Re: tclforces: switch from md with external forces to standard md

From: Jerome Henin (
Date: Fri Jan 09 2009 - 10:24:24 CST

Hi all,

On Thu, Jan 8, 2009 at 2:38 PM, Peter Freddolino <> wrote:
> Hi Vlad,
> the forces are not cumulative, but they may persist until changed.

One may or may not call this a bug, but... what would it cost to fix it?


> Adding a zero force to each atom when you want to turn off the forces
> should fix things.
> Best,
> Peter
> Vlad Cojocaru wrote:
>> Dear namd users,
>> I have another question regarding tclforces.
>> I would like that my tcl script switches at specific intervals between
>> simulation with external forces and standard md simulation.
>> So, I introduced a flag and invoked the "addforce" command only if the
>> flag is defined. After each stint with external forces, I unset the
>> flag and reset it after the standard md steps.
>> However, I noticed that once the switch occurs, the external force
>> does not disappear. In fact the value given by loadforces command
>> stays constant during the standard md part and equals the last value
>> from the part with external forces. From the trajectory, I guess that
>> the external force is still being applied on my system even during the
>> desired standard md simulation part.
>> Am I right here? Does "addforce" actually adds up forces added at each
>> time step ?
>> If yes, is it possible to alter this behavior and reset the external
>> force to 0 after specific intervals ?
>> Thanks for answering
>> Merry Christmas and Happy New Year to all of you.
>> Vlad

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:52:14 CST