Source-linked AI summary

PLUMED: a portable plugin for free-energy calculations with molecular dynamics

M. Bonomi, D. Branduardi, G. Bussi, C. Camilloni, D. Provasi, P. Raiteri, D. Donadio, F. Marinelli, F. Pietrucci, R. A. Broglia, M. Parrinello

arXiv:0902.0874v3physics.comp-phcond-mat.stat-mechphysics.bio-phq-bio.QM

TL;DR

Free-energy calculations are difficult when rare events make unbiased molecular dynamics impractical, while existing MD codes offer uneven support for free-energy methods and collective variables. PLUMED provides portable routines that interface with multiple MD engines and implement enhanced-sampling approaches, including metadynamics and well-tempered metadynamics. The software therefore lets users select host codes according to system needs and computational capabilities while calculating free-energy landscapes.

  • Problem

    Rare events make unbiased molecular-dynamics free-energy estimation impractical, and few MD codes provide broad interfaces for free-energy methods and collective variables.

  • Method

    PLUMED uses portable routines and interfaces to molecular-dynamics engines for free-energy calculations with methods including metadynamics, umbrella sampling, and steered molecular dynamics.

  • Results

    PLUMED can be ported to AMBER, DL_POLY, GROMACS, and NAMD, while well-tempered metadynamics avoids the fluctuation problem of standard metadynamics.

  • Takeaways & Limitations

    Users can choose an MD host according to its capabilities, such as implicit solvent, parallelism, force fields, and application-specific performance.

Abstract

from arXiv · show

Here we present a program aimed at free-energy calculations in molecular systems. It consists of a series of routines that can be interfaced with the most popular classical molecular dynamics (MD) codes through a simple patching procedure. This leaves the possibility for the user to exploit many different MD engines depending on the system simulated and on the computational resources available. Free-energy calculations can be performed as a function of many collective variables, with a particular focus on biological problems, and using state-of-the-art methods such as metadynamics, umbrella sampling and Jarzynski-equation based steered MD. The present software, written in ANSI-C language, can be easily interfaced with both fortran and C/C++ codes.

PROGRAM SUMMARY

PLUMED addresses the difficulty of calculating free-energy landscapes by combining enhanced-sampling methods with interfaces to diverse molecular-dynamics codes. Its methods use collective variables and include standard metadynamics, well-tempered metadynamics, umbrella sampling, and related approaches.

  • PLUMED targets free-energy calculations using umbrella sampling, steered molecular dynamics, metadynamics, and Jarzynski-equation-based methods.
  • Free-energy estimation from unbiased molecular dynamics is impractical for rare events because it requires enormous computational time.
  • Metadynamics builds a bias from Gaussians centered on previously visited collective-variable configurations to discourage revisiting them.
  • Standard metadynamics can produce an approximately flat collective-variable histogram, enabling exploration despite free-energy barriers, but its estimate fluctuates around the exact free energy.
  • Well-tempered metadynamics reduces bias growth as e^(-V(s,t)/∆T), avoiding standard-metadynamics fluctuations and focusing exploration on low-free-energy regions.

B. Metadynamics implementation

PLUMED’s metadynamics implementation tracks the evolving bias in collective-variable space and applies the corresponding forces to the microscopic dynamics. Its collective-variable routines also support other free-energy methods.

  • Metadynamics requires tracking visited configurations or the bias potential and adding the resulting forces to the microscopic dynamics.
  • The bias is represented by a dynamically growing list of deposited Gaussians, which is stored for restarting simulations and plotting the bias.
  • Bias forces are obtained by differentiating the bias potential with respect to microscopic coordinates using the chain rule.
  • For each collective variable, users must provide routines returning its value and coordinate gradients, enabling umbrella sampling and Jarzynski-equation methods as well.Writing and debugging many such routines requires noticeable effort.

C. Collective variables

PLUMED provides a broad library of collective variables for describing structural, geometric, interaction-based, and pathway-related properties. Many variables expose user-adjustable definitions or metrics for different molecular problems.

  • The package implements many collective variables to accommodate diverse problems and provide appropriate system descriptions.
  • Geometric variables include atom or group positions, distances, angles, torsions, minimum distances, and coordination numbers.Atom-position biasing can be restricted by direction or projection, but this variable is not translationally invariant.
  • Structural variables describe hydrogen bonds, interfacial water, radius of gyration, inertia, dipole moments, dihedral correlations, and secondary-structure similarity.The interfacial-water variable counts atoms contacting both of two other groups, while hydrogen-bond counting supports several pattern choices.
  • Dihedral-based variables measure similarity to adjacent-angle patterns, reference values, or a reference configuration.For proteins, dihedral correlation grows with secondary-structure content, while alpha-beta similarity measures alpha or beta structure relative to references.
  • Path collective variables use an approximate reaction path to measure progress along the path and distance from its closest point.The path comprises P frames; the progress variable ranges from 1 to P, and λ is generally chosen as 2.3/(Δd)^2.
  • Path distances can be defined using aligned Cartesian RMSD, distance RMSD, or contact-map distance, with a single reference yielding the corresponding squared structural distance.

III. USAGE EXAMPLES

Using PLUMED requires a supplementary free-energy input file, and simulations produce a COLVAR file recording collective-variable values and method-specific information.

  • PLUMED-enabled calculations require a supplementary input file for the free-energy calculation.
  • The main output is generally a COLVAR file recording collective-variable values.
  • The paper illustrates free-energy methods available across the specified MD codes and additional algorithms implemented only in the GROMACS version.Further collective-variable and sampling examples, including multiple-walker metadynamics, are distributed in the test directory.

A. Metadynamics

PLUMED’s metadynamics input uses directives, parameters, and flags to configure Gaussian deposition, well-tempered sampling, collective-variable output, and wall restraints. The resulting HILLS and COLVAR files record the simulation history and monitored quantities.

  • Metadynamics input is organized into directives, parameter keywords, and flags that activate methods and set their attributes.
  • The HILLS directive enables metadynamics and sets Gaussian height and deposition stride, producing a file that records deposited Gaussians.
  • The HILLS record contains timestep, Gaussian centers, widths, and height; well-tempered runs rescale height using the bias factor to obtain free energy when summing Gaussians.
  • WELLTEMPERED samples collective variables at a fictitious temperature T + ΔT, with the bias factor set through BIASFACTOR and SIMTEMP.
  • PRINT writes timestep, collective-variable values, bias potential, and wall or restraint potential to COLVAR at a user-defined stride.
  • UWALL and LWALL apply a power-law wall potential beyond a specified limit, with KAPPA, EPS, and EXP controlling its form.

B. Umbrella Sampling

PLUMED implements umbrella sampling by applying a harmonic restraint to a selected collective variable and recording the resulting trajectory data for free-energy reconstruction.

  • B. Umbrella Sampling: The UMBRELLA directive activates sampling on a specified collective variable, with AT setting the restraint position and KAPPA setting its spring constant.The restraint’s energy units depend on the molecular-dynamics code.
  • B. Umbrella Sampling: TORSION selects a dihedral-angle collective variable defined by four atoms or atom groups, and W_STRIDE controls how often collective-variable values are printed.
  • B. Umbrella Sampling: The COLVAR output records the timestep, collective-variable values, Gaussian and harmonic potentials, restrained variable, and restraint position.
  • B. Umbrella Sampling: The free energy as a function of the collective variable can be calculated from umbrella-sampling data using the weighted histogram analysis method.

C. Thermodynamic integration and methods based on Jarzynski or Crooks relations

PLUMED supports steered molecular dynamics that moves a system toward a target collective-variable value and estimates free-energy differences from the work performed.

  • C. Thermodynamic integration and methods based on Jarzynski or Crooks relations: Steered molecular dynamics applies a harmonic potential moving at constant speed to drag a system toward a target value in collective-variable space.
  • C. Thermodynamic integration and methods based on Jarzynski or Crooks relations: In the reversible limit of vanishing velocity, the work performed during dragging equals the free-energy difference between the initial and final states.
  • C. Thermodynamic integration and methods based on Jarzynski or Crooks relations: At finite velocity, the work distribution provides a free-energy estimate through the Jarzynski or Crooks relations.
  • C. Thermodynamic integration and methods based on Jarzynski or Crooks relations: A typical steering input defines an angle collective variable, activates steering toward 3.0 at velocity 0.5 with spring constant 500.0, and prints work every 100 steps.
  • C. Thermodynamic integration and methods based on Jarzynski or Crooks relations: The STEER directive activates steering, while TO specifies the target, VEL the velocity, and KAPPA the spring constant.The velocity is expressed in collective-variable units per kilostep.

D. Replica–exchange metadynamics

PLUMED provides replica-exchange metadynamics through temperature-based and bias-exchange schemes, improving sampling either perpendicular to collective variables or across many collective variables.

  • D. Replica–exchange metadynamics: With GROMACS, PLUMED supports parallel tempering metadynamics and bias-exchange metadynamics as two replica-exchange approaches.
  • D. Replica–exchange metadynamics: PTMetaD uses replicas sharing collective variables but coupled to different temperatures, allowing exchanges between replica conformations.
  • D. Replica–exchange metadynamics: PTMetaD samples degrees of freedom perpendicular to the collective variables more efficiently than standard metadynamics.
  • D. Replica–exchange metadynamics: BE-META distributes a large number of collective variables across replicas, with each replica controlling only a few and optionally one neutral replica using standard molecular dynamics.All replicas use the same temperature.
  • D. Replica–exchange metadynamics: The BE-META exchange probability depends on the biasing potentials evaluated for both replicas’ configurations.
  • D. Replica–exchange metadynamics: PTMetaD requires one binary topology file per replica but only one PLUMED input file, which activates PTMETAD and specifies shared collective-variable settings.

IV. OVERVIEW OF THE SOFTWARE STRUCTURE

PLUMED acts as a modular layer around a molecular-dynamics code: it parses inputs, evaluates collective variables, applies biasing forces, and records outputs.

  • IV. OVERVIEW OF THE SOFTWARE STRUCTURE: PLUMED initializes and parses the free-energy calculation input before the simulation proceeds.
  • IV. OVERVIEW OF THE SOFTWARE STRUCTURE: For each microscopic configuration, PLUMED evaluates the values of the specified collective variables.
  • IV. OVERVIEW OF THE SOFTWARE STRUCTURE: The plugin calculates forces from metadynamics Gaussians or from fixed or moving restraints used in umbrella sampling and steered molecular dynamics.
  • IV. OVERVIEW OF THE SOFTWARE STRUCTURE: PLUMED writes collective-variable values to COLVAR and, for metadynamics, deposited Gaussians to HILLS.
  • IV. OVERVIEW OF THE SOFTWARE STRUCTURE: The main molecular-dynamics code calls PLUMED’s initialization and parsing routines, which select collective-variable-specific processing routines.
  • IV. OVERVIEW OF THE SOFTWARE STRUCTURE: The interaction between PLUMED and the principal molecular-dynamics code is represented schematically in Figure 1.

V. DESCRIPTION OF THE INDIVIDUAL SOFTWARE COMPONENTS

PLUMED is distributed as a modular package with core routines, host-code patches, tests, utilities, and documentation. Installation uses code-specific automatic patching followed by recompilation for supported MD programs.

  • Package structure: The package separates common routines, tests, interface patches, utilities, and documentation into distinct directories.Tests include examples for different collective variables and free-energy methods, while patches connect PLUMED to different MD codes.
  • Utilities: The sum_hills utility reconstructs free energy from metadynamics HILLS files by summing deposited Gaussians.The driver utility instead evaluates selected collective variables along a molecular-dynamics trajectory using PDB, DCD, and PLUMED-format inputs.
  • Installation: PLUMED is installed through an automatic patch procedure applied to a clean host-code source tree, which then requires recompilation.The manual provides detailed installation instructions for each supported code.

VII. TEST RUNS DESCRIPTION

The test runs apply PLUMED free-energy methods to alanine dipeptide in vacuum at 300 K using NAMD or AMBER. They cover two-dimensional metadynamics and umbrella sampling, plus one-dimensional umbrella sampling and thermodynamic integration.

  • Test setup: The alanine-dipeptide tests use the AMBER99SB force field at 300 K in vacuum and are conducted with NAMD or AMBER SANDER.Figure 2 defines Φ as C–N–Cα–C and Ψ as N–Cα–C–N.
  • Metadynamics: Well-tempered metadynamics reconstructs the free-energy surface over Φ and Ψ from a 5 ns SANDER simulation.The calculation uses bias factor 10, initial Gaussian height 0.1 kcal/mol, width 0.35 rad for both CVs, and 1 ps deposition stride; sum_hills reconstructs the surface.
  • Umbrella sampling: Two-dimensional umbrella sampling estimates the Φ–Ψ free-energy surface from 676 adaptive umbrellas of 10 ps each using NAMD.The simulations use a spring constant of 100 kcal mol−1 rad−2, and WHAM produces the free-energy profile.
  • One-dimensional methods: One-dimensional umbrella sampling and thermodynamic integration both produce free energies along Ψ.Umbrella sampling uses 26 windows of 20 ps, while thermodynamic integration drags Ψ from π to −π in 504 ps.
  • Software scope: PLUMED provides free-energy calculations using umbrella sampling, steered molecular dynamics, and metadynamics across multiple host MD codes.The paper identifies AMBER, DLPOLY, GROMACS, and NAMD as host codes, enabling code choice based on capabilities and application-specific performance.
Loading 0902.0874v3…