VES_DELTA_F
This is part of the ves module
It is only available if you configure PLUMED with ./configure –enable-modules=ves . Furthermore, this feature is still being developed so take care when using it and report any problems on the mailing list.

Implementation of VES \(\Delta F\) method [61] (step two only).

Warning
Notice that this is a stand-alone bias Action, it does not need any of the other VES module components

First you should create some estimate of the local free energy basins of your system, using e.g. multiple METAD short runs, and combining them with the sum_hills utility. Once you have them, you can use this bias Action to perform the VES optimization part of the method.

These \(N+1\) local basins are used to model the global free energy. In particular, given the conditional probabilities \(P(\mathbf{s}|i)\propto e^{-\beta F_i(\mathbf{s})}\) and the probabilities of being in a given basin \(P_i\), we can write:

\[ e^{-\beta F(\mathbf{s})}\propto P(\mathbf{s})=\sum_{i=0}^N P(\mathbf{s}|i)P_i \, . \]

We use this free energy model and the chosen bias factor \(\gamma\) to build the bias potential: \(V(\mathbf{s})=-(1-1/\gamma)F(\mathbf{s})\). Or, more explicitly:

\[ V(\mathbf{s})=(1-1/\gamma)\frac{1}{\beta}\log\left[e^{-\beta F_0(\mathbf{s})} +\sum_{i=1}^{N} e^{-\beta F_i(\mathbf{s})} e^{-\beta \alpha_i}\right] \, , \]

where the parameters \(\boldsymbol{\alpha}\) are the \(N\) free energy differences (see below) from the \(F_0\) basin.

By default the \(F_i(\mathbf{s})\) are shifted so that \(\min[F_i(\mathbf{s})]=0\) for all \(i=\{0,...,N\}\). In this case the optimization parameters \(\alpha_i\) are the difference in height between the minima of the basins. Using the keyword NORMALIZE, you can also decide to normalize the local free energies so that \(\int d\mathbf{s}\, e^{-\beta F_i(\mathbf{s})}=1\). In this case the parameters will represent not the difference in height (which depends on the chosen CVs), but the actual free energy difference, \(\alpha_i=\Delta F_i\).

However, as discussed in Ref. [61], a better estimate of \(\Delta F_i\) should be obtained through the reweighting procedure.

Examples

The following performs the optimization of the free energy difference between two metastable basins:

Click on the labels of the actions for more information on what each action computes
tested on v2.7
cv: DISTANCE 
ATOMS
the pair of atom that we are calculating the distance between.
=1,2 ves: VES_DELTA_F ...
ARG
the input for this action is the scalar output from one or more other actions.
=cv
TEMP
temperature is compulsory, but it can be sometimes fetched from the MD engine
=300
FILE_F0
compulsory keyword names of files containing local free energies and derivatives.
=fesA.data
FILE_F1
compulsory keyword names of files containing local free energies and derivatives.
=fesB.data
BIASFACTOR
compulsory keyword ( default=0 ) the \f$\gamma\f$ bias factor used for well-tempered target \f$p(\mathbfs)\f$.
=10.0
M_STEP
compulsory keyword ( default=1.0 ) the \f$\mu\f$ step used for the \f$\Omega\f$ functional minimization
=0.1
AV_STRIDE
compulsory keyword ( default=500 ) number of simulation steps between alpha updates
=500
PRINT_STRIDE
( default=10 ) stride for printing to ALPHA_FILE
=100 ... PRINT
FMT
the format that should be used to output real numbers
=%g
STRIDE
compulsory keyword ( default=1 ) the frequency with which the quantities of interest should be output
=500
FILE
the name of the file on which to output these quantities
=Colvar.data
ARG
the input for this action is the scalar output from one or more other actions.
=cv,ves.bias,ves.rct

The local FES files can be obtained as described in Sec. 4.2 of Ref. [61], i.e. for example:

  • run 4 independent metad runs, all starting from basin A, and kill them as soon as they make the first transition (see e.g. COMMITTOR)
  • cat HILLS* > all_HILLS 
  • plumed sum_hills --hills all_HILLS --outfile all_fesA.dat --mintozero --min 0 --max 1 --bin 100 
  • awk -v n_rep=4 '{if($1!="#!" && $1!="") {for(i=1+(NF-1)/2; i<=NF; i++) $i/=n_rep;} print $0}' all_fesA.dat > fesA.data 

The header of both FES files must be identical, and should be similar to the following:

#! FIELDS cv file.free der_cv
#! SET min_cv 0
#! SET max_cv 1
#! SET nbins_cv  100
#! SET periodic_cv false
0 1000 0
[ ... ]
#! FIELDS cv file.free der_cv
#! SET min_cv 0
#! SET max_cv 1
#! SET nbins_cv  100
#! SET periodic_cv false
0 1000 0
[ ... ]
Glossary of keywords and components
Description of components

By default this Action calculates the following quantities. These quantities can be referenced elsewhere in the input by using this Action's label followed by a dot and the name of the quantity required from the list below.

Quantity Description
bias the instantaneous value of the bias potential
rct the reweighting factor \(c(t)\)
work the work done by the bias in one AV_STRIDE
Compulsory keywords
FILE_F names of files containing local free energies and derivatives. The first one, FILE_F0, is used as reference for all the free energy differences. You can use multiple instances of this keyword i.e. FILE_F1, FILE_F2, FILE_F3...
BIASFACTOR ( default=0 ) the \(\gamma\) bias factor used for well-tempered target \(p(\mathbf{s})\). Set to 0 for non-tempered flat target
M_STEP ( default=1.0 ) the \(\mu\) step used for the \(\Omega\) functional minimization
AV_STRIDE ( default=500 ) number of simulation steps between alpha updates
ALPHA_FILE ( default=ALPHA ) file name for output minimization parameters
Options
NUMERICAL_DERIVATIVES ( default=off ) calculate the derivatives for these quantities numerically
NORMALIZE ( default=off ) normalize all local free energies so that alpha will be (approx) \(\Delta F\)
NO_MINTOZERO ( default=off ) leave local free energies as provided, without shifting them to zero min
DAMPING_OFF ( default=off ) do not use an AdaGrad-like term to rescale M_STEP
SERIAL ( default=off ) perform the calculation in serial even if multiple tasks are available
MULTIPLE_WALKERS

( default=off ) use multiple walkers connected via MPI for the optimization

ARG the input for this action is the scalar output from one or more other actions. The particular scalars that you will use are referenced using the label of the action. If the label appears on its own then it is assumed that the Action calculates a single scalar value. The value of this scalar is thus used as the input to this new action. If * or *.* appears the scalars calculated by all the proceeding actions in the input file are taken. Some actions have multi-component outputs and each component of the output has a specific label. For example a DISTANCE action labelled dist may have three components x, y and z. To take just the x component you should use dist.x, if you wish to take all three components then use dist.*.More information on the referencing of Actions can be found in the section of the manual on the PLUMED Getting Started. Scalar values can also be referenced using POSIX regular expressions as detailed in the section on Regular Expressions. To use this feature you you must compile PLUMED with the appropriate flag. You can use multiple instances of this keyword i.e. ARG1, ARG2, ARG3...
TEMP temperature is compulsory, but it can be sometimes fetched from the MD engine
TG_STRIDE ( default=1 ) number of AV_STRIDE between updates of target \(p(\mathbf{s})\) and reweighing factor \(c(t)\)
TAU_MEAN exponentially decaying average for alpha (rescaled using AV_STRIDE). Should be used only in very specific cases
INITIAL_ALPHA ( default=0 ) an initial guess for the bias potential parameter alpha
PRINT_STRIDE ( default=10 ) stride for printing to ALPHA_FILE
FMT specify format for ALPHA_FILE
RESTART allows per-action setting of restart (YES/NO/AUTO)