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
OFF-EP 0007b — Add long-range vdW treatment attribute in vdW section (alternative to OFF-EP 0007) #44
base: main
Are you sure you want to change the base?
Conversation
I'll review, but one thing that makes me nervous about this is that -- unless I'm misunderstanding -- approving this would require us to immediately add LJPME support (and tests etc), and our developers already have a backlog relating to biopolymer support. Am I missing something? |
Could we just tag the LJMPE option with a "not yet implemented" note? We
can just remove that without OFF-EP review once it is implemented in the
toolkit.
In terms of how much work it will be to implement: If we are already
splitting electrostatics and vdW into separate OpenMM Forces, this will be
very easy to implement. If we are not yet doing this, we will probably want
to do that as part of a refactoring when we implement this. OpenMM
performance impact should be minimal.
|
This EP is looking pretty good, though I could use clarification on why we'd use Also, is LJPME important to distinguish from PME? I've only ever seen it in the context of OpenMM's API so I had assumed LJPME was just a unique string chosen for the nonbonded namespace (where PME has a distinct meaning). |
@mrshirts: Could you review this when you have a chance? |
which has been recognized as being important in treating heterogeneous systems such as [those containing lipid bilayers](https://doi.org/10.1021/ct400140n). | ||
|
||
Most engines implement a common form of isotropic long-range vdW correction in which the pairwise vdW potential is averaged over all vdW site pairs | ||
and integrated (numerically or analytically) alongside a surface area term (and a term to account for the switching function if one is in use) to account for the missing interactions out to infinite separation: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what you mean here by "surface area term". It's just a volume integral, isn't it, with g(r) =1 in the switching region and beyond? I say this having written the GROMACS version to handle switching (back in 2007 or something)
|
||
Many of these engines also provided the capability to use LJPME. | ||
As with electrostatics, we do not specify the exact parameters used for PME (real-space cutoff, grid spacing, error tolerance); | ||
the SMIRNOFF spec instead specifies the Ewald sum is the true desired potential and the simulation engine must make a faithful |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is also particle-particle particle mesh (P3M) as employed by LAMMPS as the default long range, which should converge to the PME result in the limit of fine-grain parameters, it should probably mention such algorithms explicitly for clarity.
Supported values are | ||
* `"none"`: No long-range vdW correction is applied. | ||
* `"isotropic"`: An isotropic vdW correction, described below, is applied. | ||
* `"LJPME"`: An Ewald sum is used (commonly referred to as LJPME) to treat the vdW potential in a periodic manner [1](https://doi.org/10.1063/1.464397) [2](http://dx.doi.org/10.1063/1.465608) [3](https://doi.org/10.1021/acs.jctc.5b00726). Note that this is only compatible with certain forms of the potential that involve sums of inverse even powers of `r`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could just be PME, since it's within the LJ definition - it's still PME, though with R^-6 instead of R^-1.
|
||
The default value, which is recommended for general use, is `"isotropic"`. | ||
|
||
The long-range correction would only be applied to periodic systems; it would be omitted and this attribute ignored for non-periodic systems. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be more clear here. A PME long-range calculation is MOST important (and different) for thing like interfaces, which are periodic in one dimension but not in the other.
Supported values are | ||
* `"none"`: No long-range vdW correction is applied. | ||
* `"isotropic"`: An isotropic vdW correction, described below, is applied. | ||
* `"LJPME"`: An Ewald sum is used (commonly referred to as LJPME) to treat the vdW potential in a periodic manner [1](https://doi.org/10.1063/1.464397) [2](http://dx.doi.org/10.1063/1.465608) [3](https://doi.org/10.1021/acs.jctc.5b00726). Note that this is only compatible with certain forms of the potential that involve sums of inverse even powers of `r`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A fundamental issue here is that isotropic and PME give statistically different results, especially for non-homogeneous systems. This may need to be explicitly called out.
* `"isotropic"`: An isotropic vdW correction, described below, is applied. | ||
* `"LJPME"`: An Ewald sum is used (commonly referred to as LJPME) to treat the vdW potential in a periodic manner [1](https://doi.org/10.1063/1.464397) [2](http://dx.doi.org/10.1063/1.465608) [3](https://doi.org/10.1021/acs.jctc.5b00726). Note that this is only compatible with certain forms of the potential that involve sums of inverse even powers of `r`. | ||
|
||
For the `"isotropic"` case, the vdW correction is computed as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For "isotropic" one needed clarification is that this is explicitly a potential switch, which is not necessarily the default for many MD engines (for example, for gromacs "force-switch" is the default. Force switch is removes a weird discontinuity in the switching region, at the cost of altering the potential at all r (thus leaving the force the same). In many cases, however, the force-switch results in being lambda-dependent, with a different switch depending on the lambda, so give incorrect results - I don't recall if this has been addressed in GROMACS yet).
Added some comments - some minor clarification points (some relating to other aspects of long-range LJ corrections), and an explicit question about how we support two options in a spec that can give statistically different results. |
This is an alternative to #40, cleanly clarifying all the concerns I raised in #40 (comment).
It may be easiest to review the changes with respect to #40 here: 507b579