PLUMED 2 Documentation

repository·master·Indexed 19 days ago

https://github.com/plumed/plumed2

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

Tokens
40.8K
Snippets
142
Records
247
Agent score
65%

What's inside PLUMED 2

  1. How PLUMED command line tools work

    master

    PLUMED includes a set of standalone command-line tools that can be used independently of a molecular dynamics code. These tools are invoked using the plumed executable 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>
  2. Compatible Molecular Dynamics (MD) codes for PLUMED

    master

    PLUMED 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: pmemd module (since v20), sander module (since v15)
    • CP2K: Since Feb 2015
    • LAMMPS: Since Nov 2018
    • DFTB+: Since release 20.1
    • OpenMM: Via the openmm-plumed plugin
    • 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 ENERGY collective 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-plumed plugin.

    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.
  3. Use generic PLUMED actions for trajectory analysis

    master

    The 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 PRINT or DUMPVECTOR to output calculated values to files.
    • Conditional output: Use UPDATE_IF to wrap printing commands, ensuring data is only output when collective variables (colvars) fall within specific ranges.
    • Trajectory manipulation: Use WHOLEMOLECULES or WRAPAROUND to adjust atom positions passed from the MD engine.
    • Constant storage: Use CONSTANT or PDB2CONSTANT to store fixed values.
    • Stopping criteria: Use COMMITTOR to stop a calculation once a criterion is met or to track how often a criterion is satisfied.
  4. Overview of Tensor Train Metadynamics (TT-MetaD)

    master

    The ttsketch module 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.

  5. What is the metatomic module?

    master

    The metatomic module provides an interface between PLUMED and the [metatomic] library. It allows users to use arbitrary machine learning models as collective variables (CVs).

    Workflow:

    1. Define custom machine learning models using Python code following the metatomic interface.
    2. Export these models to TorchScript.
    3. Load the exported TorchScript model into PLUMED to be executed during simulations.
  6. What is the LOGMFD module?

    master

    The 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.
  7. What is the Funnel Metadynamics (FM) module?

    master

    The 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.
  8. What is Experiment Directed Simulation (EDS)?

    master

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

  9. Incompatible label changes in version 2.1

    master

    If 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.argname to label.argname_bias.
    • ABMD: Changed from label.min_argname to label.argname_min.
    • PIECEWISE: Changed from label.argnumber to label.argname_pfunc.
    • CONTACTMAP: Components are now labelled label.contact-$n$.
    • Multicolvars (LESS_THAN/MORE_THAN): Components are now labelled lessthan and morethan (previously used underscores which are now reserved for special usage).
  10. MOLINFO PBC reconstruction with WHOLE flag

    master
    When using the MOLINFO action with the WHOLE flag, 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.
  11. How PYCV works: PYCVINTERFACE vs PYFUNCTION

    master

    The PYCV module provides two primary actions for defining Collective Variables (CVs) or functions in Python:

    1. PYCVINTERFACE: Used to implement single- or multi-component CVs. It supports a full lifecycle including PREPARE and UPDATE steps and can handle atom selection (via ATOMS or neighbor list keywords).
    2. PYFUNCTION: Used to implement arbitrary functions. It is simpler and only supports the INIT and CALCULATE steps.

    Plumed embeds a Python interpreter and imports a module specified by the IMPORT= keyword. This module must contain an init object (function or dictionary) and a calculate function.