xnn.ffnn.models.charmmlib.resolve_improper_type#

xnn.ffnn.models.charmmlib.resolve_improper_type(improper_types, i, j, k, l)[source]#

Find the improper key for four atom types in evaluation order.

A row matches the quadruple as written or reversed; rows without wildcards are preferred, then the wildcard rows in table order, each tried in both directions (the CHARMM rule).

Parameters:
  • improper_types (dict) – The library’s improper table.

  • i (str) – Atom types with i the central atom.

  • j (str) – Atom types with i the central atom.

  • k (str) – Atom types with i the central atom.

  • l (str) – Atom types with i the central atom.

Returns:

The key, or None.

Return type:

str or None