gau2grid is a python-generated C library for vectorized computation of grid to gaussian collocation matrices

The core of gau2grid is generating the collocation matrices between a real space grid and a gaussian basis set expanded to a given angular momenta. Where a simple gaussian can be represented with the cartesian form as:

\[\phi({\bf r}) = x^l y^m z^n e^{-\alpha r^2}\]

where for a given angular momenta \(\ell\), a gaussian basis has all possible combinations of \(l, m, n\) that satisfy \(l + m + n = \ell\). These gaussians can also take a spherical harmonic form of:

\[\phi({\bf r}) = Y_\ell^m (\hat{\bf r}) e^{-\alpha r^2}\]

where \(m\) ranges from \(+\ell\) to \(-\ell\). The spherical form offers a more compact representation at higher angular momenta, but is more difficult to work with when examining cartesian derivates.

In quantum chemistry, an individual basis is often represented as a sum of several gaussian with different exponents and coefficients together:

\[\phi({\bf r}) = Y_\ell^m (\hat{\bf r}) \sum_i c_i e^{-\alpha_i r^2}\]

Collocation matrices between a single basis set and multiple grid points can then be represented as follows:

\[\phi_{m p} = Y_\ell^m (\widehat{{\bf r}_p -{\bf r}_{\rm center}}) \sum_i c_i e^{-\alpha_i ({\bf r}_{\rm center} - {\bf r}_p) ^2}\]

where the basis is evaluated at every point \(p\) for every component of the basis i.e. basis function \(m\). The \(\phi_{m p}\) matrices are the primary focus on the gau2grid library.