$\phantom{\rule{0.3em}{0ex}}$

COLLECTIVE VARIABLES MODULE

Reference manual for NAMD

Code version: 2020-05-07

Alejandro Bernardin, Haochuan Chen, Jeﬀrey R. Comer, Giacomo Fiorin, Haohao Fu, Jérôme Hénin, Axel Kohlmeyer, Fabrizio Marinelli, Joshua V. Vermaas, Andrew D. White

### 1 Overview

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 deﬁne 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’, often shortened to colvar, to indicate any diﬀerentiable function of atomic Cartesian coordinates, ${\text{}x\text{}}_{i}$, with $i$ between $1$ and $N$, the total number of atoms:

 $\xi \left(t\right)\phantom{\rule{3.04074pt}{0ex}}=\xi \left(\text{}X\text{}\left(t\right)\right)\phantom{\rule{3.04074pt}{0ex}}=\xi \left({\text{}x\text{}}_{i}\left(t\right),{\text{}x\text{}}_{j}\left(t\right),{\text{}x\text{}}_{k}\left(t\right),\dots \right)\phantom{\rule{3.04074pt}{0ex}},\phantom{\rule{3.04074pt}{0ex}}\phantom{\rule{3.04074pt}{0ex}}1\le i,j,k\dots \le N$ (1)

This manual documents the collective variables module (Colvars), a software that provides an implementation for the functions $\xi \left(\text{}X\text{}\right)$ with a focus on ﬂexibility, robustness and high performance. 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 variables, 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 eﬃcient;
• calculate potentials of mean force (PMFs) along any set of variables, using diﬀerent 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 variables, such as running averages and standard deviations, correlation functions of pairs of variables, and multidimensional histograms: this can be done either at run-time without the need to save very large trajectory ﬁles, or after a simulation has been completed using VMD and the cv command.

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

### 2 Writing a Colvars conﬁguration: a crash course

The Colvars conﬁguration is a plain text ﬁle or string that deﬁnes collective variables, biases, and general parameters of the Colvars module. It is passed to the module using back-end-speciﬁc commands documented in section 3.

Now let us look at a complete, non-trivial conﬁguration. Suppose that we want to run a steered MD experiment where a small molecule is pulled away from a protein binding site. In Colvars terms, this is done by applying a moving restraint to the distance between the two objects. The conﬁguration will contain two blocks, one deﬁning the distance variable (see section 4 and 4.2.1), and the other the moving harmonic restraint (6.5).

colvar {
name dist
distance {
group1 { atomNumbersRange 42-55 }
group2 {
psfSegID PR
atomNameResidueRange CA 15-30
}
}
}

harmonic {
colvars dist
forceConstant 20.0
centers 4.0         # initial distance
targetCenters 15.0  # final distance
targetNumSteps 500000
}

Reading this input in plain English: the variable here named dist consists in a distance function between the centers of two groups: the ligand (atoms 42 to 55) and the $\alpha$-carbon atoms of residues 15 to 30 in the protein (segment name PR). To the “dist” variable, we apply a harmonic potential of force constant 20 kcal/mol/Å${}^{2}$, initially centered around a value of 4 Å, which will increase to 15 Å over 500,000 simulation steps.

The atom selection keywords are detailed in section 5.

### 3 Enabling and controlling the Colvars module in NAMD

Here, we document the syntax of the commands and parameters used to set up and use the Colvars module in NAMD. One of these parameters is the conﬁguration ﬁle or the conﬁguration text for the module itself, whose syntax is described in 3.4 and in the following sections.

#### 3.1 Units in the Colvars module

The “internal units” of the Colvars module are the units in which values are expected to be in the conﬁguration ﬁle, and in which collective variable values, energies, etc. are expressed in the output and colvars trajectory ﬁles. Generally the Colvars module uses internally the same units as its back-end MD engine, with the exception of VMD, where diﬀerent unit sets are supported to allow for easy setup, visualization and analysis of Colvars simulations performed with any simulation engine.

Note that angles are expressed in degrees, and derived quantites such as force constants are based on degrees as well. Atomic coordinates read from XYZ ﬁles (and PDB ﬁles where applicable) are expected to be expressed in Ångström, no matter what unit system is in use by the back-end or the Colvars Module.

To avoid errors due to reading conﬁguration ﬁles written in a diﬀerent unit system, it can be speciﬁed within the input:

• Keyword units$⟨\phantom{\rule{0.3em}{0ex}}$Unit system to be used$\phantom{\rule{0.3em}{0ex}}⟩$
Context: global
Acceptable values: string
Description: A string deﬁning the units to be used internally by Colvars. In NAMD the only allowed value is NAMD’s native units: real (Å, kcal/mol).

#### 3.2 NAMD parameters

To enable a Colvars-based calculation, the colvars on command must be added to the NAMD script. Two optional commands, colvarsConfig and colvarsInput can be used to deﬁne the module’s conﬁguration or continue a previous simulation. Because these are static parameters, it is typically more convenient to use the cv command in the rest of the NAMD script.

• Keyword colvars$⟨\phantom{\rule{0.3em}{0ex}}$Enable the Colvars module$\phantom{\rule{0.3em}{0ex}}⟩$
Context: NAMD conﬁguration ﬁle
Acceptable values: boolean
Default value: off
Description: If this ﬂag is on, the Colvars module within NAMD is enabled.
• Keyword colvarsConfig$⟨\phantom{\rule{0.3em}{0ex}}$Conﬁguration ﬁle for the collective variables$\phantom{\rule{0.3em}{0ex}}⟩$
Context: NAMD conﬁguration ﬁle
Acceptable values: UNIX ﬁlename
Description: Name of the Colvars conﬁguration ﬁle (3.4, 3.5 and following sections). This ﬁle can also be provided by the Tcl command cv configfile. Alternatively, the contents of the ﬁle (as opposed to the ﬁle itself) can be given as a string argument to the command cv config.
• Keyword colvarsInput$⟨\phantom{\rule{0.3em}{0ex}}$Input state ﬁle for the collective variables$\phantom{\rule{0.3em}{0ex}}⟩$
Context: NAMD conﬁguration ﬁle
Acceptable values: UNIX ﬁlename
Description: Keyword used to specify the input state ﬁle’s name (3.6). If the input ﬁle is meant to be loaded within a Tcl script section, the cv load command may be used instead.

#### 3.3 Using the cv command to control the Colvars module

At any moment after the ﬁrst initialization of the Colvars module, several options can be read or modiﬁed by the Tcl command cv, with the following syntax:
cv $<$subcommand$>$ [args ...]
The most frequent uses of the cv command are discussed here. For a complete list of all sub-commands of cv, see section 7.

##### 3.3.1 Setting up the Colvars module

If the NAMD conﬁguration parameter colvars is on, the cv command can be used anywhere in the NAMD script, and will be invoked as soon as NAMD begins processing Tcl commands.

To deﬁne collective variables and biases, conﬁguration can be loaded using either:
cv configfile colvars-file.in
to load conﬁguration from a ﬁle, or:
cv config "keyword { ... }"
to load conﬁguration as a string argument.

The latter version is particularly useful to dynamically deﬁne the Colvars conﬁguration. For example, when running an ensemble of umbrella sampling simulations in NAMD, it may be convenient to use an identical NAMD script, and let the queuing system assist in deﬁning the window. In this example, in a Slurm array job an environment variable is used to deﬁne the window’s numeric index (starting at zero), and the umbrella restraint center (starting at 2 for the ﬁrst window, and increasing in increments of 0.25 for all other windows):
cv configfile colvars-definition.in
set window $env(SLURM_ARRAY_TASK_ID) cv config "harmonic { name us_${window}
colvars xi
where $force is a scalar or a vector (depending on the type of variable xi) and is deﬁned by the user’s function. The force will be physically applied to the corresponding atoms during the simulation after Colvars communicates all forces to the rest of NAMD. Until then, the total force applied to xi from all biases can be retrieved by: cv colvar xi getappliedforce (see also the use of the outputAppliedForce option). To obtain the total force projected on the variable xi: cv colvar xi gettotalforce Note that not all types of variable support this option, and the value of the total force may not be available immediately: see outputTotalForce for more details. See 7.2 for a complete list of scripting commands used to manage collective variables. ##### 3.3.6 Managing collective variable biases Because biases depend only upon data internal to the Colvars module (i.e. they do not need atomic coordinates from NAMD), it is generally easy to create them or update their conﬁguration at any time. For example, given the most current value of the variable xi, an already-deﬁned restraint on it named harmonic_xi can be updated as: cv bias harmonic_xi update Again, this is not generally needed during a running simulation, when an automat ic update of each bias is already carried out. Calling update for a bias is most useful for just-deﬁned biases or when changing their conﬁguration. When update is called e.g. as part of the function invoked by scriptedColvarForces, it is executed before any biasing forces are applied to the variables, thus allowing to modify them. This use of update is often used e.g. in the deﬁnition of custom bias-exchange algorithms as part of the NAMD script. Because a bias is a relatively light-weight object, the easiest way to change the conﬁguration of an existing bias is deleting it and re-creating it: # Delete the restraint "harmonic_xi" cv bias harmonic_xi delete # Re-define it, but using an updated restraint center cv config "harmonic { name harmonic_xi centers${new_center}]
...
}"
# Now update it (based on the current value of "xi")
cv bias harmonic_xi update
It is also possible to make the change subject to a condition on the energy of the new bias:
...
cv bias harmonic_xi update
if { [cv bias harmonic_xi energy] < {E_accept} } { ... } ##### 3.3.7 Loading and saving the state of individual biases Some types of bias are history-dependent, and the magnitude of their forces depends not only on the values of their corresponding variables, but also on previous simulation history. It is thus useful to load information from a state ﬁle that contains information speciﬁcally for one bias only, for example: cv bias metadynamics1 load old.colvars.state or alternatively, using the preﬁx of the ﬁle instead of its full name: cv bias metadynamics1 load old A corresponding save function is also available: cv bias metadynamics1 save new This pair of functions is also used internally by Colvars to implement e.g. multiple-walker metadynamics (6.4.7), but they can be called from a scripted function to implement alternative coupling schemes. See 7.3 for a complete list of scripting commands used to manage biases. #### 3.4 Conﬁguration syntax used by the Colvars module All the parameters deﬁning variables and their biasing or analysis algorithms are read from the ﬁle speciﬁed by the conﬁguration option colvarsConfig, or by the Tcl commands cv config and cv configfile. None of the keywords described in the remainder of this manual are recognized directly in the NAMD conﬁguration ﬁle, unless as arguments of cv config. Each conﬁguration line follows the format “keyword value”, where the keyword and its value are separated by any white space. The following rules apply: • keywords are case-insensitive (upperBoundary is the same as upperboundary and UPPERBOUNDARY): their string values are however case-sensitive (e.g. ﬁle names); • a long value, or a list of multiple values, can be distributed across multiple lines by using curly braces, “{” and “}”: the opening brace “{” must occur on the same line as the keyword, following a space character or other white space; the closing brace “}” can be at any position after that; any keywords following the closing brace on the same line are not valid (they should appear instead on a diﬀerent line); • many keywords are nested, and are only meaningful within a speciﬁc context: for every keyword documented in the following, the “parent” keyword that deﬁnes such context is also indicated; • the ‘=’ sign between a keyword and its value, deprecated in the NAMD main conﬁguration ﬁle, is not allowed; • Tcl syntax is generally not available, but it is possible to use Tcl variables or bracket expansion of commands within a conﬁguration string, when this is passed via the command cv config ; this is particularly useful when combined with parameter introspection, e.g. cv config "colvarsTrajFrequency [DCDFreq]"; • if a keyword requiring a boolean value (yes|on|true or no|off|false) is provided without an explicit value, it defaults to ‘yes|on|true’; for example, ‘outputAppliedForce’ may be used as shorthand for ‘outputAppliedForce on’; • the hash character # indicates a comment: all text in the same line following this character will be ignored. #### 3.5 Global keywords The following keywords are available in the global context of the Colvars conﬁguration, i.e. they are not nested inside other keywords: • Keyword colvarsTrajFrequency$⟨\phantom{\rule{0.3em}{0ex}}$Colvar value trajectory frequency$\phantom{\rule{0.3em}{0ex}}⟩$ Context: global Acceptable values: positive integer Default value: 100 Description: The values of each colvar (and of other related quantities, if requested) are written to the ﬁle outputName.colvars.traj every these many steps throughout the simulation. If the value is 0, such trajectory ﬁle is not written. For optimization the output is buﬀered, and synchronized with the disk only when the restart ﬁle is being written. • Keyword colvarsRestartFrequency$⟨\phantom{\rule{0.3em}{0ex}}$Colvar module restart frequency$\phantom{\rule{0.3em}{0ex}}⟩$ Context: global Acceptable values: positive integer Default value: NAMD parameter restartFreq Description: The state ﬁle and any other output ﬁles produced by Colvars are written every these many steps (the trajectory ﬁle is still written every colvarsTrajFrequency steps). It is generally a good idea to leave this parameter at its default value, unless needed for special cases or to disable automatic writing of output ﬁles altogether. Writing can still be invoked at any time via the command cv save. • Keyword indexFile$⟨\phantom{\rule{0.3em}{0ex}}$Index ﬁle for atom selection (GROMACS “ndx” format)$\phantom{\rule{0.3em}{0ex}}⟩$ Context: global Acceptable values: UNIX ﬁlename Description: This option reads an index ﬁle (usually with a .ndx extension) as produced by the make_ndx tool of GROMACS. This keyword may be repeated to load multiple index ﬁles. A group with the same name may appear multiple times, as long as it contains the same indices in identical order each time: an error is raised otherwise. The names of index groups contained in this ﬁle can then be used to deﬁne atom groups with the indexGroup keyword. Other supported methods to select atoms are described in 5. • Keyword smp$⟨\phantom{\rule{0.3em}{0ex}}$Whether SMP parallelism should be used$\phantom{\rule{0.3em}{0ex}}⟩$ Context: global Acceptable values: boolean Default value: on Description: If this ﬂag is enabled (default), SMP parallelism over threads will be used to compute variables and biases, provided that this is supported by the NAMD build in use. To illustrate the ﬂexibility of the Colvars module, a non-trivial setup is represented in Figure 1. The corresponding conﬁguration is given below. The options within the colvar blocks are described in 4, those within the harmonic and histogram blocks in 6. Note: except colvar, none of the keywords shown is mandatory. colvar { # difference of two distances name d width 0.2 # 0.2 Å of estimated fluctuation width distance { componentCoeff 1.0 group1 { atomNumbers 1 2 } group2 { atomNumbers 3 4 5 } } distance { componentCoeff -1.0 group1 { atomNumbers 7 } group2 { atomNumbers 8 9 10 } } } colvar { name c coordNum { cutoff 6.0 group1 { atomNumbersRange 1-10 } group2 { atomNumbersRange 11-20 } } } colvar { name alpha alpha { psfSegID PROT residueRange 1-10 } } harmonic { colvars d c centers 3.0 4.0 forceConstant 5.0 } histogram { colvars c alpha } Section 4 explains how to deﬁne a colvar and its behavior, regardless of its speciﬁc functional form. To deﬁne colvars that are appropriate to a speciﬁc physical system, Section 5 documents how to select atoms, and section 4 lists all of the available functional forms, which we call “colvar components”. Finally, section 6 lists the available methods and algorithms to perform biased simulations and multidimensional analysis of colvars. #### 3.6 Input state ﬁle Because many of the methods implemented in Colvars are history-dependent, a state ﬁle is often needed to continue a long simulation over consecutive runs. Such state ﬁle is written automatically at the end of any simulation with Colvars, and contains data accumulated during that simulation along with the step number at the end of it. The step number read from the state ﬁle is then used to control such time-dependent biases: because of this essential role, the step number internal to Colvars may not always match the step number reported by the MD program that carried during the simulation (which may instead restart from zero each time). If a state ﬁle is not given, the NAMD command firstTimestep may be used to control the Colvars step number. Depending on the conﬁguration, a state ﬁle may need to be loaded issued at the beginning of a new simulation when time-dependent biasing methods are applied (moving restraints, metadynamics, ABF, ...). When the Colvars module is initialized in NAMD, the colvarsInput keyword can be used to give the name of the state ﬁle. After initialization, a state ﬁle may be loaded at any time with the Tcl command cv load. It is possible to load a state ﬁle even if the conﬁguration has changed: for example, new variables may be deﬁned or restraints be added in between consecutive runs. For each newly deﬁned variable or bias, no information will be read from the state ﬁle if this is unavailable: such new objects will remain uninitialized until the ﬁrst compute step. Conversely, any information that the state ﬁle has about variables or biases that are not deﬁned any longer is silently ignored. Because these checks are done by the names of variables or biases, it is the user’s responsibility to ensure that these are consistent between runs. #### 3.7 Output ﬁles During a simulation with collective variables deﬁned, the following three output ﬁles are written: • A state ﬁle, named outputName.colvars.state; this ﬁle is in ASCII (plain text) format, regardless of the value of binaryOutput in the NAMD conﬁguration. This ﬁle is written at the end of the speciﬁed run, but can also be written at any time with the command cv save (3.3.3). This is the only Colvars output ﬁle needed to continue a simulation. • If the parameter colvarsRestartFrequency is larger than zero, a restart ﬁle is written every that many steps: this ﬁle is fully equivalent to the ﬁnal state ﬁle. The name of this ﬁle is restartName.colvars.state. • If the parameter colvarsTrajFrequency is greater than 0 (default: 100), a trajectory ﬁle is written during the simulation: its name is outputName.colvars.traj; unlike the state ﬁle, it is not needed to restart a simulation, but can be used later for post-processing and analysis. Other output ﬁles may also be written by speciﬁc methods, e.g. the ABF or metadynamics methods (6.2, 6.4). Like the trajectory ﬁle, they are needed only for analyzing, not continuing a simulation. All such ﬁles’ names also begin with the preﬁx outputName. Lastly, the total energy of all biases or restraints applied to the colvars appears under the NAMD standard output, under the MISC column. ### 4 Deﬁning collective variables A collective variable is deﬁned by the keyword colvar followed by its conﬁguration options contained within curly braces: colvar { name xi $<$other options$>$ function_name { $<$parameters$>$ $<$atom selection$>$ } } There are multiple ways of deﬁning a variable: • The simplest and most common way way is using one of the precompiled functions (here called “components”), which are listed in section 4.1. For example, using the keyword rmsd (section 4.5.1) deﬁnes the variable as the root mean squared deviation (RMSD) of the selected atoms. • A new variable may also be constructed as a linear or polynomial combination of the components listed in section 4.1 (see 4.15 for details). • A user-deﬁned mathematical function of the existing components (see list in section 4.1), or of the atomic coordinates directly (see the cartesian keyword in 4.8.1). The function is deﬁned through the keyword customFunction (see 4.16 for details). • A user-deﬁned Tcl function of the existing components (see list in section 4.1), or of the atomic coordinates directly (see the cartesian keyword in 4.8.1). The function is provided by a separate Tcl script, and referenced through the keyword scriptedFunction (see 4.17 for details). Choosing a component (function) is the only parameter strictly required to deﬁne a collective variable. It is also highly recommended to specify a name for the variable: • Keyword name$⟨\phantom{\rule{0.3em}{0ex}}$Name of this colvar$\phantom{\rule{0.3em}{0ex}}⟩$ Context: colvar Acceptable values: string Default value: colvar” + numeric id Description: The name is an unique case-sensitive string which allows the Colvars module to identify this colvar unambiguously; it is also used in the trajectory ﬁle to label to the columns corresponding to this colvar. #### 4.1 Choosing a function In this context, the function that computes a colvar is called a component. A component’s choice and deﬁnition consists of including in the variable’s conﬁguration a keyword indicating the type of function (e.g. rmsd), followed by a deﬁnition block specifying the atoms involved (see 5) and any additional parameters (cutoﬀs, “reference” values, …). At least one component must be chosen to deﬁne a variable: if none of the keywords listed below is found, an error is raised. The following components implement functions with a scalar value (i.e. a real number): • distance: distance between two groups; • distanceZ: projection of a distance vector on an axis; • distanceXY: projection of a distance vector on a plane; • distanceInv: mean distance between two groups of atoms (e.g. NOE-based distance); • angle: angle between three groups; • dihedral: torsional (dihedral) angle between four groups; • dipoleAngle: angle between two groups and dipole of a third group; • dipoleMagnitude magnitude of the dipole of a group of atoms; • polarTheta: polar angle of a group in spherical coordinates; • polarPhi: azimuthal angle of a group in spherical coordinates; • coordNum: coordination number between two groups; • selfCoordNum: coordination number of atoms within a group; • hBond: hydrogen bond between two atoms; • rmsd: root mean square deviation (RMSD) from a set of reference coordinates; • eigenvector: projection of the atomic coordinates on a vector; • mapTotal: total value of a volumetric map; • orientationAngle: angle of the best-ﬁt rotation from a set of reference coordinates; • orientationProj: cosine of orientationProj; • spinAngle: projection orthogonal to an axis of the best-ﬁt rotation from a set of reference coordinates; • tilt: projection on an axis of the best-ﬁt rotation from a set of reference coordinates; • gyration: radius of gyration of a group of atoms; • inertia: moment of inertia of a group of atoms; • inertiaZ: moment of inertia of a group of atoms around a chosen axis; • alpha: $\alpha$-helix content of a protein segment. • dihedralPC: projection of protein backbone dihedrals onto a dihedral principal component. Some components do not return scalar, but vector values: • distanceVec: distance vector between two groups (length: 3); • distanceDir: unit vector parallel to distanceVec (length: 3); • cartesian: vector of atomic Cartesian coordinates (length: $N$ times the number of Cartesian components requested, X, Y or Z); • distancePairs: vector of mutual distances (length: ${N}_{\mathrm{1}}×{N}_{\mathrm{2}}$); • orientation: best-ﬁt rotation, expressed as a unit quaternion (length: 4). The types of components used in a colvar (scalar or not) determine the properties of that colvar, and particularly which biasing or analysis methods can be applied. What if “X” is not listed? If a function type is not available on this list, it may be possible to deﬁne it as a polynomial superposition of existing ones (see 4.15), a custom function (see 4.16), or a scripted function (see 4.17). In the rest of this section, all available component types are listed, along with their physical units and the ranges of values, if limited. Such limiting values can be used to deﬁne lowerBoundary and upperBoundary in the parent colvar. For each type of component, the available conﬁgurations keywords are listed: when two components share certain keywords, the second component references to the documentation of the ﬁrst one that uses that keyword. The very few keywords that are available for all types of components are listed in a separate section 4.12. #### 4.2 Distances ##### 4.2.1 distance: center-of-mass distance between two groups. The distance {...} block deﬁnes a distance component between the two atom groups, group1 and group2. List of keywords (see also 4.15 for additional options): • Keyword group1$⟨\phantom{\rule{0.3em}{0ex}}$First group of atoms$\phantom{\rule{0.3em}{0ex}}⟩$ Context: distance Acceptable values: Block group1 {...} Description: First group of atoms. • Keyword group2: analogous to group1 • Keyword forceNoPBC$⟨\phantom{\rule{0.3em}{0ex}}$Calculate absolute rather than minimum-image distance?$\phantom{\rule{0.3em}{0ex}}⟩$ Context: distance Acceptable values: boolean Default value: no Description: By default, in calculations with periodic boundary conditions, the distance component returns the distance according to the minimum-image convention. If this parameter is set to yes, PBC will be ignored and the distance between the coordinates as maintained internally will be used. This is only useful in a limited number of special cases, e.g. to describe the distance between remote points of a single macromolecule, which cannot be split across periodic cell boundaries, and for which the minimum-image distance might give the wrong result because of a relatively small periodic cell. • Keyword oneSiteTotalForce$⟨\phantom{\rule{0.3em}{0ex}}$Measure total force on group 1 only?$\phantom{\rule{0.3em}{0ex}}⟩$ Context: angle, dipoleAngle, dihedral Acceptable values: boolean Default value: no Description: If this is set to yes, the total force is measured along a vector ﬁeld (see equation (27) in section 6.2) that only involves atoms of group1. This option is only useful for ABF, or custom biases that compute total forces. See section 6.2 for details. 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). ##### 4.2.2 distanceZ: projection of a distance vector on an axis. The distanceZ {...} block deﬁnes 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 deﬁned using either one reference group and a constant vector, or dynamically based on two reference groups. One of the groups can be set to a dummy atom to allow the use of an absolute Cartesian coordinate. List of keywords (see also 4.15 for additional options): • Keyword main$⟨\phantom{\rule{0.3em}{0ex}}$Main group of atoms$\phantom{\rule{0.3em}{0ex}}⟩$ Context: distanceZ Acceptable values: Block main {...} Description: Group of atoms whose position $\text{}r\text{}$ is measured. • Keyword ref$⟨\phantom{\rule{0.3em}{0ex}}$Reference group of atoms$\phantom{\rule{0.3em}{0ex}}⟩$ Context: distanceZ Acceptable values: Block ref {...} Description: Reference group of atoms. The position of its center of mass is noted ${\text{}r\text{}}_{1}$ below. • Keyword ref2$⟨\phantom{\rule{0.3em}{0ex}}$Secondary reference group$\phantom{\rule{0.3em}{0ex}}⟩$ Context: distanceZ Acceptable values: Block ref2 {...} Default value: none Description: Optional group of reference atoms, whose position ${\text{}r\text{}}_{2}$ can be used to deﬁne a dynamic projection axis: $\text{}e\text{}={\left(\parallel {\text{}r\text{}}_{2}-{\text{}r\text{}}_{1}\parallel \right)}^{-1}×\left({\text{}r\text{}}_{2}-{\text{}r\text{}}_{1}\right)$. In this case, the origin is ${\text{}r\text{}}_{m}=1∕2\left({\text{}r\text{}}_{1}+{\text{}r\text{}}_{2}\right)$, and the value of the component is $\text{}e\text{}\cdot \left(\text{}r\text{}-{\text{}r\text{}}_{m}\right)$. • Keyword axis$⟨\phantom{\rule{0.3em}{0ex}}$Projection axis (Å)$\phantom{\rule{0.3em}{0ex}}⟩$ Context: distanceZ Acceptable values: (x, y, z) triplet Default value: (0.0, 0.0, 1.0) Description: The three components of this vector deﬁne a projection axis $\text{}e\text{}$ for the distance vector $\text{}r\text{}-{\text{}r\text{}}_{1}$ joining the centers of groups ref and main. The value of the component is then $\text{}e\text{}\cdot \left(\text{}r\text{}-{\text{}r\text{}}_{1}\right)$. The vector should be written as three components separated by commas and enclosed in parentheses. • Keyword forceNoPBC: see deﬁnition of forceNoPBC in sec. 4.2.1 (distance component) • Keyword oneSiteTotalForce: see deﬁnition of oneSiteTotalForce in sec. 4.2.1 (distance component) 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). ##### 4.2.3 distanceXY: modulus of the projection of a distance vector on a plane. The distanceXY {...} block deﬁnes 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 deﬁned using the axis parameter or as the vector joining ref and ref2 (see distanceZ above). List of keywords (see also 4.15 for additional options): • Keyword main: see deﬁnition of main in sec. 4.2.2 (distanceZ component) • Keyword ref: see deﬁnition of ref in sec. 4.2.2 (distanceZ component) • Keyword ref2: see deﬁnition of ref2 in sec. 4.2.2 (distanceZ component) • Keyword axis: see deﬁnition of axis in sec. 4.2.2 (distanceZ component) • Keyword forceNoPBC: see deﬁnition of forceNoPBC in sec. 4.2.1 (distance component) • Keyword oneSiteTotalForce: see deﬁnition of oneSiteTotalForce in sec. 4.2.1 (distance component) ##### 4.2.4 distanceVec: distance vector between two groups. The distanceVec {...} block deﬁnes 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 4.15 for additional options): • Keyword group1: see deﬁnition of group1 in sec. 4.2.1 (distance component) • Keyword group2: analogous to group1 • Keyword forceNoPBC: see deﬁnition of forceNoPBC in sec. 4.2.1 (distance component) • Keyword oneSiteTotalForce: see deﬁnition of oneSiteTotalForce in sec. 4.2.1 (distance component) ##### 4.2.5 distanceDir: distance unit vector between two groups. The distanceDir {...} block deﬁnes 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}=\left({d}_{x},{d}_{y},{d}_{z}\right)$, with $|\mathbf{d}|=1$. List of keywords (see also 4.15 for additional options): • Keyword group1: see deﬁnition of group1 in sec. 4.2.1 (distance component) • Keyword group2: analogous to group1 • Keyword forceNoPBC: see deﬁnition of forceNoPBC in sec. 4.2.1 (distance component) • Keyword oneSiteTotalForce: see deﬁnition of oneSiteTotalForce in sec. 4.2.1 (distance component) ##### 4.2.6 distanceInv: mean distance between two groups of atoms. The distanceInv {...} block deﬁnes a generalized mean distance between two groups of atoms 1 and 2, weighted with exponent $1∕n$:  ${d}_{\mathrm{1,2}}^{\left[n\right]}\phantom{\rule{3.04074pt}{0ex}}=\phantom{\rule{3.04074pt}{0ex}}{\left(\frac{1}{{N}_{\mathrm{1}}{N}_{\mathrm{2}}}\sum _{i,j}{\left(\frac{1}{\parallel {\mathbf{d}}^{ij}\parallel }\right)}^{n}\right)}^{-1∕n}$ (2) where $\parallel {\mathbf{d}}^{ij}\parallel$ 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 4.15 for additional options): • Keyword group1: see deﬁnition of group1 in sec. 4.2.1 (distance component) • Keyword group2: analogous to group1 • Keyword oneSiteTotalForce: see deﬁnition of oneSiteTotalForce in sec. 4.2.1 (distance component) • Keyword exponent$⟨\phantom{\rule{0.3em}{0ex}}$Exponent $n$ in equation 2$\phantom{\rule{0.3em}{0ex}}⟩$ Context: distanceInv Acceptable values: positive even integer Default value: 6 Description: Deﬁnes the exponent to which the individual distances are elevated before averaging. The default value of 6 is useful for example to applying restraints based on NOE-measured distances. This component returns a number in Å, ranging from $0$ to the largest possible distance within the chosen boundary conditions. #### 4.3 Angles ##### 4.3.1 angle: angle between three groups. The angle {...} block deﬁnes an angle, and contains the three blocks group1, group2 and group3, deﬁning the three groups. It returns an angle (in degrees) within the interval $\left[0:180\right]$. List of keywords (see also 4.15 for additional options): • Keyword group1: see deﬁnition of group1 in sec. 4.2.1 (distance component) • Keyword group2: analogous to group1 • Keyword group3: analogous to group1 • Keyword forceNoPBC: see deﬁnition of forceNoPBC in sec. 4.2.1 (distance component) • Keyword oneSiteTotalForce: see deﬁnition of oneSiteTotalForce in sec. 4.2.1 (distance component) ##### 4.3.2 dipoleAngle: angle between two groups and dipole of a third group. The dipoleAngle {...} block deﬁnes an angle, and contains the three blocks group1, group2 and group3, deﬁning the three groups, being group1 the group where dipole is calculated. It returns an angle (in degrees) within the interval $\left[0:180\right]$. List of keywords (see also 4.15 for additional options): • Keyword group1: see deﬁnition of group1 in sec. 4.2.1 (distance component) • Keyword group2: analogous to group1 • Keyword group3: analogous to group1 • Keyword forceNoPBC: see deﬁnition of forceNoPBC in sec. 4.2.1 (distance component) • Keyword oneSiteTotalForce: see deﬁnition of oneSiteTotalForce in sec. 4.2.1 (distance component) ##### 4.3.3 dihedral: torsional angle between four groups. The dihedral {...} block deﬁnes a torsional angle, and contains the blocks group1, group2, group3 and group4, deﬁning the four groups. It returns an angle (in degrees) within the interval $\left[-180:180\right]$. 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 deﬁned by using any real number of choice. List of keywords (see also 4.15 for additional options): • Keyword group1: see deﬁnition of group1 in sec. 4.2.1 (distance component) • Keyword group2: analogous to group1 • Keyword group3: analogous to group1 • Keyword group4: analogous to group1 • Keyword forceNoPBC: see deﬁnition of forceNoPBC in sec. 4.2.1 (distance component) • Keyword oneSiteTotalForce: see deﬁnition of oneSiteTotalForce in sec. 4.2.1 (distance component) ##### 4.3.4 polarTheta: polar angle in spherical coordinates. The polarTheta {...} block deﬁnes the polar angle in spherical coordinates, for the center of mass of a group of atoms described by the block atoms. It returns an angle (in degrees) within the interval $\left[0:180\right]$. To obtain spherical coordinates in a frame of reference tied to another group of atoms, use the fittingGroup (5.2) option within the atoms block. An example is provided in ﬁle examples/11_polar_angles.in of the Colvars public repository. List of keywords (see also 4.15 for additional options): • Keyword atoms$⟨\phantom{\rule{0.3em}{0ex}}$Atom group$\phantom{\rule{0.3em}{0ex}}⟩$ Context: polarPhi Acceptable values: atoms {...} block Description: Deﬁnes the group of atoms for the COM of which the angle should be calculated. ##### 4.3.5 polarPhi: azimuthal angle in spherical coordinates. The polarPhi {...} block deﬁnes the azimuthal angle in spherical coordinates, for the center of mass of a group of atoms described by the block atoms. It returns an angle (in degrees) within the interval $\left[-180:180\right]$. 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 deﬁned by using any real number of choice. To obtain spherical coordinates in a frame of reference tied to another group of atoms, use the fittingGroup (5.2) option within the atoms block. An example is provided in ﬁle examples/11_polar_angles.in of the Colvars public repository. List of keywords (see also 4.15 for additional options): • Keyword atoms$⟨\phantom{\rule{0.3em}{0ex}}$Atom group$\phantom{\rule{0.3em}{0ex}}⟩$ Context: polarPhi Acceptable values: atoms {...} block Description: Deﬁnes the group of atoms for the COM of which the angle should be calculated. #### 4.4 Contacts ##### 4.4.1 coordNum: coordination number between two groups. The coordNum {...} block deﬁnes a coordination number (or number of contacts), which calculates the function $\left(1-{\left(d∕{d}_{0}\right)}^{n}\right)∕\left(1-{\left(d∕{d}_{0}\right)}^{m}\right)$, where ${d}_{0}$ is the “cutoﬀ” distance, and $n$ and $m$ are exponents that can control its long range behavior and stiﬀness [2]. This function is summed over all pairs of atoms in group1 and group2:  $C\left(\mathtt{group1},\mathtt{group2}\right)\phantom{\rule{3.04074pt}{0ex}}=\phantom{\rule{3.04074pt}{0ex}}\sum _{i\in \mathtt{group1}}\sum _{j\in \mathtt{group2}}\frac{1-{\left(|{\mathbf{x}}_{i}-{\mathbf{x}}_{j}|∕{d}_{0}\right)}^{n}}{1-{\left(|{\mathbf{x}}_{i}-{\mathbf{x}}_{j}|∕{d}_{0}\right)}^{m}}$ (3) List of keywords (see also 4.15 for additional options): • Keyword group1: see deﬁnition of group1 in sec. 4.2.1 (distance component) • Keyword group2: analogous to group1 • Keyword cutoff$⟨\phantom{\rule{0.3em}{0ex}}$“Interaction” distance (Å)$\phantom{\rule{0.3em}{0ex}}⟩$ Context: coordNum Acceptable values: positive decimal Default value: 4.0 Description: This number deﬁnes the switching distance to deﬁne an interatomic contact: for $d\ll {d}_{0}$, the switching function $\left(1-{\left(d∕{d}_{0}\right)}^{n}\right)∕\left(1-{\left(d∕{d}_{0}\right)}^{m}\right)$ is close to 1, at $d={d}_{0}$ it has a value of $n∕m$ ($1∕2$ with the default $n$ and $m$), and at $d\gg {d}_{0}$ it goes to zero approximately like ${d}^{m-n}$. Hence, for a proper behavior, $m$ must be larger than $n$. • Keyword cutoff3$⟨\phantom{\rule{0.3em}{0ex}}$Reference distance vector (Å)$\phantom{\rule{0.3em}{0ex}}⟩$ Context: coordNum Acceptable values: (x, y, z)” triplet of positive decimals Default value: (4.0, 4.0, 4.0) Description: The three components of this vector deﬁne three diﬀerent cutoﬀs ${d}_{0}$ for each direction. This option is mutually exclusive with cutoff. • Keyword expNumer$⟨\phantom{\rule{0.3em}{0ex}}$Numerator exponent$\phantom{\rule{0.3em}{0ex}}⟩$ Context: coordNum Acceptable values: positive even integer Default value: 6 Description: This number deﬁnes the $n$ exponent for the switching function. • Keyword expDenom$⟨\phantom{\rule{0.3em}{0ex}}$Denominator exponent$\phantom{\rule{0.3em}{0ex}}⟩$ Context: coordNum Acceptable values: positive even integer Default value: 12 Description: This number deﬁnes the $m$ exponent for the switching function. • Keyword group2CenterOnly$⟨\phantom{\rule{0.3em}{0ex}}$Use only group2’s center of mass$\phantom{\rule{0.3em}{0ex}}⟩$ Context: coordNum Acceptable values: boolean Default value: off Description: If this option is on, only contacts between each atoms in group1 and the center of mass of group2 are calculated (by default, the sum extends over all pairs of atoms in group1 and group2). If group2 is a dummyAtom, this option is set to yes by default. • Keyword tolerance$⟨\phantom{\rule{0.3em}{0ex}}$Pairlist control$\phantom{\rule{0.3em}{0ex}}⟩$ Context: coordNum Acceptable values: decimal Default value: 0.0 Description: This controls the pairlist feature, dictating the minimum value for each summation element in Eq. 3 such that the pair that contributed the summation element is included in subsequent simulation timesteps until the next pairlist recalculation. For most applications, this value should be small (eg. 0.001) to avoid missing important contributions to the overall sum. Higher values will improve performance by reducing the number of pairs that contribute to the sum. Values above 1 will exclude all possible pair interactions. Similarly, values below 0 will never exclude a pair from consideration. To ensure continuous forces, Eq. 3 is further modiﬁed by subtracting the tolerance and then rescaling so that each pair covers the range $\left[0,1\right]$. • Keyword pairListFrequency$⟨\phantom{\rule{0.3em}{0ex}}$Pairlist regeneration frequency$\phantom{\rule{0.3em}{0ex}}⟩$ Context: coordNum Acceptable values: positive integer Default value: 100 Description: This controls the pairlist feature, dictating how many steps are taken between regenerating pairlists if the tolerance is greater than 0. This component returns a dimensionless number, which ranges from approximately 0 (all interatomic distances are much larger than the cutoﬀ) to ${N}_{\mathtt{group1}}×{N}_{\mathtt{group2}}$ (all distances are less than the cutoﬀ), 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}}×{N}_{\mathtt{group2}}$. Setting $\mathtt{tolerance}>0$ ameliorates this to some degree, although every pair is still checked to regenerate the pairlist. ##### 4.4.2 selfCoordNum: coordination number between atoms within a group. The selfCoordNum {...} block deﬁnes a coordination number similarly to the component coordNum, but the function is summed over atom pairs within group1:  $C\left(\mathtt{group1}\right)\phantom{\rule{3.04074pt}{0ex}}=\phantom{\rule{3.04074pt}{0ex}}\sum _{i\in \mathtt{group1}}\sum _{j>i}\frac{1-{\left(|{\mathbf{x}}_{i}-{\mathbf{x}}_{j}|∕{d}_{0}\right)}^{n}}{1-{\left(|{\mathbf{x}}_{i}-{\mathbf{x}}_{j}|∕{d}_{0}\right)}^{m}}$ (4) The keywords accepted by selfCoordNum are a subset of those accepted by coordNum, namely group1 (here deﬁning all of the atoms to be considered), cutoff, expNumer, and expDenom. List of keywords (see also 4.15 for additional options): • Keyword group1: see deﬁnition of group1 in sec. 4.4.1 (coordNum component) • Keyword cutoff: see deﬁnition of cutoff in sec. 4.4.1 (coordNum component) • Keyword cutoff3: see deﬁnition of cutoff3 in sec. 4.4.1 (coordNum component) • Keyword expNumer: see deﬁnition of expNumer in sec. 4.4.1 (coordNum component) • Keyword expDenom: see deﬁnition of expDenom in sec. 4.4.1 (coordNum component) • Keyword tolerance: see deﬁnition of tolerance in sec. 4.4.1 (coordNum component) • Keyword pairListFrequency: see deﬁnition of pairListFrequency in sec. 4.4.1 (coordNum component) This component returns a dimensionless number, which ranges from approximately 0 (all interatomic distances much larger than the cutoﬀ) to ${N}_{\mathtt{group1}}×\left({N}_{\mathtt{group1}}-1\right)∕2$ (all distances within the cutoﬀ). For performance reasons, group1 should be of limited size, because the cost of the loop over all pairs grows as ${N}_{\mathtt{group1}}^{2}$. ##### 4.4.3 hBond: hydrogen bond between two atoms. The hBond {...} block deﬁnes a hydrogen bond, implemented as a coordination number (eq. 3) between the donor and the acceptor atoms. Therefore, it accepts the same options cutoff (with a diﬀerent 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 deﬁned. It returns an adimensional number, with values between 0 (acceptor and donor far outside the cutoﬀ distance) and 1 (acceptor and donor much closer than the cutoﬀ). List of keywords (see also 4.15 for additional options): • Keyword acceptor$⟨\phantom{\rule{0.3em}{0ex}}$Number of the acceptor atom$\phantom{\rule{0.3em}{0ex}}⟩$ Context: hBond Acceptable values: positive integer Description: Number that uses the same convention as atomNumbers. • Keyword donor: analogous to acceptor • Keyword cutoff: see deﬁnition of cutoff in sec. 4.4.1 (coordNum component) Note: default value is 3.3 Å. • Keyword expNumer: see deﬁnition of expNumer in sec. 4.4.1 (coordNum component) Note: default value is 6. • Keyword expDenom: see deﬁnition of expDenom in sec. 4.4.1 (coordNum component) Note: default value is 8. #### 4.5 Collective metrics ##### 4.5.1 rmsd: root mean square displacement (RMSD) from reference positions. The block rmsd {...} deﬁnes the root mean square replacement (RMSD) of a group of atoms with respect to a reference structure. For each set of coordinates $\left\{{\mathbf{x}}_{1}\left(t\right),{\mathbf{x}}_{2}\left(t\right),\dots {\mathbf{x}}_{N}\left(t\right)\right\}$, the colvar component rmsd calculates the optimal rotation ${U}^{\left\{{\mathbf{x}}_{i}\left(t\right)\right\}\to \left\{{\mathbf{x}}_{i}^{\mathrm{\left(ref\right)}}\right\}}$ that best superimposes the coordinates $\left\{{\mathbf{x}}_{i}\left(t\right)\right\}$ onto a set of reference coordinates $\left\{{\mathbf{x}}_{i}^{\mathrm{\left(ref\right)}}\right\}$. Both the current and the reference coordinates are centered on their centers of geometry, ${\mathbf{x}}_{\mathrm{cog}}\left(t\right)$ and ${\mathbf{x}}_{\mathrm{cog}}^{\mathrm{\left(ref\right)}}$. The root mean square displacement is then deﬁned as:  $\mathrm{RMSD}\left(\left\{{\mathbf{x}}_{i}\left(t\right)\right\},\left\{{\mathbf{x}}_{i}^{\mathrm{\left(ref\right)}}\right\}\right)\phantom{\rule{3.04074pt}{0ex}}=\phantom{\rule{3.04074pt}{0ex}}\sqrt{\frac{1}{N}\sum _{i=1}^{N}{\left|U\left({\mathbf{x}}_{i}\left(t\right)-{\mathbf{x}}_{\mathrm{cog}}\left(t\right)\right)-\left({\mathbf{x}}_{i}^{\mathrm{\left(ref\right)}}-{\mathbf{x}}_{\mathrm{cog}}^{\mathrm{\left(ref\right)}}\right)\right|}^{2}}$ (5) The optimal rotation ${U}^{\left\{{\mathbf{x}}_{i}\left(t\right)\right\}\to \left\{{\mathbf{x}}_{i}^{\mathrm{\left(ref\right)}}\right\}}$ is calculated within the formalism developed in reference [3], which guarantees a continuous dependence of ${U}^{\left\{{\mathbf{x}}_{i}\left(t\right)\right\}\to \left\{{\mathbf{x}}_{i}^{\mathrm{\left(ref\right)}}\right\}}$ with respect to $\left\{{\mathbf{x}}_{i}\left(t\right)\right\}$. List of keywords (see also 4.15 for additional options): • Keyword atoms$⟨\phantom{\rule{0.3em}{0ex}}$Atom group$\phantom{\rule{0.3em}{0ex}}⟩$ Context: rmsd Acceptable values: atoms {...} block Description: Deﬁnes the group of atoms of which the RMSD should be calculated. Optimal ﬁt options (such as refPositions and rotateReference) should typically NOT be set within this block. Exceptions to this rule are the special cases discussed in the Advanced usage paragraph below. • Keyword refPositions$⟨\phantom{\rule{0.3em}{0ex}}$Reference coordinates$\phantom{\rule{0.3em}{0ex}}⟩$ Context: rmsd Acceptable values: space-separated list of (x, y, z) triplets Description: This option (mutually exclusive with refPositionsFile) sets the reference coordinates for RMSD calculation, and uses these to compute the roto-translational ﬁt. It is functionally equivalent to the option refPositions in the atom group deﬁnition, which also supports more advanced ﬁtting options. • Keyword refPositionsFile$⟨\phantom{\rule{0.3em}{0ex}}$Reference coordinates ﬁle$\phantom{\rule{0.3em}{0ex}}⟩$ Context: rmsd Acceptable values: UNIX ﬁlename Description: This option (mutually exclusive with refPositions) sets the reference coordinates for RMSD calculation, and uses these to compute the roto-translational ﬁt. It is functionally equivalent to the option refPositionsFile in the atom group deﬁnition, which also supports more advanced ﬁtting options. • Keyword refPositionsCol$⟨\phantom{\rule{0.3em}{0ex}}$PDB column containing atom ﬂags$\phantom{\rule{0.3em}{0ex}}⟩$ Context: rmsd Acceptable values: O, B, X, Y, or Z Description: If refPositionsFile is a PDB ﬁle that contains all the atoms in the topology, this option may be provided to set which PDB ﬁeld is used to ﬂag the reference coordinates for atoms. • Keyword refPositionsColValue$⟨\phantom{\rule{0.3em}{0ex}}$Atom selection ﬂag in the PDB column$\phantom{\rule{0.3em}{0ex}}⟩$ Context: rmsd Acceptable values: positive decimal Description: If deﬁned, this value identiﬁes in the PDB column refPositionsCol of the ﬁle refPositionsFile which atom positions are to be read. Otherwise, all positions with a non-zero value are read. • Keyword atomPermutation$⟨\phantom{\rule{0.3em}{0ex}}$Alternate ordering of atoms for RMSD computation$\phantom{\rule{0.3em}{0ex}}⟩$ Context: rmsd Acceptable values: List of atom numbers Description: If deﬁned, this parameter deﬁnes a re-ordering (permutation) of the 1-based atom numbers that can be used to compute the RMSD, typically due to molecular symmetry. This parameter can be speciﬁed multiple times, each one deﬁning a new permutation: the returned RMSD value is the minimum over the set of permutations. For example, if the atoms making up the group are 6, 7, 8, 9, and atoms 7, 8, and 9 are invariant by circular permutation (as the hydrogens in a CH3 group), a symmetry-adapted RMSD would be obtained by adding: atomPermutation 6 8 9 7 atomPermutation 6 9 7 8 Note that this does not aﬀect the least-squares roto-translational ﬁt, which is done using the topology ordering of atoms, and the reference positions in the order provided. Therefore, this feature is mostly useful when using custom ﬁtting parameters within the atom group, such as fittingGroup, or when ﬁtting is disabled altogether. This component returns a positive real number (in Å). ##### 4.5.2 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 ﬁtted onto the same reference coordinates that are used to compute the RMSD value. The ﬁt itself is handled by the atom group object, whose parameters are automatically set by the rmsd component. For very speciﬁc applications, however, it may be useful to control the ﬁtting process separately from the deﬁnition 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 (centerReference 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 describe the deviation of atoms from ﬁxed positions in the laboratory frame: this allows for custom positional restraints within the Colvars module; 4. ﬁtting the atomic positions to diﬀerent reference coordinates than those used in the RMSD calculation itself (by specifying refPositions or refPositionsFile within the atom group as well as within the rmsd block); 5. applying the optimal rotation and/or translation from a separate atom group, deﬁned through fittingGroup: the RMSD then reﬂects the deviation from reference coordinates in a separate, moving reference frame (see example in the section on fittingGroup). ##### 4.5.3 eigenvector: projection of the atomic coordinates on a vector. The block eigenvector {...} deﬁnes the projection of the coordinates of a group of atoms (or more precisely, their deviations from the reference coordinates) onto a vector in ${ℝ}^{3n}$, where $n$ is the number of atoms in the group. The computed quantity is the total projection:  $p\left(\left\{{\mathbf{x}}_{i}\left(t\right)\right\},\left\{{\mathbf{x}}_{i}^{\mathrm{\left(ref\right)}}\right\}\right)\phantom{\rule{3.04074pt}{0ex}}=\phantom{\rule{3.04074pt}{0ex}}\sum _{i=1}^{n}{\mathbf{v}}_{i}\cdot \left(U\left({\mathbf{x}}_{i}\left(t\right)-{\mathbf{x}}_{\mathrm{cog}}\left(t\right)\right)-\left({\mathbf{x}}_{i}^{\mathrm{\left(ref\right)}}-{\mathbf{x}}_{\mathrm{cog}}^{\mathrm{\left(ref\right)}}\right)\right)\mathrm{,}$ (6) where, as in the rmsd component, $U$ is the optimal rotation matrix, ${\mathbf{x}}_{\mathrm{cog}}\left(t\right)$ and ${\mathbf{x}}_{\mathrm{cog}}^{\mathrm{\left(ref\right)}}$ 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 $\left({\mathbf{v}}_{i}\right)$ 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 conﬁguration. List of keywords (see also 4.15 for additional options): • Keyword atoms: see deﬁnition of atoms in sec. 4.5.1 (rmsd component) • Keyword refPositions: see deﬁnition of refPositions in sec. 4.5.1 (rmsd component) • Keyword refPositionsFile: see deﬁnition of refPositionsFile in sec. 4.5.1 (rmsd component) • Keyword refPositionsCol: see deﬁnition of refPositionsCol in sec. 4.5.1 (rmsd component) • Keyword refPositionsColValue: see deﬁnition of refPositionsColValue in sec. 4.5.1 (rmsd component) • Keyword vector$⟨\phantom{\rule{0.3em}{0ex}}$Vector components$\phantom{\rule{0.3em}{0ex}}⟩$ Context: eigenvector Acceptable values: space-separated list of (x, y, z) triplets Description: This option (mutually exclusive with vectorFile) sets the values of the vector components. • Keyword vectorFile$⟨\phantom{\rule{0.3em}{0ex}}$ﬁle containing vector components$\phantom{\rule{0.3em}{0ex}}⟩$ Context: eigenvector Acceptable values: UNIX ﬁlename Description: This option (mutually exclusive with vector) sets the name of a coordinate ﬁle containing the vector components; the ﬁle is read according to the same format used for refPositionsFile. For a PDB ﬁle speciﬁcally, the components are read from the X, Y and Z ﬁelds. Note: The PDB ﬁle has limited precision and ﬁxed-point numbers: in some cases, the vector components may not be accurately represented; a XYZ ﬁle should be used instead, containing ﬂoating-point numbers. • Keyword vectorCol$⟨\phantom{\rule{0.3em}{0ex}}$PDB column used to ﬂag participating atoms$\phantom{\rule{0.3em}{0ex}}⟩$ Context: eigenvector Acceptable values: O or B Description: Analogous to atomsCol. • Keyword vectorColValue$⟨\phantom{\rule{0.3em}{0ex}}$Value used to ﬂag participating atoms in the PDB ﬁle$\phantom{\rule{0.3em}{0ex}}⟩$ Context: eigenvector Acceptable values: positive decimal Description: Analogous to atomsColValue. • Keyword differenceVector$⟨\phantom{\rule{0.3em}{0ex}}$The $3n$-dimensional vector is the diﬀerence between vector and refPositions$\phantom{\rule{0.3em}{0ex}}⟩$ Context: eigenvector Acceptable values: boolean Default value: off Description: If this option is on, the numbers provided by vector or vectorFile are interpreted as another set of positions, ${\mathbf{x}}_{i}^{\prime }$: the vector ${\mathbf{v}}_{i}$ is then deﬁned as ${\mathbf{v}}_{i}=\left({\mathbf{x}}_{i}^{\prime }-{\mathbf{x}}_{i}^{\mathrm{\left(ref\right)}}\right)$. This allows to conveniently deﬁne a colvar $\xi$ as a projection on the linear transformation between two sets of positions, “A” and “B”. For convenience, the vector is also normalized so that $\xi =0$ when the atoms are at the set of positions “A” and $\xi =1$ at the set of positions “B”. 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. 6, this range does not depend on the number of atoms involved. ##### 4.5.4 gyration: radius of gyration of a group of atoms. The block gyration {...} deﬁnes the parameters for calculating the radius of gyration of a group of atomic positions $\left\{{\mathbf{x}}_{1}\left(t\right),{\mathbf{x}}_{2}\left(t\right),\dots {\mathbf{x}}_{N}\left(t\right)\right\}$ with respect to their center of geometry, ${\mathbf{x}}_{\mathrm{cog}}\left(t\right)$:  ${R}_{\mathrm{gyr}}\phantom{\rule{3.04074pt}{0ex}}=\phantom{\rule{3.04074pt}{0ex}}\sqrt{\frac{1}{N}\sum _{i=1}^{N}{\left|{\mathbf{x}}_{i}\left(t\right)-{\mathbf{x}}_{\mathrm{cog}}\left(t\right)\right|}^{2}}$ (7) This component must contain one atoms {...} block to deﬁne the atom group, and returns a positive number, expressed in Å. List of keywords (see also 4.15 for additional options): • Keyword atoms: see deﬁnition of atoms in sec. 4.5.1 (rmsd component) ##### 4.5.5 inertia: total moment of inertia of a group of atoms. The block inertia {...} deﬁnes the parameters for calculating the total moment of inertia of a group of atomic positions $\left\{{\mathbf{x}}_{1}\left(t\right),{\mathbf{x}}_{2}\left(t\right),\dots {\mathbf{x}}_{N}\left(t\right)\right\}$ with respect to their center of geometry, ${\mathbf{x}}_{\mathrm{cog}}\left(t\right)$:  $I\phantom{\rule{3.04074pt}{0ex}}=\phantom{\rule{3.04074pt}{0ex}}\sum _{i=1}^{N}{\left|{\mathbf{x}}_{i}\left(t\right)-{\mathbf{x}}_{\mathrm{cog}}\left(t\right)\right|}^{2}$ (8) Note that all atomic masses are set to 1 for simplicity. This component must contain one atoms {...} block to deﬁne the atom group, and returns a positive number, expressed in Å${}^{2}$. List of keywords (see also 4.15 for additional options): • Keyword atoms: see deﬁnition of atoms in sec. 4.5.1 (rmsd component) ##### 4.5.6 dipoleMagnitude: dipole magnitude of a group of atoms. The dipoleMagnitude {...} block deﬁnes the dipole magnitude of a group of atoms (norm of the dipole moment’s vector), being atoms the group where dipole magnitude is calculated. It returns the magnitude in elementary charge $e$ times Å. List of keywords (see also 4.15 for additional options): • Keyword atoms: see deﬁnition of atoms in sec. 4.5.1 (rmsd component) ##### 4.5.7 inertiaZ: total moment of inertia of a group of atoms around a chosen axis. The block inertiaZ {...} deﬁnes the parameters for calculating the component along the axis $\mathbf{e}$ of the moment of inertia of a group of atomic positions $\left\{{\mathbf{x}}_{1}\left(t\right),{\mathbf{x}}_{2}\left(t\right),\dots {\mathbf{x}}_{N}\left(t\right)\right\}$ with respect to their center of geometry, ${\mathbf{x}}_{\mathrm{cog}}\left(t\right)$:  ${I}_{\mathbf{e}}\phantom{\rule{3.04074pt}{0ex}}=\phantom{\rule{3.04074pt}{0ex}}\sum _{i=1}^{N}{\left(\left({\mathbf{x}}_{i}\left(t\right)-{\mathbf{x}}_{\mathrm{cog}}\left(t\right)\right)\cdot \mathbf{e}\right)}^{2}$ (9) Note that all atomic masses are set to 1 for simplicity. This component must contain one atoms {...} block to deﬁne the atom group, and returns a positive number, expressed in Å${}^{2}$. List of keywords (see also 4.15 for additional options): • Keyword atoms: see deﬁnition of atoms in sec. 4.5.1 (rmsd component) • Keyword axis$⟨\phantom{\rule{0.3em}{0ex}}$Projection axis (Å)$\phantom{\rule{0.3em}{0ex}}⟩$ Context: inertiaZ Acceptable values: (x, y, z) triplet Default value: (0.0, 0.0, 1.0) Description: The three components of this vector deﬁne (when normalized) the projection axis $\mathbf{e}$. #### 4.6 Rotations ##### 4.6.1 orientation: orientation from reference coordinates. The block orientation {...} returns the same optimal rotation used in the rmsd component to superimpose the coordinates $\left\{{\mathbf{x}}_{i}\left(t\right)\right\}$ onto a set of reference coordinates $\left\{{\mathbf{x}}_{i}^{\mathrm{\left(ref\right)}}\right\}$. Such component returns a four dimensional vector $\mathsf{q}=\left({q}_{0},{q}_{1},{q}_{2},{q}_{3}\right)$, with ${\sum }_{i}{q}_{i}^{2}=1$; this quaternion expresses the optimal rotation $\left\{{\mathbf{x}}_{i}\left(t\right)\right\}\to \left\{{\mathbf{x}}_{i}^{\mathrm{\left(ref\right)}}\right\}$ according to the formalism in reference [3]. The quaternion $\left({q}_{0},{q}_{1},{q}_{2},{q}_{3}\right)$ can also be written as $\left(cos\left(𝜃∕2\right),\phantom{\rule{0.3em}{0ex}}sin\left(𝜃∕2\right)\mathbf{u}\right)$, where $𝜃$ 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×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 deﬁne 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 deﬁne the variable itself. List of keywords (see also 4.15 for additional options): • Keyword atoms: see deﬁnition of atoms in sec. 4.5.1 (rmsd component) • Keyword refPositions: see deﬁnition of refPositions in sec. 4.5.1 (rmsd component) • Keyword refPositionsFile: see deﬁnition of refPositionsFile in sec. 4.5.1 (rmsd component) • Keyword refPositionsCol: see deﬁnition of refPositionsCol in sec. 4.5.1 (rmsd component) • Keyword refPositionsColValue: see deﬁnition of refPositionsColValue in sec. 4.5.1 (rmsd component) • Keyword closestToQuaternion$⟨\phantom{\rule{0.3em}{0ex}}$Reference rotation$\phantom{\rule{0.3em}{0ex}}⟩$ Context: orientation Acceptable values: (q0, q1, q2, q3)” quadruplet Default value: (1.0, 0.0, 0.0, 0.0) (“null” rotation) Description: Between the two equivalent quaternions $\left({q}_{0},{q}_{1},{q}_{2},{q}_{3}\right)$ and $\left(-{q}_{0},-{q}_{1},-{q}_{2},-{q}_{3}\right)$, the closer to (1.0, 0.0, 0.0, 0.0) is chosen. This simpliﬁes the visualization of the colvar trajectory when sampled values are a smaller subset of all possible rotations. Note: this only aﬀects the output, never the dynamics. 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 deﬁne a colvar with an orientation component, and restrain it through the harmonic bias around the identity rotation, (1.0, 0.0, 0.0, 0.0). Only the overall orientation of the macromolecule is aﬀected, 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. ##### 4.6.2 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 $𝜃$ 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 4.15 for additional options): ##### 4.6.3 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 $𝜃$ between the current and the reference positions. The range of values is [-1:1]. List of keywords (see also 4.15 for additional options): ##### 4.6.4 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 4.15 for additional options): • Keyword atoms: see deﬁnition of atoms in sec. 4.5.1 (rmsd component) • Keyword refPositions: see deﬁnition of refPositions in sec. 4.5.1 (rmsd component) • Keyword refPositionsFile: see deﬁnition of refPositionsFile in sec. 4.5.1 (rmsd component) • Keyword refPositionsCol: see deﬁnition of refPositionsCol in sec. 4.5.1 (rmsd component) • Keyword refPositionsColValue: see deﬁnition of refPositionsColValue in sec. 4.5.1 (rmsd component) • Keyword axis$⟨\phantom{\rule{0.3em}{0ex}}$Special rotation axis (Å)$\phantom{\rule{0.3em}{0ex}}⟩$ Context: tilt Acceptable values: (x, y, z) triplet Default value: (0.0, 0.0, 1.0) Description: The three components of this vector deﬁne (when normalized) the special rotation axis used to calculate the tilt and spinAngle components. The component spinAngle returns an angle (in degrees) within the periodic interval $\left[-180:180\right]$. Note: the value of spinAngle is a continuous function almost everywhere, with the exception of conﬁgurations with the corresponding “tilt” angle equal to 180${}^{\circ }$ (i.e. the tilt component is equal to $-1$): in those cases, spinAngle is undeﬁned. If such conﬁgurations are expected, consider deﬁning a tilt colvar using the same axis e, and restraining it with a lower wall away from $-1$. ##### 4.6.5 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 $𝜃$ in the spherical coordinate system. The component tilt relies on the same options as spinAngle, including the deﬁnition of the axis e. The values of tilt are real numbers in the interval $\left[-1:1\right]$: 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 4.15 for additional options): • Keyword atoms: see deﬁnition of atoms in sec. 4.5.1 (rmsd component) • Keyword refPositions: see deﬁnition of refPositions in sec. 4.5.1 (rmsd component) • Keyword refPositionsFile: see deﬁnition of refPositionsFile in sec. 4.5.1 (rmsd component) • Keyword refPositionsCol: see deﬁnition of refPositionsCol in sec. 4.5.1 (rmsd component) • Keyword refPositionsColValue: see deﬁnition of refPositionsColValue in sec. 4.5.1 (rmsd component) • Keyword axis: see deﬁnition of axis in sec. 4.6.4 (spinAngle component) #### 4.7 Protein structure descriptors ##### 4.7.1 alpha: $\alpha$-helix content of a protein segment. The block alpha {...} deﬁnes 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: $\begin{array}{rcll}\alpha \left({\mathrm{C}}_{\alpha }^{\left({N}_{0}\right)},{\mathrm{O}}^{\left({N}_{0}\right)},{\mathrm{C}}_{\alpha }^{\left({N}_{0}+1\right)},{\mathrm{O}}^{\left({N}_{0}+1\right)},\dots {\mathrm{N}}^{\left({N}_{0}+5\right)},{\mathrm{C}}_{\alpha }^{\left({N}_{0}+5\right)},{\mathrm{O}}^{\left({N}_{0}+5\right)},\dots {\mathrm{N}}^{\left({N}_{0}+N\right)},{\mathrm{C}}_{\alpha }^{\left({N}_{0}+N\right)}\right)\phantom{\rule{3.04074pt}{0ex}}=\phantom{\rule{3.04074pt}{0ex}}\phantom{\rule{3.04074pt}{0ex}}\phantom{\rule{3.04074pt}{0ex}}\phantom{\rule{3.04074pt}{0ex}}& & & \text{(10)}\text{}\text{}\\ \phantom{\rule{3.04074pt}{0ex}}\phantom{\rule{3.04074pt}{0ex}}\phantom{\rule{3.04074pt}{0ex}}\phantom{\rule{3.04074pt}{0ex}}\frac{1}{2\left(N-2\right)}\sum _{n={N}_{0}}^{{N}_{0}+N-2}\mathrm{angf}\left({\mathrm{C}}_{\alpha }^{\left(n\right)},{\mathrm{C}}_{\alpha }^{\left(n+1\right)},{\mathrm{C}}_{\alpha }^{\left(n+2\right)}\right)\phantom{\rule{3.04074pt}{0ex}}+\phantom{\rule{3.04074pt}{0ex}}\frac{1}{2\left(N-4\right)}\sum _{n={N}_{0}}^{{N}_{0}+N-4}\mathrm{hbf}\left({\mathrm{O}}^{\left(n\right)},{\mathrm{N}}^{\left(n+4\right)}\right)\mathrm{,}& & & \text{}\\ & & & \text{(11)}\text{}\text{}\end{array}$ where the score function for the ${\mathrm{C}}_{\alpha }-{\mathrm{C}}_{\alpha }-{\mathrm{C}}_{\alpha }$ angle is deﬁned as:  $\mathrm{angf}\left({\mathrm{C}}_{\alpha }^{\left(n\right)},{\mathrm{C}}_{\alpha }^{\left(n+1\right)},{\mathrm{C}}_{\alpha }^{\left(n+2\right)}\right)\phantom{\rule{3.04074pt}{0ex}}=\phantom{\rule{3.04074pt}{0ex}}\frac{1-{\left(𝜃\left({\mathrm{C}}_{\alpha }^{\left(n\right)},{\mathrm{C}}_{\alpha }^{\left(n+1\right)},{\mathrm{C}}_{\alpha }^{\left(n+2\right)}\right)-{𝜃}_{0}\right)}^{2}∕{\left(\Delta {𝜃}_{\mathrm{tol}}\right)}^{2}}{1-{\left(𝜃\left({\mathrm{C}}_{\alpha }^{\left(n\right)},{\mathrm{C}}_{\alpha }^{\left(n+1\right)},{\mathrm{C}}_{\alpha }^{\left(n+2\right)}\right)-{𝜃}_{0}\right)}^{4}∕{\left(\Delta {𝜃}_{\mathrm{tol}}\right)}^{4}}\mathrm{,}$ (12) and the score function for the ${\mathrm{O}}^{\left(n\right)}↔{\mathrm{N}}^{\left(n+4\right)}$ hydrogen bond is deﬁned through a hBond colvar component on the same atoms. List of keywords (see also 4.15 for additional options): • Keyword residueRange$⟨\phantom{\rule{0.3em}{0ex}}$Potential $\alpha$-helical residues$\phantom{\rule{0.3em}{0ex}}⟩$ Context: alpha Acceptable values: $<$Initial residue number$>$-$<$Final residue number$>$ Description: This option speciﬁes the range of residues on which this component should be deﬁned. The Colvars module looks for the atoms within these residues named “CA”, “N” and “O”, and raises an error if any of those atoms is not found. • Keyword psfSegID$⟨\phantom{\rule{0.3em}{0ex}}$PSF segment identiﬁer$\phantom{\rule{0.3em}{0ex}}⟩$ Context: alpha Acceptable values: string (max 4 characters) Description: This option sets the PSF segment identiﬁer for the residues speciﬁed in residueRange. This option is only required when PSF topologies are used. • Keyword hBondCoeff$⟨\phantom{\rule{0.3em}{0ex}}$Coeﬃcient for the hydrogen bond term$\phantom{\rule{0.3em}{0ex}}⟩$ Context: alpha Acceptable values: positive between 0 and 1 Default value: 0.5 Description: This number speciﬁes the contribution to the total value from the hydrogen bond terms. 0 disables the hydrogen bond terms, 1 disables the angle terms. • Keyword angleRef$⟨\phantom{\rule{0.3em}{0ex}}$Reference ${\mathrm{C}}_{\alpha }-{\mathrm{C}}_{\alpha }-{\mathrm{C}}_{\alpha }$ angle$\phantom{\rule{0.3em}{0ex}}⟩$ Context: alpha Acceptable values: positive decimal Default value: 88${}^{\circ }$ Description: This option sets the reference angle used in the score function (12). • Keyword angleTol$⟨\phantom{\rule{0.3em}{0ex}}$Tolerance in the ${\mathrm{C}}_{\alpha }-{\mathrm{C}}_{\alpha }-{\mathrm{C}}_{\alpha }$ angle$\phantom{\rule{0.3em}{0ex}}⟩$ Context: alpha Acceptable values: positive decimal Default value: 15${}^{\circ }$ Description: This option sets the angle tolerance used in the score function (12). • Keyword hBondCutoff$⟨\phantom{\rule{0.3em}{0ex}}$Hydrogen bond cutoﬀ$\phantom{\rule{0.3em}{0ex}}⟩$ Context: alpha Acceptable values: positive decimal Default value: 3.3 Å Description: Equivalent to the cutoff option in the hBond component. • Keyword hBondExpNumer$⟨\phantom{\rule{0.3em}{0ex}}$Hydrogen bond numerator exponent$\phantom{\rule{0.3em}{0ex}}⟩$ Context: alpha Acceptable values: positive integer Default value: 6 Description: Equivalent to the expNumer option in the hBond component. • Keyword hBondExpDenom$⟨\phantom{\rule{0.3em}{0ex}}$Hydrogen bond denominator exponent$\phantom{\rule{0.3em}{0ex}}⟩$ Context: alpha Acceptable values: positive integer Default value: 8 Description: Equivalent to the expDenom option in the hBond component. This component returns positive values, always comprised between 0 (lowest $\alpha$-helical score) and 1 (highest $\alpha$-helical score). ##### 4.7.2 dihedralPC: protein dihedral principal component The block dihedralPC {...} deﬁnes 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.[4] and documented in detail by Altis et al.[5]. Given a peptide or protein segment of $N$ residues, each with Ramachandran angles ${\varphi }_{i}$ and ${\psi }_{i}$, dPCA rests on a variance/covariance analysis of the $4\left(N-1\right)$ variables $cos\left({\psi }_{1}\right),sin\left({\psi }_{1}\right),cos\left({\varphi }_{2}\right),sin\left({\varphi }_{2}\right)\cdots cos\left({\varphi }_{N}\right),sin\left({\varphi }_{N}\right)$. Note that angles ${\varphi }_{1}$ and ${\psi }_{N}$ have little impact on chain conformation, and are therefore discarded, following the implementation of dPCA in the analysis software Carma.[6] For a given principal component (eigenvector) of coeﬃcients ${\left({k}_{i}\right)}_{1\le i\le 4\left(N-1\right)}$, the projection of the current backbone conformation is:  $\xi =\sum _{n=1}^{N-1}{k}_{4n-3}cos\left({\psi }_{n}\right)+{k}_{4n-2}sin\left({\psi }_{n}\right)+{k}_{4n-1}cos\left({\varphi }_{n+1}\right)+{k}_{4n}sin\left({\varphi }_{n+1}\right)$ (13) dihedralPC expects the same parameters as the alpha component for deﬁning the relevant residues (residueRange and psfSegID) in addition to the following: List of keywords (see also 4.15 for additional options): • Keyword residueRange: see deﬁnition of residueRange in sec. 4.7.1 (alpha component) • Keyword psfSegID: see deﬁnition of psfSegID in sec. 4.7.1 (alpha component) • Keyword vectorFile$⟨\phantom{\rule{0.3em}{0ex}}$File containing dihedral PCA eigenvector(s)$\phantom{\rule{0.3em}{0ex}}⟩$ Context: dihedralPC Acceptable values: ﬁle name Description: A text ﬁle containing the coeﬃcients of dihedral PCA eigenvectors on the cosine and sine coordinates. The vectors should be arranged in columns, as in the ﬁles output by Carma.[6] • Keyword vectorNumber$⟨\phantom{\rule{0.3em}{0ex}}$File containing dihedralPCA eigenvector(s)$\phantom{\rule{0.3em}{0ex}}⟩$ Context: dihedralPC Acceptable values: positive integer Description: Number of the eigenvector to be used for this component. #### 4.8 Raw data: building blocks for custom functions ##### 4.8.1 cartesian: vector of atomic Cartesian coordinates. The cartesian {...} block deﬁnes a component returning a ﬂat vector containing the Cartesian coordinates of all participating atoms, in the order $\left({x}_{1},{y}_{1},{z}_{1},\cdots \phantom{\rule{0.3em}{0ex}},{x}_{n},{y}_{n},{z}_{n}\right)$. List of keywords (see also 4.15 for additional options): • Keyword atoms$⟨\phantom{\rule{0.3em}{0ex}}$Group of atoms$\phantom{\rule{0.3em}{0ex}}⟩$ Context: cartesian Acceptable values: Block atoms {...} Description: Deﬁnes the atoms whose coordinates make up the value of the component. If rotateReference or centerReference are deﬁned, coordinates are evaluated within the moving frame of reference. ##### 4.8.2 distancePairs: set of pairwise distances between two groups. The distancePairs {...} block deﬁnes a ${N}_{\mathrm{1}}×{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 deﬁned over two groups, by using the scriptedFunction feature. List of keywords (see also 4.15 for additional options): • Keyword group1: see deﬁnition of group1 in sec. 4.2.1 (distance component) • Keyword group2: analogous to group1 • Keyword forceNoPBC: see deﬁnition of forceNoPBC in sec. 4.2.1 (distance component) This component returns a ${N}_{\mathrm{1}}×{N}_{\mathrm{2}}$-dimensional vector of numbers, each ranging from $0$ to the largest possible distance within the chosen boundary conditions. #### 4.9 Geometric path collective variables The geometric path collective variables deﬁne the progress along a path, $s$, and the distance from the path, $z$. These CVs are proposed by Leines and Ensing[7] , which diﬀer from that[8] proposed by Branduardi et al., and utilize a set of geometric algorithms. The path is deﬁned as a series of frames in the atomic Cartesian coordinate space or the CV space. $s$ and $z$ are computed as  $s=\frac{m}{M}±\frac{1}{2M}\left(\frac{\sqrt{{\left({\mathbf{v}}_{1}\cdot {\mathbf{v}}_{3}\right)}^{2}-|{\mathbf{v}}_{3}{|}^{2}\left(|{\mathbf{v}}_{1}{|}^{2}-|{\mathbf{v}}_{2}{|}^{2}\right)}-\left({\mathbf{v}}_{1}\cdot {\mathbf{v}}_{3}\right)}{|{\mathbf{v}}_{3}{|}^{2}}-1\right)$ (14)  $z=\sqrt{{\left({\mathbf{v}}_{1}+\frac{1}{2}\left(\frac{\sqrt{{\left({\mathbf{v}}_{1}\cdot {\mathbf{v}}_{3}\right)}^{2}-|{\mathbf{v}}_{3}{|}^{2}\left(|{\mathbf{v}}_{1}{|}^{2}-|{\mathbf{v}}_{2}{|}^{2}\right)}-\left({\mathbf{v}}_{1}\cdot {\mathbf{v}}_{3}\right)}{|{\mathbf{v}}_{3}{|}^{2}}-1\right){\mathbf{v}}_{4}\right)}^{2}}$ (15) where ${\mathbf{v}}_{1}={\mathbf{s}}_{m}-\mathbf{z}$ is the vector connecting the current position to the closest frame, ${\mathbf{v}}_{2}=\mathbf{z}-{\mathbf{s}}_{m-1}$ is the vector connecting the second closest frame to the current position, ${\mathbf{v}}_{3}={\mathbf{s}}_{m+1}-{\mathbf{s}}_{m}$ is the vector connecting the closest frame to the third closest frame, and ${\mathbf{v}}_{4}={\mathbf{s}}_{m}-{\mathbf{s}}_{m-1}$ is the vector connecting the second closest frame to the closest frame. $m$ and $M$ are the current index of the closest frame and the total number of frames, respectively. If the current position is on the left of the closest reference frame, the $±$ in $s$ turns to the positive sign. Otherwise it turns to the negative sign. The equations above assume: (i) the frames are equidistant and (ii) the second and the third closest frames are neighbouring to the closest frame. When these assumptions are not satisﬁed, this set of path CV should be used carefully. ##### 4.9.1 gspath: progress along a path deﬁned in atomic Cartesian coordinate space. In the gspath {...} and the gzpath {...} block all vectors, namely $\mathbf{z}$ and ${\mathbf{s}}_{k}$ are deﬁned in atomic Cartesian coordinate space. More speciﬁcally, $\mathbf{z}=\left[{\mathbf{r}}_{1},\cdots \phantom{\rule{0.3em}{0ex}},{\mathbf{r}}_{n}\right]$, where ${\mathbf{r}}_{i}$ is the $i$-th atom speciﬁed in the atoms block. ${\mathbf{s}}_{k}=\left[{\mathbf{r}}_{k,1},\cdots \phantom{\rule{0.3em}{0ex}},{\mathbf{r}}_{k,n}\right]$, where ${\mathbf{r}}_{k,i}$ means the $i$-th atom of the $k$-th reference frame. List of keywords (see also 4.15 for additional options): • Keyword atoms$⟨\phantom{\rule{0.3em}{0ex}}$Group of atoms$\phantom{\rule{0.3em}{0ex}}⟩$ Context: gspath and gzpath Acceptable values: Block atoms {...} Description: Deﬁnes the atoms whose coordinates make up the value of the component. • Keyword refPositionsCol$⟨\phantom{\rule{0.3em}{0ex}}$PDB column containing atom ﬂags$\phantom{\rule{0.3em}{0ex}}⟩$ Context: gspath and gzpath Acceptable values: O, B, X, Y, or Z Description: If refPositionsFileN is a PDB ﬁle that contains all the atoms in the topology, this option may be provided to set which PDB ﬁeld is used to ﬂag the reference coordinates for atoms. • Keyword refPositionsFileN$⟨\phantom{\rule{0.3em}{0ex}}$File containing the reference positions for ﬁtting$\phantom{\rule{0.3em}{0ex}}⟩$ Context: gspath and gzpath Acceptable values: UNIX ﬁlename Description: The path is deﬁned by multiple refPositionsFiles which are similiar to refPositionsFile in the rmsd CV. If your path consists of $10$ nodes, you can list the coordinate ﬁle (in PDB or XYZ format) from refPositionsFile1 to refPositionsFile10. • Keyword useSecondClosestFrame$⟨\phantom{\rule{0.3em}{0ex}}$Deﬁne ${\mathbf{s}}_{m-1}$ as the second closest frame?$\phantom{\rule{0.3em}{0ex}}⟩$ Context: gspath and gzpath Acceptable values: boolean Default value: on Description: The deﬁnition assumes the second closest frame is neighbouring to the closest frame. This is not always true especially when the path is crooked. If this option is set to on (default), ${\mathbf{s}}_{m-1}$ is deﬁned as the second closest frame. If this option is set to off, ${\mathbf{s}}_{m-1}$ is deﬁned as the left or right neighbouring frame of the closest frame. • Keyword useThirdClosestFrame$⟨\phantom{\rule{0.3em}{0ex}}$Deﬁne ${\mathbf{s}}_{m+1}$ as the third closest frame?$\phantom{\rule{0.3em}{0ex}}⟩$ Context: gspath and gzpath Acceptable values: boolean Default value: off Description: The deﬁnition assumes the third closest frame is neighbouring to the closest frame. This is not always true especially when the path is crooked. If this option is set to on, ${\mathbf{s}}_{m+1}$ is deﬁned as the third closest frame. If this option is set to off (default), ${\mathbf{s}}_{m+1}$ is deﬁned as the left or right neighbouring frame of the closest frame. • Keyword fittingAtoms$⟨\phantom{\rule{0.3em}{0ex}}$The atoms that are used for alignment$\phantom{\rule{0.3em}{0ex}}⟩$ Context: gspath and gspath Acceptable values: Group of atoms Description: Before calculating ${\mathbf{v}}_{1}$, ${\mathbf{v}}_{2}$, ${\mathbf{v}}_{3}$ and ${\mathbf{v}}_{4}$, the current frame need to be aligned to the corresponding reference frames. This option speciﬁes which atoms are used to do alignment. ##### 4.9.2 gzpath: distance from a path deﬁned in atomic Cartesian coordinate space. List of keywords (see also 4.15 for additional options): • Keyword useZsquare$⟨\phantom{\rule{0.3em}{0ex}}$Compute ${z}^{2}$ instead of $z$$\phantom{\rule{0.3em}{0ex}}⟩$ Context: gzpath Acceptable values: boolean Default value: off Description: $z$ is not diﬀerentiable when it is zero. This implementation workarounds it by setting the derivative of $z$ to zero when $z=0$. Another workaround is set this option to on, which computes ${z}^{2}$ instead of $z$, and then ${z}^{2}$ is diﬀerentiable when it is zero. The usage of gzpath and gspath is illustrated below: colvar { # Progress along the path name gs # The path is defined by 5 reference frames (from string-00.pdb to string-04.pdb) # Use atomic coordinate from atoms 1, 2 and 3 to compute the path gspath { atoms {atomnumbers { 1 2 3 }} refPositionsFile1 string-00.pdb refPositionsFile2 string-01.pdb refPositionsFile3 string-02.pdb refPositionsFile4 string-03.pdb refPositionsFile5 string-04.pdb } } colvar { # Distance from the path name gz # The path is defined by 5 reference frames (from string-00.pdb to string-04.pdb) # Use atomic coordinate from atoms 1, 2 and 3 to compute the path gzpath { atoms {atomnumbers { 1 2 3 }} refPositionsFile1 string-00.pdb refPositionsFile2 string-01.pdb refPositionsFile3 string-02.pdb refPositionsFile4 string-03.pdb refPositionsFile5 string-04.pdb } } ##### 4.9.3 linearCombination: Helper CV to deﬁne a linear combination of other CVs This is a helper CV which can be deﬁned as a linear combination of other CVs. It maybe useful when you want to deﬁne the gspathCV {...} and the gzpathCV {...} as combinations of other CVs. ##### 4.9.4 gspathCV: progress along a path deﬁned in CV space. In the gspathCV {...} and the gzpathCV {...} block all vectors, namely $\mathbf{z}$ and ${\mathbf{s}}_{k}$ are deﬁned in CV space. More speciﬁcally, $\mathbf{z}=\left[{\xi }_{1},\cdots \phantom{\rule{0.3em}{0ex}},{\xi }_{n}\right]$, where ${\xi }_{i}$ is the $i$-th CV. ${\mathbf{s}}_{k}=\left[{\xi }_{k,1},\cdots \phantom{\rule{0.3em}{0ex}},{\xi }_{k,n}\right]$, where ${\xi }_{k,i}$ means the $i$-th CV of the $k$-th reference frame. It should be note that these two CVs requires the pathFile option, which speciﬁes a path ﬁle. Each line in the path ﬁle contains a set of space-seperated CV value of the reference frame. The sequence of reference frames matches the sequence of the lines. List of keywords (see also 4.15 for additional options): • Keyword useSecondClosestFrame$⟨\phantom{\rule{0.3em}{0ex}}$Deﬁne ${\mathbf{s}}_{m-1}$ as the second closest frame?$\phantom{\rule{0.3em}{0ex}}⟩$ Context: gspathCV and gzpathCV Acceptable values: boolean Default value: on Description: The deﬁnition assumes the second closest frame is neighbouring to the closest frame. This is not always true especially when the path is crooked. If this option is set to on (default), ${\mathbf{s}}_{m-1}$ is deﬁned as the second closest frame. If this option is set to off, ${\mathbf{s}}_{m-1}$ is deﬁned as the left or right neighbouring frame of the closest frame. • Keyword useThirdClosestFrame$⟨\phantom{\rule{0.3em}{0ex}}$Deﬁne ${\mathbf{s}}_{m+1}$ as the third closest frame?$\phantom{\rule{0.3em}{0ex}}⟩$ Context: gspathCV and gzpathCV Acceptable values: boolean Default value: off Description: The deﬁnition assumes the third closest frame is neighbouring to the closest frame. This is not always true especially when the path is crooked. If this option is set to on, ${\mathbf{s}}_{m+1}$ is deﬁned as the third closest frame. If this option is set to off (default), ${\mathbf{s}}_{m+1}$ is deﬁned as the left or right neighbouring frame of the closest frame. • Keyword pathFile$⟨\phantom{\rule{0.3em}{0ex}}$The ﬁle name of the path ﬁle.$\phantom{\rule{0.3em}{0ex}}⟩$ Context: gspathCV and gzpathCV Acceptable values: UNIX ﬁlename Description: Deﬁnes the nodes or images that constitutes the path in CV space. The CVs of an image are listed in a line of pathFile using space-seperated format. Lines from top to button in pathFile corresponds images from initial to last. ##### 4.9.5 gzpathCV: distance from a path deﬁned in CV space. List of keywords (see also 4.15 for additional options): • Keyword useZsquare$⟨\phantom{\rule{0.3em}{0ex}}$Compute ${z}^{2}$ instead of $z$$\phantom{\rule{0.3em}{0ex}}⟩$ Context: gzpathCV Acceptable values: boolean Default value: off Description: $z$ is not diﬀerentiable when it is zero. This implementation workarounds it by setting the derivative of $z$ to zero when $z=0$. Another workaround is set this option to on, which computes ${z}^{2}$ instead of $z$, and then ${z}^{2}$ is diﬀerentiable when it is zero. The usage of gzpathCV and gspathCV is illustrated below: colvar { # Progress along the path name gs # Path defined by the CV space of two dihedral angles gspathCV { pathFile ./path.txt dihedral { name 001 group1 {atomNumbers {5}} group2 {atomNumbers {7}} group3 {atomNumbers {9}} group4 {atomNumbers {15}} } dihedral { name 002 group1 {atomNumbers {7}} group2 {atomNumbers {9}} group3 {atomNumbers {15}} group4 {atomNumbers {17}} } } } colvar { # Distance from the path name gz gzpathCV { pathFile ./path.txt dihedral { name 001 group1 {atomNumbers {5}} group2 {atomNumbers {7}} group3 {atomNumbers {9}} group4 {atomNumbers {15}} } dihedral { name 002 group1 {atomNumbers {7}} group2 {atomNumbers {9}} group3 {atomNumbers {15}} group4 {atomNumbers {17}} } } } #### 4.10 Arithmetic path collective variables The arithmetic path collective variable in CV space uses the same formula as the one proposed by Branduardi[8] et al., except that it computes $s$ and $z$ in CV space instead of RMSDs in Cartesian space. Moreover, this implementation allows diﬀerent coeﬃcients for each CV components as described in [9]. Assuming a path is composed of $N$ reference frames and deﬁned in an $M$-dimensional CV space, then the equations of $s$ and $z$ of the path are  $s=\frac{\sum _{i=1}^{N}iexp\left(-\lambda \sum _{j=1}^{M}{c}_{j}^{2}{\left({x}_{j}-{x}_{i,j}\right)}^{2}\right)}{\sum _{i=1}^{N}exp\left(-\lambda \sum _{j=1}^{M}{c}_{j}^{2}{\left({x}_{j}-{x}_{i,j}\right)}^{2}\right)}$ (16)  $z=-\frac{1}{\lambda }ln\left(\sum _{i=1}^{N}exp\left(-\lambda \sum _{j=1}^{M}{c}_{j}^{2}\left({x}_{j}-{x}_{i,j}\right)\right)\right)$ (17) where ${c}_{j}$ is the coeﬃcient(weight) of the $j$-th CV, ${x}_{i,j}$ is the value of $j$-th CV of $i$-th reference frame and ${x}_{j}$ is the value of $j$-th CV of current frame. $\lambda$ is a parameter to smooth the variation of $s$ and $z$. ##### 4.10.1 aspathCV: progress along a path deﬁned in CV space. This colvar component computes the $s$ variable. List of keywords (see also 4.15 for additional options): • Keyword weights$⟨\phantom{\rule{0.3em}{0ex}}$Coeﬃcients of the collective variables$\phantom{\rule{0.3em}{0ex}}⟩$ Context: aspathCV and azpathCV Acceptable values: space-separated numbers in a {...} block Default value: {1.0 ...} Description: Deﬁne the coeﬃcients. The $j$-th value in the {...} block corresponds the ${c}_{j}$ in the equations. • Keyword lambda$⟨\phantom{\rule{0.3em}{0ex}}$Smoothness of the variation of $s$ and $z$$\phantom{\rule{0.3em}{0ex}}⟩$ Context: aspathCV and azpathCV Acceptable values: decimal Default value: inverse of the mean square displacements of successive reference frames Description: The value of $\lambda$ in the equations. • Keyword pathFile$⟨\phantom{\rule{0.3em}{0ex}}$The ﬁle name of the path ﬁle.$\phantom{\rule{0.3em}{0ex}}⟩$ Context: aspathCV and azpathCV Acceptable values: UNIX ﬁlename Description: Deﬁnes the nodes or images that constitutes the path in CV space. The CVs of an image are listed in a line of pathFile using space-seperated format. Lines from top to button in pathFile corresponds images from initial to last. ##### 4.10.2 azpathCV: distance from a path deﬁned in CV space. This colvar component computes the $z$ variable. Options are the same as in 4.10.1. The usage of azpathCV and aspathCV is illustrated below: colvar { # Progress along the path name as # Path defined by the CV space of two dihedral angles aspathCV { pathFile ./path.txt weights {1.0 1.0} lambda 0.005 dihedral { name 001 group1 {atomNumbers {5}} group2 {atomNumbers {7}} group3 {atomNumbers {9}} group4 {atomNumbers {15}} } dihedral { name 002 group1 {atomNumbers {7}} group2 {atomNumbers {9}} group3 {atomNumbers {15}} group4 {atomNumbers {17}} } } } colvar { # Distance from the path name az azpathCV { pathFile ./path.txt weights {1.0 1.0} lambda 0.005 dihedral { name 001 group1 {atomNumbers {5}} group2 {atomNumbers {7}} group3 {atomNumbers {9}} group4 {atomNumbers {15}} } dihedral { name 002 group1 {atomNumbers {7}} group2 {atomNumbers {9}} group3 {atomNumbers {15}} group4 {atomNumbers {17}} } } } ##### 4.10.3 Path collective variables in Cartesian coordinates The path collective variables deﬁned by Branduardi et al. [8] are based on RMSDs in Cartesian coordinates. Noting ${d}_{i}$ the RMSD between the current set of Cartesian coordinates and those of image number $i$ of the path:  $s=\frac{1}{N-1}\frac{\sum _{i=1}^{N}\left(i-1\right)exp\left(-\lambda {d}_{i}^{2}\right)}{\sum _{i=1}^{N}exp\left(-\lambda {d}_{i}^{2}\right)}$ (18)  $z=-\frac{1}{\lambda }ln\left(\sum _{i=1}^{N}exp\left(-\lambda {d}_{i}^{2}\right)\right)$ (19) where $\lambda$ is the smoothing parameter. These coordinates are implemented as Tcl-scripted combinations of rmsd components. The implementation is available as ﬁle colvartools/pathCV.tcl, and an example is provided in ﬁle examples/10_pathCV.namd of the Colvars public repository. It implements an optimization procedure, whereby the distance to a given image is only calculated if its contribution to the sum is larger than a user-deﬁned tolerance parameter. All distances are calculated every freq timesteps to update the list of nearby images. #### 4.11 Volumetric map-based variables Volumetric maps of the Cartesian coordinates, typically deﬁned as mesh grid along the three Cartesian axes, may be used to deﬁne collective variables. This feature is currently available in NAMD, implemented as an interface between Colvars and GridForces. Please cite [10] when using this implementation of collective variables based on volumetric maps. ##### 4.11.1 mapTotal: total value of a volumetric map Given a function of the Cartesian coordinates $\varphi \left(\mathbf{x}\right)=\varphi \left(x,y,z\right)$, a mapTotal collective variable component $\Phi \left(\mathbf{X}\right)$ is deﬁned as the sum of the values of the function $\varphi \left(\mathbf{x}\right)$ evaluated at the coordinates of each atom, ${\mathbf{x}}_{i}$:  $\Phi \left(\mathbf{X}\right)=\sum _{i=1}^{N}\varphi \left({\mathbf{x}}_{i}\right)$ (20) This formulation allows, for example, to “count” the number of atoms within a region of space by using a positive-valued function $\varphi \left(\mathbf{x}\right)$, such as for example the number of water molecules in a hydrophobic cavity [10]. Because the volumetric map itself and the atoms aﬀected by it are deﬁned externally to Colvars, this component has a very limited number of keywords. List of keywords (see also 4.15 for additional options): • Keyword mapName$⟨\phantom{\rule{0.3em}{0ex}}$Specify the name of the volumetric map to use as a colvar$\phantom{\rule{0.3em}{0ex}}⟩$ Context: mapTotal Acceptable values: string Description: The value of this option speciﬁes the label of the volumetric map to use for this collective variable component. This label must identify a map already loaded in NAMD via mGridForcePotFile, and its value of mGridForceScale needs to be set to (0, 0, 0), so that its collective force can be computed dynamically. Example: biasing the number of molecules inside a cavity using a volumetric map. Firstly, a volumetric map that has a value of 1 inside the cavity and 0 outside should be prepared. A reasonable starting point may be obtained, for example, with VMD: using an existing trajectory where the cavity is occupied by solvent and a spatial selection that identiﬁes all the molecules within the cavity, volmap occupancy -allframes -combine max computes the occupancy map as a step function (values 1 or 0), and volutil -smooth makes it a continuous map, suitable for use as a MD simulation bias. A PDB ﬁle deﬁning the selection (for example, where all water oxygens and ions have an occupancy of 1 and other atoms 0) is also prepared using VMD. Both the map ﬁle and the atom selection ﬁle are then loaded via the mGridForcePotFile and related NAMD commands: mGridForce yes mGridForcePotFile Cavity cavity.dx # OpenDX map file mGridForceFile Cavity water-sel.pdb # PDB file used for atom selection mGridForceCol Cavity O # Use the occupancy column of the PDB file mGridForceChargeCol Cavity O # Use occ. again (default: electrostatic charge) mGridForceScale Cavity 0.0 0.0 0.0 # Do not use GridForces for this map The value of mGridForceScale is particularly important, because it determines the GridForces force constant for the “Cavity” map. A non-zero value enables a conventional GridForces calculation, where the force constant remains ﬁxed within each run command and the forces on the atoms depend only on their positions in space. However, setting mGridForceScale to zero signals to NAMD that the force acting through the volumetric map may be computed dynamically, as part of a collective-variable biasing scheme. To do so, the map labeled “Cavity” needs to be referred to in the Colvars conﬁguration: cv config " colvar { name n_waters mapTotal { mapName Cavity # Same label as the GridForce map } }" The variable “n_waters” may then be used with any of the enhanced sampling methods available (6): new forces applied to it at each simulation step will be transmitted to the corresponding atoms within the same step. ##### 4.11.2 Multiple volumetric maps collective variables To study processes that involve changes in shape of a macromolecular aggregate (for example, deformations of lipid membranes) it is useful to deﬁne collective variables based on more than one volumetric map at a time, measuring the relative similarity with each map while still achieving correct thermodynamic sampling of each state. This is achieved by combining multiple mapTotal components, each based on a diﬀerently-shaped volumetric map, into a single collective variable $\xi$. To track transitions between states, the contribution of each map to $\xi$ should be discriminated from the others, for example by assigning to it a diﬀerent weight. The “Multi-Map” progress variable [10] uses a weight sum of these components, using linearly-increasing weights:  $\xi \left(\mathbf{X}\right)=\sum _{k=1}^{K}{\Phi }_{k}\left(\mathbf{X}\right)=\sum _{k=1}^{K}k\sum _{i=1}^{N}{\varphi }_{k}\left({\mathbf{x}}_{i}\right)$ (21) where $K$ is the number of maps employed and each ${\Phi }_{k}$ is a mapTotal component. Example: transitions between macromolecular shapes using volumetric maps. A series of map ﬁles, each representing a diﬀerent shape, is loaded into NAMD: mGridForce yes for { set k 1 } {k <= $K } { incr k } { mGridForcePotFile Shape_$k map_$k.dx # Density map of the k-th state } and these are then used to deﬁne a multiple-map collective variable: # Collect the definition of all components into one string set components "" for { set k 1 } {$k <= $K } { incr k } { set components "${components}
mapTotal {
mapName Shape_$k componentCoeff$k
}
"
}
# Use this string to define the variable
cv config "
colvar {
name shapes

#### 6.13 Performance of scripted biases

If concurrent computation over multiple threads is available (this is indicated by the message “SMP parallelism is available.” printed at initialization time), it is useful to take advantage of the scripting interface to combine many components, all computed in parallel, into a single variable.

The default SMP schedule is the following:

1. distribute the computation of all components across available threads;
2. on a single thread, collect the results of multi-component variables using polynomial combinations (see 4.15), or custom functions (see 4.16), or scripted functions (see 4.17);
3. distribute the computation of all biases across available threads;
4. compute on a single thread any scripted biases implemented via the keyword scriptedColvarForces.
5. communicate on a single thread forces to NAMD.

The following options allow to ﬁne-tune this schedule:

• Keyword scriptingAfterBiases$⟨\phantom{\rule{0.3em}{0ex}}$Scripted colvar forces need updated biases?$\phantom{\rule{0.3em}{0ex}}⟩$
Context: global
Acceptable values: boolean
Default value: on
Description: This ﬂag speciﬁes that the calc_colvar_forces procedure (last step in the list above) is executed only after all biases have been updated (next-to-last step) For example, this allows using the energy of a restraint bias, or the force applied on a colvar, to calculate additional scripted forces, such as boundary constraints. When this ﬂag is set to off, it is assumed that only the values of the variables (but not the energy of the biases or applied forces) will be used by calc_colvar_forces: this can be used to schedule the calculation of scripted forces and biases concurrently to increase performance.

### 7 Scripting interface (Tcl): list of commands

This section lists all the commands used in NAMD to control the behavior of the Colvars module from within a run script.

#### 7.1 Commands to manage the Colvars module

Add an energy to the MD engine (no effect in VMD)
Parameters
E : float - Amount of energy to add
• cv config
Read configuration from the given string
Parameters
conf : string - Configuration string
• cv configfile _file>
Parameters
conf_file : string - Path to configuration file
• cv delete
Delete this Colvars module instance (VMD only)
• cv frame [frame]
Get or set current frame number (VMD only)
Parameters
frame : integer - Frame number (optional)
• cv getconfig
Get the module's configuration string read so far
• cv getenergy
Get the current Colvars energy
• cv help [command]
Get the help string of the Colvars scripting interface
Parameters
command : string - Get the help string of this specific command (optional)
• cv list [param]
Return a list of all variables or biases
Parameters
param : string - "colvars" or "biases"; default is "colvars" (optional)
• cv listcommands
Get the list of script functions, prefixed with "cv_", "colvar_" or "bias_"
Load data from a state file into all matching colvars and biases
Parameters
prefix : string - Path to existing state file or input prefix
Load state data from a string into all matching colvars and biases
Parameters
buffer : string - String buffer containing the state information
• cv molid [molid]
Get or set the molecule ID on which Colvars is defined (VMD only)
Parameters
molid : integer - Molecule ID; -1 means undefined (optional)
• cv printframe
Return the values that would be written to colvars.traj
• cv printframelabels
Return the labels that would be written to colvars.traj
• cv reset
Delete all internal configuration
• cv resetindexgroups
Clear the index groups loaded so far, allowing to replace them
• cv save
Change the prefix of all output files and save them
Parameters
prefix : string - Output prefix with trailing ".colvars.state" gets removed)
• cv savetostring
Write the Colvars state to a string and return it
• cv units [units]
Get or set the current Colvars unit system
Parameters
units : string - The new unit system (optional)
• cv update
Recalculate colvars and biases
• cv version
Get the Colvars Module version number

#### 7.2 Commands to manage individual collective variables

Apply the given force onto this colvar and return the same
Parameters
force : float or array - Applied force; must match colvar dimensionality
• cv colvar name cvcflags
Enable or disable individual components by setting their active flags
Parameters
flags : integer array - Zero/nonzero value disables/enables the CVC
• cv colvar name delete
Delete this colvar, along with all biases that depend on it
• cv colvar name get
Get the value of the given feature for this colvar
Parameters
feature : string - Name of the feature
• cv colvar name getappliedforce
Return the total of the forces applied to this colvar
• cv colvar name getatomgroups
Return the atom indices used by this colvar as a list of lists
• cv colvar name getatomids
Return the list of atom indices used by this colvar
• cv colvar name getconfig
Return the configuration string of this colvar
Return the atomic gradients of this colvar
• cv colvar name gettotalforce
Return the sum of internal and external forces to this colvar
• cv colvar name help [command]
Get a help summary or the help string of one colvar subcommand
Parameters
command : string - Get the help string of this specific command (optional)
• cv colvar name modifycvcs
Modify configuration of individual components by passing string arguments
Parameters
confs : sequence of strings - New configurations; empty strings are skipped
• cv colvar name run_ave
Get the current running average of the value of this colvar
• cv colvar name set
Set the given feature of this colvar to a new value
Parameters
feature : string - Name of the feature
value : string - String representation of the new feature value
• cv colvar name state
Print a string representation of the feature state of this colvar
• cv colvar name type
Get the type description of this colvar
• cv colvar name update
Recompute this colvar and return its up-to-date value
• cv colvar name value
Get the current value of this colvar
• cv colvar name width
Get the width of this colvar

#### 7.3 Commands to manage individual biases

• cv bias name bin
Get the current grid bin index (1D ABF only for now)
• cv bias name bincount [index]
Get the number of samples at the given grid bin (1D ABF only for now)
Parameters
index : integer - Grid index; defaults to current bin (optional)
• cv bias name binnum
Get the total number of grid points of this bias (1D ABF only for now)
• cv bias name delete
Delete this bias
• cv bias name energy
Get the current energy of this bias
• cv bias name get
Get the value of the given feature for this bias
Parameters
feature : string - Name of the feature
• cv bias name getconfig
Return the configuration string of this bias
• cv bias name help [command]
Get a help summary or the help string of one bias subcommand
Parameters
command : string - Get the help string of this specific command (optional)
Parameters
prefix : string - Read from a file with this name or prefix
Load state data into this bias from a string
Parameters
buffer : string - String buffer containing the state information
• cv bias name save
Save data from this bias into a file with the given prefix
Parameters
prefix : string - Prefix for the state file of this bias
• cv bias name savetostring
Save data from this bias into a string and return it
• cv bias name set
Set the given feature of this bias to a new value
Parameters
feature : string - Name of the feature
value : string - String representation of the new feature value
• cv bias name share
Share bias information with other replicas (multiple-walker scheme)
• cv bias name state
Print a string representation of the feature state of this bias
• cv bias name update
Recompute this bias and return its up-to-date energy

### 8 Syntax changes from older versions

The following is a list of syntax changes in Colvars since its ﬁrst release. Many of the older keywords are still recognized by the current code, thanks to speciﬁc compatibility code. This is not a list of new features: its primary purpose is to make you aware of those improvements that aﬀect the use of old conﬁguration ﬁles with new versions of the code.

Note: if you are using any of the NAMD and VMD tutorials:
https://www.ks.uiuc.edu/Training/Tutorials/
please be aware that several of these tutorials are not actively maintained: for those cases, this list will help you reconcile any inconsistencies.

• Colvars version 2016-06-09 or later (NAMD version 2.12b1 or later).
The legacy keyword refPositionsGroup has been renamed fittingGroup for clarity (the legacy version is still supported).
• Colvars version 2016-08-10 or later (NAMD version 2.12b1 or later).
“System forces” have been replaced by “total forces” (see for example outputTotalForce). See the following page for more information:
• Colvars version 2017-01-09 or later (NAMD version 2.13b1 or later).
A new type of restraint, harmonicWalls (see 6.7), replaces and improves upon the legacy keywords lowerWall and upperWall: these are still supported as short-hands.
• Colvars version 2018-11-15 or later (NAMD version 2.14b1 or later).
The global analysis keyword has been discontinued: speciﬁc analysis tasks are controlled directly by the keywords corrFunc and runAve, which continue to remain off by default.
• Colvars version 2020-02-25 or later (NAMD version 2.14b1 or later).
The parameter hillWidth, expressing the Gaussian width $2\sigma$ in relative units (number of grid points), does not have a default value any more. A new alternative parameter gaussianSigmas allows setting the $\sigma$ parameters explicitly for each variable if needed.
Furthermore, to facilitate the use of other analysis tools such as for example sum_hills:
https://www.plumed.org/doc-v2.6/user-doc/html/sum_hills.html
the format of the ﬁle written by writeHillsTrajectory has also been changed to use $\sigma$ instead of $2\sigma$. This change does not aﬀect how the biasing potential is written in the state ﬁle, or the simulated trajectory.
• Colvars version 2020-02-25 or later (NAMD version 2.14b1 or later).
The legacy keywords lowerWall and upperWall of a colvar deﬁnition block do not have default values any longer, and need to be set explicitly, preferably as part of the harmonicWalls restraint. When using an ABF bias, it is recommended to set the two walls equal to lowerBoundary and upperBoundary, respectively. When using a metadynamics bias, it is recommended to set the two walls strictly within lowerBoundary and upperBoundary; see 6.4.1 for details.

Up-to-date documentation can always be accessed at:
https://colvars.github.io/colvars-refman-namd/colvars-refman-namd.html

### 9 Compilation notes

The Colvars module is typically built using the recipes of each supported software package: for this reason, no installation instructions are needed, and the vast majority of the features described in this manual are supported in the most common builds of each package. This section lists the few cases where the choice of compilation settings aﬀects features in the Colvars module.

• Scripting commands using the Tcl language (https://www.tcl.tk) are supported in VMD and NAMD. All precompiled builds of each code include Tcl, and it is highly recommended to enable Tcl support in any custom build, using precompiled Tcl libraries from the UIUC website.
• The Lepton library (https://simtk.org/projects/lepton) used to implement the customFunction feature is currently included only in NAMD (always on) and in LAMMPS (on by default).
• Some features require compilation using the C++11 language standard. Although it is becoming commonplace, this standard is not yet available on all scientiﬁc computing systems. Deailed information can be found at:

### Index

abf
CZARestimator, 73
UIestimator, 74
applyBias, 69
colvars, 68
fullSamples, 68
hideJacobian, 69
historyFreq, 69
inputPrefix, 69
maxForce, 68
name, 68
outputEnergy, 68
outputFreq, 68
sharedFreq, 70
shared, 70
stepZeroData, 68
updateBias, 69
writeCZARwindowFile, 73
alb
centers, 91
colvars, 91
forceRange, 92
name, 91
rateMax, 92
updateFrequency, 92
alpha
angleRef, 32
angleTol, 32
hBondCoeff, 31
hBondCutoff, 32
hBondExpDenom, 32
hBondExpNumer, 32
psfSegID, 31
residueRange, 31
angle
forceNoPBC, 19
group1, 19
group2, 19
group3, 19
oneSiteTotalForce, 19
angle, dipoleAngle, dihedral
oneSiteTotalForce, 16
aspathCV and azpathCV
lambda, 39
pathFile, 39
weights, 38
cartesian
atoms, 33
colvar
corrFuncLength, 55
corrFuncNormalize, 55
corrFuncOffset, 55
corrFuncOutputFile, 55
corrFuncStride, 55
corrFuncType, 54
corrFuncWithColvar, 54
corrFunc, 54
customFunctionType, 46
customFunction, 46
expandBoundaries, 49
extendedFluctuation, 53
extendedLagrangian, 52
extendedLangevinDamping, 53
extendedTemp, 53
extendedTimeConstant, 53
hardLowerBoundary, 49
hardUpperBoundary, 49
lowerBoundary, 49
lowerWalls, 88
name, 13
outputAppliedForce, 52
outputEnergy, 51
outputTotalForce, 52
outputValue, 51
outputVelocity, 51
runAveLength, 55
runAveOutputFile, 56
runAveStride, 55
runAve, 55
scriptedFunctionType, 48
scriptedFunctionVectorSize, 48
scriptedFunction, 48
subtractAppliedForce, 54
timeStepFactor, 53
upperBoundary, 49
upperWalls, 88
width, 48
coordNum
cutoff3, 21
cutoff, 21
expDenom, 21
expNumer, 21
group1, 21
group2CenterOnly, 21
group2, 21
pairListFrequency, 22
tolerance, 21
dihedralPC
psfSegID, 33
residueRange, 33
vectorFile, 33
vectorNumber, 33
dihedral
forceNoPBC, 20
group1, 19
group2, 19
group3, 19
group4, 19
oneSiteTotalForce, 20
dipoleAngle
forceNoPBC, 19
group1, 19
group2, 19
group3, 19
oneSiteTotalForce, 19
dipoleMagnitude
atoms, 27
distanceDir
forceNoPBC, 18
group1, 18
group2, 18
oneSiteTotalForce, 18
distanceInv
exponent, 18
group1, 18
group2, 18
oneSiteTotalForce, 18
distancePairs
forceNoPBC, 33
group1, 33
group2, 33
distanceVec
forceNoPBC, 17
group1, 17
group2, 17
oneSiteTotalForce, 17
distanceXY
axis, 17
forceNoPBC, 17
main, 17
ref2, 17
ref, 17
distanceZ
axis, 16
forceNoPBC, 16
main, 16
oneSiteTotalForce, 17
ref2, 16
ref, 16
distanceZ, dihedral, spinAngle, custom colvars
wrapAround, 44
distanceZ, custom colvars
period, 44
distance
forceNoPBC, 15
group1, 15
group2, 15
eigenvector
atoms, 26
differenceVector, 26
refPositionsColValue, 26
refPositionsCol, 26
refPositionsFile, 26
refPositions, 26
vectorColValue, 26
vectorCol, 26
vectorFile, 26
vector, 26
gspathCV and gzpathCV
pathFile, 37
useSecondClosestFrame, 36
useThirdClosestFrame, 36
gspath and gspath
fittingAtoms, 35
gspath and gzpath
atoms, 34
refPositionsCol, 34
refPositionsFileN, 34
useSecondClosestFrame, 35
useThirdClosestFrame, 35
gyration
atoms, 27
gzpathCV
useZsquare, 37
gzpath
useZsquare, 35
hBond
acceptor, 23
cutoff, 23
donor, 23
expDenom, 23
expNumer, 23
harmonicWalls
bypassExtendedLagrangian, 89
colvars, 88
forceConstant, 88
lambdaSchedule, 89
lowerWallConstant, 89
name, 88
outputAccumulatedWork, 89
outputEnergy, 88
stepZeroData, 88
targetEquilSteps, 89
targetForceConstant, 89
targetForceExponent, 89
targetNumStages, 89
targetNumSteps, 89
upperWallConstant, 89
writeTIPMF, 88
writeTISamples, 88
harmonic
centers, 85
colvars, 84
forceConstant, 84
lambdaSchedule, 87
name, 84
outputAccumulatedWork, 87
outputCenters, 86
outputEnergy, 84
stepZeroData, 84
targetCenters, 85
targetEquilSteps, 87
targetForceConstant, 86
targetForceExponent, 87
targetNumStages, 86
targetNumSteps, 85
writeTIPMF, 84
writeTISamples, 84
histogramGrid
lowerBoundaries, 94
upperBoundaries, 94
widths, 94
histogramRestraint
colvars, 94
forceConstant, 95
gaussianSigma, 95
lowerBoundary, 94
name, 94
outputEnergy, 94
refHistogramFile, 95
refHistogram, 95
upperBoundary, 95
width, 95
histogram
bypassExtendedLagrangian, 93
colvars, 92
gatherVectorColvars, 93
name, 92
outputFileDX, 93
outputFile, 92
outputFreq, 92
stepZeroData, 92
weights, 93
inertiaZ
atoms, 28
axis, 28
inertia
atoms, 27
linear
centers, 90
colvars, 90
forceConstant, 90
lambdaSchedule, 91
name, 90
outputAccumulatedWork, 91
outputEnergy, 90
targetEquilSteps, 91
targetForceConstant, 91
targetForceExponent, 91
targetNumStages, 91
targetNumSteps, 91
writeTIPMF, 91
writeTISamples, 91
mapTotal
mapName, 41
biasTemperature, 82
colvars, 77
ebMetaEquilSteps, 80
ebMeta, 80
gaussianSigmas, 77
hillWeight, 77
hillWidth, 77
keepFreeEnergyFiles, 78
keepHills, 79
multipleReplicas, 83
name, 77
newHillFrequency, 78
outputEnergy, 77
outputFreq, 77
rebinGrids, 79
replicaID, 83
replicaUpdateFrequency, 83
replicasRegistry, 83
stepZeroData, 77
targetDistFile, 80
targetDistMinVal, 80
useGrids, 79
wellTempered, 81
writeFreeEnergyFile, 78
writeHillsTrajectory, 78
writeHistogram, 95
writePartialFreeEnergyFile, 83
writeTIPMF, 77
writeTISamples, 77
orientationAngle
atoms, 29
refPositionsColValue, 29
refPositionsCol, 29
refPositionsFile, 29
refPositions, 29
orientationProj
atoms, 29
refPositionsColValue, 29
refPositionsCol, 29
refPositionsFile, 29
refPositions, 29
orientation
atoms, 28
closestToQuaternion, 28
refPositionsColValue, 28
refPositionsCol, 28
refPositionsFile, 28
refPositions, 28
polarPhi
atoms, 20
rmsd
atomPermutation, 24
atoms, 24
refPositionsColValue, 24
refPositionsCol, 24
refPositionsFile, 24
refPositions, 24
selfCoordNum
cutoff3, 22
cutoff, 22
expDenom, 22
expNumer, 22
group1, 22
pairListFrequency, 22
tolerance, 22
spinAngle
atoms, 30
refPositionsColValue, 30
refPositionsCol, 30
refPositionsFile, 30
refPositions, 30
tilt
atoms, 30
axis, 30, 31
refPositionsColValue, 30
refPositionsCol, 30
refPositionsFile, 30
refPositions, 30

any component
componentCoeff, 45
componentExp, 45
name, 43
scalable, 43
atom group
atomNameResidueRange, 58
atomNumbersRange, 58
atomNumbers, 58
atomsColValue, 59
atomsCol, 59
atomsFile, 58
atomsOfGroup, 58
centerReference, 60
dummyAtom, 59
enableForces, 62
fittingGroup, 61
indexGroup, 58
name, 57
psfSegID, 58
refPositionsColValue, 61
refPositionsCol, 60
refPositionsFile, 60
refPositions, 60
rotateReference, 60

colvar bias
bypassExtendedLagrangian, 65
colvars, 64
name, 64
outputEnergy, 64
outputFreq, 64
stepZeroData, 65
writeTIPMF, 65
writeTISamples, 65

global
colvarsRestartFrequency, 9
colvarsTrajFrequency, 9
indexFile, 10
scriptedColvarForces, 95
scriptingAfterBiases, 96
smp, 10
units, 4

NAMD conﬁguration ﬁle
colvarsConfig, 4
colvarsInput, 5
colvars, 4

### References

[1]   G. Fiorin, M. L. Klein, and J. Hénin. Using collective variables to drive molecular dynamics simulations. Mol. Phys., 111(22-23):3345–3362, 2013.

[2]   M. Iannuzzi, A. Laio, and M. Parrinello. Eﬃcient exploration of reactive potential energy surfaces using car-parrinello molecular dynamics. Phys. Rev. Lett., 90(23):238302, 2003.

[3]   E A Coutsias, C Seok, and K A Dill. Using quaternions to calculate RMSD. J. Comput. Chem., 25(15):1849–1857, 2004.

[4]   Yuguang Mu, Phuong H. Nguyen, and Gerhard Stock. Energy landscape of a small peptide revealed by dihedral angle principal component analysis. Proteins, 58(1):45–52, 2005.

[5]   Alexandros Altis, Phuong H. Nguyen, Rainer Hegger, and Gerhard Stock. Dihedral angle principal component analysis of molecular dynamics simulations. J. Chem. Phys., 126(24):244111, 2007.

[6]   Nicholas M Glykos. Carma: a molecular dynamics analysis program. J. Comput. Chem., 27(14):1765–1768, 2006.

[7]   G. D. Leines and B. Ensing. Path ﬁnding on high-dimensional free energy landscapes. Phys. Rev. Lett., 109:020601, 2012.

[8]   Davide Branduardi, Francesco Luigi Gervasio, and Michele Parrinello. From a to b in free energy space. J Chem Phys, 126(5):054103, 2007.

[9]   F. Comitani L. Hovan and F. L. Gervasio. Deﬁning an optimal metric for the path collective variables. J. Chem. Theory Comput., 15:25–32, 2019.

[10]   Giacomo Fiorin, Fabrizio Marinelli, and José D. Faraldo-Gómez. Direct derivation of free energies of membrane deformation and other solvent density variations from enhanced sampling molecular dynamics. J. Comp. Chem., 41(5):449–459, 2020.

[11]   Marco Jacopo Ferrarotti, Sandro Bottaro, Andrea Pérez-Villa, and Giovanni Bussi. Accurate multiple time step in biased molecular simulations. Journal of chemical theory and computation, 11:139–146, 2015.

[12]   Reza Salari, Thomas Joseph, Ruchi Lohia, Jérôme Hénin, and Grace Brannigan. A streamlined, general approach for computing ligand binding free energies and its application to GPCR-bound cholesterol. Journal of Chemical Theory and Computation, 14(12):6560–6573, 2018.

[13]   Eric Darve, David Rodríguez-Gómez, and Andrew Pohorille. Adaptive biasing force method for scalar and vector free energy calculations. J. Chem. Phys., 128(14):144120, 2008.

[14]   J. Hénin and C. Chipot. Overcoming free energy barriers using unconstrained molecular dynamics simulations. J. Chem. Phys., 121:2904–2914, 2004.

[15]   J. Hénin, G. Fiorin, C. Chipot, and M. L. Klein. Exploring multidimensional free energy landscapes using time-dependent biases on collective variables. J. Chem. Theory Comput., 6(1):35–47, 2010.

[16]   A. Carter, E, G. Ciccotti, J. T. Hynes, and R. Kapral. Constrained reaction coordinate dynamics for the simulation of rare events. Chem. Phys. Lett., 156:472–477, 1989.

[17]   M. J. Ruiz-Montero, D. Frenkel, and J. J. Brey. Eﬃcient schemes to compute diﬀusive barrier crossing rates. Mol. Phys., 90:925–941, 1997.

[18]   W. K. den Otter. Thermodynamic integration of the free energy along a reaction coordinate in cartesian coordinates. J. Chem. Phys., 112:7283–7292, 2000.

[19]   Giovanni Ciccotti, Raymond Kapral, and Eric Vanden-Eijnden. Blue moon sampling, vectorial reaction coordinates, and unbiased constrained dynamics. ChemPhysChem, 6(9):1809–1814, 2005.

[20]   K. Minoukadeh, C. Chipot, and T. Lelièvre. Potential of mean force calculations: A multiple-walker adaptive biasing force approach. J. Chem. Theor. Comput., 6:1008–1017, 2010.

[21]   J. Comer, J. Phillips, K. Schulten, and C. Chipot. Multiple-walker strategies for free-energy calculations in namd: Shared adaptive biasing force and walker selection rules. J. Chem. Theor. Comput., 10:5276–5285, 2014.

[22]   Adrien Lesage, Tony Lelièvre, Gabriel Stoltz, and Jérôme Hénin. Smoothed biasing forces yield unbiased free energies with the extended-system adaptive biasing force method. J. Phys. Chem. B, 121(15):3676–3685, 2017.

[23]   H. Fu, X. Shao, C. Chipot, and W. Cai. Extended adaptive biasing force algorithm. an on–the–ﬂy implementation for accurate free–energy calculations. J. Chem. Theory Comput., 2016.

[24]   L. Zheng and W. Yang. Practically eﬃcient and robust free energy calculations: Double-integration orthogonal space tempering. J. Chem. Theor. Compt., 8:810–823, 2012.

[25]   J. Kastner and W. Thiel. Bridging the gap between thermodynamic integration and umbrella sampling provides a novel analysis method: “umbrella integration”. J. Chem. Phys., 123(14):144104, 2005.

[26]   A. Laio and M. Parrinello. Escaping free-energy minima. Proc. Natl. Acad. Sci. USA, 99(20):12562–12566, 2002.

[27]   Helmut Grubmüller. Predicting slow structural transitions in macromolecular systems: Conformational ﬂooding. Phys. Rev. E, 52(3):2893–2906, Sep 1995.

[28]   T. Huber, A. E. Torda, and W.F. van Gunsteren. Local elevation - A method for improving the searching properties of molecular-dynamics simulation. Journal of Computer-Aided Molecular Design, 8(6):695–708, DEC 1994.

[29]   G. Bussi, A. Laio, and M. Parrinello. Equilibrium free energies from nonequilibrium metadynamics. Phys. Rev. Lett., 96(9):090601, 2006.

[30]   Fabrizio Marinelli, Fabio Pietrucci, Alessandro Laio, and Stefano Piana. A kinetic model of trp-cage folding from multiple biased molecular dynamics simulations. PLOS Computational Biology, 5(8):1–18, 2009.

[31]   Yanier Crespo, Fabrizio Marinelli, Fabio Pietrucci, and Alessandro Laio. Metadynamics convergence law in a multidimensional system. Phys. Rev. E, 81:055701, May 2010.

[32]   Fabrizio Marinelli and José D. Faraldo-Gómez. Ensemble-biased metadynamics: A molecular simulation method to sample experimental distributions. Biophysical Journal, 108(12):2779 – 2782, 2015.

[33]   Alessandro Barducci, Giovanni Bussi, and Michele Parrinello. Well-tempered metadynamics: A smoothly converging and tunable free-energy method. Phys. Rev. Lett., 100:020603, 2008.

[34]   P. Raiteri, A. Laio, F. L. Gervasio, C. Micheletti, and M. Parrinello. Eﬃcient reconstruction of complex free energy landscapes by multiple walkers metadynamics. J. Phys. Chem. B, 110(8):3533–9, 2006.

[35]   Yuqing Deng and Benoît Roux. Computations of standard binding free energies with molecular dynamics simulations. J. Phys. Chem. B, 113(8):2234–2246, 2009.

[36]   Jed W. Pitera and John D. Chodera. On the use of experimental observations to bias simulated ensembles. J. Chem. Theory Comput., 8:3445–3451, 2012.

[37]   A. D. White and G. A. Voth. Eﬃcient and minimal method to bias molecular simulations with experimental data. J. Chem. Theory Comput., ASAP, 2014.

[38]   Rong Shen, Wei Han, Giacomo Fiorin, Shahidul M Islam, Klaus Schulten, and Benoît Roux. Structural reﬁnement of proteins by restrained molecular dynamics simulations with non-interacting molecular fragments. PLoS Comput. Biol., 11(10):e1004368, 2015.