Source-linked AI summary

PLUMED 2: New feathers for an old bird

Gareth A. Tribello, Massimiliano Bonomi, Davide Branduardi, Carlo Camilloni, Giovanni Bussi

arXiv:1310.0980v1physics.comp-phcond-mat.stat-mechphysics.bio-phphysics.chem-phq-bio.QM

TL;DR

PLUMED 1 faced limitations from laborious, divergent interfaces across molecular-dynamics codes. This paper presents PLUMED 2, a modular C++ rewrite with a standardized interface, reporting easier extensibility, improved performance, and simpler coupling to MD engines.

  • Problem

    PLUMED 1 required laborious per-code modifications, causing interfaces to develop at different rates and motivating a standard interface across MD codes.

  • Method

    The paper rewrites PLUMED in C++ as a separately compiled library with a standard MD interface, modular plug-in architecture, and general-purpose core.

  • Results

    PLUMED 2 removes many PLUMED 1 limitations, improves performance through parallel and on-demand variable calculation, and simplifies MD-engine interfacing.

  • Takeaways & Limitations

    The new design makes it easier to add collective variables, free-energy methods, and analysis tools and supports broader contributions to molecular-dynamics methods.

  • Takeaways & Limitations

    For cluster and bulk-material applications, collective variables must remain invariant when labels of same-type atoms are exchanged.

Abstract

from arXiv · show

Enhancing sampling and analyzing simulations are central issues in molecular simulation. Recently, we introduced PLUMED, an open-source plug-in that provides some of the most popular molecular dynamics (MD) codes with implementations of a variety of different enhanced sampling algorithms and collective variables (CVs). The rapid changes in this field, in particular new directions in enhanced sampling and dimensionality reduction together with new hardwares, require a code that is more flexible and more efficient. We therefore present PLUMED 2 here - a complete rewrite of the code in an object-oriented programming language (C++). This new version introduces greater flexibility and greater modularity, which both extends its core capabilities and makes it far easier to add new methods and CVs. It also has a simpler interface with the MD engines and provides a single software library containing both tools and core facilities. Ultimately, the new code better serves the ever-growing community of users and contributors in coping with the new challenges arising in the field.

PROGRAM SUMMARY

PLUMED 2 supports free-energy-surface calculation and molecular-dynamics trajectory analysis using advanced collective variables. It implements collective variables and enhanced-sampling techniques as either a standalone program or an embeddable library for molecular-dynamics codes.

  • Distribution: The distribution includes a test suite, user and developer documentation, a collection of patches, and utilities.It requires a computer capable of running an executable produced by a C++ compiler and supports Linux and Unix operating systems.
  • Purpose: PLUMED 2 calculates free-energy surfaces for molecular systems in biology, chemistry, and materials science, both on the fly and through trajectory analysis.Its analysis capabilities use advanced collective variables.
  • Methods: The program implements various collective variables and enhanced-sampling techniques.These implementations address the stated free-energy and molecular-dynamics analysis problems.
  • Deployment: PLUMED 2 operates standalone for a-posteriori trajectory analysis or as a library embedded in molecular-dynamics codes including GROMACS, NAMD, Quantum ESPRESSO, and LAMMPS.Interfaces are provided as patches, and the library is documented to facilitate embedding into other software.

1. Introduction

PLUMED was created to unify enhanced-sampling methods across molecular-dynamics codes, but rapid growth exposed limitations in its interfaces and code organization. PLUMED 2 addresses these weaknesses through a complete C++ rewrite, a separately compiled library, and a simpler MD-code interface.

  • Motivation: Molecular simulations support understanding phenomena across fields from biochemistry to solid-state physics and complement increasingly large experimental datasets.The introduction attributes expanded configuration-space sampling to advances in computational power and related technical developments.
  • Original PLUMED: PLUMED unified free-energy methods including umbrella sampling, metadynamics, and steered MD for use with multiple MD codes.The plug-in was designed to extend codes such as CLASSIC, NAMD, GROMACS, and AMBER through a shared implementation.
  • Limitations: Maintaining interfaces became time-consuming, while the absence of developer documentation and programming guidelines discouraged contributions and led to untidy code growth.These problems arose because the original code was not designed for such a large variety of MD codes or rapid expansion.
  • PLUMED 2: PLUMED 2 is a complete rewrite that simplifies MD-code interfaces, separates compilation into an independent software library, and adopts C++.The redesign aims to make maintenance more straightforward and address weaknesses in the original design.

2. Theoretical Background

Molecular dynamics produces high-dimensional trajectories that require processing through collective variables (CVs), while energy barriers can prevent ergodic exploration. Biasing along CVs and modular, compositional code structures address these interpretive and sampling challenges.

  • Trajectory analysis: MD trajectories are high-dimensional, so histograms along selected CVs provide a useful way to process and interpret simulation data.The trajectory records how many atomic positions change over time, making direct interpretation and comparison with experiments difficult.
  • Enhanced sampling: High-energy barriers can break ergodicity, motivating biases along one or more CVs to force exploration of a wider range of CV values.The stated equilibrium relation assumes the system visits all energetically accessible configuration-space regions.
  • Bias formulation: The bias can depend on multiple CVs through V(X, t) = V(s1(X), s2(X), . . . , sn(X), t).This formulation represents the bias as a function of the selected CVs and time.
  • Modular CV construction: Users can construct new CVs from simpler CVs, while differentiation remains straightforward enough to obtain the bias force on atoms.This compositional approach provides flexibility without preventing force evaluation.
  • Modular dependencies: A flexible plug-in can divide calculations of CV values, derivatives, CV functions, and biases into separate units with dependencies calculated in order.Bias virials similarly require derivatives of CVs with respect to cell vectors.

3. PLUMED 2 Overview

PLUMED 2 is a modular C++ library and executable for calculating collective variables, analyzing trajectories, running simple simulations, and interfacing with diverse modeling codes. Its redesigned syntax, standalone compilation, extensible Actions, and testing tools improve flexibility for users and developers.

  • Core design: PLUMED 2 provides both an executable and C++ library for calculating collective variables from atomic positions during molecular dynamics simulations.The library enables on-the-fly CV calculation without relying exclusively on stored trajectories.
  • Action-based interface: The flexible input syntax represents calculations, data output, and biases as labeled Action objects whose outputs can feed subsequent Actions.Actions can calculate CVs, centers of mass, simulation biases, or printed data, and labels expose their results to later operations.
  • MD-engine interface: Independent compilation and a simplified interface make PLUMED 2 easier to patch into MD engines, support constant-temperature and constant-pressure simulations, and exchange additional data.The interface also facilitates dissemination and cross-validation across different MD, Monte Carlo, and modeling tools.
  • Core design: A modular kernel and dynamic polymorphism let developers add collective variables and free-energy methods without editing core code.The design supports adding features concurrently or at run time while maintaining performance through C++.
  • Collective variables: PLUMED 2 reimplements many PLUMED 1 variables with fewer executable-code lines and greater flexibility, while adding geometric, polymer, and other community-specific CVs.Implemented examples include distances, angles, torsions, radius of gyration, and inertia-tensor-based CVs.
  • Standalone tools and testing: The executable includes simplemd for test molecular dynamics, driver for trajectory analysis, and sum_hills for analyzing metadynamics results, alongside extensive regression tests.Regression tests compare analyses against precomputed results within computational accuracy to detect bugs introduced by new features.

4. Examples

The examples demonstrate PLUMED 2’s enhanced-sampling workflows, flexible construction of complex collective variables, and analysis of molecular and cluster free-energy surfaces. They cover steered MD for an SN2 reaction, path CVs for alanine dipeptide, and permutation-invariant global CVs for a Lennard-Jones cluster.

  • Steered MD and enhanced sampling: PLUMED 2 demonstrates steered MD for the SN2 reaction between methyl chloride and a chlorine atom using the distance d12 as the moving-restraint CV.The restraint moves d12 from 0.31 nm to 0.18 nm over 5 ps (5000 steps).
  • Complex collective variables: MATHEVAL constructs nonlinear combinations of RMSDs that generate path CVs measuring progress s along, and distance z from, a curvilinear path.The RMSDs are computed after optimal alignment, with λ serving as a smoothing parameter; PLUMED automatically handles the derivatives.
  • Complex collective variables: A 3 ns well-tempered metadynamics simulation applied geometry-adapted Gaussians to an optimized alanine-dipeptide path connecting the metastable states C7eq and Cax.The resulting free-energy surface is shown as a function of the path CVs.
  • Global collective variables: For cluster and bulk-material processes, PLUMED 2 uses permutation-invariant global CVs based on moments of coordination-number distributions to avoid artificial multiplicities of pathways.The seven-atom Lennard-Jones example uses the second and third moments, which map four known minima to different regions of a two-dimensional free-energy surface.
  • Global collective variables: The Lennard-Jones-cluster free-energy surface averages 16 independent runs, with standard deviations of approximately 0.05 ǫ across the surface.The analysis is performed on the fly using kernel density estimation with triangular kernel functions.

5. Adding a new functionality to PLUMED 2

PLUMED 2 is designed to make extending the code straightforward through reusable object-oriented components and a simple Action-based implementation pattern. New functionality is supported by integrated documentation, regression testing, and community tutorials.

  • Reusable development: Developers should consult the developer manual to identify reusable core functionality before implementing new CVs, CV functions, biases, or analysis methods.The object-oriented design makes it straightforward to reuse features written by others.
  • Action-based implementation: A new functionality usually requires a single source file defining a new Action object, its class methods, and its documentation.Each new Action must inherit directly or indirectly from the Action class.
  • Documentation: Each Action has a single HTML manual page, while keyword descriptions are embedded in the source to support documentation and useful error messages.The keyword descriptions can also generate PLUMED GUI templates and be reused across multiple Action descriptions.
  • Regression testing: Developers are encouraged to use regtests so a single script can run tests and detect when new features break established functionality.Regtests can also help developers validate private, unshared functionality.
  • Community contribution: Users are encouraged to share exotic CVs and methods through tutorials that can be added to the PLUMED manual.This provides a mechanism for sharing experiences with the broader community.

6. Conclusion and outlook

PLUMED disseminates new simulation methods through accessible implementations compatible with many MD engines. PLUMED 2 removes key limitations through easier CV construction, improved performance, a simplified MD-engine interface, and greater extensibility for new methods and tools.

  • 6. Conclusion and outlook: PLUMED disseminates new simulation techniques through easy-to-use implementations that can be added to many available MD engines.This addresses the limited uptake of methods whose implementations are not readily available.
  • 6. Conclusion and outlook: PLUMED 2 enables complex CV combinations from input files, improves performance by parallelizing variables and calculating them only when needed, and simplifies the MD-engine interface.These changes remove many limitations present in PLUMED 1.
  • 6. Conclusion and outlook: PLUMED 2 can be extended with thermostats and force-fields while encouraging contributions of new CVs, free-energy methods, and analysis tools.The authors expect this flexibility to foster development of new techniques for MD.

7. Availability

PLUMED 2 is available for download from the project website, with stable releases supplemented by read-only access to the development git repository and separate user and git mailgroups.

  • Availability: PLUMED 2 can be downloaded from www.plumed-code.org, with stable releases and read-only access to the development-version git repository.The project also provides plumed-users@googlegroups.com and plumed2-git@googlegroups.com for users and development discussion.
Loading 1310.0980v1…