From dc3c8667f7440c18ea9f30228208938b32d962ce Mon Sep 17 00:00:00 2001 From: finlayclark Date: Fri, 21 Feb 2025 15:54:03 +0000 Subject: [PATCH 1/2] Ensure somd.rst7 is correctly named during equilibration --- a3fe/run/leg.py | 6 ++++-- a3fe/run/system_prep.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/a3fe/run/leg.py b/a3fe/run/leg.py index 401a152..8c22fb1 100644 --- a/a3fe/run/leg.py +++ b/a3fe/run/leg.py @@ -645,9 +645,11 @@ def run_ensemble_equilibration( ) # Give the output files unique names - for i, outdir in enumerate(outdirs_to_run): + equil_numbers = [int(outdir.split("_")[-1]) for outdir in outdirs_to_run] + for equil_number, outdir in zip(equil_numbers, outdirs_to_run): _subprocess.run( - ["mv", f"{outdir}/somd.rst7", f"{outdir}/somd_{i + 1}.rst7"], check=True + ["mv", f"{outdir}/somd.rst7", f"{outdir}/somd_{equil_number}.rst7"], + check=True, ) # Load the system and mark the ligand to be decoupled diff --git a/a3fe/run/system_prep.py b/a3fe/run/system_prep.py index 3b6e6b6..50f07d9 100644 --- a/a3fe/run/system_prep.py +++ b/a3fe/run/system_prep.py @@ -675,7 +675,7 @@ def run_ensemble_equilibration( # Run - assuming that this will be in the appropriate ensemble equilibration directory print( - f"Running SOMD ensemble equilibration simulation for {cfg.ensemble_equilibration_time} ps" + f"Running ensemble equilibration simulation with GROMACS for {cfg.ensemble_equilibration_time} ps" ) if leg_type == _LegType.BOUND: work_dir = output_dir From 53d2c61bb6b78f5d6fe650e36a201eb6f5ddc897 Mon Sep 17 00:00:00 2001 From: finlayclark Date: Fri, 21 Feb 2025 15:56:25 +0000 Subject: [PATCH 2/2] Update changelog --- docs/CHANGELOG.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/CHANGELOG.rst b/docs/CHANGELOG.rst index 9a0a85d..4ea289b 100644 --- a/docs/CHANGELOG.rst +++ b/docs/CHANGELOG.rst @@ -2,6 +2,10 @@ Change Log =============== +0.3.2 +==================== +- Fix bug which caused somd.rst7 files in the ensemble equilibration directories to be incorrectly numbered in some cases. + 0.3.1 ==================== - Modified the SimulationRunnerIterator to ensure that the state of sub-simulation runners is saved before they are torn down. This means that setting the equilibration time at the CalcSet level will now work as expected (previously the state of the calculations was not saved, causing the analysis to fail).