next up previous contents index
Next: Biasing and analysis methods Up: Collective Variable-based Calculations1 Previous: General parameters and input/output   Contents   Index

Subsections


Declaring and using collective variables

Each collective variable is defined as a combination of individual quantities called components (see Figure 6). To obtain a colvar $ \xi(\mathbf{r})$, its components $ q_{i}(\mathbf{r})$ are summed according to:

$\displaystyle \xi(\mathbf{r}) = \sum_{i} c_{i} [q_{i}(\mathbf{r})]^{n_{i}}$ (12)

where each component appears with a unique coefficient $ c_{i}$ and (positive integer) exponent $ n_{i}$. Note: in most applications, only one component per colvar needs to be defined: accordingly, $ c_{i}$ and $ n_{i}$ are equal to 1 by default.

In the configuration file, a collective variable is initiated by the keyword colvar, followed by its configuration options, usually between curly braces: colvar {...}. Each variable must have one or more components, defined by blocks specifying a functional form, atoms whose coordinates are used to evaluate this functional form, and optional parameters as needed. Each component block is initiated within the colvar block by the keyword corresponding to a given functional form. For instance, the block distance {...} adds a component whose value is the distance between to atom groups.

The types of components used determine the properties of a colvar, and which biases or analysis methods can be applied to it. For instance, the colvar returns a scalar value if it includes components of one or more of the following types: distance, distanceZ, distanceXY, angle, dihedral, coordnum, hBond, rmsd, orientationAngle, gyration, and alphaHelix. The colvar returns instead a three-dimensional vector $ \mathbf{d}$ if distanceVec is used, a three-dimensional vector with a $ \vert\mathbf{d}\vert^{2} = 1$ constraint if distanceDir is used, and a unitary quaternion (used to parameterize a rotation) if orientation is are used.

Currently, binning of colvar values on a grid can only be performed for scalar components. In addition, some properties like the system force, can be calculated only for some of these components. The detail documentation all component types is provided in 9.2.1. Note: restrictions only apply to the type of an individual colvar. In fact, all of the implemented methods can be applied to any number of collective variables.

Irrespective of which components it is built of, each colvar can be provided the following parameters:


Collective variable components

Each colvar has one or more components, each of them defined by a functional form, the atom positions from which it is calculated, and any additional parameters of the functional form. This section lists the types of components and their parameters. Each component makes use of one or more atom groups, whose syntax of definition is by their name followed by a definition block, e.g. myatoms {...}; the options in the definition block are described in (9.2.3).

Component distance: distance between two groups.

The distance {...} block defines a distance component, between two atom groups, group1 and group2.

The value returned is a positive number (in Å), limited between 0 and the largest possible interatomic distance within the chosen boundary conditions (in PBC, the minimum image convention is used).

Component distanceZ: projection of a distance on an axis.

The distanceZ {...} block defines a distance projection component, which can be seen as measuring the distance between two groups projected onto an axis, or the position of a group along such an axis. The axis can be defined using either one reference group and a constant vector, or dynamically based on two reference groups. This component returns a number (in Å) whose range is determined by the chosen boundary conditions: if the $ z$ axis is used in PBC, its value is limited between $ -b_{z}/2$ and $ b_{z}/2$, where $ b_{z}$ is the box length in the $ z$ direction.

Component distanceXY: projection of a distance on a plane.

The distanceXY {...} block defines a distance projected on a plane, and accepts the same options as distanceZ, i.e. main, ref, either ref2 or axis, and oneSiteSystemForce. It returns the norm of the projection of the distance vector between main and ref onto the plane orthogonal to the axis. The axis is defined using the axis parameter or as the vector joining ref and ref2 (see distanceZ above).

Component distanceVec: distance vector between two groups.

The distanceVec {...} block defines a distance vector component, which accepts the same options as distance, group1 and group2. It returns a 3-dimensional vector $ \mathbf{d} = (d_{x}, d_{y}, d_{z})$. The range of values of $ d_{x}$, $ d_{y}$ and $ d_{z}$ (in Å) is determined by the chosen boundary conditions.

Component distanceDir: distance unit vector between two groups.

The distanceDir {...} block defines a distance unit vector component, which accepts the same options as distance, group1 and group2. It returns a 3-dimensional unit vector $ \mathbf{d} = (d_{x}, d_{y}, d_{z})$, $ \vert\mathbf{d}\vert = 1$. $ d_{x}$, $ d_{y}$ and $ d_{z}$ lie within the $ [-1:1]$ interval.

Component angle: angle between three groups.

The angle {...} block defines an angle, which accepts the options group1, group2 and group3 to define the three groups. It returns an angle (in degrees) within the interval $ [0:180]$.

Component dihedral: torsional angle between four groups.

The dihedral {...} block defines a torsional angle, which accepts the options group1, group2, group3 and group4 to define the four groups. It returns an angle (in degrees) within the interval $ [-180:180]$. The colvar module calculates all the distances between two angles taking into account periodicity. For instance, reference values for restraints or range boundaries can be defined by using any real number of choice.

Component coordnum: coordination number between two groups.

The coordnum {...} block defines a coordination number (or number of contacts), which calculates the function $ (1-(d/d_0)^{n})/(1-(d/d_0)^{m})$, where $ d_0$ is the ``cutoff'' distance, and $ n$ and $ m$ are exponents that can control its long range behavior and stiffness [27]. This function is summed over all pairs of atoms in group1 and group2:

$\displaystyle C (\mathtt{group1}, \mathtt{group2}) \; = \; \sum_{i\in\mathtt{gr...
...}\vert/d_{0})^{n}}{ 1 - (\vert\mathbf{x}_{i}-\mathbf{x}_{j}\vert/d_{0})^{m} } }$ (13)

This colvar component accepts the same options as distance, group1 and group2. In addition to them, it recognizes the following options:

This component returns a dimensionless number, which ranges from approximately 0 (all interatomic distances much larger than the cutoff) to $ N_{\mathtt{group1}} * N_{\mathtt{group2}}$ (all distances within the cutoff), or $ N_{\mathtt{group1}}$ if group2CenterOnly is used. As a recommendation, at least one group1 and group2 should be of limited size (unless group2CenterOnly is used), because the size of the loop over all pairs grows with the product of the sizes of $ \texttt{group1}$ and $ \texttt{group2}$.

Component hBond: hydrogen bond between two atoms.

The hBond {...} block defines a hydrogen bond, implemented as a coordination number (eq. 13) between the donor and the acceptor atoms. Therefore, it accepts the same options cutoff (with a different default value of 3.3 Å), expNumer (with a default value of 6) and expDenom (with a default value of 8). Unlike coordnum, it requires two atom numbers, acceptor and donor, to be defined. It returns an adimensional number, with values between 0 (acceptor and donor far outside the cutoff distance) and 1 (acceptor and donor much closer than the cutoff).

Component rmsd: root mean square displacement (RMSD) with respect to a reference structure.

The block rmsd {...} defines the root mean square replacement (RMSD) of a group of atoms with respect to a reference structure. For each set of coordinates $ \{ \mathbf{x}_1(t), \mathbf{x}_2(t), \ldots
\mathbf{x}_N(t) \}$, the colvar component rmsd calculates the optimal rotation $ U^{\{\mathbf{x}_{i}(t)\}\rightarrow\{\mathbf{x}_{i}^{\mathrm{(ref)}}\}}$ that best superimposes the coordinates $ \{\mathbf{x}_{i}(t)\}$ onto a set of reference coordinates $ \{\mathbf{x}_{i}^{\mathrm{(ref)}}\}$. Both the current and the reference coordinates are centered on their centers of geometry, $ \mathbf{x}_{\mathrm{cog}}(t)$ and $ \mathbf{x}_{\mathrm{cog}}^{\mathrm{(ref)}}$. The root mean square displacement is then defined as:

$\displaystyle { \mathrm{RMSD}(\{\mathbf{x}_{i}(t)\}, \{\mathbf{x}_{i}^{\mathrm{...
...{(ref)}} - \mathbf{x}_{\mathrm{cog}}^{\mathrm{(ref)}} \right) \right\vert^{2} }$ (14)

The optimal rotation $ U^{\{\mathbf{x}_{i}(t)\}\rightarrow\{\mathbf{x}_{i}^{\mathrm{(ref)}}\}}$ is calculated within the formalism developed in reference [15], which guarantees a continuous dependence of $ U^{\{\mathbf{x}_{i}(t)\}\rightarrow\{\mathbf{x}_{i}^{\mathrm{(ref)}}\}}$ with respect to $ \{\mathbf{x}_{i}(t)\}$. The options for rmsd are: This component returns a positive real number (in Å).

Component orientation: orientation with respect to a reference structure.

The block orientation {...} returns the same optimal rotation used in the rmsd component to superimpose the coordinates $ \{\mathbf{x}_{i}(t)\}$ onto a set of reference coordinates $ \{\mathbf{x}_{i}^{\mathrm{(ref)}}\}$. It accepts all the options of rmsd: atoms, refPositions, refPositionsFile and refPositionsCol, and returns a four dimensional vector $ \mathsf{q} = (q_0, q_1, q_2, q_3)$, with $ \sum_{i} q_{i}^{2} = 1$; this quaternion expresses the optimal rotation $ \{\mathbf{x}_{i}(t)\}
\rightarrow \{\mathbf{x}_{i}^{\mathrm{(ref)}}\}$ according to the formalism in reference [15]. The quaternion $ (q_0,
q_1, q_2, q_3)$ can also be written as $ \left(\cos(\theta/2), \,
\sin(\theta/2)\mathbf{u}\right)$, where $ \theta$ is the angle and $ \mathbf{u}$ the normalized axis of rotation; for example, a rotation of 90$ ^{\circ}$ around the $ z$ axis should be expressed as ``(0.707, 0.0, 0.0, 0.707)''. The script quaternion2rmatrix.tcl provides Tcl functions for converting to and from a $ 4\times{}4$ rotation matrix in a format suitable for usage in VMD.

Hint: to restrain the rotation of a macromolecule in solution (e.g. when one of the cell dimensions is much longer than the others), it is possible to define a colvar with an orientation component, and restrain it throuh the harmonic bias around the ``zero'' rotation, (1.0, 0.0, 0.0, 0.0).

Component orientationAngle: angle of rotation with respect to a reference structure.

The block orientationAngle {...} accepts the same options of rmsd and orientation (atoms, refPositions, refPositionsFile and refPositionsCol), but it returns instead the angle of rotation $ \theta$ between the current and the reference positions. This angle is expressed in degrees within the range [-180$ ^{\circ}$:180$ ^{\circ}$].

Component gyration: radius of gyration.

The block gyration {...} defines the parameters for calculating the radius of gyration of a group of atomic positions $ \{ \mathbf{x}_1(t), \mathbf{x}_2(t), \ldots
\mathbf{x}_N(t) \}$ with respect to their center of geometry, $ \mathbf{x}_{\mathrm{cog}}(t)$:

$\displaystyle R_{\mathrm{gyr}} \; = \; \sqrt{ \frac{1}{N} \sum_{i=1}^{N} \left\vert\mathbf{x}_{i}(t) - \mathbf{x}_{\mathrm{cog}}(t)\right\vert^{2} }$ (15)

This component must contain one atoms {...} block to define the atom group, and returns a positive number, expressed in Å.

Component alpha: $ \alpha $-helix content of a protein segment.

The block alpha {...} defines the parameters to calculate the helical content of a segment of protein residues. The $ \alpha $-helical content across the $ N+1$ residues $ N_{0}$ to $ N_{0}+N$ is calculated by the formula:
$\displaystyle {
\alpha\left(
\mathrm{C}_{\alpha}^{(N_{0})},
\mathrm{O}^{(N_{0})...
...thrm{N}^{(N_{0}+N)},
\mathrm{C}_{\alpha}^{(N_{0}+N)}
\right)
} \; = \; \; \; \;$     (16)
$\displaystyle \; \; \; \; {
\frac{1}{2(N-2)}
\sum_{n=N_{0}}^{N_{0}+N-2}
\mathrm...
...}}^{N_{0}+N-4}
\mathrm{hbf}\left(
\mathrm{O}^{(n)},
\mathrm{N}^{(n+4)}\right)
}$      

where the score function for the $ \mathrm{C}_{\alpha} -
\mathrm{C}_{\alpha} - \mathrm{C}_{\alpha}$ angle is defined as:

$\displaystyle { \mathrm{angf}\left( \mathrm{C}_{\alpha}^{(n)}, \mathrm{C}_{\alp...
...+2)}) - \theta_{0}\right)^{4} / \left(\Delta\theta_{\mathrm{tol}}\right)^{4}} }$ (17)

and the score function for the $ \mathrm{O}^{(n)} \leftrightarrow
\mathrm{N}^{(n+4)}$ hydrogen bond is defined through a hBond colvar component on the same atoms. The options recognized within the alpha {...} block are:

This component returns positive values, always comprised between 0 (lowest $ \alpha $-helical score) and 1 (highest $ \alpha $-helical score).

Linear and polynomial combinations of components

Any set of components can be combined within a colvar, provided that they return the same type of values (scalar, unit vector, vector, or quaternion). By default, the colvar is the sum of its components. Linear or polynomial combinations (following equation (12)) can be obtained by setting the following parameters, which are common to all components:


Defining atom groups

Each component depends on one or more atom groups, which can be defined by different methods in the configuration file. Each atom group block is initiated by the name of the group itself within the component block, followed by the instructions to the colvar module on how to select the atoms involved. Here is an example configuration, for an atom group called myatoms, which makes use of the most common keywords:
# atom group definition
myatoms {
  # add atoms 1, 2 and 3 to this group (note: numbers start from 1)
  atomNumbers {
     1 2 3
  }
  # add all the C-alphas within residues 11 to 20 of segment "PROT"
  atomNameResidueRange  CA 11-20
  psfSegID              PROT
  # add all the atoms with occupancy 2 in the file atoms_occ1.pdb
  atomsFile             atoms_occ1.pdb
  atomsCol              O
  atomsColValue         2.0
}

For any atom group, the available options are:

To minimize the length of the NAMD standard output, messages from the previous options are not echoed by default. They can be enabled by using the boolean keyword verboseOutput.

Recommendations for using atom groups.

Nearly all the calculations of colvar components are based on user-specified atom groups. These guidelines could be useful when choosing the atom groups to define a collective variable:


Statistical analysis of individual collective variables

When the global keyword analysis is defined in the configuration file, calculations of statistical properties for individual colvars can be performed. At the moment, several types of time correlation functions, running averages and running standard deviations are available.


next up previous contents index
Next: Biasing and analysis methods Up: Collective Variable-based Calculations1 Previous: General parameters and input/output   Contents   Index
namd@ks.uiuc.edu