Re: how to convert dcd files from namd to charmm

From: Alessandro Cembran (
Date: Thu Mar 15 2007 - 15:38:37 CDT

Next post we're gonna move on CHARMM forum...

Anyway, even if I've never used the ptraj tool, my first guess is that
the problem might be related to the header of the dcd file, where the
trj info is stored (i.e., number of steps and DeltaT...). It might be
that ptraj takes the header of the first trj you pasted, without
updating it for the total number of steps AFTER the pasting. Therefore,
when you "traj quer" with CHARMM, the ?star ?skip and ?stop values it
reads are those only of the first trj. Try to check that on the CHARMM
output. If that's the case, then you just have to determine the actual
number of frames you have in your trj (by summing up all the dcd you
pasted together) and tell CHARMM in the traj command your real STOP, not
the one read from the query.


Peter Freddolino wrote:
> By the "first individual one", do you mean the first frame, or the first
> trajectory?
> Peter
> wrote:
>> Hello,
>> I have another problem about trajectories from NAMD to be used in the
>> analysis with Charmm. With NAMD, the simulation was done by steps, and
>> I don´t have only one trajectory file for all the simulation, but
>> several files that I have treated with ptraj to get a total
>> trajectory. When this trajectory is used in CHARMM, the program only
>> recognizes the first individual one, and the loop used in the script
>> stops.
>> Do you have a solution for doing that Charmm reads all the steps of
>> the trajectory?
>> The script for analysis is:
>> ...
>> open read card name "top_all22_prot.inp" unit 20
>> read rtf card unit 20
>> close unit 20
>> open read card name "par_all22_prot.inp" unit 20
>> read parameter card unit 20
>> close unit 20
>> !open and read psf file
>> open read card name "4f2hc_rx.psf" unit 20
>> read psf card unit 20
>> close unit 20
>> !Set up for reading coordinate sets from trajectory and writing energy
>> data
>> open write card name "energy.tst" unit 52
>> open read file name trayectoria_10ns.dcd unit 51
>> trajectory query unit 51
>> trajectory iread 51 begin ?start skip ?skip
>> set i 1
>> !Loop for reading coordinate sets and calculating an interaction energy.
>> label loop
>> trajectory read
>> update
>> interaction select segid pro1 .and. resid 1 : 416 end -
>> select segid pro2 .and. resid 417 : 837 end unit 52
>> increment i
>> if i le ?nfile goto loop
>> stop
>> ...
>> Thank you very much for your help,
>> Rebeca García
>> Post-doctoral student
>> Barcelona
>> Spain

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:44:28 CST