openforcefield / amber-ff-porting

Scratch space for porting amber FFs into SMIRNOFF format
1 stars 3 forks source link

Try matching exact improper order #17

Closed j-wags closed 3 years ago

j-wags commented 3 years ago

Even if we end up moving to a threefold improper system for this force field [1], it will be good for this effort to verify that we can match improper energies precisely as a reference. Further, matching precisely will give us some confidence about the proper multiplicative factors (if any) to apply to periodicity and k.

In order to define these dihedrals in a different order, we'll need to override the normal improper valence checks. This should be possible by setting

ff.get_parameter_handler('ImproperTorsions')._INFOTYPE._VALENCE_TYPE = None

[1] We actually can't trivially mix our small molecule FF with a protein FF that doesn't apply three-fold impropers. This is because of the "all-wildcard" improper patterns we include in the small molecule FF to ensure that all improper centers have generic threefold parameters applied, which can be overwritten by subsequent matches, for example here. Mixing this with a protein FF that does one-fold impropers will end up mangling improper barriers.

j-wags commented 3 years ago

This is resolved by using the special AmberImproperHandler.