Skip to content

Fix issue #506 - #507

Merged
lohedges merged 1 commit into
develfrom
fix_506
Oct 13, 2026
Merged

lohedges merged 1 commit into
develfrom
fix_506

Conversation

@lohedges

Copy link
Copy Markdown
Contributor

Closes #506. Sire removed the MM non-bonded interactions between QM atoms only when both atoms were in the same molecule, via that molecule's intrascale property. When the QM region spans several molecules and they react with each other, such as a water transferring a proton to a residue and its hydroxide bonding to a ligand, the full MM LJ between the newly bonded atoms remained and the simulation crashed. sire_to_openmm_system now adds an OpenMM::NonbondedForce exception for every pair of QM atoms in different molecules, plus matching exclusions in the ghost/ghost and ghost/non-ghost forces. The LambdaLever scales these from the full MM interaction at λ=0 to zero at λ=1 using the same clj charge_scale and lj_scale levers as the intramolecular QM pairs, so λ interpolation stays consistent. To do this, QMForce now exposes a pure virtual getAtoms(), which PyQMForce and TorchQMForce already implement. A regression test, test_qm_cross_molecule_exceptions, checks that the exceptions exist and take the right values at both end states.

  • 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/n]
  • I confirm that I have added a changelog entry to the changelog (we will add a link to this PR as part of the review): [y/n]
  • I confirm that I have permission to release this code under the GPL3 license: [y/n]

@lohedges lohedges added the bug Something isn't working label Oct 13, 2026
@lohedges
lohedges deployed to sire-build October 13, 2026 14:34 — with GitHub Actions Active
@lohedges
lohedges deployed to sire-build October 13, 2026 14:34 — with GitHub Actions Active
@lohedges
lohedges deployed to sire-build October 13, 2026 14:34 — with GitHub Actions Active
@lohedges
lohedges deployed to sire-build October 13, 2026 14:34 — with GitHub Actions Active
@lohedges
lohedges deployed to sire-build October 13, 2026 14:34 — with GitHub Actions Active
@lohedges
lohedges merged commit c0528cc into devel Oct 13, 2026
5 checks passed
@lohedges
lohedges deleted the fix_506 branch October 13, 2026 16:59

This branch was successfully deployed

1 active deployment
sire-build — 5e002935 Deployed Oct 13, 2026 by lohedges via build (3.11, linux) #453
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.

[BUG] Non-bonded interactions between QM atoms in different molecules are not excluded

1 participant