Skip to content

Commit

Permalink
new reference value for NAMD BAR "tut03_tyr2ala (hydrated)" dataset
Browse files Browse the repository at this point in the history
- changed the test reference value to the value produced by the NAMD parser
  + BAR (alchemlyb) implementation
- see #75 (comment)
  for discussion and background
- close #75
  • Loading branch information
orbeckst committed Jul 17, 2019
1 parent d099694 commit a90ed11
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/alchemlyb/tests/test_fep_estimators.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def namd_tyr2ala():
u_nk2 = namd.extract_u_nk(dataset['data']['backward'][0], T=300)

# combine dataframes of fwd and rev directions
u_nk1[u_nk1.isnan()] = u_nk2
u_nk1[u_nk1.isna()] = u_nk2
u_nk = u_nk1.sort_index(level=u_nk1.index.names[1:])

return u_nk
Expand All @@ -117,7 +117,6 @@ class TestMBAR(FEPestimatorMixin):
"""
cls = MBAR


@pytest.fixture(scope="class",
params=[(gmx_benzene_coul_u_nk, 3.041, 0.02088),
(gmx_benzene_vdw_u_nk, -3.007, 0.04519),
Expand All @@ -136,16 +135,13 @@ def X_delta_f(self, request):
def test_mbar(self, X_delta_f):
self.compare_delta_f(X_delta_f)


class TestBAR(FEPestimatorMixin):
"""Tests for BAR.
"""
cls = BAR

# NAMD data were generated at T=300 K and the reference values
# were provided in kcal/mol so we convert to reduced units
kT_NAMD = 300 * namd.k_b

@pytest.fixture(scope="class",
params = [(gmx_benzene_coul_u_nk, 3.044, 0.01640),
(gmx_benzene_vdw_u_nk, -3.033, 0.03438),
Expand All @@ -156,7 +152,7 @@ class TestBAR(FEPestimatorMixin):
(gmx_water_particle_with_potential_energy, -11.724, 0.064964),
(gmx_water_particle_without_energy, -11.660, 0.064914),
(amber_bace_example_complex_vdw, 2.37846, 0.050899),
(namd_tyr2ala, 6.031269829/kT_NAMD, 0.069813058/kT_NAMD),
(namd_tyr2ala, 11.0044, 0.10235),
])
def X_delta_f(self, request):
get_unk, E, dE = request.param
Expand Down

0 comments on commit a90ed11

Please sign in to comment.