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

From: Peter Freddolino (petefred_at_ks.uiuc.edu)
Date: Thu Jan 08 2009 - 13:38:05 CST

Hi Vlad,
the forces are not cumulative, but they may persist until changed.
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:50:20 CST