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

OFF-EP 0007b — Add long-range vdW treatment attribute in vdW section (alternative to OFF-EP 0007) #44

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

jchodera
Copy link
Member

@jchodera jchodera commented Jul 22, 2022

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

@davidlmobley
Copy link

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?

@jchodera
Copy link
Member Author

jchodera commented Jul 22, 2022 via email

@j-wags
Copy link
Member

j-wags commented Jul 27, 2022

This EP is looking pretty good, though I could use clarification on why we'd use method='LJPME' long_range_correction='LJPME' as opposed to method='PME' long_range_correction='none'. My current (very limited!) understanding is that the long- and short-distance parts of PME are inseparable.

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).

@jchodera
Copy link
Member Author

jchodera commented Jun 7, 2023

@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:
Copy link

@mrshirts mrshirts Jun 7, 2023

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
Copy link

@mrshirts mrshirts Jun 7, 2023

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`.
Copy link

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.
Copy link

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`.
Copy link

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
Copy link

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).

@mrshirts
Copy link

mrshirts commented Jun 7, 2023

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.

@mattwthompson mattwthompson mentioned this pull request Sep 5, 2023
15 tasks
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.

None yet

5 participants