next up previous contents index
Next: Alchemical Free Energy Methods1 Up: Collective Variable-based Calculations1 Previous: Collective variable components (basis   Contents   Index

Subsections


Biasing and analysis methods

All of the biasing and analysis methods implemented (abf, harmonic, histogram and metadynamics) recognize the following options:

Adaptive Biasing Force

For a full description of the Adaptive Biasing Force method, see reference [19]. For details about this implementation, see references [31] and [32]. When publishing research that makes use of this functionality, please cite references [19] and [32].

An alternate usage of this feature is the application of custom tabulated biasing potentials to one or more colvars. See inputPrefix and updateBias below.

ABF is based on the thermodynamic integration (TI) scheme for computing free energy profiles. The free energy as a function of a set of collective variables $ {\mbox{\boldmath {$\xi$}}}=(\xi_{i})_{i\in[1,n]}$ is defined from the canonical distribution of $ {\mbox{\boldmath {$\xi$}}}$ , $ {\mathcal P}({\mbox{\boldmath {$\xi$}}})$ :

$\displaystyle A({\mbox{\boldmath {$\xi$}}}) = -\frac{1}{\beta} \ln {\mathcal P}({\mbox{\boldmath {$\xi$}}}) + A_0$ (48)

In the TI formalism, the free energy is obtained from its gradient, which is generally calculated in the form of the average of a force $ {\mbox{\boldmath {$F$}}}_\xi$ exerted on $ {\mbox{\boldmath {$\xi$}}}$ , taken over an iso- $ {\mbox{\boldmath {$\xi$}}}$ surface:

$\displaystyle {\mbox{\boldmath {$\nabla$}}}_\xi A({\mbox{\boldmath {$\xi$}}}) =...
...t\langle -{\mbox{\boldmath {$F$}}}_\xi \right\rangle_{\mbox{\boldmath {$\xi$}}}$ (49)

Several formulae that take the form of (50) have been proposed. This implementation relies partly on the classic formulation [14], and partly on a more versatile scheme originating in a work by Ruiz-Montero et al. [57], generalized by den Otter [20] and extended to multiple variables by Ciccotti et al. [17]. Consider a system subject to constraints of the form $ \sigma_{k}({\mbox{\boldmath {$x$}}}) = 0$ . Let ( $ {\mbox{\boldmath {$v$}}}_{i})_{i\in[1,n]}$ be arbitrarily chosen vector fields ( $ \mathbb{R}^{3N}\rightarrow\mathbb{R}^{3N}$ ) verifying, for all $ i$ , $ j$ , and $ k$ :


$\displaystyle {\mbox{\boldmath {$v$}}}_{i} \cdot \mbox{\boldmath$\nabla_{\!\!x}\,$}\xi_{j}$ $\displaystyle =$ $\displaystyle \delta_{ij}$ (50)
$\displaystyle {\mbox{\boldmath {$v$}}}_{i} \cdot \mbox{\boldmath$\nabla_{\!\!x}\,$}\sigma_{k}$ $\displaystyle =$ 0 (51)

then the following holds [17]:

$\displaystyle \frac{\partial A}{\partial \xi_{i}} = \left\langle {\mbox{\boldma...
...\,$}\cdot {\mbox{\boldmath {$v$}}}_{i} \right\rangle_{\mbox{\boldmath {$\xi$}}}$ (52)

where $ V$ is the potential energy function. $ {\mbox{\boldmath {$v$}}}_{i}$ can be interpreted as the direction along which the force acting on variable $ \xi_{i}$ is measured, whereas the second term in the average corresponds to the geometric entropy contribution that appears as a Jacobian correction in the classic formalism [14]. Condition (51) states that the direction along which the system force on $ \xi_{i}$ is measured is orthogonal to the gradient of $ \xi_{j}$ , which means that the force measured on $ \xi_{i}$ does not act on $ \xi_{j}$ .

Equation (52) implies that constraint forces are orthogonal to the directions along which the free energy gradient is measured, so that the measurement is effectively performed on unconstrained degrees of freedom. In NAMD, constraints are typically applied to the lengths of bonds involving hydrogen atoms, for example in TIP3P water molecules (parameter rigidBonds, section 5.6.1).

In the framework of ABF, $ {\bf F}_\xi$ is accumulated in bins of finite size, $ \delta \xi$ , thereby providing an estimate of the free energy gradient according to equation (50). The biasing force applied along the colective variables to overcome free energy barriers is calculated as:

$\displaystyle {\bf F}^{\rm ABF} =$   $\displaystyle \mbox{\boldmath$\nabla_{\!\!x}\,$}$$\displaystyle \widetilde A({\mbox{\boldmath {$\xi$}}})$ (53)

where $ \nabla_{\!\!x}\,$ $ \widetilde A$ denotes the current estimate of the free energy gradient at the current point $ {\mbox{\boldmath {$\xi$}}}$ in the collective variable subspace.

As sampling of the phase space proceeds, the estimate $ \nabla_{\!\!x}\,$ $ \widetilde A$ is progressively refined. The biasing force introduced in the equations of motion guarantees that in the bin centered around $ {\mbox{\boldmath {$\xi$}}}$ , the forces acting along the selected collective variables average to zero over time. Eventually, as the undelying free energy surface is canceled by the adaptive bias, evolution of the system along $ {\mbox{\boldmath {$\xi$}}}$ is governed mainly by diffusion. Although this implementation of ABF can in principle be used in arbitrary dimension, a higher-dimension collective variable space is likely to result in sampling difficulties. Most commonly, the number of variables is one or two.


ABF requirements on collective variables

  1. Only linear combinations of colvar components can be used in ABF calculations.
  2. Availability of system forces is necessary. The following colvar components can be used in ABF calculations: distance, distance_xy, distance_z, angle, dihedral, gyration, rmsd and eigenvector. Atom groups may not be replaced by dummy atoms, unless they are excluded from the force measurement by specifying oneSiteSystemForce, if available.
  3. Mutual orthogonality of colvars. In a multidimensional ABF calculation, equation (51) must be satisfied for any two colvars $ \xi_{i}$ and $ \xi_{j}$ . Various cases fulfill this orthogonality condition:
  4. Mutual orthogonality of components: when several components are combined into a colvar, it is assumed that their vectors $ {\mbox{\boldmath {$v$}}}_{i}$ (equation (53)) are mutually orthogonal. The cases described for colvars in the previous paragraph apply.
  5. Orthogonality of colvars and constraints: equation 52 can be satisfied in two simple ways, if either no constrained atoms are involved in the force measurement (see point 3 above) or pairs of atoms joined by a constrained bond are part of an atom group which only intervenes through its center (center of mass or geometric center) in the force measurement. In the latter case, the contributions of the two atoms to the left-hand side of equation 52 cancel out. For example, all atoms of a rigid TIP3P water molecule can safely be included in an atom group used in a distance component.

Parameters for ABF

The following parameters can be set in the ABF configuration block (in addition to generic bias parameters such as colvars):

ABF also depends on parameters from collective variables to define the grid on which free energy gradients are computed. In the direction of each colvar, the grid ranges from lowerBoundary to upperBoundary, and the bin width (grid spacing) is set by the width parameter.

Output files

The ABF bias produces the following files, all in multicolumn ASCII format:

If several ABF biases are defined concurrently, their name is inserted to produce unique filenames for output, as in outputName.abf1.grad. This should not be done routinely and could lead to meaningless results: only do it if you know what you are doing!

If the colvar space has been partitioned into sections (windows) in which independent ABF simulations have been run, the resulting data can be merged using the inputPrefix option described above (a NAMD run of 0 steps is enough).

Post-processing: reconstructing a multidimensional free energy surface

If a one-dimensional calculation is performed, the estimated free energy gradient is automatically integrated and a potential of mean force is written under the file name <outputName>.pmf, in a plain text format that can be read by most data plotting and analysis programs (e.g. gnuplot).

In dimension 2 or greater, integrating the discretized gradient becomes non-trivial. The standalone utility abf_integrate is provided to perform that task. abf_integrate reads the gradient data and uses it to perform a Monte-Carlo (M-C) simulation in discretized collective variable space (specifically, on the same grid used by ABF to discretize the free energy gradient). By default, a history-dependent bias (similar in spirit to metadynamics) is used: at each M-C step, the bias at the current position is incremented by a preset amount (the hill height). Upon convergence, this bias counteracts optimally the underlying gradient; it is negated to obtain the estimate of the free energy surface.

abf_integrate is invoked using the command-line:

integrate <gradient_file> [-n <nsteps>] [-t <temp>] [-m (0|1)]
                          [-h <hill_height>] [-f <factor>]

The gradient file name is provided first, followed by other parameters in any order. They are described below, with their default value in square brackets:

Using the default values of all parameters should give reasonable results in most cases.


abf_integrate produces the following output files:

Note: Typically, the ``deviation'' vector field does not vanish as the integration converges. This happens because the numerical estimate of the gradient does not exactly derive from a potential, due to numerical approximations used to obtain it (finite sampling and discretization on a grid).


Metadynamics

The metadynamics method uses a history-dependent potential [40] that generalizes to any type of colvars the conformational flooding [26] and local elevation [33] methods, originally formulated to use as colvars the principal components of a covariance matrix or a set of dihedral angles, respectively. The metadynamics potential on the colvars $ {\mbox{\boldmath {$\xi$}}} = (\xi_{1}, \xi_{2}, \ldots, \xi_{N_{\mathrm{cv}}})$ is defined as:

$\displaystyle V_{\mathrm{meta}}({\mbox{\boldmath {$\xi$}}}) \; = \; { \sum_{t' ...
...t(-\frac{(\xi_{i}-\xi_{i}(t'))^{2}}{2\delta_{\xi_{i}}^{2}}\right) } }\mathrm{,}$ (54)

where $ V_{\mathrm{meta}}$ is the history-dependent potential acting on the current values of the colvars $ {\mbox{\boldmath {$\xi$}}}$ , and depends only parametrically on the previous values of the colvars. $ V_{\mathrm{meta}}$ is constructed as a sum of $ N_{\mathrm{cv}}$ -dimensional repulsive Gaussian ``hills'', whose height is a chosen energy constant $ W$ , and whose centers are the previously explored configurations $ \left({\mbox{\boldmath {$\xi$}}}(\delta{}t), {\mbox{\boldmath {$\xi$}}}(2\delta{}t), \ldots\right)$ . Each Gaussian functions has a width of approximately $ 2\delta_{\xi_{i}}$ along the direction of the $ i$ -th colvar.

During the simulation, the system evolves towards the nearest minimum of the ``effective'' potential of mean force $ \tilde{A}({\mbox{\boldmath {$\xi$}}})$ , which is the sum of the ``real'' underlying potential of mean force $ A({\mbox{\boldmath {$\xi$}}})$ and the the metadynamics potential $ V_{\mathrm{meta}}({\mbox{\boldmath {$\xi$}}})$ . Therefore, at any given time the probability of observing the configuration $ {\mbox{\boldmath {$\xi^{*}$}}}$ is proportional to $ \exp\left(-\tilde{A}({\mbox{\boldmath {$\xi^{*}$}}})/\kappa_{\mathrm{B}}T\right)$ : this is also the probability that a new Gaussian ``hill'' is added at that configuration. If the simulation is run for a sufficiently long time, each local minimum is canceled out by the sum of the Gaussian ``hill'' functions. At that stage the the ``effective'' potential of mean force $ \tilde{A}({\mbox{\boldmath {$\xi$}}})$ is constant, and $ -V_{\mathrm{meta}}({\mbox{\boldmath {$\xi$}}})$ is an accurate estimator of the ``real'' potential of mean force $ A({\mbox{\boldmath {$\xi$}}})$ , save for an additive constant:

$\displaystyle A({\mbox{\boldmath {$\xi$}}}) \; \simeq \; { -V_{\mathrm{meta}}({\mbox{\boldmath {$\xi$}}}) + K }$ (55)

Assuming that the set of collective variables includes all relevant degrees of freedom, the predicted error of the estimate is a simple function of the correlation times of the colvars $ \tau_{\xi_{i}}$ , and of the user-defined parameters $ W$ , $ \delta_{\xi_{i}}$ and $ \delta{}t$ [13]. In typical applications, a good rule of thumb can be to choose the ratio $ W/\delta{}t$ much smaller than $ \kappa_{\mathrm{B}}T/\tau_{{\mbox{\boldmath {$\xi$}}}}$ , where $ \tau_{{\mbox{\boldmath {$\xi$}}}}$ is the longest among $ {\mbox{\boldmath {$\xi$}}}$ 's correlation times: $ \delta_{\xi_{i}}$ then dictates the resolution of the calculated PMF.

To enable a metadynamics calculation, a metadynamics block must be defined in the colvars configuration file. Its only mandatory keyword is the colvars option listing all the variables involved: multidimensional PMFs are obtained by the same metadynamics instance applied to all the colvars.

The parameters $ W$ and $ \delta{}t$ are specified by the keywords hillWeight and newHillFrequency, respectively. The values of these options are optimal for colvars with correlation times $ \tau_{{\mbox{\boldmath {$\xi$}}}}$ in the range of a few thousand simulation steps, typical of many biomolecular simulations:

It is the user's responsibility to either leave hillWeight and newHillFrequency at their default values, or to change them to match the specifics of each system. The parameter $ \delta_{\xi_{i}}$ is instead defined as approximately half the width of the corresponding colvar $ \xi_{i}$ (see 10.2.1).


Output files

When interpolating grids are enabled (default behavior), the PMF is written every colvarsRestartFrequency steps to the file outputName.pmf. The following two options allow to control this behavior and to visually track statistical convergence:

Note: when Gaussian hills are deposited near lowerBoundary or upperBoundary (see 10.2.1) and interpolating grids are used (default behavior), their truncation can give rise to accumulating errors. In these cases, as a measure of fault-tolerance all Gaussian hills near the boundaries are included in the output state file, and are recalculated analytically whenever the colvar falls outside the grid's boundaries. (Such measure protects the accuracy of the calculation, and can only be disabled by hardLowerBoundary or hardUpperBoundary.) To avoid gradual loss of performance and growth of the state file, either one of the following solutions is recommended:


Performance tuning

The following options control the computational cost of metadynamics calculations, but do not affect results. Default values are chosen to minimize such cost with no loss of accuracy.


Well-tempered metadynamics

The following options define the configuration for the ``well-tempered'' metadynamics approach [4]:


Multiple-replicas metadynamics

The following options define metadynamics calculations with more than one replica:

Compatibility and post-processing

The following options may be useful only for applications that go beyond the calculation of a PMF by metadynamics:


Harmonic restraints

The harmonic biasing method may be used to enforce fixed or moving restraints, including variants of Steered and Targeted MD. Within energy minimization runs, it allows for restrained minimization, e.g. to calculate relaxed potential energy surfaces. In the context of the colvars module, harmonic potentials are meant according to their textbook definition: $ \displaystyle V({\mbox{\boldmath {$x$}}}) = \frac{1}{2} k ({\mbox{\boldmath {$x$}}} - {\mbox{\boldmath {$x_0$}}})^2$ . Note that this differs from harmonic bond and angle potentials in common force fields, where the factor of one half is typically omitted, resulting in a non-standard definition of the force constant. The restraint energy is reported by NAMD under the MISC title. A harmonic restraint is set up by a harmonic {...} block, which may contain (in addition to the standard option colvars) the following keywords:

Tip: A complex set of restraints can be applied to a system, by defining several colvars, and applying one or more harmonic restraints to different groups of colvars. In some cases, dozens of colvars can be defined, but their value may not be relevant: to limit the size of the colvars trajectory file, it may be wise to disable outputValue for such ``ancillary'' variables, and leave it enabled only for ``relevant'' ones.


Moving restraints: steered molecular dynamics

The following options allow to change gradually the centers of the harmonic restraints during a simulations. When the centers are changed continuously, a steered MD in a collective variable space is carried out.

Note on restarting moving restraint simulations: Information about the current step and stage of a simulation with moving restraints is stored in the restart file (state file). Thus, such simulations can be run in several chunks, and restarted directly using the same colvars configuration file. In case of a restart, the values of parameters such as targetCenters, targetNumSteps, etc. should not be changed manually.


Moving restraints: umbrella sampling

The centers of the harmonic restraints can also be changed in discrete stages: in this cases a one-dimensional umbrella sampling simulation is performed. The sampling windows in simulation are calculated in sequence. The colvars trajectory file may then be used both to evaluate the correlation times between consecutive windows, and to calculate the frequency distribution of the colvar of interest in each window. Furthermore, frequency distributions on a predefined grid can be automatically obtained by using the histogram bias (see 10.5.4).

To activate an umbrella sampling simulation, the same keyords as in the previous section can be used, with the addition of the following:


Changing force constant

The force constant of the harmonic restraint may also be changed to equilibrate [21].


Multidimensional histograms

The histogram feature is used to record the distribution of a set of collective variables in the form of a N-dimensional histogram. It functions as a ``collective variable bias'', and is invoked by adding a histogram block to the colvars configuration file.

In addition to the common parameters name and colvars described above, a histogram block may define the following parameter:

Like the ABF and metadynamics biases, histogram uses parameters from the colvars to define its grid. The grid ranges from lowerBoundary to upperBoundary, and the bin width is set by the width parameter.


next up previous contents index
Next: Alchemical Free Energy Methods1 Up: Collective Variable-based Calculations1 Previous: Collective variable components (basis   Contents   Index
http://www.ks.uiuc.edu/Research/namd/