Re: scriptedColvarForces doesn't work in recent NAMD builds

From: Giacomo Fiorin (giacomo.fiorin_at_gmail.com)
Date: Thu Apr 12 2018 - 11:55:59 CDT

Hi Jeff, that's possible, but it would not cover the case when both
boundaries are defined because you're doing metadynamics or ABF, but only
one wall should be defined. We could use the value of the lower/upper
force constant to identify such cases: but then, you would always need to
specify both force consants separately, and not be able to use a single
force constant, as the new harmonicWalls lets you do.

If you can identify a logic that is fully backward-compatible (as the fixed
code should have been - thanks again for the bug report), I'm happy to
include it in the next update.

To avoid entering repeated values: with the cv command you can inline
pretty much the entire Colvars configuration in the NAMD script, and use
Tcl variables to hold any value that you'd like to use simultaneously for
two distinct options (like a grid boundary and the position of a wall).

Giacmo

On Thu, Apr 12, 2018 at 9:14 AM, Jeff Comer <jeffcomer_at_gmail.com> wrote:

> Thanks, Giacomo! My only reason to prefer the old way
> (lowerWallConstant/upperWallConstant in the colvar definition) is that
> including a harmonicWalls means that I have to specify the same
> lowerBoundary and upperBoundary twice, which gives me two things to
> change when I change the boundaries. Could the lowerBoundary and
> upperBoundary of harmonicWalls default to the corresponding value of
> their colvar?
>
> Jeff
>
> –––––––––––––––––––––––––––––––––––———————
> Jeffrey Comer, PhD
> Assistant Professor
> Institute of Computational Comparative Medicine
> Nanotechnology Innovation Center of Kansas State
> Kansas State University
> Office: P-213 Mosier Hall
> Phone: 785-532-6311
> Website: http://jeffcomer.us
>
>
> On Wed, Apr 11, 2018 at 3:09 PM, Giacomo Fiorin
> <giacomo.fiorin_at_gmail.com> wrote:
> > Hi Jeff, I just uploaded the fix and am about to send it to the NAMD
> > repository, which would make it available in the next nightly build.
> Thanks
> > for pointing out the error!
> >
> > With the fix you probably don't need to use a harmonicWalls bias and keep
> > going with the old input if the walls are supposed to be fixed. You
> should
> > consider using it in the future, though, as you can now change the force
> > constant of the wall over time like with harmonic restraints.
> >
> > Giacomo
> >
> >
> > On Wed, Apr 11, 2018 at 1:12 PM, Jérôme Hénin <jerome.henin_at_ibpc.fr>
> wrote:
> >>
> >> Thanks Jeff, I see what the problem is. I think a workaround for now is
> to
> >> specify the wall potentials of your colvars as a separate instance of
> >> harmonicWalls bias, and remove the upper/lowerWall keywords.
> >>
> >> This should be an easy fix, but I can't do it right away.
> >>
> >> Best,
> >> Jerome
> >>
> >>
> >>
> >> On 11 April 2018 at 18:51, Jeff Comer <jeffcomer_at_gmail.com> wrote:
> >>>
> >>> Thanks, Jerome. I've attached an example system. Running NAMD 2.12 on
> >>> "test_funnel_amber.0.namd" gives log file output from
> >>> calc_colvar_forces, while running recent NAMD builds on it do not.
> >>> Maybe I am doing something unusual?
> >>>
> >>> Jeff
> >>>
> >>> –––––––––––––––––––––––––––––––––––———————
> >>> Jeffrey Comer, PhD
> >>> Assistant Professor
> >>> Institute of Computational Comparative Medicine
> >>> Nanotechnology Innovation Center of Kansas State
> >>> Kansas State University
> >>> Office: P-213 Mosier Hall
> >>> Phone: 785-532-6311
> >>> Website: http://jeffcomer.us
> >>>
> >>>
> >>> On Wed, Apr 11, 2018 at 11:26 AM, Jérôme Hénin <jerome.henin_at_ibpc.fr>
> >>> wrote:
> >>> > Hi Jeff,
> >>> >
> >>> > This is the first report I see of such an issue. I have just tested
> it
> >>> > with
> >>> > both NAMD 2.12 and a recent build, so it must be a more specific
> >>> > problem.
> >>> > Can you send your NAMD and colvars input?
> >>> >
> >>> > Thanks,
> >>> > Jerome
> >>> >
> >>> > On 11 April 2018 at 18:04, Jeff Comer <jeffcomer_at_gmail.com> wrote:
> >>> >>
> >>> >> I'm not sure whether this is a Colvars problem or a NAMD problem.
> >>> >>
> >>> >> My Colvars configuration file includes "scriptedColvarForces on". In
> >>> >> my NAMD configuration file, I have defined the proc
> calc_colvar_forces
> >>> >> to print some information to the log file and apply a restraint
> >>> >> force. Using NAMD_2.12 (multcore or multicore CUDA), this works
> fine.
> >>> >> The status information is written to the log file and the effects of
> >>> >> the force are clearly seen in the trajectory. For recent NAMD
> builds,
> >>> >> for example, NAMD_Git-2018-04-06_Linux-x86_64-multicore, no
> >>> >> information from calc_colvar_forces appears in the log file and the
> >>> >> force is not applied.
> >>> >>
> >>> >> I looked in the Colvars GitHub, but didn't find a clear reference to
> >>> >> this issue. Is this something I can fix by recompiling NAMD with a
> >>> >> newer Colvars version? Is there a work-around?
> >>> >>
> >>> >> Thanks!
> >>> >> Jeff
> >>> >>
> >>> >> –––––––––––––––––––––––––––––––––––———————
> >>> >> Jeffrey Comer, PhD
> >>> >> Assistant Professor
> >>> >> Institute of Computational Comparative Medicine
> >>> >> Nanotechnology Innovation Center of Kansas State
> >>> >> Kansas State University
> >>> >> Office: P-213 Mosier Hall
> >>> >> Phone: 785-532-6311
> >>> >> Website: http://jeffcomer.us
> >>> >>
> >>> >
> >>
> >>
> >
> >
> >
> > --
> > Giacomo Fiorin
> > Associate Professor of Research, Temple University, Philadelphia, PA
> > Contractor, National Institutes of Health, Bethesda, MD
> > http://goo.gl/Q3TBQU
> > https://github.com/giacomofiorin
>

-- 
Giacomo Fiorin
Associate Professor of Research, Temple University, Philadelphia, PA
Contractor, National Institutes of Health, Bethesda, MD
http://goo.gl/Q3TBQU
https://github.com/giacomofiorin

This archive was generated by hypermail 2.1.6 : Tue Dec 31 2019 - 23:19:50 CST