|
|
Joined: Sep 2003
Posts: 4,883 Likes: 12
Forum Member
|
OP
Forum Member
Joined: Sep 2003
Posts: 4,883 Likes: 12 |
*FILENAME: merge-orient-trajectory.inp *PURPOSE: merge trajectories, orienting wrt initial protein coordinates, and removing solvent *AUTHOR: Lennart Nilsson, Karolinska Institutet, October 2003 * !unix environment variable CHM_HOME points to CHARMM installation directory read rtf card name $CHM_HOME/toppar/top_all22_prot.inp read para card name $CHM_HOME/toppar/par_all22_prot.inp read psf card name my_psf.psf read coor card name my_reference.crd ! put reference coordinates into comparison set as well coor copy comp ! Initial trajectory open unit 51 read unform name traj_1.cor open unit 52 read unform name traj_2.cor ! New, merged trajectory open unit 81 write unform name traj_orient_nosolv.cor merge first 51 nunit 2 output 81 skip 500 - ! one frame/ps is all we need sele segid prot end orient mass sele segid prot .and. .not. hydrogen end ! first selection picks up those atoms that will be written to new trajectory ! second selection is used in the least squares re-orienting of each frame
! save new psf that is compatible with the new trajectory delete atom sele .not. segid prot end
write psf card name new_psf.psf * psf after deleting everything but the protein segment *
Lennart Nilsson Karolinska Institutet Stockholm, Sweden
|
|
|
|
Joined: Oct 2012
Posts: 24
Forum Member
|
Forum Member
Joined: Oct 2012
Posts: 24 |
I only want to remove water. Can I remove these lines:
sele segid prot end orient mass sele segid prot .and. .not. hydrogen end ! first selection picks up those atoms that will be written to new trajectory ! second selection is used in the least squares re-orienting of each frame
|
|
|
|
Joined: Sep 2003
Posts: 4,883 Likes: 12
Forum Member
|
OP
Forum Member
Joined: Sep 2003
Posts: 4,883 Likes: 12 |
No. This is the merge command you need: merge first 51 nunit 2 output 81 skip 500 sele segid prot end
Lennart Nilsson Karolinska Institutet Stockholm, Sweden
|
|
|
|
Joined: Oct 2012
Posts: 24
Forum Member
|
Forum Member
Joined: Oct 2012
Posts: 24 |
Thanks. Can the trajectory be .dcd (NAMD) instead of .cor ?
|
|
|
|
Joined: Sep 2003
Posts: 8,658 Likes: 26
Forum Member
|
Forum Member
Joined: Sep 2003
Posts: 8,658 Likes: 26 |
File extensions are not important for CHARMM, only VMD, and for that app, .cor implies a formatted coordinate file, not a trajectory.
If the trajectory you wish to process has a protein and the initial PSF was not made with CHARMM and exported as an X-PLOR PSF, there may be problems, esp. with any subsequent analysis using CHARMM.
Rick Venable computational chemist
|
|
|
|
Joined: Oct 2012
Posts: 24
Forum Member
|
Forum Member
Joined: Oct 2012
Posts: 24 |
I want to merge 94 trajectory files, but this cannot be done in one script without exceeding 99 unit numbers. I merged into 3 parts and then tried to merge the 3 parts. The default skip is 2ooo, but I changed it to 8ooo because I want it compressed.
I get an error when combining the files: "At line 959 of file dynio.f Fortran runtime error: End of file"
The script to combine
stream toppar.str
read psf card name "/export/lustre_1/dpc/sim1/w-dpc-1.psf" open unit 2 card read name "/export/lustre_1/dpc/sim1/w-dpc-1.pdb" read coor pdb resid unit 2
! put reference coordinates into comparison set as well coor copy comp
open unit 50 read unform name traj_part1.cor open unit 51 read unform name traj_part2.cor open unit 52 read unform name traj_part3.cor
open unit 40 write unform name traj_part1_2_3.cor
merge first 50 nunit 3 output 40 skip 8000
|
|
|
|
Joined: Sep 2003
Posts: 4,883 Likes: 12
Forum Member
|
OP
Forum Member
Joined: Sep 2003
Posts: 4,883 Likes: 12 |
You can open more than 99 files; I recommend starting with unit numbers above 100.
The error message you get means that there is less data in one of the three files than what is indicated in its header. Are the files OK? Perhaps something went wrong in the preceding merge?
It is best to post the complete output.
Lennart Nilsson Karolinska Institutet Stockholm, Sweden
|
|
|
|
Joined: Oct 2012
Posts: 24
Forum Member
|
Forum Member
Joined: Oct 2012
Posts: 24 |
In that case i will use the units above 100 and avoid this idea. The problem maybe was skipping.
One more question: Say i merge X trajectories-default skip is 2ooo, but I use 32ooo. I load in VMD and it shows a total of 1438 frames. At frame 600, something interesting happens. What trajectory file did this occur in? (600/1438)*X
|
|
|
|
Joined: Sep 2003
Posts: 8,658 Likes: 26
Forum Member
|
Forum Member
Joined: Sep 2003
Posts: 8,658 Likes: 26 |
The number of frames per file is needed.
It's easier to determine if (requested_SKIP/default_SKIP) divides evenly into the number of frames per file.
Rick Venable computational chemist
|
|
|
|
Joined: Oct 2012
Posts: 24
Forum Member
|
Forum Member
Joined: Oct 2012
Posts: 24 |
VMD shows 250 frames per trajectory (unmodified trajectory)
|
|
|
|
|
|