Skip to content

Choose the nearest MM atoms without gradients before embedding them. - #563

Merged
lohedges merged 1 commit into
OpenBioSim:develfrom
kzinovjev:feature_gpu_resident_select_first
Dec 5, 2026
Merged

lohedges merged 1 commit into
OpenBioSim:develfrom
kzinovjev:feature_gpu_resident_select_first

Conversation

@kzinovjev

Copy link
Copy Markdown
Contributor

Follow-up to #562: the nearest max_mm_atoms MM atoms are chosen without gradients, and only they are re-imaged, switched and differentiated, instead of all MM atoms. Results are unchanged.

Chorismate mutase (50,193 atoms), MACEEMLEJoint, float32, CUDA graph, RTX 3070, 2000 steps of 1 fs, n=3 interleaved:

Cutoff (QM/MM, MM) MM atoms passed devel ms/step (ns/day) This PR ms/step (ns/day)
12 Å, 10 Å 1,768 12.32 (7.01) 10.77 (8.02)
24 Å, 24 Å 10,183 16.65 (5.19) 15.47 (5.58)

With a float64 model, energies and forces on all atoms match devel (dE = 0, max |dF| = 2e-10 kJ/mol/nm). tests/qm/test_qm_gpu_resident.py passes.

  • 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 added a test for any new functionality in this pull request: [n] No new functionality; covered by the existing max_mm_atoms tests.
  • I confirm that I have added documentation (e.g. a new tutorial page or detailed guide) for any new functionality in this pull request: [n] Not applicable.
  • 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]
  • I confirm that I have permission to release this code under the MIT license (the Python API) or the LGPLv3+ license (everything else), as described in the LICENSE file: [y]

Suggested reviewers:

@lohedges

Only the selected MM atoms are re-imaged, switched and differentiated, so the
per-step cost of the embedding no longer scales with the size of the system.
@lohedges
lohedges merged commit fbf2d17 into OpenBioSim:devel Dec 5, 2026
4 of 5 checks passed

@lohedges lohedges left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. I've fixed the CI issue on devel so the Windows build will work there.

This branch was previously deployed

1 inactive deployment
sire-build — c058aafb Deployed Dec 5, 2026 by kzinovjev via build (3.13, linux) #493
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants