Re: looping on multiple dcds in namd configuration file

From: Miro Astore (
Date: Fri Nov 15 2019 - 00:44:37 CST

If the files are not too large you can just
catdcd -o sum.dcd 1st.dcd 2nd.dcd 3rd.dcd 4th.dcd 5th.dcd

catdcd is located in vmd/plugins/LINUXAMD64/bin/catdcd5.1/catdcd

There are sometimes issues with the 1.9.3 version I have found so it is
safer to use 1.9.2. Or you can use the animate plugin

To script loading of dcd files could look something like:

mol new molecule.psf
set list {"1st.dcd" "2nd.dcd" "3rd.dcd" "4th.dcd" "5th.dcd"}
for {set i 0} {i < [llength $list]} {incr i} {
set file [lindex $list $i]
mol addfile $file

is a ham fisted way of doing it I guess

On Fri, Nov 15, 2019 at 5:35 PM SHIVAM TIWARI <> wrote:

> Dear namd users,
> Let us say I have a 100 ns simulation which is divided into multiple dcds
> of 20 ns each dcd, how can I perform pair interaction calculation for the
> whole simulation (upto 100 ns) in a single run.
> In other words , if there is a way to create a loop in the configuration
> file for pair interaction analysis, so that namd reads the dcds in the
> given sequence, and produces a single log file for the energies between the
> pairs upto 100 ns.
> regards
> shivam

This archive was generated by hypermail 2.1.6 : Thu Dec 31 2020 - 23:17:12 CST