diff --git a/src/openfecli/data/_registry.py b/src/openfecli/data/_registry.py index f9b811f73..6ed1f3dfe 100644 --- a/src/openfecli/data/_registry.py +++ b/src/openfecli/data/_registry.py @@ -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/", diff --git a/src/openfecli/tests/commands/test_gather.py b/src/openfecli/tests/commands/test_gather.py index 9584482a9..430c3011c 100644 --- a/src/openfecli/tests/commands/test_gather.py +++ b/src/openfecli/tests/commands/test_gather.py @@ -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"]) @@ -502,11 +497,12 @@ 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 @@ -514,6 +510,14 @@ def test_abfe_single_repeat(self, abfe_result_dir, report, file_regression): 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): diff --git a/src/openfecli/tests/commands/test_gather/test_abfe_full_results_multiple_units_dg_.tsv b/src/openfecli/tests/commands/test_gather/test_abfe_full_results_multiple_units_dg_.tsv new file mode 100644 index 000000000..6cdde8d8e --- /dev/null +++ b/src/openfecli/tests/commands/test_gather/test_abfe_full_results_multiple_units_dg_.tsv @@ -0,0 +1,2 @@ +ligand DG (kcal/mol) std dev uncertainty (kcal/mol) +1 -20.87 0.47 diff --git a/src/openfecli/tests/commands/test_gather/test_abfe_full_results_multiple_units_raw_.tsv b/src/openfecli/tests/commands/test_gather/test_abfe_full_results_multiple_units_raw_.tsv new file mode 100644 index 000000000..99c4d8867 --- /dev/null +++ b/src/openfecli/tests/commands/test_gather/test_abfe_full_results_multiple_units_raw_.tsv @@ -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 diff --git a/src/openfecli/tests/commands/test_gather/test_abfe_full_results_dg_.tsv b/src/openfecli/tests/commands/test_gather/test_abfe_full_results_single_unit_dg_.tsv similarity index 100% rename from src/openfecli/tests/commands/test_gather/test_abfe_full_results_dg_.tsv rename to src/openfecli/tests/commands/test_gather/test_abfe_full_results_single_unit_dg_.tsv diff --git a/src/openfecli/tests/commands/test_gather/test_abfe_full_results_raw_.tsv b/src/openfecli/tests/commands/test_gather/test_abfe_full_results_single_unit_raw_.tsv similarity index 100% rename from src/openfecli/tests/commands/test_gather/test_abfe_full_results_raw_.tsv rename to src/openfecli/tests/commands/test_gather/test_abfe_full_results_single_unit_raw_.tsv diff --git a/src/openfecli/tests/commands/test_gather/test_abfe_single_repeat_multiple_units_dg_.tsv b/src/openfecli/tests/commands/test_gather/test_abfe_single_repeat_multiple_units_dg_.tsv new file mode 100644 index 000000000..ddd62a23e --- /dev/null +++ b/src/openfecli/tests/commands/test_gather/test_abfe_single_repeat_multiple_units_dg_.tsv @@ -0,0 +1,2 @@ +ligand DG (kcal/mol) MBAR uncertainty (kcal/mol) +1 -20.3 1.6 diff --git a/src/openfecli/tests/commands/test_gather/test_abfe_single_repeat_multiple_units_raw_.tsv b/src/openfecli/tests/commands/test_gather/test_abfe_single_repeat_multiple_units_raw_.tsv new file mode 100644 index 000000000..a058230d6 --- /dev/null +++ b/src/openfecli/tests/commands/test_gather/test_abfe_single_repeat_multiple_units_raw_.tsv @@ -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 +standard_state_correction 1 -9.0 0.0 diff --git a/src/openfecli/tests/commands/test_gather/test_abfe_single_repeat_dg_.tsv b/src/openfecli/tests/commands/test_gather/test_abfe_single_repeat_single_unit_dg_.tsv similarity index 100% rename from src/openfecli/tests/commands/test_gather/test_abfe_single_repeat_dg_.tsv rename to src/openfecli/tests/commands/test_gather/test_abfe_single_repeat_single_unit_dg_.tsv diff --git a/src/openfecli/tests/commands/test_gather/test_abfe_single_repeat_raw_.tsv b/src/openfecli/tests/commands/test_gather/test_abfe_single_repeat_single_unit_raw_.tsv similarity index 100% rename from src/openfecli/tests/commands/test_gather/test_abfe_single_repeat_raw_.tsv rename to src/openfecli/tests/commands/test_gather/test_abfe_single_repeat_single_unit_raw_.tsv