Skip to content

Commit

Permalink
add amber TI energy output files for testing (#6)
Browse files Browse the repository at this point in the history
* add amber TI output file for testing
* modify the MANIFEST.in to include the amber energy output files
* add license info in amber descr.rst file and clean up the empty line
* update the docs folder with amber dataset info
* fixes #5
  • Loading branch information
shuail authored and orbeckst committed Nov 1, 2017
1 parent eea9682 commit c6b0722
Show file tree
Hide file tree
Showing 23 changed files with 315,974 additions and 1 deletion.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include *.rst
recursive-include src/alchemtest *.gz *.bz2 *.zip *.rst *.txt
recursive-include src/alchemtest *.gz *.bz2 *.zip *.rst *.txt *.out
include README.rst
include LICENSE
22 changes: 22 additions & 0 deletions docs/amber.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.. _amber:

================
Amber datasets
================
.. automodule:: alchemtest.amber

The :mod:`alchemlyb.amber` module features datasets generated using the `Amber <http://www.ambermd.org/>`_ molecular dynamics engine.
They can be accessed using the following accessor functions:

.. currentmodule:: alchemtest.amber

.. autosummary::

load_simplesolvated


.. _amber_simplesolvated:

.. include:: ../src/alchemtest/amber/simplesolvated/descr.rst

.. autofunction:: alchemtest.amber.load_simplesolvated
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ Datasets are released under an `open license`_ that conforms to the `Open Defini
:caption: Datasets

gmx
amber
5 changes: 5 additions & 0 deletions src/alchemtest/amber/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""Amber molecular dynamics simulation datasets.
"""

from .access import load_simplesolvated
31 changes: 31 additions & 0 deletions src/alchemtest/amber/access.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
"""Accessors for Amber TI datasets.
"""

from os.path import dirname
from os.path import join
from glob import glob
from sklearn.datasets.base import Bunch

def load_simplesolvated():
"""Load the Amber solvated dataset.
Returns
-------
data : Bunch
Dictionary-like object, the interesting attributes are:
- 'data' : the data files by alchemical leg
- 'DESCR': the full description of the dataset
"""

module_path = dirname(__file__)
data = {'charge': glob(join(module_path, 'simplesolvated/charge/*/ti-*.out')),
'vdw': glob(join(module_path, 'simplesolvated/vdw/*/ti-*.out'))}

with open(join(module_path, 'simplesolvated', 'descr.rst')) as rst_file:
fdescr = rst_file.read()

return Bunch(data=data,
DESCR=fdescr)
Loading

0 comments on commit c6b0722

Please # to comment.