From: Giacomo Fiorin (
Date: Thu Apr 23 2020 - 19:00:11 CDT

Hi Shashank, thanks for specifying the reweighting method that you want to

In many cases people would either wait until after all the basins have been
filled, and then either take the average of multiple snapshots of
metadynamics to get a PMF, or in the case of well-tempered metadynamics use
its final snapshot (because the WT variant was designed specifically to
converge and avoid taking the average). After getting a PMF, you can bin
it against any variables you want, as long as you use the Boltzmann
probability consistently: p(x1)dx1 = p(x2)dx2. This has been the
traditional route with many free-energy methods (not just metadynamics).

The Tiwary paper that you cited tries to avoid assuming that there is
significant simulation data after the metadynamics bias has converged, and
tries to extract information from the trajectory before that point. In
that case, the metadynamics bias and the PMF are not equivalent at any
given time, so you need the biasing potential for every trajectory frame.

In Colvars, to get the biasing energy as a function of the trajectory you
need outputEnergy defined for metadynamics during the simulation: if you
didn't have it while running that's not immediately possible after the
fact. In the Colvars state file or in the PMF file you get the total bias
at that simulation time, but it is not broken down into individual hills.
So you could either:

A) Use the approximation that the bias doesn't change too quickly between
restarts (especially in the last stages of WT-MTD) and before processing
each trajectory chunk in VMD load the most recent state file for Colvars.
You can get the metadynamics biasing energy for any trajectory frame (or
any other configuration, for that matter). You can use for this the Tcl
command "cv bias <name> energy" in VMD 1.9.3 onwards (see:,
or the Colvars Dashboard that is included in the 1.9.4 alpha builds of VMD.

B) Reconstruct a trajectory for the individual hills and feed it to the
sum_hills utility from PLUMED. This is easy to do for metadynamics with
constant weight, but for well-tempered the weight changes. I'm not sure if
the well-tempered correction can be applied by sum_hills itself (can you
find out?). If not, I can look into making it possible to re-generate the
trajectory of the hills in VMD, provided that your colvars.traj or DCD
files are sufficiently finely binned. This would require waiting for the
next alpha build or compiling an updated VMD yourself, which may not be too
difficult at your institution :-)


On Thu, Apr 23, 2020 at 3:42 PM Pant, Shashank <> wrote:

> Hello,
> I am looking for suggestions/help in extracting out the bias from
> well-tempered metadynamics simulations in COLVARS.
> *To add more details*: I have performed well-tempered metadynamics on a
> system and I would to project the free-energy surfaces on a different RCs--000000000000c4a87605a3fe0e37--