MDPOW documentation

Date:Aug 06, 2021

MDPOW is a python package that automates the calculation of solvation free energies via molecular dynamics (MD) simulations. In particular, it facilitates the computation of partition coeffcients. Currently implemented:

  • water-octanol partition coefficient (POW)
  • water-cyclohexane partition coefficient (PCW)


Development is still very much in flux and the documentation is at least partially out of date. If something appears unclear or just wrong, then please ask questions on the MDPOW Issue Tracker.

MD engine

Calculations are performed with the Gromacs molecular dynamics (MD) software package [1]. MDPOW is tested with

  • Gromacs 4.6.5
  • Gromacs 2018.6
  • Gromacs 2020.6
  • Gromacs 2021.1

but versions 5.x, 2016.x, and 2019.x should also work. It should be possible to use any of these Gromacs versions without further adjustments, thanks to the underlying GromacsWrapper library [1].

Nevertheless, you should always check the topology and runinput (mdp) files for the version of Gromacs that you are using.

Force fields



are supported. In principle it is possible to add force fields sets by changing the GMXLIB environment variable and providing appropriate template files but this is currently untested.

A number of different water models are supporte (see mdpow.forcefields.GROMACS_WATER_MODELS).

Required input

As input, the user only needs to provide a structure file (PDB or GRO) and a Gromacs ITP file containing the parametrization of the small molecule (e.g. from LigandBook or ParamChem).

Version information

MDPOW uses semantic versioning with the release number consisting of a triplet MAJOR.MINOR.PATCH. PATCH releases are bug fixes or updates to docs or meta data only and do not introduce new features or change the API. Within a MAJOR release, the user API is stable except during the development cycles with MAJOR = 0 where the API may also change (rarely) between MINOR releases. MINOR releases can introduce new functionality or deprecate old ones.

The version information can be accessed from the attribute mdpow.__version__.

mdpow.__version__ = '0.7.1+0.g9c5b966.dirty'

str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.

Limitations and known issues

For current issues and open feature requests please look through the MDPOW Issue Tracker. Some of the major open issues are:

  • GROMACS versions < 2021 can silently produce incorrect free energy estimates because exclusions are not properly accounted for for solutes larger than the rlist cutoff when the couple-intramol = no decoupling is used (as it is in all of MDPOW), see MDPOW does not detect this situation and does not offer a workaround (namely doing separate vacuum simulations and use couple-intramol = yes). GROMACS 2021 at least fails when the failure condition occurs (see
  • Only free energy calculations of neutral solutes are supported; the workflow also does not include addition of ions (see issue #97).
  • Mixed solvents (octanol and water) are only supported with the included template topology files for GROMACS >= 2018.
  • Adding new solvents requires modifying the MDPOW code; instead it should be configurable.

Indices and tables


[1](1, 2) The package is built on top of the GromacsWrapper framework (which is automatically installed).