Skip to content

_backends

Pure-numpy backend for promolecule density evaluation.

The dispatch indirection is kept so that an alternative fast backend (e.g. occpy) can be slotted in via CHMPY_INTERP_BACKEND without touching density.py. For now there's only the numpy implementation.

Public entry points:

  • rho(positions, rho_data, domain, pts) -> sum of atomic densities at pts
  • weights(pos_a, rho_a, pos_b, rho_b, domain, pts, background) -> Hirshfeld stockholder weights