openforcefield / standards

A repository of the standards employed across the Open Force Field Consortium.
https://openforcefield.github.io/standards
MIT License
1 stars 3 forks source link

SMIRNOFF: Allow vdW potentials other than 12-6 Lennard-Jones #46

Open mattwthompson opened 1 year ago

mattwthompson commented 1 year ago

The current SMIRNOFF specification states:

The potential attribute (default: "none") specifies the potential energy function to use. Currently, only potential="Lennard-Jones-12-6" is supported:

and promises:

Later revisions will add support for additional potential types (e.g., Buckingham-exp-6), as well as the ability to support arbitrary algebraic functional forms using a scheme such as [...] potential="4*epsilon*((sigma/r)^12-(sigma/r)^6)"

Users are already doing this, so it would be useful to hash out the details of proper support of this behavior so as to avoid large deviations in the future. (Must expressions be algebraic, or will there be a set of English strings that encode specific functional forms?)

Aside: it's confusing that a default value is specified but explicitly not supported. It's also not consistently what the reference implementation does:


>>> from openff.toolkit.typing.engines.smirnoff.parameters import vdWHandler
>>> vdWHandler(version=0.3).potential
'Lennard-Jones-12-6'
mattwthompson commented 1 year ago

A crucial detail to consider: non-bonded interactions on virtual sites are hard-coded to only support Lennard-Jones parameters, even if zero. (If a Buckingham potential is used in the vdW section and the virtual sites do not have vdW/Buckingham interactions, should parameters bear rmin_half/epsilon or a/b/c? If left out, these default to whatever is implemented as a default in the VirtualSiteHandler ... which implies each new non-bonded functional form might also require a subclass of VirtualSiteHandler). This can be worked around in out-of-spec code, but it would be nice to align everything.

mrshirts commented 1 year ago

Are there cases when virtual sites have any repulsion/dispersion parameters? Generally, they would only have charges, since the goal is to create a more accurate electric field - although I can imagine a case where one would want to add some sort of repulsion to prevent accidental instability, though the functional form there is somewhat arbitrary.

mattwthompson commented 1 year ago

IIUC the current interest is only in moving around the location of charges and the early prototypes have focused on that. (Or least in atomistic simulations, not looking at CG/UA/hybrid approaches.) I can't say much more about the scientific possibilities but, since the spec includes vdW parameters on virtual sites, we've put a lot of work into ensuring the machinery is there in the infrastructure.