Skip to content

Commit

Permalink
Merge pull request #36 from michellab/bugfix-rename-equil-files
Browse files Browse the repository at this point in the history
Bugfix rename equil files
  • Loading branch information
Roy-Haolin-Du authored Feb 23, 2025
2 parents fd77bf2 + 53d2c61 commit b2b8c8e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions a3fe/run/leg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion a3fe/run/system_prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit b2b8c8e

Please sign in to comment.