canonical_exposed#

irmsd.bindings.canonical_exposed.get_canonical_sorter_fortran_raw(natoms: int, types: ndarray, coords_flat: ndarray, rank: ndarray, heavy: bool = False, wbo: ndarray | None = None, invtype: str = 'apsp+') → None[source]#

Low-level call that matches the Fortran signature exactly. Operates IN- PLACE on rank.

Parameters:
  • natoms (int) – Number of atoms (must be consistent with array lengths).

  • types ((natoms,) int32, C-contiguous) – Atomic numbers (or type IDs).

  • coords_flat ((3*natoms,) float64, C-contiguous) – Flat coordinates [x1,y1,z1,x2,y2,z2,…].

  • rank ((natoms,) int32, C-contiguous) – Output array for rank.

  • heavy (bool, optional) – Whether to consider only heavy atoms (default: False).

  • wbo ((natoms, natoms) float64, C-contiguous, optional) – Optional Wiberg bond order matrix, required if invtype is ‘cangen’, ignored in case of ‘apsp+’.

  • invtype (str, optional) – alogrithm type for invariants calculation (default: apsp+), alternativly ‘cangen’.

Raises:
  • TypeError – If any of the arrays do not have the expected dtype or memory layout.

  • ValueError – If array sizes do not match natoms.

irmsd.bindings.canonical_exposed.get_ids_from_connect_fortran_raw(natoms: int, types: ndarray, connectivity_flat: ndarray, rank: ndarray, heavy: bool = False) → None[source]#

Low-level call that matches the Fortran signature exactly.

Parameters:
  • natoms (int) – Number of atoms (must be consistent with array lengths).

  • types ((natoms,) int32, C-contiguous) – Atomic numbers (or type IDs).

  • connectivity_flat ((natoms*natoms,) int32, F-contiguous) – indicates whether a bond between two atoms exists

  • rank ((natoms,) int32, C-contiguous) – Output array for rank.

  • heavy (bool, optional) – Whether to consider only heavy atoms (default: False).

Raises:
  • TypeError – If any of the arrays do not have the expected dtype or memory layout.

  • ValueError – If array sizes do not match natoms.