cn_exposed#

irmsd.bindings.cn_exposed.get_cn_fortran_raw(natoms: int, types: ndarray, coords_flat: ndarray, cn_flat: ndarray) → None[source]#

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

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,…].

  • cn_flat ((natoms) float64, C-contiguous) – Output CN array written by Fortran.

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

  • ValueError – If array sizes do not match natoms.