foyer
foyer copied to clipboard
Precedence of bond/angle/dihedral definitions with and without wildcards
Dihedral terms (whether periodic or Ryckaert-Bellemans) are assigned such that those without wildcard characters are considered more specific than those containing wildcard characters, and are given precedence in assignment. Looking through the OpenMM source, the relevant lines are here.
However, this logic does not appear in the OpenMM HarmonicBondGenerator and HarmonicAngleGenerator, so wildcard and non-wildcard definitions are likely given equal precedence.
I still need to test this out. But at any rate, we should have documentation for each force concerning how precedence is handled (some of this is already contained in #160), as well as ample unit tests.
This issue was about the charmm FFXML, but the discussion brushes on OpenMM and wildcards.
Possibly the best solution is simply not to use wildcards in the definitions I just looked through those files, and CGenFF never uses wildcards at all