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

COLLECTIVE VARIABLES MODULE

Reference manual for NAMD

Code version: 2021-01-19

Alejandro Bernardin, Haochuan Chen, Jeffrey 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 define biasing potentials to alter the dynamics of the system in a controlled manner. These have been called ‘order parameters', ‘collective variables', ‘(surrogate) reaction coordinates', and many other terms.

Here we use primarily the term ‘collective variable', often shortened to colvar, to indicate any differentiable 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 flexibility, 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 efficient;
• calculate potentials of mean force (PMFs) along any set of variables, using different enhanced sampling methods, such as Adaptive Biasing Force (ABF), metadynamics, steered MD and umbrella sampling; variants of these methods that make use of an ensemble of replicas are supported as well;
• calculate statistical properties of the 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 files, 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 configuration: a crash course

The Colvars configuration is a plain text file or string that defines collective variables, biases, and general parameters of the Colvars module. It is passed to the module using back-end-specific commands documented in section 3.

Example: steering two atoms away from each other. Now let us look at a complete, non-trivial configuration. 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 configuration will contain two blocks, one defining 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.

Example: using multiple variables and multiple biasing/analysis methods together. A more complex example configuration is included below, showing how a variable may be constructed by combining multiple existing functions, and how multiple variables or multiple biases may be used concurrently. The colvar indicated below as “$d$" is defined as the difference between two distances (see 4.2): the first distance (${d}_{1}$) is taken between the center of mass of atoms 1 and 2 and that of atoms 3 to 5, the second (${d}_{2}$) between atom 7 and the center of mass of atoms 8 to 10 (see 5). The difference $d={d}_{1}-{d}_{2}$ is obtained by multiplying the two by a coefficient $C=+1$ or $C=-1$, respectively (see 4.15). The colvar called “$c$" is the coordination number calculated between atoms 1 to 10 and atoms 11 to 20. A harmonic restraint (see 6.5) is applied to both $d$ and $c$: to allow using the same force constant $K$, both $d$ and $c$ are scaled by their respective fluctuation widths ${w}_{d}$ and ${w}_{c}$. A third colvar “alpha" is defined as the $\alpha$-helical content of residues 1 to 10 (see 4.7.1). The values of “$c$" and “alpha" are also recorded throughout the simulation as a joint 2-dimensional histogram (see 6.10).

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 }    tolerance 1.0e-6    pairListFrequency 1000  }}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}

### 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 [2]. One of these parameters is the configuration file or the configuration 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 configuration file, and in which collective variable values, energies, etc. are expressed in the output and colvars trajectory files. Generally the Colvars module uses internally the same units as its back-end MD engine, with the exception of VMD, where different 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 files (and PDB files where applicable) are expected to be expressed in Ångström, no matter what unit system is in use by the back-end (NAMD) or the Colvars Module.

To avoid errors due to reading configuration files written in a different unit system, it can be specified 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 defining the units to be used internally by Colvars. In NAMD the only supported 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 define the module's configuration 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 configuration file
Acceptable values: boolean
Default value: off
Description: If this flag is on, the Colvars module within NAMD is enabled.
• Keyword colvarsConfig $⟨\phantom{\rule{0.3em}{0ex}}$Configuration file for the collective variables$\phantom{\rule{0.3em}{0ex}}⟩$
Context: NAMD configuration file
Acceptable values: UNIX filename
Description: Name of the Colvars configuration file (3.4, 3.5 and following sections). This file can also be provided by the Tcl command cv configfile. Alternatively, the contents of the file (as opposed to the file itself) can be given as a string argument to the command cv config.
• Keyword colvarsInput $⟨\phantom{\rule{0.3em}{0ex}}$Input state file for the collective variables$\phantom{\rule{0.3em}{0ex}}⟩$
Context: NAMD configuration file
Acceptable values: UNIX filename
Description: Keyword used to specify the input state file's name (3.6). If the input file is meant to be loaded within a Tcl script section, the cv load command may be used instead.

#### 3.3 Using the scripting interface to control the Colvars module

After the first initialization of the Colvars module, the internal state of Colvars objects may be queried or modified in a NAMD script:

cv $<$method$>$ arg1 arg2 ...


where $<$method$>$ is the name of a specific procedure and arg1, arg2, …are its required and/or optional arguments.

The most frequent uses of the scripting interface are discussed and exemplified in this section. For the full reference documentation of all procedures supported by the Colvars scripting interface, see section 7 for the Tcl command reference.

##### 3.3.1 Setting up the Colvars module

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

To define new collective variables and/or biases for immediate use in the current session, configuration can be loaded from an external configuration file:

cv configfile "colvars-file.in"

his can in principle be called at any time, if only flags internal to Colvars are being modified. In practice, when new atoms or any new atomic properties (e.g. total forces are being requested), initialization steps are required that are not carried out during a simulation. Therefore, it is good practice to change the Colvars configuration outside the scope between segments of the same simulation.

To load the configuration directly from a string the “config" method may be used:

cv config "keyword { ... }"

This method is particularly useful to dynamically define the Colvars configuration within a NAMD script. 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 defining the window. In this example, in a Slurm array job an environment variable is used to define the window's numeric index (starting at zero), and the umbrella restraint center (starting at 2 for the first window, and increasing in increments of 0.25 for all other windows):

cv configfile colvar-definition.inset window $env(SLURM_ARRAY_TASK_ID)cv config "harmonic { name us_${window}  colvars xi  centers [expr 2.0 + 0.25 * ${window}] ...}"  ##### 3.3.2 Using the Colvars version in scripts The vast majority of the syntax in Colvars is backward-compatible, adding keywords when new features are introduced. However, when using multiple versions simultaneously it may be useful to test within the script whether the version is recent enough to support the desired feature. The “version" can be used to get the Colvars version for this use: if { [cv version] >= "2020-02-25" } { cv config "(use a recent feature)"} ##### 3.3.3 Loading and saving the Colvars state and other information After a configuration is fully defined, the “load" method may be used to load a state file from a previous simulation that contains e.g. data from history-dependent biases), to either continue that simulation or analyze its results: cv load "$<$oldjob$>$.colvars.state"  or more simply using the prefix of the state file itself: cv load "$<$oldjob$>$"  Note that the Colvars state is already loaded automatically as part of the LAMMPS restart file, when this is read via the LAMMPS read_restart command; the “load" method allows to load a different state file after the fact. The latter version is particularly convenient in combination with the NAMD reinitatoms command, for example: reinitatoms $<$oldjob$>$cv load $<$oldjob$>$  The step number contained by the loaded file will be used internally by Colvars to control time-dependent biases, unless firstTimestep is issued, in which case that value will be used. When the system's topology is changed during simulation via the structure command (e.g. in constant-pH simulations), it is generally best to reset and re-initalize the module from scratch before loading the corresponding snapshot: structure newsystem.psfreinitatoms $<$snapshot$>$cv resetcv configfile ...cv load $<$snapshot$>$  The “save" method, analogous to “load", allows to save all restart information to a state file. This is normally not required during a simulation if colvarsRestartFrequency is defined (either directly or indirectly by the NAMD restart frequency). Because not only a state file (used to continue simulations) but also other data files (used to analyze the trajectory) are written, it is generally recommended to call the save method using a prefix, rather than a complete file name: cv save "$<$job$>$"  See 7.1 for a complete list of scripting commands used to manage the Colvars module. ##### 3.3.4 Managing collective variables After one or more collective variables are defined, they can be accessed with the following syntax. cv colvar "$<$name$>$" $<$method$>$ arg1 arg2 ...  where “$<$name$>$" is the name of the variable. For example, to recompute the collective variable “xi" after a change in its parameters, the following command can be used: cv colvar "xi" update  This ordinarily is not needed during a simulation run, where all variables are recomputed at every step (along with biasing forces acting on them). However, when analyzing an existing trajectory, e.g. in VMD, a call to update is generally required. While in all typical cases all configuration of the variables is done with the “config" or “configfile" methods, a limited set of changes can be enacted at runtime using: cv colvar "$<$name$>$" modifycvcs arg1 arg2 ...  where each argument is a string passed to the function or functions that are used to compute the variable, and are called colvar components, or CVCs (4.1). For example, a variable “DeltaZ" made of a single “distanceZ" component can be made periodic with a period equal to the unit cell dimension along the $Z$-axis: cv colvar "DeltaZ" modifycvcs "period Lz"  Please note that this option is currently limited to changing the values of the polynomial superposition parameters componentCoeff, or of the componentExp to update on the fly, of period, wrapAround or forceNoPBC options for components that support them. If the variable is computed using many components, it is possible to selectively turn some of them on or off: cv colvar "$<$name$>$" cvcflags $<$flags$>$  where “$<$flags$>$" is a list of 0/1 values, one per component. This is useful for example when script-based path collective variables in Cartesian coordinates (4.10.3) are used, to minimize computational cost by disabling the computation of terms that are very close to zero. Important: None of the changes enacted by the “modifycvcs" or “cvcflags" methods will be saved to state files, and will be lost when restarting a simulation, deleting the corresponding collective variable, or resetting the module with the “reset" method. ##### 3.3.5 Applying and analyzing forces on collective variables As soon as a collective variable is up to date (during a MD run or after its “update" method has been called), forces can be applied to it, e.g. as part of a custom restraint implemented by scriptedColvarForces: cv colvar "xi" addforce $<$force$>$  where “$<$force$>$" is a scalar or a vector (depending on the type of variable “xi") and is defined 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 configuration at any time. For example, given the most current value of the variable “xi", an already-defined harmonic restraint on it named “h_xi" can be updated as: cv bias "h_xi" update  During a running simulation this step is not needed, because an automatic update of each bias is already carried out. Another circumstance when “update" may be 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 definition of custom bias-exchange algorithms as part of the NAMD script. Because a restraint is a relatively light-weight object, the easiest way to change the configuration 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 centercv 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:

#### 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 fine-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 flag specifies 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 flag 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_"
• cv listindexfiles
Get a list of the index files loaded in this session
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 getvolmapids
Return the list of volumetric map indices used by 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 first release. Many of the older keywords are still recognized by the current code, thanks to specific compatibility code. This is not a list of new features: its primary purpose is to make you aware of those improvements that affect the use of old configuration files 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: specific 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 file written by writeHillsTrajectory has also been changed to use $\sigma$ instead of $2\sigma$. This change does not affect how the biasing potential is written in the state file, 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 definition 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.
• Colvars version 2020-11-09 or later.
The legacy keyword disableForces for atom groups is now deprecated and will be discontinued in a future release. Atom groups now have an automated way to save computation if forces are not used, and enabling this option otherwise would lead to incorrect behavior.

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 affects 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 scientific computing systems. Deailed information can be found at:

### References

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

[2]   James C. Phillips, David J. Hardy, Julio D. C. Maia, John E. Stone, João V. Ribeiro, Rafael C. Bernardi, Ronak Buch, Giacomo Fiorin, Jérôme Hénin, Wei Jiang, Ryan McGreevy, Marcelo C. R. Melo, Brian K. Radak, Robert D. Skeel, Abhishek Singharoy, Yi Wang, Benoît Roux, Aleksei Aksimentiev, Zaida Luthey-Schulten, Laxmikant V. Kalé, Klaus Schulten, Christophe Chipot, and Emad Tajkhorshid. Scalable molecular dynamics on CPU and GPU architectures with NAMD. Journal of Chemical Physics, 153(4):044130, 2020.

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

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

[5]   Haohao Fu, Wensheng Cai, Jérôme Hénin, Benoît Roux, and Christophe Chipot. New coarse variables for the accurate determination of standard binding free energies. J. Chem. Theory. Comput., 13(11):5173--5178, 2017.

[6]   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.

[7]   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.

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

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

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

[11]   F. Comitani L. Hovan and F. L. Gervasio. Defining an optimal metric for the path collective variables. J. Chem. Theory Comput., 15:25--32, 2019.

[12]   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.

[13]   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.

[14]   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.

[15]   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.

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

[17]   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.

[18]   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.

[19]   M. J. Ruiz-Montero, D. Frenkel, and J. J. Brey. Efficient schemes to compute diffusive barrier crossing rates. Mol. Phys., 90:925--941, 1997.

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

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

[22]   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.

[23]   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.

[24]   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.

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

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

[27]   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.

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

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

[30]   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.

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

[32]   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.

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

[34]   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.

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

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

[37]   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.

[38]   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.

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

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