Skip to content

Commit bc708a5

Browse files
committed
Use correct dynamics object for post-equilibration minimisation.
1 parent 844c005 commit bc708a5

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/somd2/runner/_repex.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -867,17 +867,6 @@ def _equilibrate(self, index):
867867
frame_frequency=0,
868868
)
869869

870-
# Perform minimisation at the end of equilibration only if the
871-
# timestep is increasing, or the constraint is changing.
872-
if (self._config.timestep > self._config.equilibration_timestep) or (
873-
not self._config.equilibration_constraints
874-
and self._config.perturbable_constraint != "none"
875-
):
876-
_logger.info(
877-
f"Minimising at {_lam_sym} = {self._lambda_values[index]:.5f}"
878-
)
879-
dynamics.minimise(timeout=self._config.timeout)
880-
881870
# Commit the system.
882871
system = dynamics.commit()
883872

@@ -901,6 +890,17 @@ def _equilibrate(self, index):
901890
# Create the production dynamics object.
902891
dynamics = system.dynamics(**dynamics_kwargs)
903892

893+
# Perform minimisation at the end of equilibration only if the
894+
# timestep is increasing, or the constraint is changing.
895+
if (self._config.timestep > self._config.equilibration_timestep) or (
896+
not self._config.equilibration_constraints
897+
and self._config.perturbable_constraint != "none"
898+
):
899+
_logger.info(
900+
f"Minimising at {_lam_sym} = {self._lambda_values[index]:.5f}"
901+
)
902+
dynamics.minimise(timeout=self._config.timeout)
903+
904904
# Set the new dynamics object.
905905
self._dynamics_cache.set(index, dynamics)
906906

0 commit comments

Comments
 (0)