Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
4 changes: 2 additions & 2 deletions src/openfecli/data/_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
known_hash="md5:ff7313e14eb6f2940c6ffd50f2192181",
)
zenodo_abfe_data = dict(
base_url="doi:10.5281/zenodo.17348229/",
base_url="doi:10.5281/zenodo.18894097/",
fname="abfe_results.zip",
known_hash="md5:547f896e867cce61979d75b7e082f6ba",
known_hash="md5:b394facb0c2f8c3b20fd899d1068e0b9",
)
zenodo_septop_data = dict(
base_url="doi:10.5281/zenodo.17435569/",
Expand Down
30 changes: 17 additions & 13 deletions src/openfecli/tests/commands/test_gather.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,23 +475,18 @@ def test_allow_partial_msg_not_printed(self, results_paths_serial_missing_legs:

@pytest.fixture
def abfe_result_dir() -> pathlib.Path:
"""for pre-PR #1776 backwards compatability"""
ZENODO_ABFE_DATA.fetch("abfe_results.zip", processor=pooch.Unzip())
result_dir = pathlib.Path(POOCH_CACHE) / "abfe_results.zip.unzip/abfe_results/"
return result_dir


@pytest.fixture
def septop_result_dir() -> pathlib.Path:
ZENODO_SEPTOP_DATA.fetch("septop_results.zip", processor=pooch.Unzip())
result_dir = pathlib.Path(POOCH_CACHE) / "septop_results.zip.unzip/septop_results/"

return result_dir


class TestGatherABFE:
@pytest.mark.parametrize("report", ["raw", "dg"])
def test_abfe_full_results(self, abfe_result_dir, report, file_regression):
results = [str(abfe_result_dir / f"results_{i}") for i in range(3)]
@pytest.mark.parametrize("protocol_type", ["single_unit", "multiple_units"])
def test_abfe_full_results(self, abfe_result_dir, report, protocol_type, file_regression):
results_dir = abfe_result_dir / f"abfe_results_{protocol_type}"
results = [str(results_dir / f"results_{i}") for i in range(3)]
args = ["--report", report]
runner = CliRunner()
cli_result = runner.invoke(gather_abfe, results + args + ["--tsv"])
Expand All @@ -502,18 +497,27 @@ def test_abfe_full_results(self, abfe_result_dir, report, file_regression):
file_regression.check(cli_result.stdout, extension=".tsv")

@pytest.mark.parametrize("report", ["raw", "dg"])
def test_abfe_single_repeat(self, abfe_result_dir, report, file_regression):
results = [str(abfe_result_dir / "results_0")]
@pytest.mark.parametrize("protocol_type", ["single_unit", "multiple_units"])
def test_abfe_single_repeat(self, abfe_result_dir, report, protocol_type, file_regression):
results_dir = str(abfe_result_dir / f"abfe_results_{protocol_type}" / "results_0")
args = ["--report", report]
runner = CliRunner()
cli_result = runner.invoke(gather_abfe, results + args + ["--tsv"])
cli_result = runner.invoke(gather_abfe, [results_dir] + args + ["--tsv"])

assert_click_success(cli_result)
assert "WARNING! Gathering of ABFE results" in cli_result.stderr

file_regression.check(cli_result.stdout, extension=".tsv")


@pytest.fixture
def septop_result_dir() -> pathlib.Path:
ZENODO_SEPTOP_DATA.fetch("septop_results.zip", processor=pooch.Unzip())
result_dir = pathlib.Path(POOCH_CACHE) / "septop_results.zip.unzip/septop_results/"

return result_dir


class TestGatherSepTop:
@pytest.mark.parametrize("report", ["raw", "ddg", "dg"])
def test_septop_full_results(self, septop_result_dir, report, file_regression):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ligand DG (kcal/mol) std dev uncertainty (kcal/mol)
1 -20.87 0.47
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
leg ligand DG (kcal/mol) MBAR uncertainty (kcal/mol)
complex 1 34.77 0.81
complex 1 36.17 0.80
complex 1 36.34 0.91
solvent 1 5.5 1.4
solvent 1 5.4 1.4
solvent 1 6.5 1.4
standard_state_correction 1 0.0 0.0
standard_state_correction 1 -9.0 0.0
standard_state_correction 1 0.0 0.0
standard_state_correction 1 -9.0 0.0
standard_state_correction 1 0.0 0.0
standard_state_correction 1 -9.3 0.0
standard_state_correction 1 -9.3 0.0
standard_state_correction 1 0.0 0.0
standard_state_correction 1 0.0 0.0
standard_state_correction 1 -8.9 0.0
standard_state_correction 1 -8.9 0.0
standard_state_correction 1 0.0 0.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ligand DG (kcal/mol) MBAR uncertainty (kcal/mol)
1 -20.3 1.6
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
leg ligand DG (kcal/mol) MBAR uncertainty (kcal/mol)
complex 1 34.77 0.81
solvent 1 5.5 1.4
standard_state_correction 1 0.0 0.0
standard_state_correction 1 -9.0 0.0
standard_state_correction 1 0.0 0.0
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these additional entries expected now that units are split? I'm wary that some assumption in gather_abfe.py is being violated.

standard_state_correction 1 -9.0 0.0
Loading