hi, I have several dcd trajectory files to analyse by my own codes, yet I meet a problem.
my own scripts is:(bash programming)

for ((i=1;i<=$end;i++))
do
charmm <getpdb.inp>getpdb.out (this will produce $i.pdb)
my codes $i.pdb
done


In the above scripts, I would like to produce ONE frame for each loop, so my getpdb.inp is:

!Read topology and parameter
open read card unit 10 name toph19.inp
read rtf card unit 10

open read card unit 20 name param19.inp
read para card unit 20


!Read PSF and initial/reference coordinates
read psf card name protein.psf
read coor pdb resid name protein.pdb
coor copy comp

!Open file unit for trajectory
open read unit 13 file name run1.dcd
open read unit 14 file name run2.dcd
open read unit 15 file name run3.dcd
open read unit 16 file name run4.dcd
open read unit 17 file name run5.dcd

TRAJECTORY FIRSTU 13 NUNIT 5 IREAD BEGIN 500 STOP 500 SKIP 1
TRAJ READ
OPEN WRITE CARD UNIT 12 NAME ${i}.pdb
WRITE COOR PDB UNIT 12
CLOSE UNIT 12

STOP

In each trajectory, there are

READING TRAJECTORY FROM UNIT 13
NUMBER OF COORDINATE SETS IN FILE: 100000
NUMBER OF PREVIOUS DYNAMICS STEPS: 500
FREQUENCY FOR SAVING COORDINATES: 500
NUMBER OF STEPS FOR CREATION RUN: 50000000


It is that OK when I set "begin 500 stop 500", but when I set "begin 50000500 stop 50000500" (I want to get the first frame of trajectory run2.dcd), I got the wrong pdb in which there is no coordinate information, just like:

ATOM 1 HT1 THR 1 ************************ 1.00 0.00 PROA
ATOM 2 HT2 THR 1 ************************ 1.00 0.00 PROA
ATOM 3 N THR 1 ************************ 1.00 1.00 PROA
ATOM 4 HT3 THR 1 ************************ 1.00 0.00 PROA
ATOM 5 CA THR 1 ************************ 1.00 1.00 PROA


Someone can help me to figure out this problem? Thanks


Last edited by zzlai; 05/09/11 10:09 PM.