xnn.ffnn.models.amberlib.match_improper#
- xnn.ffnn.models.amberlib.match_improper(improper_types, center, outer)[source]#
Pick the improper parameter and atom order for one trigonal center.
Follows the conventions of the AMBER builder (LEaP) as reproduced by the
amberimproper ordering of OpenMM: a patternI-J-K-Lmatches a centerKwhen its three neighbours can be assigned toI,JandL(Xmatches anything); a pattern without wildcards is preferred over one with, the last matching wildcard-free pattern wins among those, else the first matching wildcard pattern (table order). The matched atoms are then ordered: between positions of equal type (wildcard-free patterns) or of equal element involvingL(wildcard patterns), and always between the two leading positions of a wildcard pattern, the atom that comes first in its residue template goes first.- Parameters:
improper_types (dict) – The library’s improper table in file order, keys
"I-J-K-L".center (str) – Atom type of the central atom.
outer (sequence of (int, str, str, tuple)) – The three neighbours as
(atom index, atom type, element symbol, order key), where the order key is(residue index, position in the residue template).
- Returns:
The matching key and the atom indices
(i, j, k, l)in evaluation order, orNonewhen no pattern applies.- Return type: