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: Support interpolated improper torsions #19

Open mattwthompson opened 2 years ago

mattwthompson commented 2 years ago

There might be interest in doing WBO-based parameter interpolation. It's unclear at the moment if this is scientifically useful, but @davidlmobley says some A spec for this should be feasible given that it's already implemented for proper torsions (and bonds). I'm not sure how the interpolation should actually happen given that there is no central bond in a torsion; probably the people doing science on this do (maybe @SimonBoothroyd?).

davidlmobley commented 2 years ago

Actually, yes, this is a strong reason to hold on this - there's a problem of "which bond" that really means we ought to do the more of the science first.

pavankum commented 2 years ago

@davidlmobley do you think as a test we can interpolate based on wbo of central atom (second atom) and out of plane atom (fourth atom), as we see a faint signal in the attached image? image

mattwthompson commented 2 years ago

@pavankum and I wrote out a couple different ways this could be implemented using my elementary drawing skills. Each seem feasible to me if scientifically on the right track and desired by the science team. It would be ideal for this to be specific in SMIRNOFF before implementing, although we can explore ways to support this in an experimental implementation if that would be useful in determining how the spec should be written.

image

https://gist.github.com/mattwthompson/22788dbeb740e2978addaf7a5ff81f38 https://gist.github.com/mattwthompson/31713ca4275f375136afdbaa88086b6b

jchodera commented 2 years ago

My physical organic chemistry may not be as strong as @cbayly13, but isn't the idea here that you simply need to compute a WBO-like quantity that interpolates between sp2 and sp3 parameters for an improper, depending on the central atom's hybridization?

The best WBO-like quantity would compute the sp2/sp3-likeness quantity directly from the wavefunction, rather than attempting to derive it from WBOs. But if WBOs are all we have, I would imagine that something like the maximum of all the WBOs to the incident atom will go between 1 (for sp3) and 2 (for sp2), and should be sufficient for our purposes.

davidlmobley commented 2 years ago

To @jchodera 's point, I believe @jmaat did look at "maximum of WBOs to the relevant atom" before and didn't find anything helpful, but it may be that it's worth checking again on this relatively more tailored dataset.

@pavankum if you have patterns such that the out-of-plane atom is always the fourth atom, then:

@davidlmobley do you think as a test we can interpolate based on wbo of central atom (second atom) and out of plane atom (fourth atom), as we see a faint signal in the attached image?

this is probably worth checking.

The challenge here is that we are facing a bit of a chicken-and-egg problem, in that we can't really test our ideas in force fields until the toolkit supports WBO-interpolated impropers, and we aren't going to be fully sure what type of interpolation we want until we try it in a force field, for which we need toolkit support. I wonder if there is a way we can use plugins to do this?

Alternatively, I wonder if a better idea is to make a "bespoke" improper torsion fitter, where you would run some calculation on a "per molecule" basis to assign a custom improper for that molecule based on whatever bond order you like (even an interpolated one), then test it out. If this works well, THEN we get support for the tested interpolation into the toolkit. This leaves the devs out until the science is more settled.

So to Matt's point:

It would be ideal for this to be specific in SMIRNOFF before implementing, although we can explore ways to support this in an experimental implementation if that would be useful in determining how the spec should be written.

Yes! Pavan, what do you think of my idea above? What if we just write a script which generates a custom improper parameter for each molecule you want to look at, using whatever interpolation we MAY want to have implemented in the toolkit... then we see how it works, and when we find something which works quite well THEN we get it implemented?

I could see this could make testing more complex, however, because our benchmarking likely assumes we are using a consistent force field across all molecules... 🤔

pavankum commented 2 years ago

@davidlmobley I can try it out on a fork of toolkit, @mattwthompson showed where I can make changes and reuse the interpolated torsions code. I think that's a bit easier than the bespoke way.