Previous Thread
Next Thread
Print Thread
Page 1 of 2 1 2
Joined: Aug 2006
Posts: 45
G
Grazia Offline OP
Forum Member
OP Offline
Forum Member
G
Joined: Aug 2006
Posts: 45
Hello

I want to merge independent trajectories into a single file using the command MERGE, but what I get is only the first trajectory.

All the starting trajectories have the same number of frames and all start after 200000 steps:
NUMBER OF COORDINATE SETS IN FILE: 16500
NUMBER OF PREVIOUS DYNAMICS STEPS: 200001
FREQUENCY FOR SAVING COORDINATES: 1
NUMBER OF STEPS FOR CREATION RUN: 16500

here the script for merging only 2 trajectories
open unit 51 read unform name traj_18.dcd
open unit 52 read unform name traj_19.dcd
open unit 81 write unform name merged_2.dcd
merge coor first 51 nunit 2 output 81 -
sele (resname PCB .or. (resid 259 .and. (atom * * CB .or. atom * * SG .or. atom * * HB1 .or. atom * * HB2))) end -
orient MASS sele ((resname PCB .and. .not. type H*) .or. (resid 259 .and. (atom * * CB .or. atom * * SG))) end

the bomblevel is -2 and I am using charmm 32b2

thanks

Grazia

Joined: Sep 2004
Posts: 57
B
Forum Member
Offline
Forum Member
B
Joined: Sep 2004
Posts: 57

Joined: Sep 2003
Posts: 8,623
Likes: 24
rmv Online Content
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 8,623
Likes: 24
Did you try specifying NFILE as the total number of coord sets desired, i.e. twice the number in each file?


Rick Venable
computational chemist

Joined: Aug 2006
Posts: 45
G
Grazia Offline OP
Forum Member
OP Offline
Forum Member
G
Joined: Aug 2006
Posts: 45
yes, I tried and the specification was ignored

Joined: Aug 2006
Posts: 45
G
Grazia Offline OP
Forum Member
OP Offline
Forum Member
G
Joined: Aug 2006
Posts: 45
Originally Posted By: Baloo


thanks for the tip. I have tried that and I was able to merge coordinate trajectories which can be read by charmm. I also need to merge velocity trajectories (in charmm I would use the command "merge vel", but it does not work with my trajectories). Which are the flags for merging velocities with catdcd?

grazia

Joined: Sep 2003
Posts: 8,623
Likes: 24
rmv Online Content
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 8,623
Likes: 24
A loop over frames in CHARMM using TRAJ READ and TRAJ WRITE (dynamc.doc) is another possibility, one which I routinely use when MERGE fails. It also works for velocity files, with the VELO keyword.


Rick Venable
computational chemist

Joined: Aug 2006
Posts: 45
G
Grazia Offline OP
Forum Member
OP Offline
Forum Member
G
Joined: Aug 2006
Posts: 45
Originally Posted By: rmv
A loop over frames in CHARMM using TRAJ READ and TRAJ WRITE (dynamc.doc) is another possibility, one which I routinely use when MERGE fails. It also works for velocity files, with the VELO keyword.


yes, but TRAJ READ / WRITE is very slow: it took 48 minutes for two trajectories and I have more of them! I am just repeating calculations done by somebody else and the same script, which was working in the past, does not work any more and it would be nice to understand why. Nevertheless thanks a lot!!!

Joined: Sep 2003
Posts: 8,623
Likes: 24
rmv Online Content
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 8,623
Likes: 24
CHARMM looping can be inefficient, esp. if the the input file is on a remote file system, e.g. an NFS mounted volume. I recommend copying the input to a local disk (on the same machine the program executes on) and writing the output log file to the same location. The output can then be compressed and copied back to the originating directory. Using /tmp or /scratch for temporary user files is a common convention at many sites.


Rick Venable
computational chemist

Joined: Aug 2006
Posts: 45
G
Grazia Offline OP
Forum Member
OP Offline
Forum Member
G
Joined: Aug 2006
Posts: 45
thanks for the information, I could increase the speed of the looping when reading files on the local disk.
But now, how do I use the loop and traj read/write commands if I want to write out coordinates and velocities of a selected group of atoms, after having re-oriented the trajectory?

With merge, the command was very simple:
merge coor first 11 nunit 25 output 99 skip 1 -
sele (selection) end -
orient MASS sele (selection2) end

I have tried various things, but I've got only rubbish....

Joined: Sep 2003
Posts: 8,623
Likes: 24
rmv Online Content
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 8,623
Likes: 24
With TRAJ READ/WRITE, the number of atoms cannot be changed, at least not directly. You should be able to create the subset before or after, probably via MERGE COOR. You could also go through intermediate single coordinate sets, which could be done in binary form.


Rick Venable
computational chemist

Page 1 of 2 1 2

Moderated by  BRBrooks, lennart, rmv 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5
(Release build 20201027)
Responsive Width:

PHP: 7.3.31-1~deb10u1 Page Time: 0.014s Queries: 35 (0.009s) Memory: 0.7813 MB (Peak: 0.8739 MB) Data Comp: Off Server Time: 2022-12-04 21:28:56 UTC
Valid HTML 5 and Valid CSS