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

COLLECTIVE VARIABLES MODULE

Reference manual for NAMD

Code version: 2024-03-12

Updated versions of this manual: [GROMACS] [LAMMPS] [NAMD] [Tinker-HP] [VMD]

Alejandro Bernardin, Haochuan Chen, Jeffrey R. Comer, Giacomo Fiorin, Haohao Fu, Jérôme Hénin, Axel Kohlmeyer, Fabrizio Marinelli, Hubert Santuz, 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{0.28em}{0ex}}=\xi \left(\text{}X\text{}\left(t\right)\right)\phantom{\rule{0.28em}{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{0.28em}{0ex}},\phantom{\rule{0.28em}{0ex}}\phantom{\rule{0.28em}{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 (post-processing).

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, alongside any other publications for specific features being, according to the usage summary printed when running a Colvars-enabled MD simulation or analysis.

### 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 groups of 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.3.1), and the other the moving harmonic restraint (6.5).

colvar {  name dist  distance {    group1 { atomNumbersRange 42-55 }    group2 { indexGroup C-alpha_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.3): 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.17). 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.8.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  # 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 expressed 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 quantities such as force constants are based on degrees as well. Some colvar components have default values, expressed in Ångström (Å) in this documentation. They are converted to the current length unit, if different from Å. 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. They are converted internally to the current length unit as needed. Note that force constants in harmonic and harmonicWalls biases (6.5) are rescaled according to the width parameter of colvars, so that they are formally in energy units, although if width is given its default value of 1.0, force constants are effectively expressed in kcal/mol/(colvar unit)${}^{2}$.

To avoid errors due to reading configuration files written in a different unit system, it can be specified within the input:

• unitsUnit system to be used
$\left[$ string, context: global $\right]$
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.

• colvarsEnable the Colvars module
Default: off $\left[$ boolean, context: NAMD configuration file $\right]$
If this flag is on, the Colvars module within NAMD is enabled.
• colvarsConfigConfiguration file for the collective variables
$\left[$ UNIX filename, context: NAMD configuration file $\right]$
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.
• colvarsInputInput state file for the collective variables
$\left[$ UNIX filename, context: NAMD configuration file $\right]$
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.

In the remainder of this section, the most frequently used commands of the Colvars scripting interface are discussed and exemplified. For a full list of scripting commands available, see section 7.

##### 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"

This 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 will be required that are not carried out during a simulation. Therefore, it is generally good practice in a simulation to change the Colvars configuration outside the scope between segments of the same computation.

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 script and define the specific window through environment variables.

In the following example, the environment variable “SLURM_ARRAY_TASK_ID" is set in a Slurm array job to increasing values starting at 0. The value of this variable is used to define the window's numeric index, and the umbrella restraint center beginning at 2.00 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$>$"  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-initialize the module from scratch before loading the corresponding snapshot: structure newsystem.psfreinitatoms $<$snapshot$>$cv resetcv configfile $<$new_config$>$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$>$"  ##### 3.3.4 Accessing atomic data For computational efficiency the Colvars module keeps internal copies of the numeric IDs, masses, charges, positions, and optionally total forces of the atoms requested for a Colvars computation. At each simulation step, up-to-date versions of these properties are copied from the central memory of NAMD into the internal memory of the Colvars module. In a post-processing workflow or outside a simulation (e.g. when using VMD), this copy can be carried out as part of the update method: cv update  which also performs the (re-)computation of all variables and biases defined in Colvars. For example, the current sequence of numeric IDs of the atoms processed by Colvars can be obtained as: cv getatomids  and their current positions as: cv getatompositions  This may prove useful to test the correctness of the coordinates passed to Colvars, particularly in regard to periodic boundary conditions (5.3). There is currently no mechanism to modify the above fields via the scripting interface, but such capability will be added in the future. A special case are collective variables that are based on centers of mass, or volumetric maps (see e.g. mapTotal). These are often computed by NAMD itself, and any atoms that are used only for such variables will not be included in the lists above. While running a simulation, or when setting one up in VMD, it is possible to examine all the forces that were last applied by Colvars to the atoms, or are about to be applied: cv getatomappliedforces  where the length and order of this sequence matches that provided by the getatomids method. A simpler way of testing the stability of a Colvars configuration before or during a simulation makes use of aggregated data, such as the energy: cv getenergy  the root-mean-square of the Colvars applied forces: cv getatomappliedforcesrms  or the maximum norm of the applied forces: cv getatomappliedforcesmax  which can be matched to a specific atom via its numeric ID obtained as: cv getatomappliedforcesmaxid  See 7.1 for a complete list of scripting commands used to manage atomic data and runtime parameters of the Colvars module. ##### 3.3.5 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 where it is relevant.

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.11.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.6 Applying and analyzing forces on collective variables

As soon as a colvar “xi" and its associated biasing potentials are up to date (i.e. during a MD run, or after the respective “update" methods have been called), the force applied onto the colvar is known and may be accessed through the getappliedforce method:

cv colvar "xi" getappliedforce

See also the use of the outputAppliedForce option to have this force be saved to file during a simulation.

Aside from the biasing methods already implemented within Colvars (6) this force may be incremented ad hoc, for example 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"). If addforce is used during a simulation step, the force added by will be communicated to the corresponding atoms as soon as Colvars communicates all forces to NAMD.

For certain types of variable, the force applied directly on a colvar may be combined with those acting indirectly on it via the interatomic force field, making up the total force. When the outputTotalForce keyword is enabled, or when a biasing method that makes explicit use of the total force is enabled, the total force may be obtained as:

cv colvar "xi" gettotalforce

Note that not all types of variable support total-force computation, and the value of the total force may not be available immediately within the same simulation step: see the documentation of outputTotalForce for more details.

See 7.2 for a complete list of scripting commands used to manage collective variables.

##### 3.3.7 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: ...cv bias harmonic_xi updateif { [cv bias harmonic_xi energy] <${E_accept} } {    ...}

##### 3.3.8 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 file that contains information specifically for one bias only, for example:

cv bias "metadynamics1" load "old.colvars.state"

or alternatively, using the prefix of the file instead of its full name:

cv bias "metadynamics1" load "old"

A corresponding “save" function is also available:

cv bias "metadynamics1" save "new"

Please note that the file above must contain only the state information for that particular bias: loading a state file for the whole module is not allowed.

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 Configuration syntax used by the Colvars module

Configuration for the Colvars module is passed using an external file, or inlined as a string in a NAMD script using the Tcl command cv config "...". Configuration lines follow the format “keyword value" or “keyword { ... }", where the keyword and its value must be separated by one or more space characters. The following formatting rules apply:

• Keywords are case-insensitive; for example, upperBoundary is the same as upperboundary and UPPERBOUNDARY); note that their string values are however still case-sensitive (e.g. names of variables, file 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 at least one space character; the closing brace “}" may 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 different line).
• Many keywords are nested, and are only meaningful within the specific context of another keyword; for example, the keyword name is available inside the block of the keyword colvar {...}, but not outside of it; for every keyword documented in the following, the “parent" keyword that defines such context is also indicated.
• 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.
• Outside of comments, only ASCII characters are allowed for defining keywords, and the only white-space characters supported are spaces, tabs and newlines: a warning will be printed upon detection of non-ASCII characters in a configuration line, which include both characters that are visibly “special", as well as those with a very similar appearance to ASCII ones (for instance, non-breaking spaces); common ways to identify/remove non-ASCII characters are using the Emacs text editor, or using LC_ALL=C vi.
• Tcl syntax is generally not available inside a Colvars configuration file/string, but it is possible to use Tcl variables or bracket expansion of commands when configuration is passed via the command cv config "..."; for example, this is particularly useful when combined with NAMD's parameter introspection, e.g. cv config "colvarsTrajFrequency [DCDFreq]" allows synchronizing the output frequencies of NAMD and Colvars trajectory files. .

#### 3.5 Global keywords

The following keywords are available in the global context of the Colvars configuration, i.e. they are not nested inside other keywords:

• colvarsTrajFrequencyColvar value trajectory frequency
Default: 100 $\left[$ positive integer, context: global $\right]$
The values of each colvar (and of other related quantities, if requested) are written to the file outputName.colvars.traj every these many steps throughout the simulation. If the value is 0, such trajectory file is not written. For optimization the output is buffered, and synchronized with the disk only when the restart file is being written.
• colvarsRestartFrequencyColvar module restart frequency
Default: NAMD parameter restartFreq $\left[$ positive integer, context: global $\right]$
When this value is non-zero, a state file suitable for restarting will be written every these many steps. Additionally, any other output files produced by Colvars are written as well (except the trajectory file, which is 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 files altogether. If neeed, writing of all output files can still be triggered at any time via the save scripting function.
• indexFileIndex file for atom selection (GROMACS “ndx" format)
$\left[$ UNIX filename, context: global $\right]$
This option reads an index file (usually with a .ndx extension) as produced by the make_ndx tool of GROMACS. This keyword may be repeated to load multiple index files. 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 file can then be used to define atom groups with the indexGroup keyword. Other supported methods to select atoms are described in 5.
• smpWhether SMP parallelism should be used
Default: on $\left[$ boolean, context: global $\right]$
If this flag 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.
• sourceTclFileTcl file to be sourced at startup
$\left[$ UNIX filename, context: global $\right]$
This option causes the provided Tcl script file to be loaded at startup, e.g. to initialize the Tcl callback procedures for scripted variables or biases.

#### 3.6 Input state file

Several of the sampling methods implemented in Colvars are time- or history-dependent, i.e. they work by accumulating data as a simulation progresses, and use these data to determine their biasing forces. If the simulation engine uses a checkpoint or restart file (as GROMACS and LAMMPS do), any data needed by Colvars are embedded into that file. Otherwise, a dedicated state file can be loaded into Colvars directly.

When a dedicated Colvars state file is used, it may be in either one of two formats:

• Formatted, i.e. “text" format, which takes more space and is slower to to load/save but is also portable across different platforms and even different simulation engines (save for changes in physical units). This format is used by default, unless explicitly requested otherwise.
• Unformatted, i.e. “binary" format, which is both space-efficient and quick to load/save, but requires that the same NAMD build was used to write the file and that the Colvars configuration remains the same. This format is supported by Colvars versions starting 2023-09-25. Colvars state files can be written in binary format by setting the environment variable “COLVARS_BINARY_RESTART" to 1.

In either format, the state file contains accumulated data as well as the step number at the end of the run. The step number read from a state file overrides any value that NAMD provides, and will be incremented if the simulation proceeds. This means that the step number used internally by Colvars may not always match the step number reported by NAMD. This is particularly inmportant in NAMD, which represents step numbers as a 32-bit integers that overflows after $\sim$ 2 billion steps, effectively negating the usefulness of the firstTimeStep keyword. However, step numbers are implemented correctly in the Colvars state file.

##### 3.6.1 Restarting in NAMD.

Before the Colvars module is initialized in NAMD, the colvarsInput keyword can be used to give the name of a state file. After initialization of the Colvars module, a state file may be loaded at any time with the Tcl command cv load. Both versions support loading Colvars state files in either format (binary or text).

##### 3.6.2 Changing configuration upon restarting.

In some cases, it is useful to modify the configuration of variables or biases between consecutive runs, for example by adding or removing a restraint. Some special provisions will happen in that case. When a state file is loaded, no information is available about any newly added variable or bias, which will thus remain uninitialized until the first compute step. Conversely, any information that the state file may contain about variables or biases that are no longer defined will be silently ignored. Please note that these checks are performed based only on the names of variables and biases: it is your responsibility to ensure that these names have consistent definitions between runs.

The flexibility just described carries some limitations: namely, it is only supported when reading text-format Colvars state files. Instead, restarting from binary files after a configuration change will trigger an error. It is also important to remind that when switching to a different build of NAMD, the binary format may change slightly, even if the release version is the same.

To work around the potential issues just described, a text-format Colvars state file should be loaded. This is the default in NAMD unless the “COLVARS_BINARY_RESTART" is set to 1, and this information is only provided here for troubleshooting purposes.

#### 3.7 Output files

When the output prefix outputName is defined, the following output files are written during a simulation run:

• A state file, named outputName.colvars.state, which is written at the end of the specified run, and can also be written at any time with the scripting command save (3.3.3). This file is in plain text format by default, regardless of the value of binaryOutput of the NAMD coordinate and velocity files, or in binary format if the environment variable COLVARS_BINARY_RESTART is set to a non-zero integer. The state file can be used to continue a simulation: unless its contents are embedded in the checkpoint file of the MD engine itself (currently, GROMACS and LAMMPS support this), instructions for loading the Colvars state file will be required in the simulation script (see 3.6).
• If the parameter colvarsRestartFrequency is larger than zero and the restartName prefix is defined, a restart file is written every that many steps: this file is fully equivalent to the final state file. The name of this file is restartName.colvars.state.
• If the parameter colvarsTrajFrequency is greater than 0 (default value: 100 steps), a trajectory file, named outputName.colvars.traj, is written during the simulation. Unlike a state file, this file is not needed to restart a simulation, but can be used for post-processing and analysis. The format of this file is described in sec. 3.8.6.
• Additionally, certain features, when enabled, can emit output files with a specific purpose: for example, potentials of mean force (PMFs) can be written to file to be analyzed or plotted. These files are described in the respective sections, but as a general rule they all use names beginning with the outputName prefix. Like the trajectory file, these additional files are needed only for analyzing a simulation's results, but not to continue it.

Lastly, the total energy of all biases or restraints applied to the colvars appears under the NAMD standard output, under the MISC column.

#### 3.8 File formats

This section summarizes the file formats of various files that Colvars may be reading or writing.

##### 3.8.1 Configuration and state files.

Configuration files are text files that are generally read as input by NAMD, and may be optionally inlined in a NAMD script (see 3.3.1). Starting from version 2017-02-01, changes in newline encodings are handled transparently, i.e. it is possible to typeset a configuration file in Windows (CR-LF newlines) and then use it with Linux or macOS (LF-only newlines).

Formatted state files, although not written manually, follow otherwise the same text format as configuration files. Binary state files can only be read by the Colvars code itself.

##### 3.8.2 Index (NDX) files

For atom selections that cannot be specified only by using internal Colvars keywords, external index files may also be used following the NDX format used in GROMACS:

[ group_1_name ]  i1  i2  i3  i4  ...  ...             ...  iN[ group_2_name ]  ...

where i1 through iN are 1-based indices. Each group name may not contain spaces or tabs: otherwise, a parsing error will be raised.

Multiple index files may be provided to Colvars, each using the keyword indexFile. Two index files may contain groups with the same names, however these must also represent identical atom selections, i.e. the same sequence of indices including order.

Other than with GROMACS, an index group may also be generated from the VMD command-line interface, using the helper function write_index_group provided in the colvartools folder:

#### 6.14 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.17), or custom functions (see 4.18), or scripted functions (see 4.19);
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:

• scriptingAfterBiasesScripted colvar forces need updated biases?
Default: on $\left[$ boolean, context: global $\right]$
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 Tcl command-line interface: 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

cv addenergy <E>     Add an energy to the MD engine (no effect in VMD)     Parameters     E : float - Amount of energy to add

cv config <conf>     Read configuration from the given string     Parameters     conf : string - Configuration string

cv configfile <conf_file>     Read configuration from a file     Parameters     conf_file : string - Path to configuration file

cv delete     Delete this Colvars module instance (VMD only)

cv featurereport     Return a summary of Colvars features used so far and their citations     Returns     report : string - Feature report and citations

cv frame [frame]     Get or set current frame number (VMD only)     Parameters     frame : integer - Frame number (optional)     Returns     frame : integer - Frame number

cv getatomappliedforces     Get the list of forces applied by Colvars to atoms     Returns     forces : array of arrays of floats - Atomic forces

cv getatomappliedforcesmax     Get the maximum norm of forces applied by Colvars to atoms     Returns     force : float - Maximum atomic force

cv getatomappliedforcesmaxid     Get the atom ID with the largest applied force     Returns     id : int - ID of the atom with the maximum atomic force

cv getatomappliedforcesrms     Get the root-mean-square norm of forces applied by Colvars to atoms     Returns     force : float - RMS atomic force

cv resetatomappliedforces     Reset forces applied by Colvars to atoms

cv getatomids     Get the list of indices of atoms used in Colvars     Returns     indices : array of ints - Atom indices

cv getatomcharges     Get the list of charges of atoms used in Colvars     Returns     charges : array of floats - Atomic charges

cv getatommasses     Get the list of masses of atoms used in Colvars     Returns     masses : array of floats - Atomic masses

cv getatompositions     Get the list of cached positions of atoms used in Colvars     Returns     positions : array of arrays of floats - Atomic positions

cv getatomtotalforces     Get the list of cached total forces of atoms used in Colvars     Returns     forces : array of arrays of floats - Atomic total foces

cv getconfig     Get the module's configuration string read so far     Returns     conf : string - Current configuration string

cv getenergy     Get the current Colvars energy     Returns     E : float - Amount of energy (internal units)

cv getnumactiveatomgroups     Get the number of atom groups that currently have positive ref counts     Returns     count : integer - Total number of atom groups

cv getnumactiveatoms     Get the number of atoms that currently have positive ref counts     Returns     count : integer - Total number of atoms

cv getnumatoms     Get the number of requested atoms, including those not in use now     Returns     count : integer - Total number of atoms

cv getstepabsolute     Get the current step number of the simulation (including restarts)     Returns     step : int - Absolute step number

cv getsteprelative     Get the current step number from the start of this job     Returns     step : int - Relative step number

cv help [command]     Get the help string of the Colvars scripting interface     Parameters     command : string - Get the help string of this specific command (optional)
Returns     help : string - Help string 

cv languageversion     Get the C++ language version number     Returns     version : string - C++ language version

cv list [param]     Return a list of all variables or biases     Parameters     param : string - "colvars" or "biases"; default is "colvars" (optional)     Returns     list : sequence of strings - List of elements

cv listcommands     Get the list of script functions, prefixed with "cv_", "colvar_" or "bias_"
Returns     list : sequence of strings - List of commands 

cv listindexfiles     Get a list of the index files loaded in this session     Returns     list : sequence of strings - List of index file names

cv listinputfiles     Get a list of all input/configuration files loaded in this session     Returns     list : sequence of strings - List of file names

cv load <prefix>     Load data from a state file into all matching colvars and biases     Parameters     prefix : string - Path to existing state file or input prefix

cv loadfromstring <buffer>     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 - New molecule ID; -1 means undefined (optional)     Returns     molid : integer - Current molecule ID

cv printframe     Return the values that would be written to colvars.traj     Returns     values : string - The values

cv printframelabels     Return the labels that would be written to colvars.traj     Returns     Labels : string - The labels

cv reset     Delete all internal configuration

cv resetindexgroups     Clear the index groups loaded so far, allowing to replace them

cv save <prefix>     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     Returns     state : string - The saved state

cv targettemperature [T]     Get/set target temperature, overriding internally what the MD engine reports
Parameters     T : float - New target temperature in K (internal use) (optional)     Returns     T : float - Current target temperature in K 

cv timestep [dt]     Get/set integration timestep, overriding internally what the MD engine reports
Parameters     dt : float - New integration timestep in MD engine units (optional)     Returns     dt : float - Current integration timestep in MD engine units 

cv units [units]     Get or set the current Colvars unit system     Parameters     units : string - The new unit system (optional)     Returns     units : string - The current unit system

cv update     Recalculate colvars and biases

cv version     Get the Colvars Module version string     Returns     version : string - Colvars version

#### 7.2 Commands to manage individual collective variables

cv colvar name addforce <force>     Apply the given force onto this colvar (no effects outside run)     Parameters     force : float or array - Applied force; must match colvar dimensionality     Returns     force : float or array - Applied force; matches colvar dimensionality

cv colvar name communicateforces     Communicate bias forces from this colvar to atoms

cv colvar name cvcflags <flags>     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 <feature>     Get the value of the given feature for this colvar     Parameters     feature : string - Name of the feature     Returns     state : 1/0 - State of the given feature

cv colvar name getappliedforce     Return the total of the forces applied to this colvar     Returns     force : float - Applied force; matches the colvar dimensionality

cv colvar name resetbiasforce     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     Returns     groups : array of arrays of ints - Atom indices

cv colvar name getatomids     Return the list of atom indices used by this colvar     Returns     indices : array of ints - Atom indices

cv colvar name getconfig     Return the configuration string of this colvar     Returns     conf : string - Current configuration string

cv colvar name getgradients     Return the atomic gradients of this colvar     Returns     gradients : array of arrays of floats - Atomic gradients

cv colvar name gettotalforce     Return the sum of internal and external forces to this colvar     Returns     force : float - Total force; matches the colvar dimensionality

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)
Returns     help : string - Help string 

cv colvar name modifycvcs <confs>     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     Returns     value : float or array - Averaged value; matches the colvar dimensionality


cv colvar name set <feature> <value>     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     Returns     state : string - The feature state

cv colvar name type     Get the type description of this colvar     Returns     type : string - Type description

cv colvar name update     Recompute this colvar and return its up-to-date value     Returns     value : float or array - Current value; matches the colvar dimensionality


cv colvar name value     Get the current value of this colvar     Returns     value : float or array - Current value; matches the colvar dimensionality


cv colvar name width     Get the width of this colvar     Returns     width : float - Value of the width

#### 7.3 Commands to manage individual biases

cv bias name bin     Get the current grid bin index (flattened if more than 1d)     Returns     bin : integer - Bin index

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)     Returns     samples : integer - Number of samples

cv bias name local_sample_count [radius]     Get the number of samples around the current binsamples : integer - Number of samples
Parameters     radius : integer - Sum over radius bins around current bin (optional) 

cv bias name binnum     Get the total number of grid points of this bias (1D ABF only for now)     Returns     Bins : integer - Number of grid points

cv bias name delete     Delete this bias

cv bias name energy     Get the current energy of this bias     Returns     E : float - Energy value

cv bias name get <feature>     Get the value of the given feature for this bias     Parameters     feature : string - Name of the feature     Returns     state : 1/0 - State of the given feature

cv bias name getconfig     Return the configuration string of this bias     Returns     conf : string - Current configuration string

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)
Returns     help : string - Help string 

cv bias name load <prefix>     Load data into this bias     Parameters     prefix : string - Read from a file with this name or prefix

cv bias name loadfromstring <buffer>     Load state data into this bias from a string     Parameters     buffer : string - String buffer containing the state information

cv bias name save <prefix>     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     Returns     state : string - The bias state

cv bias name set <feature> <value>     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     Returns     state : string - String representation of the bias features

cv bias name type     Print the type of this bias object     Returns     type : string - Type of this bias object (e.g. metadynamics)

cv bias name update     Recompute this bias and return its up-to-date energy     Returns     E : float - Energy value

### 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.

### 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 the availability features in the Colvars module.

• Scripting commands using the Tcl language (https://www.tcl.tk) are supported in VMD, NAMD, and Tinker-HP. All precompiled builds of NAMD and VMD 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), in LAMMPS (on by default) and in the Colvars-patched GROMACS releases (but currently, not in the standard releases). For VMD, a patch that allows to link Lepton is available.
• Colvars requires the C++11 language standard or higher, which is either supported (VMD) or required (GROMACS, LAMMPS, NAMD) by all the engines. However, many of the VMD official builds are produced on very old architectures, where C++11 features are disabled at build time, thus limiting functionality. For details please see:

### 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. J. Chem. Phys., 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]   Mina Ebrahimi and Jérôme Hénin. Symmetry-adapted restraints for binding free energy calculations. Journal of Chemical Theory and Computation, 18(4):2494--2502, 2022.

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

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

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

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

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

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

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

[13]   Haochuan Chen, Han Liu, Heying Feng, Haohao Fu, Wensheng Cai, Xueguang Shao, and Christophe Chipot. Mlcv: Bridging Machine-Learning-Based Dimensionality Reduction and Free-Energy Calculation. J. Chem. Inf. Model., 62(1):1--8, 2022.

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

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

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

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

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

[19]   Jérôme Hénin, Giacomo Fiorin, Christophe Chipot, and Michael L. Klein. Exploring multidimensional free energy landscapes using time-dependent biases on collective variables. J. Chem. Theory Comput., 6(1):35--47, 2010.

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

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

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

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

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

[25]   Jeffrey Comer, James C. Phillips, Klaus Schulten, and Christophe Chipot. Multiple-walker strategies for free-energy calculations in NAMD: Shared adaptive biasing force and walker selection rules. J. Chem. Theor. Comput., 10(12):5276--5285, 2014.

[26]   J. Hénin. Fast and accurate multidimensional free energy integration. J. Chem. Theory Comput., 2021.

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

[28]   Haohao Fu, Xueguang Shao, Christophe Chipot, and Wensheng Cai. Extended adaptive biasing force algorithm. An on--the--fly implementation for accurate free--energy calculations. J. Chem. Theory Comput., 12(8):3506----3513, 2016.

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

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

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

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

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

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

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

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

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

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

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

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

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

[42]   Andrew D. White and Gregory A. Voth. Efficient and minimal method to bias molecular simulations with experimental data. J. Chem. Theory Comput., 10(8):3023----3030, 2014.

[43]   Donald Hamelberg, John Mongan, and J. Andrew McCammon. Accelerated molecular dynamics: A promising and efficient simulation method for biomolecules. J. Chem. Phys., 120(24):11919--11929, June 2004.

[44]   Yinglong Miao, Victoria A. Feher, and J. Andrew McCammon. Gaussian Accelerated Molecular Dynamics: Unconstrained Enhanced Sampling and Free Energy Calculation. J. Chem. Theory Comput, 11(8):3584--3595, August 2015.

[45]   Haochuan Chen, Haohao Fu, Christophe Chipot, Xueguang Shao, and Wensheng Cai. Overcoming free-energy barriers with a seamless combination of a biasing force and a collective variable-independent boost potential. J. Chem. Theory Comput., 17(7):3886--3894, 2021.

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