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 NAMD IDWS dataset, lambda 1 -> 0, with interruptions and restarts #57

Merged
merged 2 commits into from
Oct 6, 2021
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
7 changes: 7 additions & 0 deletions docs/namd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,10 @@ engine. They can be accessed using the following accessor functions:
.. include:: ../src/alchemtest/namd/restarted/descr.rst

.. autofunction:: alchemtest.namd.load_restarted

.. _namd_restarted_reversed:

.. include:: ../src/alchemtest/namd/restarted_reversed/descr.rst

.. autofunction:: alchemtest.namd.load_restarted_reversed

1 change: 1 addition & 0 deletions src/alchemtest/namd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
from .access import load_tyr2ala
from .access import load_idws
from .access import load_restarted
from .access import load_restarted_reversed
23 changes: 23 additions & 0 deletions src/alchemtest/namd/access.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,26 @@ def load_restarted():

return Bunch(data=data,
DESCR=fdescr)


def load_restarted_reversed():
"""Load the NAMD IDWS dataset, run from lambda = 1 -> 0, with interruptions and restarts.

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 = {'both': glob(join(module_path, 'restarted_reversed', 'restarted_reversed*.fepout.bz2'))}

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

return Bunch(data=data,
DESCR=fdescr)
38 changes: 38 additions & 0 deletions src/alchemtest/namd/restarted_reversed/descr.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
NAMD: free energy of tyrosine to alanine in vacuo
=================================================

Free energy change from mutating a Tyr into Ala in vacuo.
Uses Interleaved Double-Wide Sampling (Hénin and Brannigan).
Each lambda window was run separately, and NAMD was interrupted
and restarted multiple times, such that one window may span
multiple fepout files.

Derived from NAMD FEP Tutorial, available at:
https://www.ks.uiuc.edu/Training/Tutorials/namd/FEP/

This calculation was run from lambda = 1.0 to lambda = 0.0,
because it is possible for an IDWS calculation in NAMD to be
run this way.

Notes
-----
Data Set Characteristics:
:Number of Legs: 1 (forward mutation with IDWS sampling)
:Number of Windows: 11
:Length of Windows: 50 ps
:System Size: 57 atoms
:Temperature: 300 K
:Alchemical Pathway: Mutation of Tyr into Ala using hybrid molecule.
Nonbonded interactions of perturbed atoms are scaled
with their environment.
:Missing Values: None
:Energy unit: kcal/mol
:Time unit: step
:Date: September 2021
:Donor: Thomas T. Joseph
:License: `CC0 <https://creativecommons.org/publicdomain/zero/1.0/>`_
Public Domain Dedication

This dataset was generated using the `NAMD
<http://http://www.ks.uiuc.edu/Research/namd/>`_ molecular dynamics
engine.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5 changes: 3 additions & 2 deletions src/alchemtest/tests/test_namd.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'''Tests for all the NAMD datasets'''
import pytest

from alchemtest.namd import load_tyr2ala, load_idws, load_restarted
from alchemtest.namd import load_tyr2ala, load_idws, load_restarted, load_restarted_reversed

from . import BaseDatasetTest

Expand All @@ -10,7 +10,8 @@ class TestNAMD(BaseDatasetTest):
@pytest.fixture(scope="class",
params = [(load_tyr2ala, ('forward', 'backward'), (1, 1)),
(load_idws, ('forward', ), (2,)),
(load_restarted, ('both', ), (15,))
(load_restarted, ('both', ), (15,)),
(load_restarted_reversed, ('both', ), (19,))
])
def dataset(self, request):
return super(TestNAMD, self).dataset(request)