PLUMED 2 Documentation
repository·master·Indexed 19 days ago
https://github.com/plumed/plumed2A library for analyzing and biasing molecular dynamics simulations, providing tools for enhanced sampling, collective variables, and metadynamics. Includes documentation for the cudaCoord plugin for GPU-optimized coordination functions and the pycv support module for defining Collective Variables (CVs) or functions in Python using PYCVINTERFACE and PYFUNCTION.
What's inside PLUMED 2
- The DRR module implements the eABF/DRR (Extended Accelerated Boundary Force) method. This method is used for free energy calculations and for enhancing sampling along Collective Variables (CVs).
How PLUMED command line tools work
masterPLUMED includes a set of standalone command-line tools that can be used independently of a molecular dynamics code. These tools are invoked using the
plumedexecutable followed by the tool name and its specific flags.Common use cases for these tools include:
- Postprocessing trajectories.
- Benchmarking PLUMED calculations.
- Running molecular dynamics on Lennard Jones particle systems.
Example invocation:
plumed <toolname> <list of input flags for that tool>plumed <toolname> <list of input flags for that tool>Compatible Molecular Dynamics (MD) codes for PLUMED
masterPLUMED can be integrated into various Molecular Dynamics (MD) engines to analyze or bias simulations on the fly. Many MD codes are 'PLUMED-ready' out of the box, while others require specific plugins or patches.
Out-of-the-box support:
- Amber:
pmemdmodule (since v20),sandermodule (since v15) - CP2K: Since Feb 2015
- LAMMPS: Since Nov 2018
- DFTB+: Since release 20.1
- OpenMM: Via the
openmm-plumedplugin - GROMACS: Native support since version 2025 (with limitations)
- Other supported codes: ESPResSo (patched), PINY-MD (plumed branch), IPHIGENIE, AceMD, DL_POLY4, VNL-ATK, ABIN, i-pi, Yaff (since Jul 2019), Metalwalls, ASE, and GPUMD.
Patches and Plugins:
- GROMACS: For advanced features like replica exchange, the
ENERGYcollective variable, or lambda dynamics, use the PLUMED patch instead of the native GROMACS implementation. - NAMD and Quantum Espresso: Patches are available.
- OpenMM: Requires the
openmm-plumedplugin.
Post-processing and Analysis:
PLUMED can also be used as a standalone tool for post-processing results or integrated into analysis packages:
- PLUMED-GUI: A VMD plugin for computing collective variables.
- HTMD: Uses PLUMED collective variables for analysis.
- OpenPathSampling: Uses the
PLUMED Wrapper for OpenPathSampling.
- Amber:
Use generic PLUMED actions for trajectory analysis
masterThe generic module provides actions for extracting information from molecular dynamics trajectories. These can be used during an MD run or via post-processing with the
driver.Key capabilities include:
- Printing data: Use
PRINTorDUMPVECTORto output calculated values to files. - Conditional output: Use
UPDATE_IFto wrap printing commands, ensuring data is only output when collective variables (colvars) fall within specific ranges. - Trajectory manipulation: Use
WHOLEMOLECULESorWRAPAROUNDto adjust atom positions passed from the MD engine. - Constant storage: Use
CONSTANTorPDB2CONSTANTto store fixed values. - Stopping criteria: Use
COMMITTORto stop a calculation once a criterion is met or to track how often a criterion is satisfied.
- Printing data: Use
Overview of Tensor Train Metadynamics (TT-MetaD)
masterThe
ttsketchmodule implements Tensor Train Metadynamics (TT-MetaD). Unlike standard metadynamics that represents bias potentials as a sum of Gaussian hills, TT-MetaD represents the bias potential as a Tensor Train (TT).It uses the TT-Sketch algorithm to periodically compress accumulated Gaussian hills into a low-rank TT approximation. This approach ensures that both memory usage and evaluation costs remain bounded, even during very long simulations.
What is the metatomic module?
masterThe
metatomicmodule provides an interface between PLUMED and the [metatomic] library. It allows users to use arbitrary machine learning models as collective variables (CVs).Workflow:
- Define custom machine learning models using Python code following the
metatomicinterface. - Export these models to TorchScript.
- Load the exported TorchScript model into PLUMED to be executed during simulations.
- Define custom machine learning models using Python code following the
What is the LOGMFD module?
masterThe LOGMFD module implements methods for enhanced sampling in a Collective Variable (CV) space and for on-the-fly free energy reconstruction along those CVs.
Key capabilities include:
- LogMFD/LogPD methods: For enhanced sampling and free energy reconstruction.
- Multiple-replica algorithm: Implements the Crooks-Jarzynski non-equilibrium work relation.
- Single-replica algorithm.
- TAMD/d-AFED: Implementation of Temperature Accelerated Molecular Dynamics (TAMD) and d-AFED.
What is the Funnel Metadynamics (FM) module?
masterThe Funnel Metadynamics (FM) module combines Metadynamics bias potentials with a funnel-shaped restraint potential. This restraint is applied to the target structure of a binding interaction to accelerate the sampling of binding/unbinding processes.
How it works:
- Structure: The restraint consists of a cone restraint covering the ligand binding site and a cylindrical restraint leading towards the solvent.
- Inside the funnel: When the ligand is within the funnel volume, it experiences no restraint potential and behaves according to regular Metadynamics.
- At the boundaries: Upon reaching the funnel boundaries, a repulsive bias is applied to force the ligand to remain within the allowed funnel space.
- Benefit: This approach leads to swift convergence of calculations and a well-defined binding free-energy surface.
- Alignment: This version of FM incorporates an alignment function, which removes the need to block the target macromolecule in the simulation box.
What is Experiment Directed Simulation (EDS)?
masterEDS is a module providing methods for adaptively determining linear bias parameters. Its primary goal is to ensure that each biased Collective Variable (CV) samples a new target mean value.
Key features include:
- Implementation of the stochastic gradient descent algorithm as described in the original EDS literature.
- Additional minimization algorithms designed for Coarse-Grained Directed Simulation.
Note: If you require different optimization algorithms or features, consider using the MAXENT method available in PLUMED.
Incompatible label changes in version 2.1
masterIf you are migrating from PLUMED 2.0 to 2.1, be aware that several action labels have changed to be more consistent with steered MD. You may need to adjust your input files to use the new label formats:
- BIASVALUE: Changed from
label.bias.argnametolabel.argname_bias. - ABMD: Changed from
label.min_argnametolabel.argname_min. - PIECEWISE: Changed from
label.argnumbertolabel.argname_pfunc. - CONTACTMAP: Components are now labelled
label.contact-$n$. - Multicolvars (LESS_THAN/MORE_THAN): Components are now labelled
lessthanandmorethan(previously used underscores which are now reserved for special usage).
- BIASVALUE: Changed from
MOLINFO PBC reconstruction with WHOLE flag
masterWhen using theMOLINFOaction with theWHOLEflag, Periodic Boundary Conditions (PBCs) in subsequent actions will be reconstructed using a minimum spanning tree. This reconstruction is based on the coordinates stored in the MOLFILE reference PDB.How PYCV works: PYCVINTERFACE vs PYFUNCTION
masterThe PYCV module provides two primary actions for defining Collective Variables (CVs) or functions in Python:
PYCVINTERFACE: Used to implement single- or multi-component CVs. It supports a full lifecycle includingPREPAREandUPDATEsteps and can handle atom selection (viaATOMSor neighbor list keywords).PYFUNCTION: Used to implement arbitrary functions. It is simpler and only supports theINITandCALCULATEsteps.
Plumed embeds a Python interpreter and imports a module specified by the
IMPORT=keyword. This module must contain aninitobject (function or dictionary) and acalculatefunction.