This is part of the bias module

Used to performed Parallel Bias metadynamics.

This action activate Parallel Bias Metadynamics (PBMetaD) [85], a version of metadynamics [64] in which multiple low-dimensional bias potentials are applied in parallel. In the current implementation, these have the form of mono-dimensional metadynamics bias potentials:

${V(s_1,t), ..., V(s_N,t)}$

where:

$V(s_i,t) = \sum_{ k \tau < t} W_i(k \tau) \exp\left( - \frac{(s_i-s_i^{(0)}(k \tau))^2}{2\sigma_i^2} \right).$

To ensure the convergence of each mono-dimensional bias potential to the corresponding free energy, at each deposition step the Gaussian heights are multiplied by the so-called conditional term:

$W_i(k \tau)=W_0 \frac{\exp\left( - \frac{V(s_i,k \tau)}{k_B T} \right)}{\sum_{i=1}^N \exp\left( - \frac{V(s_i,k \tau)}{k_B T} \right)}$

where $$W_0$$ is the initial Gaussian height.

The PBMetaD bias potential is defined by:

$V_{PB}(\vec{s},t) = -k_B T \log{\sum_{i=1}^N \exp\left( - \frac{V(s_i,t)}{k_B T} \right)}.$

Information on the Gaussian functions that build each bias potential are printed to multiple HILLS files, which are used both to restart the calculation and to reconstruct the mono-dimensional free energies as a function of the corresponding CVs. These can be reconstructed using the sum_hills utility because the final bias is given by:

$V(s_i) = -F(s_i)$

Currently, only a subset of the METAD options are available in PBMetaD.

The bias potentials can be stored on a grid to increase performances of long PBMetaD simulations. You should provide either the number of bins for every collective variable (GRID_BIN) or the desired grid spacing (GRID_SPACING). In case you provide both PLUMED will use the most conservative choice (highest number of bins) for each dimension. In case you do not provide any information about bin size (neither GRID_BIN nor GRID_SPACING) and if Gaussian width is fixed PLUMED will use 1/5 of the Gaussian width as grid spacing. This default choice should be reasonable for most applications.

Another option that is available is well-tempered metadynamics [11]. In this variant of PBMetaD the heights of the Gaussian hills are scaled at each step by the additional well-tempered metadynamics term. This ensures that each bias converges more smoothly. It should be noted that, in the case of well-tempered metadynamics, in the output printed the Gaussian height is re-scaled using the bias factor. Also notice that with well-tempered metadynamics the HILLS files do not contain the bias, but the negative of the free-energy estimate. This choice has the advantage that one can restart a simulation using a different value for the $$\Delta T$$. The applied bias will be scaled accordingly.

Note that you can use here also the flexible Gaussian approach [25] in which you can adapt the Gaussian to the extent of Cartesian space covered by a variable or to the space in collective variable covered in a given time. In this case the width of the deposited Gaussian potential is denoted by one value only that is a Cartesian space (ADAPTIVE=GEOM) or a time (ADAPTIVE=DIFF). Note that a specific integration technique for the deposited Gaussian kernels should be used in this case. Check the documentation for utility sum_hills.

With the keyword INTERVAL one changes the metadynamics algorithm setting the bias force equal to zero outside boundary [10]. If, for example, metadynamics is performed on a CV s and one is interested only to the free energy for s > boundary, the history dependent potential is still updated according to the above equations but the metadynamics force is set to zero for s < boundary. Notice that Gaussian kernels are added also if s < boundary, as the tails of these Gaussian kernels influence VG in the relevant region s > boundary. In this way, the force on the system in the region s > boundary comes from both metadynamics and the force field, in the region s < boundary only from the latter. This approach allows obtaining a history-dependent bias potential VG that fluctuates around a stable estimator, equal to the negative of the free energy far enough from the boundaries. Note that:

• It works only for one-dimensional biases;
• It works both with and without GRID;
• The interval limit boundary in a region where the free energy derivative is not large;
• If in the region outside the limit boundary the system has a free energy minimum, the INTERVAL keyword should be used together with a UPPER_WALLS or LOWER_WALLS at boundary.

For systems with multiple CVs that share identical properties, PBMetaD with partitioned families can be used to group them under one bias potential that each contributes to [93]. This is done with a list of PF keywords, where each PF* argument contains the list of CVs from ARG to be placed in that family. Once invoked, each CV in ARG must be placed in exactly one PF, even if it results in families containing only one CV. Additionally, in cases where each of SIGMA or GRID entry would correspond to each ARG entry, they now correspond to each PF and must be adjusted accordingly.

Multiple walkers [95] can also be used. See below the examples.

Examples

The following input is for PBMetaD calculation using as collective variables the distance between atoms 3 and 5 and the distance between atoms 2 and 4. The value of the CVs and the PBMetaD bias potential are written to the COLVAR file every 100 steps.

Click on the labels of the actions for more information on what each action computes
d1: DISTANCE ATOMSthe pair of atom that we are calculating the distance between. =3,5
d2: DISTANCE ATOMSthe pair of atom that we are calculating the distance between. =2,4
pb: PBMETAD ARGthe input for this action is the scalar output from one or more other actions. =d1,d2 SIGMAcompulsory keyword
the widths of the Gaussian hills =0.2,0.2 HEIGHTthe height of the Gaussian hills, one for all biases. =0.3 PACEcompulsory keyword
the frequency for hill addition, one for all biases =500 FILEfiles in which the lists of added hills are stored, default names are assigned using
PRINT ARGthe input for this action is the scalar output from one or more other actions. =d1,d2,pb.bias STRIDEcompulsory keyword ( default=1 )
the frequency with which the quantities of interest should be output =100 FILEthe name of the file on which to output these quantities =COLVAR


If you use well-tempered metadynamics, you should specify a single bias factor and initial Gaussian height.
Click on the labels of the actions for more information on what each action computes
d1: DISTANCE ATOMSthe pair of atom that we are calculating the distance between. =3,5
d2: DISTANCE ATOMSthe pair of atom that we are calculating the distance between. =2,4
ARGthe input for this action is the scalar output from one or more other actions. =d1,d2 SIGMAcompulsory keyword
the widths of the Gaussian hills =0.2,0.2 HEIGHTthe height of the Gaussian hills, one for all biases. =0.3
PACEcompulsory keyword
the frequency for hill addition, one for all biases =500 BIASFACTORuse well tempered metadynamics with this bias factor, one for all biases. =8
FILEfiles in which the lists of added hills are stored, default names are assigned using
...
PRINT ARGthe input for this action is the scalar output from one or more other actions. =d1,d2,pb.bias STRIDEcompulsory keyword ( default=1 )
the frequency with which the quantities of interest should be output =100 FILEthe name of the file on which to output these quantities =COLVAR

Using partitioned families, each CV in ARG must be in exactly one family. Here, the distance between atoms 1,2 is degenerate with 2,4, but not with the distance between 3,5. Note that two SIGMA are provided to match the two PF.
Click on the labels of the actions for more information on what each action computes
d1: DISTANCE ATOMSthe pair of atom that we are calculating the distance between. =3,5
d2: DISTANCE ATOMSthe pair of atom that we are calculating the distance between. =2,4
d3: DISTANCE ATOMSthe pair of atom that we are calculating the distance between. =1,2
ARGthe input for this action is the scalar output from one or more other actions. =d1,d2,d3 SIGMAcompulsory keyword
the widths of the Gaussian hills =0.2,0.2 HEIGHTthe height of the Gaussian hills, one for all biases. =0.3
PF0specify which CVs belong in a partitioned family. =d1 PF1specify which CVs belong in a partitioned family. =d2,d3
PACEcompulsory keyword
the frequency for hill addition, one for all biases =500 BIASFACTORuse well tempered metadynamics with this bias factor, one for all biases. =8
FILEfiles in which the lists of added hills are stored, default names are assigned using
...
PRINT ARGthe input for this action is the scalar output from one or more other actions. =d1,d2,d3,pb.bias STRIDEcompulsory keyword ( default=1 )
the frequency with which the quantities of interest should be output =100 FILEthe name of the file on which to output these quantities =COLVAR

The following input enables the MPI version of multiple-walkers.
Click on the labels of the actions for more information on what each action computes
d1: DISTANCE ATOMSthe pair of atom that we are calculating the distance between. =3,5
d2: DISTANCE ATOMSthe pair of atom that we are calculating the distance between. =2,4
ARGthe input for this action is the scalar output from one or more other actions. =d1,d2 SIGMAcompulsory keyword
the widths of the Gaussian hills =0.2,0.2 HEIGHTthe height of the Gaussian hills, one for all biases. =0.3
PACEcompulsory keyword
the frequency for hill addition, one for all biases =500 BIASFACTORuse well tempered metadynamics with this bias factor, one for all biases. =8
FILEfiles in which the lists of added hills are stored, default names are assigned using
WALKERS_MPI( default=off ) Switch on MPI version of multiple walkers - not compatible with WALKERS_*
options other than WALKERS_DIR
...
PRINT ARGthe input for this action is the scalar output from one or more other actions. =d1,d2,pb.bias STRIDEcompulsory keyword ( default=1 )
the frequency with which the quantities of interest should be output =100 FILEthe name of the file on which to output these quantities =COLVAR

The disk version of multiple-walkers can be enabled by setting the number of walker used, the id of the current walker which interprets the input file, the directory where the hills containing files resides, and the frequency to read the other walkers. Here is an example
Click on the labels of the actions for more information on what each action computes
d1: DISTANCE ATOMSthe pair of atom that we are calculating the distance between. =3,5
d2: DISTANCE ATOMSthe pair of atom that we are calculating the distance between. =2,4
ARGthe input for this action is the scalar output from one or more other actions. =d1,d2 SIGMAcompulsory keyword
the widths of the Gaussian hills =0.2,0.2 HEIGHTthe height of the Gaussian hills, one for all biases. =0.3
PACEcompulsory keyword
the frequency for hill addition, one for all biases =500 BIASFACTORuse well tempered metadynamics with this bias factor, one for all biases. =8
FILEfiles in which the lists of added hills are stored, default names are assigned using
WALKERS_Nnumber of walkers =10
WALKERS_IDwalker id =3
WALKERS_DIRshared directory with the hills files from all the walkers =../
WALKERS_RSTRIDEstride for reading hills files =100
...
PRINT ARGthe input for this action is the scalar output from one or more other actions. =d1,d2,pb.bias STRIDEcompulsory keyword ( default=1 )
the frequency with which the quantities of interest should be output =100 FILEthe name of the file on which to output these quantities =COLVAR

where WALKERS_N is the total number of walkers, WALKERS_ID is the id of the present walker (starting from 0 ) and the WALKERS_DIR is the directory where all the walkers are located. WALKERS_RSTRIDE is the number of step between one update and the other.
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
Compulsory keywords
 SIGMA the widths of the Gaussian hills PACE the frequency for hill addition, one for all biases
Options