Skip to content

Fix issue #231 - #232

Merged
lohedges merged 2 commits into
develfrom
fix_231
Sep 29, 2026
Merged

lohedges merged 2 commits into
develfrom
fix_231

Conversation

@lohedges

Copy link
Copy Markdown
Contributor

This PR closes #231.

_mix_replicas returns the state each replica's configuration moves to, but the mixing code treated it as the replica each state is seeded from, so it applied the inverse permutation. That's harmless for pairwise swaps but wrong for chained swaps around three or more replicas, which are common when energies are close and many swaps are accepted. Configurations were sent to the wrong lambda windows.

  • _mix_replicas now returns the inverse (np.argsort), matching how the states are used.
  • The transition matrix now records each configuration's move. It previously paired states from two consecutive cycles.
  • Legacy checkpoints (pre-slots) are inverted on restore.
  • Added a test that runs mixing and state application together for a 3-cycle.

@lohedges lohedges added the bug Something isn't working label Sep 29, 2026
@lohedges
lohedges deployed to somd2-build September 29, 2026 20:35 — with GitHub Actions Active
@lohedges
lohedges deployed to somd2-build September 29, 2026 20:35 — with GitHub Actions Active
@lohedges
lohedges deployed to somd2-build September 29, 2026 20:35 — with GitHub Actions Active
@lohedges
lohedges deployed to somd2-build September 29, 2026 20:35 — with GitHub Actions Active
@lohedges
lohedges merged commit f73b6a7 into devel Sep 29, 2026
4 checks passed
@lohedges
lohedges deleted the fix_231 branch September 29, 2026 20:44

This branch was successfully deployed

1 active deployment
somd2-build — 0a3c6e2e Deployed Sep 29, 2026 by lohedges via build (3.10, linux) #113
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replica exchange applies the inverse of the accepted permutation when mixing states

1 participant