Skip to content

Fix mergeIntrascale dropping (1,1) pairs in ring-breaking perturbations#430

Merged
lohedges merged 1 commit intodevelfrom
fix_intrascale_merge
Apr 17, 2026
Merged

Fix mergeIntrascale dropping (1,1) pairs in ring-breaking perturbations#430
lohedges merged 1 commit intodevelfrom
fix_intrascale_merge

Conversation

@lohedges
Copy link
Copy Markdown
Contributor

Fixes a bug in the new SireIO::mergeIntrascale function where the helper lambda copyIntrascale skipped writing CLJScaleFactor(1, 1) pairs because of an explicit guard against the default value. In the two-pass algorithm used to build each merged end-state intrascale, the first (ghost-topology) pass could write non-(1, 1) values for shared-atom pairs, and the second (correct end-state) pass would then fail to overwrite them when the correct value was (1,1). This caused ring-breaking perturbations (e.g. cyclopentane → cyclohexane) to produce too few changed OpenMM exceptions; 6 instead of 18, leading to missing non-bonded interactions and simulation instabilities. The fix adds a copy_all flag to copyIntrascale and passes it as true on the second call for each end state, ensuring the correct end-state values always win regardless of whether they are (1, 1) or not.

No CHANGELOG entry is needed since this new function is not (yet) part of a release. The update has been tested locally and a regression test will be provided via BioSimSpace in a companion PR.

  • I confirm that I have merged the latest version of devel into this branch before issuing this pull request (e.g. by running git pull origin devel): [y]
  • I confirm that I have permission to release this code under the GPL3 license: [y]

@lohedges lohedges added bug Something isn't working cresset related to work with cresset labels Apr 17, 2026
@lohedges lohedges merged commit be36dfb into devel Apr 17, 2026
lohedges added a commit that referenced this pull request Apr 17, 2026
lohedges added a commit that referenced this pull request Apr 17, 2026
@lohedges lohedges deleted the fix_intrascale_merge branch April 17, 2026 11:27
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.

1 participant