From 24d5a2f1ef6d8b33d7ef32078a566cda5c50817e Mon Sep 17 00:00:00 2001 From: hannahbaumann Date: Mon, 20 Nov 2023 11:38:03 +0100 Subject: [PATCH] Fix equilbration settings --- openfe/protocols/openmm_md/plain_md_methods.py | 3 ++- openfe/protocols/openmm_utils/omm_settings.py | 10 +--------- .../tests/protocols/test_openmm_plain_md_protocols.py | 5 +---- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/openfe/protocols/openmm_md/plain_md_methods.py b/openfe/protocols/openmm_md/plain_md_methods.py index bd0ab9eb5..5dd69a954 100644 --- a/openfe/protocols/openmm_md/plain_md_methods.py +++ b/openfe/protocols/openmm_md/plain_md_methods.py @@ -113,6 +113,7 @@ def _default_settings(cls): engine_settings=OpenMMEngineSettings(), integrator_settings=IntegratorSettings(), simulation_settings=SimulationSettingsMD( + equilibration_length_nvt=0.1 * unit.nanosecond, equilibration_length=1.0 * unit.nanosecond, production_length=5.0 * unit.nanosecond, ), @@ -288,7 +289,7 @@ def run(self, *, dry=False, verbose=True, ) equil_steps_nvt, equil_steps_npt, prod_steps = settings_validation.get_simsteps( equil_length_nvt=sim_settings.equilibration_length_nvt, - equil_length_npt=sim_settings.equilibration_length_npt, + equil_length=sim_settings.equilibration_length, prod_length=sim_settings.production_length, timestep=timestep, mc_steps=mc_steps ) diff --git a/openfe/protocols/openmm_utils/omm_settings.py b/openfe/protocols/openmm_utils/omm_settings.py index e0895399f..cb6f1140a 100644 --- a/openfe/protocols/openmm_utils/omm_settings.py +++ b/openfe/protocols/openmm_utils/omm_settings.py @@ -386,15 +386,7 @@ class Config: """ Length of the equilibration phase in the NVT ensemble in units of time. The total number of steps from this equilibration length - (i.e. ``equilibration_length`` / :class:`IntegratorSettings.timestep`) - must be a multiple of the value defined for - :class:`IntegratorSettings.n_steps`. - """ - equilibration_length_npt: unit.Quantity - """ - Length of the equilibration phase in the NPT ensemble in units of time. - The total number of steps from this equilibration length - (i.e. ``equilibration_length`` / :class:`IntegratorSettings.timestep`) + (i.e. ``equilibration_length_nvt`` / :class:`IntegratorSettings.timestep`) must be a multiple of the value defined for :class:`IntegratorSettings.n_steps`. """ diff --git a/openfe/tests/protocols/test_openmm_plain_md_protocols.py b/openfe/tests/protocols/test_openmm_plain_md_protocols.py index 1c24ebb7c..ba3df33dc 100644 --- a/openfe/tests/protocols/test_openmm_plain_md_protocols.py +++ b/openfe/tests/protocols/test_openmm_plain_md_protocols.py @@ -377,7 +377,4 @@ def test_gather(solvent_protocol_dag, tmpdir): res = prot.gather([dagres]) - assert isinstance(res, PlainMDProtocolResult) - -def test_ffcache_none(): - dryrun = pu.run(dry=True, shared_basepath=tmp) \ No newline at end of file + assert isinstance(res, PlainMDProtocolResult) \ No newline at end of file