Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add amber TI energy output files for testing #6

Merged
merged 6 commits into from
Nov 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -26,3 +26,4 @@ The package is standalone, however, and can be used for any purpose.
: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