openff-toolkit: Raise exception when generic parameters are assigned
In SMIRNOFF99Frosst, generic parameters are set to fairly ridiculous values. For example, the generic bond ([*:1]~[*:2] for any two atoms connected by any bond) the length is 4.0 angstroms and the force constant is 2,000 kcal/mol/angstrom**2. For our molecule sets we have eliminated molecules where these parameters are assigned, indeed that is how we discovered what parameters were missing when developing smirnoff99Frosst to begin with. However, if these parameters are assigned to a molecule the simulation will run without any kind of warning and unless someone looks closely at the data they may never know there is a problem.
@davidlmobley and I agree that as more people begin to use our force field running quietly with these parameters is not ideal. Offline we discussed two options for how to handle this scenario:
-
We could make the parameters slightly more reasonable and add a warning that generic parameters were assigned to the parameters.
-
Default behavior is to have an exception raised when one of these parameters is assigned. There should be an option that allows users to run the simulation anyway where a warning would still be printed.
David and I think option 2 is the better solution, but this raises a couple of questions:
-
Currently generic parameters are assigned the number 1 in their category (i.e.
b1for Bonds andn1for non-bonds). This numbering scheme comes from how we convert the “frocmodish” files into the smirnoff ffxml format where each parameter is numbered in order. Should we maintain this convention where we look at the parameter id? OR assume the first parameter in any section is generic? -
Should we keep the generic parameters as is or change the numbers to be slightly more reasonable values since default behavior will be to raise an error. If we change the values what should we change them to?
@cbayly13 could we get your input on this when you have time?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 24 (15 by maintainers)
Ah! Sorry, I had missed that. I think I’m going to reenable them, and fix the eventual test failures that come up then.
In the rush to make the January workshop release, I had disabled the missing valence checks. We should re-enable those before the alpha release so exceptions can be raised if needed here.
Right now,
ForceFieldautomatically searches the path where thedata/directory is installed, so if you put it here, you could specifyWe can always change the search path here, or add more paths to search.
@cbayly13 - by “generic” I was thinking mainly parameters of the type “contains no element and will apply to anything I’ve never seen before”. You certainly did do a good job (as far as I can tell) of covering elemental generics in a sensible way; what I’m mostly worried about now is people managing to come up with corner cases where they throw in an element we don’t yet support and get a “bad” parameter assigned to it.
Caitlin could put in some more sensible non-elemental generics in these cases (e.g., not a bond length of 4 angstroms for the generic bond; maybe something like 1.5 angstroms) so that if people insist on running, it will at least run…
But it sounds like we’re agreed.
@bannanc - let’s talk at some point about how to do this.
I think it should be a minor change.