xnn.common.models.dispersion_fast.coulomb#

The molecular EEQ interaction erf(gamma_ij r_ij) / r_ij applied without storing it.

The reference applies the dense (N, N) kernel in row blocks that are materialized (positions, distances, erf) at every matrix-vector product. The Triton kernel here evaluates each pair in registers and accumulates the product directly: memory O(N), one pass over the pairs per product.

Functions

coulomb_matvec(pos, rad, v)

sum_{j != i} erf(gamma_ij r_ij) / r_ij v_j for v of shape (N, K).