Repository navigation
Conversation
EMLEPotential is now one openmm-torch TorchForce (TorchScript), replayed from a CUDA graph on CUDA devices. The MM charges of the ML atoms are scaled by 1 - lambda with NonbondedForce offsets, and the force adds lambda * E_EMLE. With periodic boundary conditions, EMLE sums the ML-MM electrostatics with PME by default. lambda is a global parameter, so windows with EMLE can share one Context. The Sire EMLE path, the lambda levers and the strategy inputs that only EMLE used are removed.
Coverage Report
|
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
EMLEPotential no longer uses Sire. It is one openmm-torch TorchForce (TorchScript), replayed from a CUDA graph, so no Python runs at each step.
The energy is E(lambda) = E_MM[ML charges (1 - lambda) q] + lambda * E_EMLE. NonbondedForce offsets scale the ML charges, so lambda = 0 is the MM System with PME, and lambda = 1 has EMLE for all ML-MM electrostatics. With periodic boundary conditions, EMLE uses PME by default (
electrostatics="pme", from chemle/emle-engine#133). lambda is a global parameter, so EMLE windows can share one Context.Speed, ethanol in 1000 waters, 1 fs, RTX 4090: MM 0.11 ms/step; MM + EMLE (PME) 1.35 ms/step (64 ns/day). The old Sire path did not finish the example smoke test in 25 minutes.
Tests: unit tests against emle-engine's model evaluated directly (PME, cutoff, vacuum) and against MM Systems built by hand with scaled charges; GPU tests for lambda = 0, shared Contexts, lambda taken from MLInterpolation, and the CUDA graph.
Needs: emle-engine with PME. environment.yaml pins the head of chemle/emle-engine#133 until it is merged.
Changelog:
lambda_emle, orlambda_interpolatewhen it comes from MLInterpolation).emle_plus, and the strategy inputs that only EMLE used.