RE: looping on multiple dcds in namd configuration file

From: Vermaas, Joshua (Joshua.Vermaas_at_nrel.gov)
Date: Fri Nov 15 2019 - 11:26:19 CST

Can't you do something like this in your interaction.namd script?

# First frame saved was frame 1000.
set ts 0
foreach dcdfile [list file1.dcd file2.dcd file3.dcd] {
coorfile open dcd $dcdfile.dcd
# Read all frames until nonzero is returned.
while { ![coorfile read] } {
# Set firstTimestep so our energy output has the correct TS.
firstTimestep $ts
# Compute energies and forces, but donít try to move the atoms.
run 0
incr ts 1
}
coorfile close
}

I think that would do what you wanted to.

-Josh

On 2019-11-15 05:31:14-07:00 owner-namd-l_at_ks.uiuc.edu wrote:

Dear Miro,
Thank you for your reply, but as far as I know bigdcd can only be used within vmd. Please let me know in a bit detail, if it can be used for pair interaction calculation in namd also. I am attaching the configuration file I used for the pair interaction calculation on a single dcd, so that you have a better idea about my problem. Is it possible to use bigdcd in this configuration file?
________________________________
From: Miro Astore <miro.astore_at_gmail.com>
Sent: Friday, November 15, 2019 4:52 PM
To: SHIVAM TIWARI <t.shivam_at_iitg.ac.in>
Cc: Namd Mailing List <namd-l_at_ks.uiuc.edu>
Subject: Re: namd-l: looping on multiple dcds in namd configuration file
There is also bigdcd which can read one frame at a time and just loops through arbitrary length files. https://www.ks.uiuc.edu/Research/vmd/script_library/scripts/bigdcd/

On Fri., 15 Nov. 2019, 17:59 SHIVAM TIWARI, <t.shivam_at_iitg.ac.in<mailto:t.shivam_at_iitg.ac.in>> wrote:
Dear Miro,
Thank you for your reply, but I know about catdcd. But my trajectory is quite large (about a 90 gb in total), and I have four trajectory like that. So I was thinking about avoiding to use catdcd, as even after merging the files, I have to upload the merged trajectory on the hpc for calculations (I don't have vmd installed on the hpc here). So I was thinking I can avoid all this if there is another way available.
regards
shivam
________________________________
From: Miro Astore <miro.astore_at_gmail.com<mailto:miro.astore_at_gmail.com>>
Sent: Friday, November 15, 2019 12:14 PM
To: Namd Mailing List <namd-l_at_ks.uiuc.edu<mailto:namd-l_at_ks.uiuc.edu>>; SHIVAM TIWARI <t.shivam_at_iitg.ac.in<mailto:t.shivam_at_iitg.ac.in>>
Subject: Re: namd-l: looping on multiple dcds in namd configuration file
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 https://www.ks.uiuc.edu/Research/vmd/current/ug/node121.html
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 <t.shivam_at_iitg.ac.in<mailto:t.shivam_at_iitg.ac.in>> 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 : Tue Dec 31 2019 - 23:21:01 CST