colvars
colvars copied to clipboard
Bias-exchange metadynamics implementation
This PR contains an implementation of bias-exchange metadynamics (https://doi.org/10.1021/jp067873l) based on the NAMD Tcl scripting interface.
Although most of the code is Tcl, the following significant changes are introduced to the C++ source code:
- The value of the "active" flag of the biases is being written to the state file; this is needed because all biases are defined for all replicas, but only one is active at a time. Therefore, we need to carry over the active flag when checkpointing.
- The value of the "active" flag can be reported on the trajectory.
- The field
name
is now a member ofcolvardeps
, and could later be moved to the AST (see https://github.com/Colvars/colvars/pull/700#issuecomment-2374427246 and related comments). - Allow updating and reporting in the scripting calls the energy and forces of a bias, but without actually sending those (used to decide the exchanges).
- Adds a
neutral
bias, which simplifies greatly the inclusion of replicas with equilibrium sampling in the BE implementation.