Previous Thread
Next Thread
Print Thread
Page 1 of 3 1 2 3
merge-orient-trajectory.inp
#324 10/23/03 10:31 AM
Joined: Sep 2003
Posts: 4,762
lennart Offline OP
Forum Member
OP Offline
Forum Member
Joined: Sep 2003
Posts: 4,762
*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
Re: merge-orient-trajectory.inp
lennart #31906 05/14/13 02:27 AM
Joined: Oct 2012
Posts: 24
S
Forum Member
Offline
Forum Member
S
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

Re: merge-orient-trajectory.inp
lennart #31907 05/14/13 06:31 AM
Joined: Sep 2003
Posts: 4,762
lennart Offline OP
Forum Member
OP Offline
Forum Member
Joined: Sep 2003
Posts: 4,762
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
Re: merge-orient-trajectory.inp
lennart #31908 05/14/13 12:10 PM
Joined: Oct 2012
Posts: 24
S
Forum Member
Offline
Forum Member
S
Joined: Oct 2012
Posts: 24
Thanks.
Can the trajectory be .dcd (NAMD) instead of .cor ?

Re: merge-orient-trajectory.inp
lennart #31909 05/14/13 12:27 PM
Joined: Sep 2003
Posts: 8,424
rmv Online Content
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 8,424
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

Re: merge-orient-trajectory.inp
lennart #31970 05/23/13 03:18 AM
Joined: Oct 2012
Posts: 24
S
Forum Member
Offline
Forum Member
S
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

Re: merge-orient-trajectory.inp
lennart #31971 05/23/13 06:33 AM
Joined: Sep 2003
Posts: 4,762
lennart Offline OP
Forum Member
OP Offline
Forum Member
Joined: Sep 2003
Posts: 4,762
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
Re: merge-orient-trajectory.inp
lennart #31976 05/24/13 01:14 AM
Joined: Oct 2012
Posts: 24
S
Forum Member
Offline
Forum Member
S
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

Re: merge-orient-trajectory.inp
lennart #31977 05/24/13 02:45 AM
Joined: Sep 2003
Posts: 8,424
rmv Online Content
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 8,424
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

Re: merge-orient-trajectory.inp
rmv #31978 05/24/13 03:54 PM
Joined: Oct 2012
Posts: 24
S
Forum Member
Offline
Forum Member
S
Joined: Oct 2012
Posts: 24
VMD shows 250 frames per trajectory (unmodified trajectory)

Page 1 of 3 1 2 3

Moderated by  chmgr, John Legato, petrella 

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

PHP: 5.6.33-0+deb8u1 Page Time: 0.013s Queries: 35 (0.004s) Memory: 0.9856 MB (Peak: 1.1185 MB) Data Comp: Off Server Time: 2020-04-08 05:40:56 UTC
Valid HTML 5 and Valid CSS