PLUMED Wrapper for OpenPathSampling¶
Authors: Alberto Pérez de Alba Ortíz
This module interfaces OpenPathSampling (OPS) with PLUMED, an open-source library with a rich catalogue of Collective Variables (CVs).
Special thanks to Gareth A. Tribello for facilitating the use of the PLUMED Cython wrapper.
- G.A. Tribello, M. Bonomi, D. Branduardi, C. Camilloni, G. Bussi, PLUMED2: New feathers for an old bird, Comp. Phys. Comm. 185, 604 (2014); https://doi.org/10.1016/j.cpc.2013.09.018
Transition path sampling simulations and analysis rely on accurate state definitions. Such states are typically defined as volumes in a CV-space. OPS already supports a number of CVs, including the ones defined in the MDTraj Python library. PLUMED, an open-source C++ library, offers a wide variety of extra CVs, which are enabled in OPS by this module.
Many of PLUMED’s dozens of CVs have a biomolecular focus, but they are also general enough for other applications. PLUMED’s popularity (over 500 citations in 4 years after the release of PLUMED2) is greatly based on the fact that it works with many MD codes. OPS is now added to that list. The PLUMED code is well-maintained and documented for both users and developers. Several tutorials and a mailing list are available to address FAQs. For more information about the PLUMED code, visit: http://www.plumed.org/home
In this module, the class
PLUMEDInterface is a subclass of the
Cython wrapper class
Plumed contained in the PLUMED installation.
PLUMEDInterface requires an
and accepts additional PLUMED settings:
pathtoplumed=""is the path to the PLUMED installation, where the
sourceme.shscript is run to set all relevant flags. By default, the string is empty and the currently sourced PLUMED is used.
timestep=1.is the time step size in PLUMED units (ps).
kbt=1.is in PLUMED units (kJ/mol).
molinfo=""is a file to be used as
MOLINFOPLUMED command. It allows to provide extra information about the molecules. Consult: https://plumed.github.io/doc-v2.4/user-doc/html/_m_o_l_i_n_f_o.html
logfile=plumed.logis the name of the log file written by the
PLUMEDInterface can be subsequently used to make
functions that calculate CVs for a given
Trajectory. This is done
PLUMEDCV class, a subclass of
In PLUMED input files, a common syntax is:
label: keywords. The
definition as arguments,
which are respectively equivalent to PLUMED’s
PLUMEDCV class also takes the
as argument. This allows for a single
PLUMEDInterface to contain
MDTrajTopology, additional PLUMED
keywords and previously
defined CVs that can be reused for the same system. Both
PLUMEDCV are storable.
This module supports (as listed in PLUMED documentation):
- Groups and Virtual Atoms: are directly set in the
PLUMEDInterface.set(name, definition)function. The
PLUMEDInterface.get()function allows to consult the commands that have been already set. Some commands do not need a
name, while some others must be run before any other command (e.g.
- CV Documentation: all CVs are created by calling
PLUMEDCV(name, PLUMEDInterface, definition). The returned function can be applied to a
Trajectory. CVs with components should specify the
components=["c1", "c2", "c3", ...]keyword and the corresponding PLUMED keywords in the
- Distances from reference configurations: also created by calling
PLUMEDCV(name, PLUMEDInterface, definition). Most of them require external files with reference configurations.
- Functions: also created by calling
PLUMEDCV(name, PLUMEDInterface, definition). They should be created using the same
PLUMEDInterfacethat contains the previously defined CVs that are part of the function.
- Multicolvar and Exploiting contact matrices are not tested.
For examples see the
Examples section below.
For further PLUMED usage details see: http://plumed.github.io/doc-master/user-doc/html/index.html
This module builds on OpenPathSampling, a Python package for path sampling simulations. To learn more about OpenPathSampling, you might be interested in reading:
- OPS documentation: http://openpathsampling.org
- OPS source code: http://github.com/openpathsampling/openpathsampling
Tests in OpenPathSampling use the nose package.
The tests for this module can be run by downloading its source code (see the
Source Code section below), installing its requirements, and running the
nosetests from the root directory of the repository.
- Examples on how create and calculate PLUMED CVs can be found in
examplesdirectory (https://gitlab.e-cam2020.eu/apdealbao/plumed_wrapper/tree/master/plumed_wrapper/examples). Open it using
jupyter notebook plumed_wrapper_example.ipynb(see http://jupyter.org/ for more details).
The source code for this module can be found in: https://gitlab.e-cam2020.eu/apdealbao/plumed_wrapper/tree/master
It can be installed by running
pip install -e . from the root directory
of the package.
It requires to have the PLUMED development version (with the Cython wrapper)
installed from: https://github.com/plumed/plumed2; and to source the file
For details on PLUMED installation, see: http://plumed.github.io/doc-master/user-doc/html/_installation.html
Before using this module, please test the Cython PLUMED wrapper by attempting
import plumed in Python. If this is not successful, please refer to PLUMED
installation documentation (above), or to the mailing list: