From f6cb213c890cf1523b6f9104eab54443dae82607 Mon Sep 17 00:00:00 2001 From: Alyssa Travitz <31974495+atravitz@users.noreply.github.com> Date: Tue, 17 Feb 2026 17:25:22 -0800 Subject: [PATCH 1/4] add xfail to ahfe cpu test (#1851) --- src/openfe/tests/protocols/openmm_ahfe/test_ahfe_slow.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/openfe/tests/protocols/openmm_ahfe/test_ahfe_slow.py b/src/openfe/tests/protocols/openmm_ahfe/test_ahfe_slow.py index 353becde..7e8575c9 100644 --- a/src/openfe/tests/protocols/openmm_ahfe/test_ahfe_slow.py +++ b/src/openfe/tests/protocols/openmm_ahfe/test_ahfe_slow.py @@ -13,7 +13,10 @@ from openfe.protocols import openmm_afe @pytest.mark.integration # takes too long to be a slow test ~ 4 mins locally @pytest.mark.flaky(reruns=3) # pytest-rerunfailures; we can get bad minimisation -@pytest.mark.parametrize("platform", ["CPU", "CUDA"]) +@pytest.mark.parametrize( + "platform", + [pytest.param("CPU", marks=pytest.mark.xfail(reason="see openfe issue #1670")), "CUDA"], +) def test_openmm_run_engine( platform, get_available_openmm_platforms, From 591c9b70fc759a98020ee17a897e3d2cf0328e1f Mon Sep 17 00:00:00 2001 From: Alyssa Travitz <31974495+atravitz@users.noreply.github.com> Date: Wed, 25 Feb 2026 10:40:34 -0800 Subject: [PATCH 2/4] deprecate perses functionality (#1857) * add tests that should fail * add deprecation warnings * news item * raises-> warns fix * Update news/deprecate_perses.rst Co-authored-by: Mike Henry <11765982+mikemhenry@users.noreply.github.com> * add issues link --------- Co-authored-by: Mike Henry <11765982+mikemhenry@users.noreply.github.com> --- news/deprecate_perses.rst | 24 +++++++++++++++++ .../setup/atom_mapping/perses_mapper.py | 6 +++++ .../setup/atom_mapping/perses_scorers.py | 6 +++++ .../atom_mapping/test_perses_atommapper.py | 26 ++++++++++--------- .../setup/atom_mapping/test_perses_scorers.py | 9 ++++--- 5 files changed, 56 insertions(+), 15 deletions(-) create mode 100644 news/deprecate_perses.rst diff --git a/news/deprecate_perses.rst b/news/deprecate_perses.rst new file mode 100644 index 00000000..07047159 --- /dev/null +++ b/news/deprecate_perses.rst @@ -0,0 +1,24 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* Perses atom mapper and scorer functionality is deprecated, slated to be removed in ``openfe v2.0``. +This includes ``PersesAtomMapper`` and ``default_perses_scorer``. + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* diff --git a/src/openfe/setup/atom_mapping/perses_mapper.py b/src/openfe/setup/atom_mapping/perses_mapper.py index 397bb2e3..b961b37c 100644 --- a/src/openfe/setup/atom_mapping/perses_mapper.py +++ b/src/openfe/setup/atom_mapping/perses_mapper.py @@ -6,6 +6,8 @@ The MCS class from Perses shamelessly wrapped and used here to match our API. """ +import warnings + from gufe.settings.typing import AngstromQuantity from openff.units import Quantity, unit from openff.units.openmm import to_openmm @@ -75,6 +77,10 @@ class PersesAtomMapper(LigandAtomMapper): can be mapped, default: 0.25*unit.angstrom """ + warnings.warn( + "PersesAtomMapper is deprecated and is planned to be removed in openfe v2.0. If you have questions related to this, please open an issue at https://github.com/OpenFreeEnergy/openfe/issues.", + DeprecationWarning, + ) self.allow_ring_breaking = allow_ring_breaking self.preserve_chirality = preserve_chirality self.use_positions = use_positions diff --git a/src/openfe/setup/atom_mapping/perses_scorers.py b/src/openfe/setup/atom_mapping/perses_scorers.py index 2cc0f140..be7df35e 100644 --- a/src/openfe/setup/atom_mapping/perses_scorers.py +++ b/src/openfe/setup/atom_mapping/perses_scorers.py @@ -1,6 +1,7 @@ # This code is part of OpenFE and is licensed under the MIT license. # For details, see https://github.com/OpenFreeEnergy/openfe +import warnings from typing import Callable from openfe.utils import requires_package @@ -67,6 +68,11 @@ def default_perses_scorer( ------- float """ + warnings.warn( + "default_perses_scorer is deprecated and is planned to be removed in openfe v2.0. If you have questions related to this, please open an issue at https://github.com/OpenFreeEnergy/openfe/issues", + DeprecationWarning, + ) + score = AtomMapper(use_positions=use_positions).score_mapping( AtomMapping( old_mol=mapping.componentA.to_openff(), diff --git a/src/openfe/tests/setup/atom_mapping/test_perses_atommapper.py b/src/openfe/tests/setup/atom_mapping/test_perses_atommapper.py index 0ff69fa4..15e00d66 100644 --- a/src/openfe/tests/setup/atom_mapping/test_perses_atommapper.py +++ b/src/openfe/tests/setup/atom_mapping/test_perses_atommapper.py @@ -13,8 +13,8 @@ def test_simple(atom_mapping_basic_test_files): # basic sanity check on the LigandAtomMapper mol1 = atom_mapping_basic_test_files["methylcyclohexane"] mol2 = atom_mapping_basic_test_files["toluene"] - - mapper = PersesAtomMapper() + with pytest.warns(DeprecationWarning, match="PersesAtomMapper"): + mapper = PersesAtomMapper() mapping_gen = mapper.suggest_mappings(mol1, mol2) @@ -31,8 +31,8 @@ def test_generator_length(atom_mapping_basic_test_files): # generator stops correctly mol1 = atom_mapping_basic_test_files["methylcyclohexane"] mol2 = atom_mapping_basic_test_files["toluene"] - - mapper = PersesAtomMapper() + with pytest.warns(DeprecationWarning, match="PersesAtomMapper"): + mapper = PersesAtomMapper() mapping_gen = mapper.suggest_mappings(mol1, mol2) @@ -45,7 +45,8 @@ def test_generator_length(atom_mapping_basic_test_files): @skip_if_missing("perses") def test_empty_atommappings(mol_pair_to_shock_perses_mapper): mol1, mol2 = mol_pair_to_shock_perses_mapper - mapper = PersesAtomMapper() + with pytest.warns(DeprecationWarning, match="PersesAtomMapper"): + mapper = PersesAtomMapper() mapping_gen = mapper.suggest_mappings(mol1, mol2) @@ -59,11 +60,12 @@ def test_empty_atommappings(mol_pair_to_shock_perses_mapper): @skip_if_missing("openeye") @skip_if_missing("perses") def test_dict_round_trip(): - # use some none defaults - mapper1 = PersesAtomMapper( - allow_ring_breaking=False, - preserve_chirality=False, - coordinate_tolerance=0.01 * unit.nanometer, - ) - mapper2 = PersesAtomMapper.from_dict(mapper1.to_dict()) + with pytest.warns(DeprecationWarning, match="PersesAtomMapper"): + # use some none defaults + mapper1 = PersesAtomMapper( + allow_ring_breaking=False, + preserve_chirality=False, + coordinate_tolerance=0.01 * unit.nanometer, + ) + mapper2 = PersesAtomMapper.from_dict(mapper1.to_dict()) assert mapper2.to_dict() == mapper1.to_dict() diff --git a/src/openfe/tests/setup/atom_mapping/test_perses_scorers.py b/src/openfe/tests/setup/atom_mapping/test_perses_scorers.py index c7f65cd6..0becbd0f 100644 --- a/src/openfe/tests/setup/atom_mapping/test_perses_scorers.py +++ b/src/openfe/tests/setup/atom_mapping/test_perses_scorers.py @@ -18,7 +18,8 @@ USING_OLD_OFF = False @pytest.mark.xfail(not USING_OLD_OFF, reason="perses #1108") def test_perses_normalization_not_using_positions(gufe_atom_mapping_matrix): # now run the openfe equivalent with the same ligand atom _mappings - scorer = perses_scorers.default_perses_scorer + with pytest.warns(DeprecationWarning, match="default_perses_scorer"): + scorer = perses_scorers.default_perses_scorer molecule_row = np.max(list(gufe_atom_mapping_matrix.keys())) + 1 norm_scores = np.zeros([molecule_row, molecule_row]) @@ -41,7 +42,8 @@ def test_perses_normalization_not_using_positions(gufe_atom_mapping_matrix): @skip_if_missing("perses") @pytest.mark.xfail(not USING_OLD_OFF, reason="perses #1108") def test_perses_not_implemented_position_using(gufe_atom_mapping_matrix): - scorer = perses_scorers.default_perses_scorer + with pytest.warns(DeprecationWarning, match="default_perses_scorer"): + scorer = perses_scorers.default_perses_scorer first_key = list(gufe_atom_mapping_matrix.keys())[0] match_re = "normalizing using positions is not currently implemented" @@ -76,7 +78,8 @@ def test_perses_regression(gufe_atom_mapping_matrix): assert matrix.shape == (8, 8) # now run the openfe equivalent with the same ligand atom _mappings - scorer = perses_scorers.default_perses_scorer + with pytest.warns(DeprecationWarning, match="default_perses_scorer"): + scorer = perses_scorers.default_perses_scorer scores = np.zeros_like(matrix) for (i, j), ligand_atom_mapping in gufe_atom_mapping_matrix.items(): score = scorer( From a64bd4427e64f41a547b6fb2a1d35ec7354d311c Mon Sep 17 00:00:00 2001 From: Mike Henry <11765982+mikemhenry@users.noreply.github.com> Date: Wed, 25 Feb 2026 12:27:02 -0700 Subject: [PATCH 3/4] Update openfe analysis pin (#1859) * bump min pin of openfe_analysis to fix https://github.com/OpenFreeEnergy/openfe/issues/1834 * add note in changelog about RMSD analysis fixed --- docs/CHANGELOG.rst | 4 ++-- environment.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/CHANGELOG.rst b/docs/CHANGELOG.rst index 2e62fd61..61f0098b 100644 --- a/docs/CHANGELOG.rst +++ b/docs/CHANGELOG.rst @@ -9,8 +9,8 @@ v1.9.1 **Fixed:** -* Fixed a bug in Protocol termination for the HybridTop and AFE Protocols - which would unnecessarily declare an ``UnboundLocalError``. +* Fixed a bug in Protocol termination for the HybridTop and AFE Protocols which would unnecessarily declare an ``UnboundLocalError``. +* Updated ``openfe_analysis`` dependency to fix issue with RMSD analysis (`Issue 1834 `). diff --git a/environment.yml b/environment.yml index c45d8102..a04b72ec 100644 --- a/environment.yml +++ b/environment.yml @@ -12,7 +12,7 @@ dependencies: - lomap2>=3.2.1 - networkx - numpy - - openfe-analysis>=0.3.1 + - openfe-analysis>=0.4.0 # min pin https://github.com/OpenFreeEnergy/openfe/issues/1834#issuecomment-3920079481, no max to check issues with new versions - openff-interchange-base - openff-nagl-base >=0.3.3 - openff-nagl-models>=0.1.2 From d0cc4c7938c84b92640dd4382dcb13d704efb329 Mon Sep 17 00:00:00 2001 From: Alyssa Travitz <31974495+atravitz@users.noreply.github.com> Date: Mon, 2 Mar 2026 09:42:14 -0800 Subject: [PATCH 4/4] pin interchange (#1860) --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index a04b72ec..5b23e906 100644 --- a/environment.yml +++ b/environment.yml @@ -13,7 +13,7 @@ dependencies: - networkx - numpy - openfe-analysis>=0.4.0 # min pin https://github.com/OpenFreeEnergy/openfe/issues/1834#issuecomment-3920079481, no max to check issues with new versions - - openff-interchange-base + - openff-interchange-base != 0.5.1 # https://github.com/openforcefield/openff-interchange/issues/1450 - openff-nagl-base >=0.3.3 - openff-nagl-models>=0.1.2 - openff-toolkit-base >=0.16.2