Collective Variable-based Calculations (Colvars)

In molecular dynamics simulations, it is often useful to reduce the large number of degrees of freedom of a physical system into few parameters whose statistical distributions can be analyzed individually, or used to define biasing potentials to alter the dynamics of the system in a controlled manner. These have been called `order parameters', `collective variables', `(surrogate) reaction coordinates', and many other terms.

Here we use primarily the term `collective variable' (shortened to *colvar*), which indicates any differentiable function of atomic Cartesian coordinates,
, with
between
and
, the total
number of atoms:

The Colvars module in NAMD may be used in both MD simulations and energy minimization runs. The module is designed to perform multiple tasks concurrently during or after a simulation, the most common of which are:

- apply restraints or biasing potentials to multiple colvars, tailored on the system by choosing from a wide set of basis functions, without limitations on their number or on the number of atoms involved; while this can in principle be done through a TclForces script, using the Colvars module is both easier and computationally more efficient;
- calculate potentials of mean force (PMFs) along any set of colvars, using different enhanced sampling methods, such as Adaptive Biasing Force (ABF), metadynamics, steered MD and umbrella sampling; variants of these methods that make use of an ensemble of replicas are supported as well;
- calculate statistical properties of the colvars, such as running averages and standard deviations, correlation functions of pairs of colvars, and multidimensional histograms: this can be done either at run-time without the need to save very large trajectory files, or after a simulation has been completed using VMD and the
`cv`command or NAMD and the`coorfile read`command as illustrated in 17.

Detailed explanations of the design of the Colvars module are provided in reference [27]. Please cite this reference whenever publishing work that makes use of this module.

- A crash course
- General parameters and input/output files
- Using the
`cv`command - Accessing biases
- Accessing biases
- NAMD parameters
- Configuration syntax for the Colvars module
- Input state file (optional)
- Output files

- Using the
- Defining and setting up collective variables
- General options for a collective variable
- Trajectory output
- Extended Lagrangian.
- Statistical analysis of collective variables

- Selecting atoms
- Atom selection keywords
- Moving frame of reference.
- Treatment of periodic boundary conditions.
- Performance of a Colvars calculation based on group size.

- Collective variable types (available functions)
- List of available colvar components
`distance`: center-of-mass distance between two groups.`distanceZ`: projection of a distance vector on an axis.`distanceXY`: modulus of the projection of a distance vector on a plane.`distanceVec`: distance vector between two groups.`distanceDir`: distance unit vector between two groups.`distanceInv`: mean distance between two groups of atoms.`distancePairs`: set of pairwise distances between two groups.`cartesian`: vector of atomic Cartesian coordinates.`angle`: angle between three groups.`dipoleAngle`: angle between two groups and dipole of a third group.`dihedral`: torsional angle between four groups.`polarTheta`: polar angle in spherical coordinates.`polarPhi`: azimuthal angle in spherical coordinates.`coordNum`: coordination number between two groups.`selfCoordNum`: coordination number between atoms within a group.`hBond`: hydrogen bond between two atoms.`rmsd`: root mean square displacement (RMSD) from reference positions.- Advanced usage of the
`rmsd`component. - Path collective variables
`eigenvector`: projection of the atomic coordinates on a vector.`gyration`: radius of gyration of a group of atoms.`inertia`: total moment of inertia of a group of atoms.`inertiaZ`: total moment of inertia of a group of atoms around a chosen axis.`orientation`: orientation from reference coordinates.`orientationAngle`: angle of rotation from reference coordinates.`orientationProj`: cosine of the angle of rotation from reference coordinates.`spinAngle`: angle of rotation around a given axis.`tilt`: cosine of the rotation orthogonal to a given axis.`alpha`: -helix content of a protein segment.`dihedralPC`: protein dihedral pricipal component

- Configuration keywords shared by all components
- Advanced usage and special considerations
- Linear and polynomial combinations of components
- Colvars as custom functions of components
- Colvars as scripted functions of components

- List of available colvar components
- Biasing and analysis methods
- Adaptive Biasing Force
- Extended-system Adaptive Biasing Force (eABF)
- Metadynamics
- Harmonic restraints
- Computing the work of a changing restraint
- Harmonic wall restraints
- Linear restraints
- Adaptive Linear Bias/Experiment Directed Simulation
- Multidimensional histograms
- Probability distribution-restraints
- Scripted biases

- Colvars scripting