Re: [MetaD; namd 2.9] Pmf output file problem once the CV boundaries are reached, even using "expandBoundaries on"

From: Robert Elder (
Date: Sun Nov 18 2012 - 15:53:46 CST

Hello again NAMD users,

I am experiencing the same problem that Salvatore Cosseddu describes below:
using NAMD 2.9 for metadynamics with expandBoundaries on, the program
correctly expands the boundaries of the metadynamics bias (in the .state
file) but does not expand the boundaries of the PMF it generates from the
bias. I've looked through the source code and can't determine why this is
the case. At first, I thought this might be related to my use of
replica-exchange combined with metadynamics, but since it also occurred in
the case below I don't think that's the case.

It's easy enough to rebuild the PMF from the bias energy recorded in the
state file, but I'm hoping there's an even easier patch I can apply to the
code! :)

As a small piece of advice for others, you might consider making your
specified grid much larger than the values you expect your collective
variable(s) to explore. That way, you won't have to worry about the grid
changing size. There isn't a significant cost for doing so (right?) and it
will simplify the use of the output later, for plotting etc. And it serves
as a quick fix for the problem I've described here. Additionally, don't
forget (like I did) that the hills will extend beyond the boundaries even
if their centers are located within the boundaries, e.g. even for
quantities like end-to-end distance that cannot go below zero, there will
be energy recorded for negative values.

Best regards, and thanks very much for your help,

Robert Elder
PhD Student, Chemical and Biological Engineering
University of Colorado-Boulder

On Fri, Sep 7, 2012 at 10:38 AM, Giacomo Fiorin <>wrote:

> Hello Salvatore, what is your configuration file? Send it off list if
> you'd like to.
> Giacomo
> On Fri, Sep 7, 2012 at 8:49 AM, Salvatore Mario Cosseddu <
>> wrote:
>> Dear all,
>> I'm using namd2.9 colvar module for metaD calculations.
>> Once the colvars exceed the boundaries set in the input file, the output
>> file does not adjust the grid size, even using "expandBoundaries on"
>> Everything worked fine using version 2.8, the problem started with
>> version 2.9. I'm attaching an example of PMF and the trajectories of che
>> CVs (in that case well-tempered MetaD, the boundaries are:
>> CV1: 2.1-15
>> CV2: 0.5 - 7.1 exceeded to over 8)
>> I'm thinking to rebuild the PMF from the gaussian trajectories, but I'd
>> like to let you know this problem in advance, in order to avoid wasting
>> time in the case of a deeper problem.
>> Regards, and thanks again for your work and help
>> Salvatore
>> --
>> Salvatore Cosseddu
>> PhD student
>> Centre for Scientific Computing and School of Engineering
>> University of Warwick
>> Coventry CV4 7AL
>> United Kingdom
>> email:

This archive was generated by hypermail 2.1.6 : Mon Dec 31 2012 - 23:22:16 CST