Re: Question about applying external force

From: Jérôme Hénin (jerome.henin_at_ibpc.fr)
Date: Mon Mar 06 2017 - 14:23:24 CST

Hi Sebastian,

This sounds like a job for a scripted collective variable restraint.
<http://colvars.github.io/colvars-refman-namd/colvars-refman-namd.html#x1-810006.10>

Define a variable named d made of a distance component between the two
molecules, enable scriptedColvarForces, and then this Tcl procedure should
do the trick:

proc calc_colvar_forces { ts } {
  set omega 42.
  set A 42.
  cv colvar d addforce [expr {$A * cos($omega * $ts)}]
}

Best,
Jerome

On 6 March 2017 at 20:56, The Cromicus Productions <
thecromicusproductions_at_gmail.com> wrote:

> Hi everyone,
>
> I would like to consider the center of mass of two molecules and apply a
> force F=Acos(wt) in the direction between the CMs to separate and get them
> back. Is this possible in NAMD? Any suggestion about how to do it?
> Thank you very much,
>
> Sebastian
>

This archive was generated by hypermail 2.1.6 : Mon Dec 31 2018 - 23:20:09 CST