Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update integrator used in OpenMM driver #1096

Open
mattwthompson opened this issue Nov 7, 2024 · 0 comments · May be fixed by #1137
Open

Update integrator used in OpenMM driver #1096

mattwthompson opened this issue Nov 7, 2024 · 0 comments · May be fixed by #1137
Labels
bug Something isn't working openmm

Comments

@mattwthompson
Copy link
Member

          A crucial detail I've run into while getting this ready; [OpenMM's VerletIntegrator](http://docs.openmm.org/7.2.0/api-python/generated/simtk.openmm.openmm.VerletIntegrator.html#simtk.openmm.openmm.VerletIntegrator) (and in general, any leapfrog algorithm integrator in OpenMM) **will report non-zero kinetic energies when evaluating State, _even_ if all velocities are zero**. Taken [straight from the horse's mouth](http://docs.openmm.org/7.2.0/api-python/generated/simtk.openmm.openmm.State.html#simtk.openmm.openmm.State.getKineticEnergy):``

"Note that [KE] may be different from simply mv/2 summed over all particles. For example, a leapfrog integrator will store velocities offset by half a step, so they must be adjusted before computing the kinetic energy."
``

Some quick testing shows that for static structures exported from Interchange to OpenMM, VerletIntegrator and LangevinIntegrator both yield nonzero KEs, while LangevinMiddleIntegrator and BrownianIntegrator DO yield the expected 0 KE. I haven't yet checked the full list of supported Integrators exhaustively.

This becomes relevant to Interchange when noting that the drivers.openmm layer does use VerletIntegrator in its evaluation, and does not check 0 KE as far as I can tell. This has been introducing errors into my current data, and is likely doing the same for yours @mattwthompson

Originally posted by @timbernat in #1086 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working openmm
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant