xnn.ffnn.common.frc.register_section_schema#

xnn.ffnn.common.frc.register_section_schema(kind, n_atoms, symmetry, constants, type='', text=None, flip=0, **extra)[source]#

Register (or replace) the schema of a section kind.

Parameters:
  • kind (str) – The section kind, the word after # (e.g. "quadratic_bond").

  • n_atoms (int or None) – Number of leading atom-type key columns after Version and Ref.

  • n_atoms – Number of leading atom-type key columns after Version and Ref; None reads the key width from the section’s own header line (for kinds such as buckingham that appear in both pairwise and per-atom shapes), in which case constants should be None too.

  • symmetry (str) – "none", "like_bond", "like_angle", "like_torsion", "like_improper" (central atom third) or "like_oop" (central atom second); governs the canonical ordering of the key.

  • constants (sequence of (name, unit[, ctor]) or None) – The value columns with their default units; None takes the names from the section’s header comment and reads floats.

  • type (str, optional) – The interaction class ("bond", "angle", "torsion", "out-of-plane", "pair", …), used by ForceField.terms().

  • text (str, optional) – Name of a trailing free-text column (the remainder of the row).

  • flip (int, optional) – When the key was flipped into canonical order, swap the first flip values with the next flip (bond increments).

Return type:

None