Repository: OpenFreeEnergy/gufe (language: python)

Issue:
Reconsider default hydrogen_mass setting
Originally we used to run a hydrogen mass of 3 amu with a 4 fs timestep. Since we've switched to using the gufe settings, this has changed to 4 amu. Coincidentally I'm also seeing an increase in sporadic early simulation crashes.

It's possible that the two aren't related (could also be because we halved the number of minimization steps by default), but it's something worth keeping an eye out for. Hopefully post-workshop we can use something like alchemiscale to get to the bottom of this.


Discussion / hints:
Transferring to gufe, having briefly discussed with @mikemhenry - it looks reasonably clear that the Perses team found very similar outcomes. See https://github.com/choderalab/perses/pull/924 amongst others.

I would suggest we change gufe settings to have a default hydrogen_mass of 3.0.
Extra info - the choice of mass does influence absolute values in some specific systems: https://github.com/OpenFreeEnergy/openfe/pull/332#issue-1661426676

Fix patch:
diff --git a/gufe/settings/models.py b/gufe/settings/models.py
index 492dc3c2..66ad76cb 100644
--- a/gufe/settings/models.py
+++ b/gufe/settings/models.py
@@ -67,9 +67,9 @@ class OpenMMSystemGeneratorFFSettings(BaseForceFieldSettings):
 
     rigid_water: bool = True
     remove_com: bool = False
-    hydrogen_mass: float = 4.0
+    hydrogen_mass: float = 3.0
     """Mass to be repartitioned to hydrogens from neighbouring
-       heavy atoms (in amu), default 4.0"""
+       heavy atoms (in amu), default 3.0"""
 
     forcefields: list[str] = [
         "amber/ff14SB.xml",  # ff14SB protein force field


Test patch:
diff --git a/gufe/tests/test_custom_json.py b/gufe/tests/test_custom_json.py
index ae58bdab..1efcb2f5 100644
--- a/gufe/tests/test_custom_json.py
+++ b/gufe/tests/test_custom_json.py
@@ -164,7 +164,7 @@ def setup(self):
                     "constraints": "hbonds",
                     "rigid_water": True,
                     "remove_com": False,
-                    "hydrogen_mass": 4.0,
+                    "hydrogen_mass": 3.0,
                     "forcefields": [
                         "amber/ff14SB.xml",
                         "amber/tip3p_standard.xml",
diff --git a/gufe/tests/test_protocol.py b/gufe/tests/test_protocol.py
index 825032ef..33c2be46 100644
--- a/gufe/tests/test_protocol.py
+++ b/gufe/tests/test_protocol.py
@@ -206,8 +206,8 @@ def _create(
 class TestProtocol(GufeTokenizableTestsMixin):
 
     cls = DummyProtocol
-    key = "DummyProtocol-84b834e05f8a280c0c26a161010f52c8"
-    repr = "<DummyProtocol-84b834e05f8a280c0c26a161010f52c8>"
+    key = "DummyProtocol-f4f0aab0421240c9bc65b6491791f9d8"
+    repr = "<DummyProtocol-f4f0aab0421240c9bc65b6491791f9d8>"
 
     @pytest.fixture
     def instance(self):
diff --git a/gufe/tests/test_transformation.py b/gufe/tests/test_transformation.py
index 1dce1798..8c8119ac 100644
--- a/gufe/tests/test_transformation.py
+++ b/gufe/tests/test_transformation.py
@@ -31,8 +31,8 @@ def complex_equilibrium(solvated_complex):
 class TestTransformation(GufeTokenizableTestsMixin):
 
     cls = Transformation
-    key = "Transformation-decb5cda54a4092529bd47a2305c3169"
-    repr = "Transformation(stateA=ChemicalSystem(name=, components={'ligand': SmallMoleculeComponent(name=toluene), 'solvent': SolventComponent(name=O, K+, Cl-)}), stateB=ChemicalSystem(name=, components={'protein': ProteinComponent(name=), 'solvent': SolventComponent(name=O, K+, Cl-), 'ligand': SmallMoleculeComponent(name=toluene)}), protocol=<DummyProtocol-84b834e05f8a280c0c26a161010f52c8>)"
+    key = "Transformation-e710da52fcf4b7d78f890e6e00e8f6c5"
+    repr = "Transformation(stateA=ChemicalSystem(name=, components={'ligand': SmallMoleculeComponent(name=toluene), 'solvent': SolventComponent(name=O, K+, Cl-)}), stateB=ChemicalSystem(name=, components={'protein': ProteinComponent(name=), 'solvent': SolventComponent(name=O, K+, Cl-), 'ligand': SmallMoleculeComponent(name=toluene)}), protocol=<DummyProtocol-f4f0aab0421240c9bc65b6491791f9d8>)"
 
     @pytest.fixture
     def instance(self, absolute_transformation):
@@ -126,8 +126,8 @@ def test_dump_load_roundtrip(self, absolute_transformation):
 class TestNonTransformation(GufeTokenizableTestsMixin):
 
     cls = NonTransformation
-    key = "NonTransformation-f82418b1fcc30dc3ec1e8e196a208aa8"
-    repr = "NonTransformation(stateA=ChemicalSystem(name=, components={'protein': ProteinComponent(name=), 'solvent': SolventComponent(name=O, K+, Cl-), 'ligand': SmallMoleculeComponent(name=toluene)}), stateB=ChemicalSystem(name=, components={'protein': ProteinComponent(name=), 'solvent': SolventComponent(name=O, K+, Cl-), 'ligand': SmallMoleculeComponent(name=toluene)}), protocol=<DummyProtocol-84b834e05f8a280c0c26a161010f52c8>)"
+    key = "NonTransformation-55e8c1e7274d71e246d36ca4d718fed3"
+    repr = "NonTransformation(stateA=ChemicalSystem(name=, components={'protein': ProteinComponent(name=), 'solvent': SolventComponent(name=O, K+, Cl-), 'ligand': SmallMoleculeComponent(name=toluene)}), stateB=ChemicalSystem(name=, components={'protein': ProteinComponent(name=), 'solvent': SolventComponent(name=O, K+, Cl-), 'ligand': SmallMoleculeComponent(name=toluene)}), protocol=<DummyProtocol-f4f0aab0421240c9bc65b6491791f9d8>)"
 
     @pytest.fixture
     def instance(self, complex_equilibrium):