next up previous contents index
Next: Biasing and analysis methods Up: Collective Variable-based Calculations (Colvars)1 Previous: Selecting atoms for colvars:   Contents   Index

Subsections


Collective variable components (basis functions)

Each colvar is defined by one or more components (typically only one). Each component consists of a keyword identifying a functional form, and a definition block following that keyword, specifying the atoms involved and any additional parameters (cutoffs, ``reference'' values, ...).

The types of the components used in a colvar determine the properties of that colvar, and which biasing or analysis methods can be applied. In most cases, the colvar returns a real number, which is computed by one or more instances of the following components:

Some components do not return scalar, but vector values. They can only be combined with vector values of the same type, except within a scripted collective variable.

In the following, all the available component types are listed, along with their physical units and the limiting values, if any. Such limiting values can be used to define lowerBoundary and upperBoundary in the parent colvar.

For each type of component, the available configurations keywords are listed: when two components share certain keywords, the second component simply references to the documentation of the first regarding that keyword. The keywords that are available for all types of components are listed at the end (see

List of available colvar components


distance: center-of-mass distance between two groups.

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

List of keywords (see also 10.4.4 for additional options):

The value returned is a positive number (in Å), ranging from 0 to the largest possible interatomic distance within the chosen boundary conditions (with PBCs, the minimum image convention is used unless the forceNoPBC option is set).

distanceZ: projection of a distance vector 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.

List of keywords (see also 10.4.4 for additional options):

This component returns a number (in Å) whose range is determined by the chosen boundary conditions. For instance, if the $ z$ axis is used in a simulation with periodic boundaries, the returned value ranges between $ -b_{z}/2$ and $ b_{z}/2$ , where $ b_{z}$ is the box length along $ z$ (this behavior is disabled if forceNoPBC is set).

distanceXY: modulus of the projection of a distance vector on a plane.

The distanceXY {...} block defines a distance projected on a plane, and accepts the same keywords as the component distanceZ, i.e. main, ref, either ref2 or axis, and oneSiteTotalForce. 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).

List of keywords (see also 10.4.4 for additional options):

distanceVec: distance vector between two groups.

The distanceVec {...} block defines a distance vector component, which accepts the same keywords as the component distance: group1, group2, and forceNoPBC. Its value is the 3-vector joining the centers of mass of group1 and group2.

List of keywords (see also 10.4.4 for additional options):

distanceDir: distance unit vector between two groups.

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

List of keywords (see also 10.4.4 for additional options):

distanceInv: mean distance between two groups of atoms.

The distanceInv {...} block defines a generalized mean distance between two groups of atoms 1 and 2, weighted with exponent $ 1/n$ :

$\displaystyle d_{\mathrm{1,2}}^{[n]} \; = \; \left(\frac{1}{N_{\mathrm{1}}N_{\m...
...}\sum_{i,j} \left(\frac{1}{\Vert\mathbf{d}^{ij}\Vert}\right)^{n} \right)^{-1/n}$ (36)

where $ \Vert\mathbf{d}^{ij}\Vert$ is the distance between atoms $ i$ and $ j$ in groups 1 and 2 respectively, and $ n$ is an even integer.

List of keywords (see also 10.4.4 for additional options):

This component returns a number in Å, ranging from 0 to the largest possible distance within the chosen boundary conditions.

distancePairs: set of pairwise distances between two groups.

The distancePairs {...} block defines a $ N_{\mathrm{1}}\times{}N_{\mathrm{2}}$ -dimensional variable that includes all mutual distances between the atoms of two groups. This can be useful, for example, to develop a new variable defined over two groups, by using the scriptedFunction feature.

List of keywords (see also 10.4.4 for additional options):

This component returns a $ N_{\mathrm{1}}\times{}N_{\mathrm{2}}$ -dimensional vector of numbers, each ranging from 0 to the largest possible distance within the chosen boundary conditions.

cartesian: vector of atomic Cartesian coordinates.

The cartesian {...} block defines a component returning a flat vector containing the Cartesian coordinates of all participating atoms, in the order $ (x_1, y_1, z_1, \cdots, x_n, y_n, z_n)$ .

List of keywords (see also 10.4.4 for additional options):

angle: angle between three groups.

The angle {...} block defines an angle, and contains the three blocks group1, group2 and group3, defining the three groups. It returns an angle (in degrees) within the interval $ [0:180]$ .

List of keywords (see also 10.4.4 for additional options):

dipoleAngle: angle between two groups and dipole of a third group.

The dipoleAngle {...} block defines an angle, and contains the three blocks group1, group2 and group3, defining the three groups, being group1 the group where dipole is calculated. It returns an angle (in degrees) within the interval $ [0:180]$ .

List of keywords (see also 10.4.4 for additional options):

dihedral: torsional angle between four groups.

The dihedral {...} block defines a torsional angle, and contains the blocks group1, group2, group3 and group4, defining the four groups. It returns an angle (in degrees) within the interval $ [-180:180]$ . The Colvars 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.

List of keywords (see also 10.4.4 for additional options):

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 [39]. 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} } }$ (37)

List of keywords (see also 10.4.4 for additional options):

This component returns a dimensionless number, which ranges from approximately 0 (all interatomic distances are much larger than the cutoff) to $ N_{\mathtt{group1}} \times N_{\mathtt{group2}}$ (all distances are less than the cutoff), or $ N_{\mathtt{group1}}$ if group2CenterOnly is used. For performance reasons, at least one of group1 and group2 should be of limited size or group2CenterOnly should be used: the cost of the loop over all pairs grows as $ N_{\mathtt{group1}} \times N_{\mathtt{group2}}$ .

selfCoordNum: coordination number between atoms within a group.

The selfCoordNum {...} block defines a coordination number similarly to the component coordNum, but the function is summed over atom pairs within group1:

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

The keywords accepted by selfCoordNum are a subset of those accepted by coordNum, namely group1 (here defining all of the atoms to be considered), cutoff, expNumer, and expDenom.

List of keywords (see also 10.4.4 for additional options):

This component returns a dimensionless number, which ranges from approximately 0 (all interatomic distances much larger than the cutoff) to $ N_{\mathtt{group1}} \times (N_{\mathtt{group1}} - 1) / 2$ (all distances within the cutoff). For performance reasons, group1 should be of limited size, because the cost of the loop over all pairs grows as $ N_{\mathtt{group1}}^2$ .

hBond: hydrogen bond between two atoms.

The hBond {...} block defines a hydrogen bond, implemented as a coordination number (eq. 37) 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).

List of keywords (see also 10.4.4 for additional options):

rmsd: root mean square displacement (RMSD) from reference positions.

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} }$ (39)

The optimal rotation $ U^{\{\mathbf{x}_{i}(t)\}\rightarrow\{\mathbf{x}_{i}^{\mathrm{(ref)}}\}}$ is calculated within the formalism developed in reference [20], which guarantees a continuous dependence of $ U^{\{\mathbf{x}_{i}(t)\}\rightarrow\{\mathbf{x}_{i}^{\mathrm{(ref)}}\}}$ with respect to $ \{\mathbf{x}_{i}(t)\}$ .

List of keywords (see also 10.4.4 for additional options):

This component returns a positive real number (in Å).

Advanced usage of the rmsd component.

In the standard usage as described above, the rmsd component calculates a minimum RMSD, that is, current coordinates are optimally fitted onto the same reference coordinates that are used to compute the RMSD value. The fit itself is handled by the atom group object, whose parameters are automatically set by the rmsd component. For very specific applications, however, it may be useful to control the fitting process separately from the definition of the reference coordinates, to evaluate various types of non-minimal RMSD values. This can be achieved by setting the related options (refPositions, etc.) explicitly in the atom group block. This allows for the following non-standard cases:

  1. applying the optimal translation, but no rotation (rotateReference off), to bias or restrain the shape and orientation, but not the position of the atom group;
  2. applying the optimal rotation, but no translation (translateReference off), to bias or restrain the shape and position, but not the orientation of the atom group;
  3. disabling the application of optimal roto-translations, which lets the RMSD component decribe the deviation of atoms from fixed positions in the laboratory frame: this allows for custom positional restraints within the Colvars module;
  4. fitting the atomic positions to different reference coordinates than those used in the RMSD calculation itself;
  5. applying the optimal rotation and/or translation from a separate atom group, defined through fittingGroup: the RMSD then reflects the deviation from reference coordinates in a separate, moving reference frame.

eigenvector: projection of the atomic coordinates on a vector.

The block eigenvector {...} defines the projection of the coordinates of a group of atoms (or more precisely, their deviations from the reference coordinates) onto a vector in $ \mathbb{R}^{3n}$ , where $ n$ is the number of atoms in the group. The computed quantity is the total projection:

$\displaystyle { p(\{\mathbf{x}_{i}(t)\}, \{\mathbf{x}_{i}^{\mathrm{(ref)}}\}) }...
...athrm{(ref)}} - \mathbf{x}_{\mathrm{cog}}^{\mathrm{(ref)}}) \right)\mathrm{,} }$ (40)

where, as in the rmsd component, $ U$ is the optimal rotation matrix, $ \mathbf{x}_{\mathrm{cog}}(t)$ and $ \mathbf{x}_{\mathrm{cog}}^{\mathrm{(ref)}}$ are the centers of geometry of the current and reference positions respectively, and $ \mathbf{v}_{i}$ are the components of the vector for each atom. Example choices for $ (\mathbf{v}_{i})$ are an eigenvector of the covariance matrix (essential mode), or a normal mode of the system. It is assumed that $ \sum_{i}\mathbf{v}_{i} = 0$ : otherwise, the Colvars module centers the $ \mathbf{v}_{i}$ automatically when reading them from the configuration.

List of keywords (see also 10.4.4 for additional options):

This component returns a number (in Å), whose value ranges between the smallest and largest absolute positions in the unit cell during the simulations (see also distanceZ). Due to the normalization in eq. 40, this range does not depend on the number of atoms involved.

gyration: radius of gyration of a group of atoms.

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} }$ (41)

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

List of keywords (see also 10.4.4 for additional options):

inertia: total moment of inertia of a group of atoms.

The block inertia {...} defines the parameters for calculating the total moment of inertia 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 I \; = \; \sum_{i=1}^{N} \left\vert\mathbf{x}_{i}(t) - \mathbf{x}_{\mathrm{cog}}(t)\right\vert^{2}$ (42)

Note that all atomic masses are set to 1 for simplicity. This component must contain one atoms {...} block to define the atom group, and returns a positive number, expressed in Å$ ^{2}$ .

List of keywords (see also 10.4.4 for additional options):

inertiaZ: total moment of inertia of a group of atoms around a chosen axis.

The block inertiaZ {...} defines the parameters for calculating the component along the axis $ \mathbf{e}$ of the moment of inertia 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 I_{\mathbf{e}} \; = \; \sum_{i=1}^{N} \left(\left(\mathbf{x}_{i}(t) - \mathbf{x}_{\mathrm{cog}}(t)\right)\cdot\mathbf{e}\right)^{2}$ (43)

Note that all atomic masses are set to 1 for simplicity. This component must contain one atoms {...} block to define the atom group, and returns a positive number, expressed in Å$ ^{2}$ .

List of keywords (see also 10.4.4 for additional options):

orientation: orientation from reference coordinates.

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)}}\}$ . Such component 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 [20]. 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 is 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.

As for the component rmsd, the available options are atoms, refPositionsFile, refPositionsCol and refPositionsColValue, and refPositions.

Note: refPositionsand refPositionsFile define the set of positions from which the optimal rotation is calculated, but this rotation is not applied to the coordinates of the atoms involved: it is used instead to define the variable itself.

List of keywords (see also 10.4.4 for additional options):

Tip: stopping the rotation of a protein. To stop the rotation of an elongated macromolecule in solution (and use an anisotropic box to save water molecules), it is possible to define a colvar with an orientation component, and restrain it throuh the harmonic bias around the identity rotation, (1.0, 0.0, 0.0, 0.0). Only the overall orientation of the macromolecule is affected, and not its internal degrees of freedom. The user should also take care that the macromolecule is composed by a single chain, or disable wrapAll otherwise.

orientationAngle: angle of rotation from reference coordinates.

The block orientationAngle {...} accepts the same base options as the component orientation: atoms, refPositions, refPositionsFile, refPositionsCol and refPositionsColValue. The returned value is the angle of rotation $ \theta$ between the current and the reference positions. This angle is expressed in degrees within the range [0$ ^{\circ}$ :180$ ^{\circ}$ ].

List of keywords (see also 10.4.4 for additional options):

orientationProj: cosine of the angle of rotation from reference coordinates.

The block orientationProj {...} accepts the same base options as the component orientation: atoms, refPositions, refPositionsFile, refPositionsCol and refPositionsColValue. The returned value is the cosine of the angle of rotation $ \theta$ between the current and the reference positions. The range of values is [-1:1].

List of keywords (see also 10.4.4 for additional options):

spinAngle: angle of rotation around a given axis.

The complete rotation described by orientation can optionally be decomposed into two sub-rotations: one is a ``spin'' rotation around e, and the other a ``tilt'' rotation around an axis orthogonal to e. The component spinAngle measures the angle of the ``spin'' sub-rotation around e.

List of keywords (see also 10.4.4 for additional options):

The component spinAngle returns an angle (in degrees) within the periodic interval $ [-180:180]$ .

Note: the value of spinAngle is a continuous function almost everywhere, with the exception of configurations with the corresponding ``tilt'' angle equal to 180$ ^\circ$ (i.e. the tilt component is equal to $ -1$ ): in those cases, spinAngle is undefined. If such configurations are expected, consider defining a tilt colvar using the same axis e, and restraining it with a lower wall away from $ -1$ .

tilt: cosine of the rotation orthogonal to a given axis.

The component tilt measures the cosine of the angle of the ``tilt'' sub-rotation, which combined with the ``spin'' sub-rotation provides the complete rotation of a group of atoms. The cosine of the tilt angle rather than the tilt angle itself is implemented, because the latter is unevenly distributed even for an isotropic system: consider as an analogy the angle $ \theta$ in the spherical coordinate system. The component tilt relies on the same options as spinAngle, including the definition of the axis e. The values of tilt are real numbers in the interval $ [-1:1]$ : the value $ 1$ represents an orientation fully parallel to e (tilt angle = 0$ ^\circ$ ), and the value $ -1$ represents an anti-parallel orientation.

List of keywords (see also 10.4.4 for additional options):

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)
} \; = \; \; \; \;$     (44)
$\displaystyle \; \; \; \; {
\frac{1}{2(N-2)}
\sum_{n=N_{0}}^{N_{0}+N-2}
\mathrm...
...-4}
\mathrm{hbf}\left(
\mathrm{O}^{(n)},
\mathrm{N}^{(n+4)}\right) \mathrm{,}
}$      

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...
...eta_{0}\right)^{4} / \left(\Delta\theta_{\mathrm{tol}}\right)^{4}} \mathrm{,} }$ (45)

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.

List of keywords (see also 10.4.4 for additional options):

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

dihedralPC: protein dihedral pricipal component

The block dihedralPC {...} defines the parameters to calculate the projection of backbone dihedral angles within a protein segment onto a dihedral principal component, following the formalism of dihedral principal component analysis (dPCA) proposed by Mu et al.[58] and documented in detail by Altis et al.[2]. Given a peptide or protein segment of $ N$ residues, each with Ramachandran angles $ \phi_i$ and $ \psi_i$ , dPCA rests on a variance/covariance analysis of the $ 4(N-1)$ variables $ \cos(\psi_1), \sin(\psi_1), \cos(\phi_2), \sin(\phi_2)
\cdots \cos(\phi_N), \sin(\phi_N)$ . Note that angles $ \phi_1$ and $ \psi_N$ have little impact on chain conformation, and are therefore discarded, following the implementation of dPCA in the analysis software Carma.[29]

For a given principal component (eigenvector) of coefficients $ (k_i)_{1 \leq i \leq 4(N-1)}$ , the projection of the current backbone conformation is:

$\displaystyle \xi = \sum_{n=1}^{N-1} k_{4n-3} \cos(\psi_n) + k_{4n-2} \sin (\psi_n) + k_{4n-1} \cos (\phi_{n+1}) + k_{4n} \sin(\phi_{n+1})$ (46)

dihedralPC expects the same parameters as the alpha component for defining the relevant residues (residueRange and psfSegID) in addition to the following:

List of keywords (see also 10.4.4 for additional options):


Configuration keywords shared by all components

The following options can be used for any of the above colvar components in order to obtain a polynomial combination or any user-supplied function provided by scriptedFunction (see 10.4.4).


Advanced usage and special considerations


Periodic components.

The following components returns real numbers that lie in a periodic interval: In certain conditions, distanceZ can also be periodic, namely when periodic boundary conditions (PBCs) are defined in the simulation and distanceZ's axis is parallel to a unit cell vector.

The following keywords can be used within periodic components (and are illegal elsewhere):

Internally, all differences between two values of a periodic colvar follow the minimum image convention: they are calculated based on the two periodic images that are closest to each other.

Note: linear or polynomial combinations of periodic components may become meaningless when components cross the periodic boundary. Use such combinations carefully: estimate the range of possible values of each component in a given simulation, and make use of wrapAround to limit this problem whenever possible.


Non-scalar components.

When one of the following components are used, the defined colvar returns a value that is not a scalar number: The distance between two 3-dimensional unit vectors is computed as the angle between them. The distance between two quaternions is computed as the angle between the two 4-dimensional unit vectors: because the orientation represented by $ \mathsf{q}$ is the same as the one represented by $ -\mathsf{q}$ , distances between two quaternions are computed considering the closest of the two symmetric images.

Non-scalar components carry the following restrictions:

Note: while these restrictions apply to individual colvars based on non-scalar components, no limit is set to the number of scalar colvars. To compute multi-dimensional histograms and PMFs, use sets of scalar colvars of arbitrary size.


Calculating total forces.

In addition to the restrictions due to the type of value computed (scalar or non-scalar), a final restriction can arise when calculating total force (outputTotalForce option or application of a abf bias). total forces are available currently only for the following components: distance, distanceZ, distanceXY, angle, dihedral, rmsd, eigenvector and gyration.


Linear and polynomial combinations of components

To extend the set of possible definitions of colvars $ \xi(\mathbf{r})$ , multiple components $ q_i(\mathbf{r})$ can be summed with the formula:

$\displaystyle \xi(\mathbf{r}) = \sum_i c_i [q_i(\mathbf{r})]^{n_i}$ (47)

where each component appears with a unique coefficient $ c_i$ (1.0 by default) the positive integer exponent $ n_i$ (1 by default).

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 (48)) can be obtained by setting the following parameters, which are common to all components:

Example: To define the average of a colvar across different parts of the system, simply define within the same colvar block a series of components of the same type (applied to different atom groups), and assign to each component a componentCoeff of $ 1/N$ .


Colvars as scripted functions of components

When scripting is supported (default in NAMD), a colvar may be defined as a custom function of its components, rather than a linear or polynomial combination. When implementing generic functions of Cartesian coordinates rather than functions of existing components, the cartesian component may be particularly useful.

An example of elaborate scripted colvar is given in example 10, in the form of path-based collective variables as defined by Branduardi et al[11]. The required Tcl procedures are provided in the colvartools directory.


next up previous contents index
Next: Biasing and analysis methods Up: Collective Variable-based Calculations (Colvars)1 Previous: Selecting atoms for colvars:   Contents   Index
http://www.ks.uiuc.edu/Research/namd/