Previous topic

staging.Local — staging class for running local jobs

This Page

Alternatives to GromacsWrapper

GromacsWrapper is simplistic; in particular it does not directly link to the Gromacs libraries but relies on python wrappers to call gromacs tools. Some people find this very crude (the author included). Other people have given more thought to the problem and you are encouraged to see if their efforts speed up your work more than does GromacsWrapper.

MDAnalysis (N. Michaud-Agrawal, E. J. Dennning, and O. Beckstein)
Reads various trajectories (dcd, xtc, trr) and makes coordinates available as numpy arrays. It also has a fairly sophisticated selection language, similar to Charmm or VMD.
pymacs (Daniel Seeliger)

pymacs is a python module for dealing with structure files and trajectory data from the GROMACS molecular dynamics package. It has interfaces to some gromacs functions and uses gromacs routines for command line parsing, reading and writing of structure files (pdb,gro,...) and for reading trajectory data (only xtc at the moment). It is quite useful to write python scripts for simulation setup and analysis that can be combined with other powerful python packages like numpy, scipy or plotting libraries like pylab. It has an intuitive data structure (Model –> Chain –> Molecule –> Atom) and allows modifications at all levels like

  • Changing of atom, residue and chain properties (name, coordinate, b-factor,...
  • Deleting and inserting atoms, residues, chains
  • Straightforward selection of structure subsets
  • Structure building from sequence
  • Handling gromacs index files
Gromacs XTC Library
Version 1.1 of the separate xtc/trr library contains example code to access a Gromacs trajectory from python. It appears to be based on grompy (also see below).
various implementations of python wrappers
See the discussion on the gmx-developers mailinglist: check the thread [gmx-developers] Python interface for Gromacs
grompy (René Pool, Martin Hoefling, Roland Schulz)

uses ctypes to wrap libgmx:

“Here’s a bunch of code I wrote to wrap libgmx with ctypes and make use of parts of gromacs functionality. My application for this was the processing of a trajectories using gromac’s pbc removal and fitting routines as well as reading in index groups etc. It’s very incomplete atm and also focused on wrapping libgmx with all gromacs types and definitions...

... so python here feels a bit like lightweight c-code glueing together gromacs library functions :-)

The attached code lacks a bit of documentation, but I included a test.py as an example using it.”

Roland Schulz added code:

“I added a little bit wrapper code to easily access the atom information in tpx. I attached the version. It is backward compatible ...”

A working grompy tar ball (with Roland’s enhancements) is cached at gmane.org and the latest sources are hosted at https://github.com/GromPy

LOOS (Grossfield lab at the University of Rochester)

The idea behind LOOS (Lightweight Object-Oriented Structure library) is to provide a lightweight C++ library for analysis of molecular dynamics simulations. This includes parsing a number of PDB variants, as well as the native system description and trajectory formats for CHARMM, NAMD, and Amber. LOOS is not intended to be an all-encompassing library and it is primarily geared towards reading data in and processing rather than manipulating the files and structures and writing them out.

The LOOS documentation is well written and comprehensive and the code is published under the GPL.

copernicus
Copernicus is a Python-based client-server network that allows running of large and complicated MD simulation workflows. It supports Gromacs (grompp and mdrun).
VMD (Schulten lab at UIUC)
VMD is a great analysis tool; the only downside is that (at the moment) trajectories have to fit into memory. In some cases this can be circumvented by reading a trajectory frame by frame using the bigdcd script (which might also work for Gromacs xtcs).
JGromacs (Márton Münz and Philip C Biggin)
JGromacs is a Java library designed to facilitate the development of cross-platform analysis applications for Molecular Dynamics (MD) simulations. The package contains parsers for file formats applied by GROMACS. It provides a multilevel object-oriented representation of simulation data to integrate and interconvert sequence, structure and dynamics information. In addititon, a basic analysis toolkit is included in the package. The programmer is also provided with simple tools (e.g. XML-based configuration) to create applications with a user interface resembling the command-line UI of Gromacs applications.

Please let me know of other efforts so that I can add them here. Thanks.