xnn.ffnn.common.frc.canonical_key#

xnn.ffnn.common.frc.canonical_key(symmetry, atoms)[source]#

Order an atom-type key canonically under a symmetry.

Mirrors the SEAMM conventions so that keys written in either orientation in a file resolve to the same entry.

Parameters:
Returns:

  • key (tuple of str) – The canonical key.

  • flipped (bool) – Whether the order was changed.

Return type:

tuple[tuple, bool]