Gromacs engine in OpenPathSampling¶
This module adds support for Gromacs as an engine for OpenPathSampling.
Different molecular dynamics (MD) codes have developed to serve different communities. Gromacs is one of the major MD codes for the biomolecular community, and even though much of its functionality can be reproduced by other MD codes, such as OpenMM, there are still some extensions that are built on top of Gromacs that haven’t been ported to other codes. For example, the MARTINI coarse-grained model is not available other codes such as OpenMM.
Additionally, people who are familiar with a given MD package will prefer to continue to work with that. Therefore codes that wrap around MD packages, as OpenPathSampling does, can expand their reach by adding ways to interface with other MD packages.
This module adds the Gromacs engine for OpenPathSampling. It is the first practical test of the external engine API of OPS.
Specific functionality in this module includes:
GromacsEngine: the OPS dynamics engine, based on the
ExternalEngine, that runs Gromacs as an external tool. Option on initialization allow the user to customize the path to the Gromacs executable.
ExternalMDSnapshot: an OPS snapshot for external MD engines, which contains coordinates, velocities, and box vectors. Requires that the engine implement a
read_frame_datamethod to load from a specific MD trajectory.
snapshot_from_gro: a function that creates an OPS snapshot from a Gromacs
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
This module is in a development branch of OpenPathSampling. If you have
conda installed, this branch of OPS can be installed by downloading the
conda_ops_dev_install.sh script and running it with the command:
source conda_ops_dev_install.sh dwhswenson gromacs_engine
This will download a new copy of the OPS git repository, select the
gromacs_engine branch from the
dwhswenson fork, install the
requirements, and create an editable install of OPS. If you would like to do
this in a new conda environment, set the environment variable
and it will install in a new environment with the name
To run tests, you may need
pytest, which can be installed with
The entire OPS test suite can be run with run with
openpathsampling. Tests specific to the Gromacs engine can be run with
py.test --pyargs openpathsampling.tests.test_gromacs_engine.
- An example can be found here: https://github.com/dwhswenson/openpathsampling/tree/gromacs_engine/examples/gromacs
This module is contained in the following pull request: