alchemtest: the simple alchemistry test set

Warning

This library is in an alpha state. The library and the documentation is incomplete. Use in production at your own risk.

alchemtest is a collection of test datasets for alchemical free energy calculations. The datasets come from a variety of software packages, primarily molecular dynamics engines, and are used as the test set for alchemlyb. The package is standalone, however, and can be used for any purpose.

Installing alchemtest

alchemtest is pure-Python, so it can be installed easily via pip:

pip install alchemtest

If you wish to install this in your user site-packages, use the --user flag:

pip install --user alchemtest

Installing from source

from source. Clone the source from GitHub with:

git clone https://github.com/alchemistry/alchemtest.git

then do:

cd alchemtest
pip install .

If you wish to install this in your user site-packages, use the --user flag:

pip install --user .

Basic usage

All datasets in alchemtest are accessible via load_* functions, organized in submodules by the software package that generated them. The current set of submodules are:

gmx Gromacs molecular dynamics simulation datasets.

As an example, we can access the Gromacs: Benzene in water dataset with:

>>> from alchemtest.gmx import load_benzene
>>> bz = load_benzene()

and use the resulting Bunch object to introspect what this dataset includes. In particular, it features a DESCR attribute with a human-readable description of the dataset:

>>> print(bz.DESCR)
Gromacs: Benzene in water
=========================

Notes
-----
Data Set Characteristics:
    :Number of Legs: 2 (Coulomb, VDW)
    :Number of Windows: 5 for Coulomb, 16 for VDW
    :Length of Windows: 40ns

    :Missing Values: None
    :Creator: \I. Kenney
    :Donor: Ian Kenney (ian.kenney@asu.edu)
    :Date: March 2017

Benzene in water, alchemically turned into benzene in vacuum separated from water

This dataset was generated using `MDPOW <https://github.com/Becksteinlab/MDPOW>`_, with
the `Gromacs <http://www.gromacs.org/>`_ molecular dynamics engine.

as well as the dataset itself:

>>>  bz.data.keys()
['VDW', 'Coulomb']

which consists in this case of two alchemical legs, each having several files. For this dataset each file happens to correspond to a simulation sampling a particular \(\lambda\):

>>> bz.data['Coulomb']
['/usr/local/python3.6/site-packages/alchemtest/gmx/benzene/Coulomb/0000/dhdl.xvg.bz2',
 '/usr/local/python3.6/site-packages/alchemtest/gmx/benzene/Coulomb/0250/dhdl.xvg.bz2',
 '/usr/local/python3.6/site-packages/alchemtest/gmx/benzene/Coulomb/0500/dhdl.xvg.bz2',
 '/usr/local/python3.6/site-packages/alchemtest/gmx/benzene/Coulomb/0750/dhdl.xvg.bz2',
 '/usr/local/python3.6/site-packages/alchemtest/gmx/benzene/Coulomb/1000/dhdl.xvg.bz2']

These paths can be read by any appropriate parser for further analysis. For this particular dataset, see alchemlyb.parsing.gmx for a good set of parsers.

Gromacs datasets

Gromacs molecular dynamics simulation datasets.

The alchemlyb.gmx module features datasets generated using the Gromacs molecular dynamics engine. They can be accessed using the following accessor functions:

load_benzene() Load the Gromacs benzene dataset.

Gromacs: Benzene in water

Notes

Data Set Characteristics:
Number of Legs:2 (Coulomb, VDW)
Number of Windows:
 5 for Coulomb, 16 for VDW
Length of Windows:
 40ns
System Size:1668 atoms
Temperature:300 K
Pressure:1 bar
Alchemical Pathway:
 vdw + coul –> vdw –> vacuum
Experimental Hydration Free Energy:
 -0.90 +- 0.2 kcal/mol
Missing Values:None
Creator:I. Kenney
Donor:Ian Kenney (ian.kenney@asu.edu)
Date:March 2017

Benzene in water, alchemically turned into benzene in vacuum separated from water

This dataset was generated using MDPOW, with the Gromacs molecular dynamics engine.

Experimental value sourced from [Mobley2013].

[Mobley2013]Mobley, David L. (2013). Experimental and Calculated Small Molecule Hydration Free Energies. UC Irvine: Department of Pharmaceutical Sciences, UCI. Retrieved from: http://escholarship.org/uc/item/6sd403pz
alchemtest.gmx.load_benzene()

Load the Gromacs benzene dataset.

Returns:data – Dictionary-like object, the interesting attributes are: - ‘data’ : the data files by alchemical leg - ‘DESCR’: the full description of the dataset
Return type:Bunch