Skip to content

Fix issue #254 - #255

Merged
lohedges merged 4 commits into
develfrom
fix_254
Oct 20, 2026
Merged

lohedges merged 4 commits into
develfrom
fix_254

Conversation

@lohedges

Copy link
Copy Markdown
Contributor

Closes #254.

When replica exchange re-uses OpenMM contexts across lambda values (max_contexts less than the number of replicas), every replica built its own equilibration and production dynamics objects during setup, each thrown away when the next replica took the context. Minimisation and equilibration now work per context instead: each context builds one equilibration and one production dynamics object, and its replicas are run through them in turn. With max_contexts=1 that is two builds rather than two per replica.

  • Equilibration no longer advances a replica's clock, which is restored afterwards rather than reset by building a new context.
  • A rebuilt context, or one left in a bad state by a failed minimisation, is set up in full the next time a replica is loaded into it, including its lambda value and GCMC water state.
  • Failing to create a dynamics object during setup is now reported as such and stops the run, rather than being logged as a minimisation warning.
  • Removed some unused attributes and duplicated setup logic.

@lohedges lohedges added bug Something isn't working cresset Related to work with Cresset labels Oct 20, 2026
@lohedges
lohedges deployed to somd2-build October 20, 2026 15:15 — with GitHub Actions Active
@lohedges
lohedges deployed to somd2-build October 20, 2026 15:15 — with GitHub Actions Active
@lohedges
lohedges deployed to somd2-build October 20, 2026 15:15 — with GitHub Actions Active
@lohedges
lohedges deployed to somd2-build October 20, 2026 15:15 — with GitHub Actions Active
@lohedges
lohedges merged commit d7f3c01 into devel Oct 20, 2026
4 checks passed
@lohedges
lohedges deleted the fix_254 branch October 20, 2026 15:26

This branch was successfully deployed

1 active deployment
somd2-build — 85e86fa5 Deployed Oct 20, 2026 by lohedges via build (3.12, linux) #130
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cresset Related to work with Cresset

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reduce setup time when re-using contexts for replica exchange

1 participant