Topic Options
#6655 - 05/14/05 02:10 PM Help with Script to calculate trajectory rms matrix
Leonardo Offline
Forum Member

Registered: 03/17/05
Posts: 42
Loc: Chile-Santiago
hello

I would like to create a rms matrix for my trajectory (a matrix where entry aij is the rms beetween the i-th and j-th trajectory frame) I Thought it would be done using a loop over traj read (dynamc.doc) defining each coordinate frame as the comparison cordinate, and then using correl rms to obtain the rms time series related to the traj read strucure, and then combining the outputs into a matrix. To do it, I used a mixture from lennart's rms-rgyr.inp and other scripts:

*FILENAME: Rmsd-Matrix.inp
*PURPOSE: compute
*AUTHOR: Lennart Nilsson, Karolinska Institutet, October 2003

read rtf card name $CHM_PGI_HOME/toppar/top_all22_prot.inp
read para card name $CHM_PGI_HOME/toppar/par_all22_prot.inp
read psf card name "1YPC-din35.psf"

open unit 51 read unform name din35-merged.dcd

!OPENING TRAJECTORY TO BE READED WITH TRAJ READ
trajectory firstu 51 nunit 1 skip 1000 begin 1000 stop 125000
set counter 1
label loop
!DEFINING THAT EACH FRAME IS GOING TO BE CONSIDERED THE COMPARISON COORDINATE
trajectory read comp
open unit 11 write form name frame@counter.dat
write title unit 11
* time rmsd
*
correl maxtime 10000
enter v1 rms
traj firstu 51 nunit 1 begin 1000 skip 1000 stop 125000
write v1 dumb time unit 11
*hi
*
end
incr counter by 1
if counter lt 126 goto loop
stop

the code works well in the first iteration, but when it read "trajectory read comp" for the second time it exits without FORTRAN STOP or any complain. I thougt the problem would be in using a same trajectory in two loops, so I try to read the .dcd file twice using another open statement into a second unit (i.e, unit 52), but the program exits with FORTRAN STOP. I dont know how this can be fixed. Can someone give me a hand???

Gracias, gracias

leonardo


Edited by Leonardo (05/14/05 02:12 PM)
_________________________
Leonardo Sepulveda Durán Universidad de Chile

Top
#6656 - 05/14/05 02:50 PM Re: Help with Script to calculate trajectory rms matrix [Re: Leonardo]
rmv Online   content

Forum Member

Registered: 09/17/03
Posts: 8373
Loc: 39 03 48 N, 77 06 54 W
Try using a different unit number for the TRAJ READ setup; the job quits because you've used the same unit number both for that and within CORREL.
_________________________
Rick Venable
computational chemist


Top
#6657 - 05/14/05 03:44 PM Re: Help with Script to calculate trajectory rms matrix [Re: Leonardo]
lennart Online   content

Forum Member

Registered: 09/25/03
Posts: 4741
Loc: ~ 59N, 15E
try the RMSDyn command instead, it does exactly this.
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top
#6658 - 05/14/05 04:01 PM Re: Help with Script to calculate trajectory rms matrix [Re: lennart]
rmv Online   content

Forum Member

Registered: 09/17/03
Posts: 8373
Loc: 39 03 48 N, 77 06 54 W
The RMSDyn command is described in dynamc.doc

Top

Moderator:  chmgr, John Legato, petrella