Skip to content

Commit 36a4bdf

Browse files
committed
Save the OpenMM state after a GCMC move.
1 parent 0ecc721 commit 36a4bdf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/somd2/runner/_repex.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,9 +1265,6 @@ def _run_block(
12651265
),
12661266
)
12671267

1268-
# Set the state.
1269-
self._dynamics_cache.save_openmm_state(index)
1270-
12711268
# Perform a GCMC move and write ghost water residue indices after
12721269
# dynamics so that the ghost state is temporally consistent with
12731270
# the saved frame.
@@ -1289,6 +1286,9 @@ def _run_block(
12891286
# Save the GCMC state.
12901287
self._dynamics_cache.save_gcmc_state(index)
12911288

1289+
# Save the OpenMM state after any GCMC move so the context is consistent.
1290+
self._dynamics_cache.save_openmm_state(index)
1291+
12921292
# Get the energy at each lambda value.
12931293
energies = dynamics._current_energy_array()
12941294

0 commit comments

Comments
 (0)