Skip to content

Add explicit PME parameter options and automatic PME tuning - #499

Merged
lohedges merged 5 commits into
develfrom
feature_pme_parameters
Oct 1, 2026
Merged

lohedges merged 5 commits into
develfrom
feature_pme_parameters

Conversation

@lohedges

@lohedges lohedges commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Profiling showed that OpenMM's PME parameters, as it chooses them from the Ewald error tolerance, often give a much finer reciprocal-space grid than the requested accuracy needs. Setting the splitting parameter and the grid size directly can give a decent speedup with no loss of accuracy. This PR adds pme_alpha, pme_grid and pme_spacing map options that are passed through to OpenMM. pme_grid takes one size or one per box vector. pme_spacing gives a maximum grid spacing, from which the grid size is calculated, and also works for triclinic boxes. It also adds sire.convert.openmm.tune_pme(), which finds the smallest grid, and the splitting parameter for it, that is at least as accurate as OpenMM's default choice. The result can be passed straight into the map, and the relative force errors can optionally be returned too. Existing behaviour is unchanged unless the new options are used. Numeric ForceFieldInfo map options, such as tolerance and dielectric, were silently ignored when passed as strings; they are now parsed, and an error is raised if they aren't valid numbers.

  • 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: [y]
  • I confirm that I have added documentation (e.g. a new tutorial page or detailed guide) for any new functionality in this pull request: [y]
  • 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 GPL3 license: [y]

@lohedges lohedges added the enhancement New feature or request label Oct 1, 2026
@lohedges
lohedges deployed to sire-build October 1, 2026 11:50 — with GitHub Actions Active
@lohedges
lohedges deployed to sire-build October 1, 2026 11:50 — with GitHub Actions Active
@lohedges
lohedges deployed to sire-build October 1, 2026 11:50 — with GitHub Actions Active
@lohedges
lohedges deployed to sire-build October 1, 2026 11:50 — with GitHub Actions Active
@lohedges
lohedges deployed to sire-build October 1, 2026 11:50 — with GitHub Actions Active
@lohedges
lohedges merged commit 998f608 into devel Oct 1, 2026
5 checks passed
@lohedges
lohedges deleted the feature_pme_parameters branch October 1, 2026 13:50

This branch was successfully deployed

1 active deployment
sire-build — 8b0eec9c Deployed Oct 1, 2026 by lohedges via build (3.12, windows) #449
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant