Re: running a calculation during simulation

From: Josh Vermaas (
Date: Mon Oct 20 2014 - 16:38:57 CDT

Hi Brad,

The NAMD input is one giant tcl script, so in principle instead of
issuing one "run" command at the end, you could put it in a for loop and
do something at a regular interval. That way:

for { set i 0 } { $i < 100 } { incr i } {
run 1000
#Do something else here

Another approach, because density is special, is to make your XSTfreq
significantly shorter than your DCD freq, which will tell you how big
your periodic boundary box is for free without needing a big file write.

However, wouldn't all of your samples be correlated anyway? Standard
errors only decrease with more *uncorrelated* samples, and for most of
the quantities of interest to me, I've measured their correlation times
to be several orders of magnitude larger than the default dcdfreq.

-Josh Vermaas

On 10/20/2014 04:08 PM, wrote:
> Hi,
> I am looking to use the coordinates of a selection of atoms in my
> simulation at a sampling rate considerably higher than that of the
> dcdfreq. I was wondering if there was a way to run a tcl script
> concurrently with the simulation. Specifically, I am trying to calculate a
> one-dimensional density of atoms averaged more frequently than I am
> writing all the atoms to the dcd.
> -Brad

This archive was generated by hypermail 2.1.6 : Wed Dec 31 2014 - 23:22:56 CST