occ
Loading...
Searching...
No Matches
occ::ints Namespace Reference

Effective core potential (ECP) integrals over Cartesian Gaussians. More...

Namespaces

namespace  detail
namespace  simd
namespace  ecp_detail

Classes

struct  BoysConstants
struct  BoysTableParams
class  BoysTableGenerator
class  Boys
struct  ECoeffs1D
struct  ECoeffs3D
struct  ECoeffs1DDynamic
struct  EcpPrimitive
struct  EcpCentre
 All ECP terms on one atom. More...
struct  EcpBasisShell
 A contracted Cartesian AO shell as the ECP code sees it. More...
class  EcpEvaluator
struct  ShellPairData
 Data for a shell pair (all primitive pairs). More...
class  ESPEvaluator
 High-level ESP integral evaluator. More...
struct  PrimitivePairData
 Data for a single primitive pair (precomputed at initialization). More...
struct  AuxPrimitiveData
 Data for a single auxiliary primitive (single-center). More...
struct  AuxShellData
 Data for an auxiliary shell. More...
struct  RInts
struct  RIntsDynamic

Typedefs

using BoysParamsDefault = BoysTableParams<7, 16, 36, 252>
using BoysParamsExtended = BoysTableParams<7, 32, 117, 819>
using BoysParamsHighRes = BoysTableParams<7, 16, 36, 504>
using BoysDefault = Boys<BoysParamsDefault>
using BoysExtended = Boys<BoysParamsExtended>

Functions

template<typename T, int N>
OCC_GPU_ENABLED OCC_GPU_INLINE void boys_asymptotic (T x, int m0, T *F)
 Asymptotic expansion for Boys function: F_m(T) ~ sqrt(pi/(4T)) * prod(i-0.5)/T Valid for T > 30.
template<typename T>
OCC_GPU_ENABLED OCC_GPU_INLINE T boys_asymptotic (T x, int m)
template<typename T, typename Params>
OCC_GPU_ENABLED OCC_GPU_INLINE T boys_interpolate (const T *table, T x, int m)
 Interpolate F_m(x) from Chebyshev table.
template<typename T, int N, typename Params>
OCC_GPU_ENABLED OCC_GPU_INLINE void boys_interpolate (const T *table, T x, int m0, T *F)
template<typename T, int N, typename Params>
OCC_GPU_ENABLED OCC_GPU_INLINE void boys_evaluate (const T *table, T x, int m0, T *F)
template<typename T, typename Params>
OCC_GPU_ENABLED OCC_GPU_INLINE T boys_evaluate (const T *table, T x, int m)
const BoysDefault & boys ()
const BoysExtended & boys_extended ()
constexpr int ncart (int L)
constexpr int ncartsum (int L)
template<typename T, int A, int B>
OCC_GPU_ENABLED OCC_GPU_INLINE void compute_e_coeffs_1d (T a, T b, T XAB, ECoeffs1D< T, A, B > &E)
template<typename T, int LA, int LB>
OCC_GPU_ENABLED OCC_GPU_INLINE void compute_e_coeffs_3d (T a, T b, T Ax, T Ay, T Az, T Bx, T By, T Bz, ECoeffs3D< T, LA, LB > &E)
template<typename T, int LA, int LB>
OCC_GPU_ENABLED OCC_GPU_INLINE void compute_e_coeffs_3d (T a, T b, const T *A, const T *B, ECoeffs3D< T, LA, LB > &E)
template<typename T>
OCC_GPU_ENABLED void compute_e_coeffs_1d_dynamic (int la, int lb, T a, T b, T XAB, ECoeffs1DDynamic< T > &E)
std::vector< EcpCentre > ecp_centres_from_basis (const occ::gto::AOBasis &basis)
std::vector< EcpBasisShell > ecp_shells_from_basis (const occ::gto::AOBasis &basis)
constexpr int ecp_cart_index (int i, int j, int k)
 Index of the Cartesian component (i,j,k) in occ's default ordering.
constexpr int ecp_sym_index (int i, int j)
 Position of d2/dX_i dX_j in the packed xx, xy, xz, yy, yz, zz order of the same-centre second-derivative blocks.
template<typename T, int LA, int LB, int LC, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED void eri3c_primitive (T a, T b, T gamma, const T *A, const T *B, const T *C, const T *boys_table, T *integrals)
 3-center ERI primitive integral (μν|P) Uses templated RInts for efficiency (no dynamic allocation)
template<typename T, int LA, int LB, int LC, typename BoysParams = BoysParamsDefault>
void eri3c_contracted (int na_prim, int nb_prim, int nc_prim, const T *exponents_a, const T *exponents_b, const T *exponents_c, const T *coeffs_a, const T *coeffs_b, const T *coeffs_c, const T *A, const T *B, const T *C, const T *boys_table, T *integrals)
 3-center ERI contracted integral (μν|P) for shell triple
template<typename T, typename BoysParams = BoysParamsDefault>
void eri3c_dispatch (int la, int lb, int lc, int na_prim, int nb_prim, int nc_prim, const T *exponents_a, const T *exponents_b, const T *exponents_c, const T *coeffs_a, const T *coeffs_b, const T *coeffs_c, const T *A, const T *B, const T *C, const T *boys_table, T *integrals)
 Dispatch to templated 3c ERI kernel based on runtime angular momenta.
template<typename T>
OCC_GPU_ENABLED OCC_GPU_INLINE constexpr T hermite_sign (int t, int u, int v)
 Compute Hermite sign factor (-1)^(t+u+v) for a given Hermite index.
template<typename T>
void apply_hermite_signs (const T *in, int L_max, T *out)
 Apply Hermite signs to a vector out[h] = sign(h) * in[h] where sign(h) = (-1)^(t+u+v).
template<typename T>
void density_to_hermite (const T *D_block, const T *E_ab, int na, int nb, int nherm_ab, T *X_out, bool apply_sign=true)
 Eq.
template<typename T>
void contract_hermite_eri_forward (const T *R_pq, const T *X_q, int nherm_ab, int nherm_c, T *Y_p)
 Eq.
template<typename T>
void hermite_to_aux (const T *E_c, const T *Y_p, int nc, int nherm_c, T *g_out)
 Eq.
template<typename Scalar>
void aux_to_hermite (const Scalar *E_c, const Scalar *d_r, int nc, int nherm_c, Scalar *T_out)
 Eq.
template<typename Scalar>
void contract_hermite_eri_backward (const Scalar *R_pq, const Scalar *T_p, int nherm_ab, int nherm_c, Scalar *U_q)
 Eq.
template<typename T>
void hermite_to_orbital (const T *E_ab, const T *U_q, int na, int nb, int nherm_ab, T *J_block, bool apply_sign=true)
 Eq.
template<typename T, typename BoysParams = BoysParamsDefault>
void compute_R_pq_tensor (const ShellPairData< T > &ao_pair, const AuxShellData< T > &aux_shell, const T *boys_table, T *R_pq_out)
 Compute the accumulated R_pq tensor for a shell pair + aux shell.
template<typename T>
void compute_accumulated_E_ab (const ShellPairData< T > &shell_pair, T *E_ab_out)
 Compute E_ab matrix accumulated over all primitives in a shell pair This is needed for the forward and backward transformations.
template<typename T>
void compute_accumulated_E_c (const AuxShellData< T > &aux_shell, T *E_c_out)
 Compute E_c matrix accumulated over all primitives in an aux shell.
std::tuple< size_t, size_t, size_t, size_t > split_rij_workspace_sizes (int max_l_ao, int max_l_aux)
 Compute maximum workspace sizes for Split-RI-J.
template<typename T>
OCC_GPU_ENABLED OCC_GPU_INLINE constexpr T spherical_harmonic_factor (int l)
template<typename T, int LA, int LB, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED void esp_primitive (T a, T b, const T *A, const T *B, const T *C, const T *boys_table, T *integrals)
 ESP integral for a single primitive pair at a single point.
template<typename T, int LA, int LB, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED void esp_contracted (int na_prim, int nb_prim, const T *exponents_a, const T *exponents_b, const T *coeffs_a, const T *coeffs_b, const T *A, const T *B, const T *C, const T *boys_table, T *integrals)
 ESP integral for contracted shell pair at a single point.
template<typename T, int LA, int LB, typename BoysParams = BoysParamsDefault>
void esp_contracted_batch (int na_prim, int nb_prim, const T *exponents_a, const T *exponents_b, const T *coeffs_a, const T *coeffs_b, const T *A, const T *B, int npts, const T *C, const T *boys_table, T *integrals)
 ESP integrals for a shell pair at multiple points (vectorized over points) SHARK-style: E-coefficients computed once per primitive pair, reused for all points.
template<typename T, int LA, int LB>
void build_e_matrix (const ECoeffs3D< T, LA, LB > &E, T *E_matrix)
 Build E-matrix for a primitive pair.
template<typename T, int LA, int LB>
ShellPairData< T > precompute_shell_pair (int na_prim, int nb_prim, const T *exponents_a, const T *exponents_b, const T *coeffs_a, const T *coeffs_b, const T *A, const T *B)
 Precompute ShellPairData for a shell pair.
template<int LA, int LB>
constexpr size_t esp_workspace_size (int npts)
 Calculate workspace size for esp_evaluate_with_precomputed.
template<typename T, int LA, int LB, typename BoysParams = BoysParamsDefault>
void esp_evaluate_with_precomputed (const ShellPairData< T > &shell_pair, int npts, const T *C, const T *boys_table, T *integrals, T *workspace)
 ESP evaluation using precomputed ShellPairData This is the hot path - E-matrices are already computed!
template<typename T>
void build_aux_e_1d (int lc, T gamma, T *E_1d)
 Build 1D E-coefficients for single-center auxiliary with exponent gamma Uses recurrence: E^{l+1}_t = (1/2γ) E^l_{t-1} + (t+1) E^l_{t+1}.
template<typename T>
void build_aux_e_matrix_with_gamma (const T *E_1d, int lc, T *E_matrix)
 Build E-matrix for single-center auxiliary shell with ket signs.
template<typename T, int L>
AuxShellData< T > precompute_aux_shell (int nprim, const T *exponents, const T *coeffs, const T *C)
 Precompute auxiliary shell data with gamma-dependent E-coefficients.
template<typename T>
ShellPairData< T > precompute_shell_pair_dispatch (int la, int lb, int na_prim, int nb_prim, const T *exponents_a, const T *exponents_b, const T *coeffs_a, const T *coeffs_b, const T *A, const T *B)
 Dispatch shell pair precomputation based on runtime angular momenta Supports angular momenta up to L=4 (g functions).
template<typename T>
AuxShellData< T > precompute_aux_shell_dispatch (int lc, int nprim, const T *exponents, const T *coeffs, const T *C)
 Dispatch auxiliary shell precomputation based on runtime angular momentum.
template<typename T, int LA, int LB, int LC, typename BoysParams = BoysParamsDefault>
void eri3c_evaluate_with_precomputed (const ShellPairData< T > &ao_pair, const AuxShellData< T > &aux_shell, const T *boys_table, T *integrals)
 3-center ERI (μν|P) using precomputed data
template<typename T, int LP, int LQ, typename BoysParams = BoysParamsDefault>
void eri2c_evaluate_with_precomputed (const AuxShellData< T > &shell_P, const AuxShellData< T > &shell_Q, const T *boys_table, T *integrals)
 2-center Coulomb (P|Q) using precomputed data
template<typename T, typename BoysParams = BoysParamsDefault>
void esp_primitive_dynamic (int la, int lb, T a, T b, const T *A, const T *B, const T *C, const T *boys_table, T *integrals)
 ESP integral with runtime angular momentum.
template<typename T, typename BoysParams = BoysParamsDefault>
void esp_contracted_dynamic (int la, int lb, int na_prim, int nb_prim, const T *exponents_a, const T *exponents_b, const T *coeffs_a, const T *coeffs_b, const T *A, const T *B, const T *C, const T *boys_table, T *integrals)
 Contracted ESP with runtime angular momentum.
template<typename T, typename BoysParams = BoysParamsDefault>
void eri3c_dynamic (int la, int lb, int lc, int na_prim, int nb_prim, int nc_prim, const T *exponents_a, const T *exponents_b, const T *exponents_c, const T *coeffs_a, const T *coeffs_b, const T *coeffs_c, const T *A, const T *B, const T *C, const T *boys_table, T *integrals)
 Dynamic 3-center ERI (μν|P) for runtime angular momentum.
template<typename T, typename BoysParams = BoysParamsDefault>
void eri2c_dynamic (int lp, int lq, int np_prim, int nq_prim, const T *exponents_p, const T *exponents_q, const T *coeffs_p, const T *coeffs_q, const T *P, const T *Q, const T *boys_table, T *integrals)
 Dynamic 2-center Coulomb (P|Q) for runtime angular momentum.
template<typename T>
void build_E_ab_matrix_dynamic (const ECoeffs1DDynamic< T > &Ex, const ECoeffs1DDynamic< T > &Ey, const ECoeffs1DDynamic< T > &Ez, int la, int lb, T *E_ab)
 Build E_ab matrix [nab × nherm_ab] from 3D E-coefficients Row order: standard Cartesian order (descending in first index).
template<typename T>
void build_E_c_matrix_dynamic (const T *E_c_1d, int lc, T *E_c_matrix)
 Build E_c matrix [nc × nherm_c] from single-center E-coefficients with ket signs The sign (-1)^(tx+ty+tz) is baked into the matrix.
template<typename T>
void build_R_tensor_dynamic (const RIntsDynamic< T > &R, int L_ab, int lc, T *R_tensor)
 Build R_tensor [nherm_ab × nherm_c] from R-integrals R_tensor[h_ab, h_c] = R[combined_hermite_index(h_ab, h_c)].
template<typename T, typename BoysParams = BoysParamsDefault>
void eri3c_dynamic_matmul (int la, int lb, int lc, int na_prim, int nb_prim, int nc_prim, const T *exponents_a, const T *exponents_b, const T *exponents_c, const T *coeffs_a, const T *coeffs_b, const T *coeffs_c, const T *A, const T *B, const T *C, const T *boys_table, T *integrals)
 Dynamic 3-center ERI using matrix multiplication for contraction This version pre-allocates workspace and uses Eigen matmul.
template<typename T, typename BoysParams = BoysParamsDefault>
void eri3c_dynamic_matmul_workspace (int la, int lb, int lc, int na_prim, int nb_prim, int nc_prim, const T *exponents_a, const T *exponents_b, const T *exponents_c, const T *coeffs_a, const T *coeffs_b, const T *coeffs_c, const T *A, const T *B, const T *C, const T *boys_table, T *integrals, T *E_ab_workspace, T *E_c_workspace, T *R_workspace, T *temp_workspace)
 Dynamic 3-center ERI using matrix multiplication with external workspace This version eliminates internal allocations by using caller-provided buffers.
std::tuple< size_t, size_t, size_t, size_t > eri3c_workspace_sizes (int la, int lb, int lc)
 Required workspace sizes for eri3c_dynamic_matmul_workspace Returns sizes as tuple: (E_ab_size, E_c_size, R_tensor_size, temp_size).
std::tuple< size_t, size_t, size_t, size_t > eri3c_workspace_sizes_max (int max_l_ao, int max_l_aux)
 Maximum workspace sizes given max angular momenta Useful for pre-allocating workspace for all shell combinations.
constexpr int nherm (int L)
constexpr int nhermsum (int L)
OCC_GPU_ENABLED OCC_GPU_INLINE constexpr int hermite_index (int t, int u, int v)
template<typename T, int L, typename BoysParams>
OCC_GPU_ENABLED void compute_r_ints (const T *boys_table, T p, T PCx, T PCy, T PCz, RInts< T, L > &R)
template<typename T, int L>
OCC_GPU_ENABLED void compute_r_ints (const T *boys_table, T p, T PCx, T PCy, T PCz, T *R_out)
template<typename T, typename BoysParams>
OCC_GPU_ENABLED void compute_r_ints_dynamic (const T *boys_table, int L, T p, T PCx, T PCy, T PCz, RIntsDynamic< T > &R)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void compute_r_ints_L0_batch (const T *boys_table, T p, int npts, const T *PCx, const T *PCy, const T *PCz, T *R_out)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void compute_r_ints_L1_batch (const T *boys_table, T p, int npts, const T *PCx, const T *PCy, const T *PCz, T *R_out)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void compute_r_ints_L2_batch (const T *boys_table, T p, int npts, const T *PCx, const T *PCy, const T *PCz, T *R_out)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void compute_r_ints_L3_batch (const T *boys_table, T p, int npts, const T *PCx, const T *PCy, const T *PCz, T *R_out)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void compute_r_ints_L4_batch (const T *boys_table, T p, int npts, const T *PCx, const T *PCy, const T *PCz, T *R_out)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void compute_r_ints_L5_batch (const T *boys_table, T p, int npts, const T *PCx, const T *PCy, const T *PCz, T *R_out)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void compute_r_ints_L6_batch (const T *boys_table, T p, int npts, const T *PCx, const T *PCy, const T *PCz, T *R_out)
template<typename T, int L, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void compute_r_ints_batch (const T *boys_table, T p, int npts, const T *PCx, const T *PCy, const T *PCz, T *R_out)
template<typename T, typename BoysParams = BoysParamsDefault>
void compute_r_ints_L0_eigen (const T *boys_table, T p, int npts, const Eigen::Array< T, Eigen::Dynamic, 1 > &PCx, const Eigen::Array< T, Eigen::Dynamic, 1 > &PCy, const Eigen::Array< T, Eigen::Dynamic, 1 > &PCz, Eigen::Ref< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > > R_out)
template<typename T, typename BoysParams = BoysParamsDefault>
void compute_r_ints_L1_eigen (const T *boys_table, T p, int npts, const Eigen::Array< T, Eigen::Dynamic, 1 > &PCx, const Eigen::Array< T, Eigen::Dynamic, 1 > &PCy, const Eigen::Array< T, Eigen::Dynamic, 1 > &PCz, Eigen::Ref< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > > R_out)
template<typename T, typename BoysParams = BoysParamsDefault>
void compute_r_ints_L2_eigen (const T *boys_table, T p, int npts, const Eigen::Array< T, Eigen::Dynamic, 1 > &PCx, const Eigen::Array< T, Eigen::Dynamic, 1 > &PCy, const Eigen::Array< T, Eigen::Dynamic, 1 > &PCz, Eigen::Ref< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > > R_out)
template<typename T, typename BoysParams = BoysParamsDefault>
void compute_r_ints_L3_eigen (const T *boys_table, T p, int npts, const Eigen::Array< T, Eigen::Dynamic, 1 > &PCx, const Eigen::Array< T, Eigen::Dynamic, 1 > &PCy, const Eigen::Array< T, Eigen::Dynamic, 1 > &PCz, Eigen::Ref< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > > R_out)
template<typename T, typename BoysParams = BoysParamsDefault>
void compute_r_ints_L4_eigen (const T *boys_table, T p, int npts, const Eigen::Array< T, Eigen::Dynamic, 1 > &PCx, const Eigen::Array< T, Eigen::Dynamic, 1 > &PCy, const Eigen::Array< T, Eigen::Dynamic, 1 > &PCz, Eigen::Ref< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > > R_out)
template<typename T, typename BoysParams = BoysParamsDefault>
void compute_r_ints_L6_eigen (const T *boys_table, T p, int npts, const Eigen::Array< T, Eigen::Dynamic, 1 > &PCx, const Eigen::Array< T, Eigen::Dynamic, 1 > &PCy, const Eigen::Array< T, Eigen::Dynamic, 1 > &PCz, Eigen::Ref< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > > R_out)
template<typename T, int L, typename BoysParams = BoysParamsDefault>
void compute_r_ints_batch_direct (const T *boys_table, T p, int npts, T Px, T Py, T Pz, const Eigen::Ref< const Eigen::Matrix< T, 3, Eigen::Dynamic > > &C, Eigen::Ref< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > > R_out, T omega=T(0))
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void compute_r_ints_3c_L0 (const T *boys_table, T p, T PCx, T PCy, T PCz, T *R)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void compute_r_ints_3c_L1 (const T *boys_table, T p, T PCx, T PCy, T PCz, T *R)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void compute_r_ints_3c_L2 (const T *boys_table, T p, T PCx, T PCy, T PCz, T *R)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void compute_r_ints_3c_L3 (const T *boys_table, T p, T PCx, T PCy, T PCz, T *R)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void compute_r_ints_3c_L4 (const T *boys_table, T p, T PCx, T PCy, T PCz, T *R)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void compute_r_ints_3c_L5 (const T *boys_table, T p, T PCx, T PCy, T PCz, T *R)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void compute_r_ints_3c_L6 (const T *boys_table, T p, T PCx, T PCy, T PCz, T *R)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void fused_forward_0_0 (const T *boys_table, T alpha, T PCx, T PCy, T PCz, T prefactor, const T *X, T *Y)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void fused_backward_0_0 (const T *boys_table, T alpha, T PCx, T PCy, T PCz, T prefactor, const T *T_vec, T *U)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void fused_forward_0_1 (const T *boys_table, T alpha, T PCx, T PCy, T PCz, T prefactor, const T *X, T *Y)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void fused_backward_0_1 (const T *boys_table, T alpha, T PCx, T PCy, T PCz, T prefactor, const T *T_vec, T *U)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void fused_forward_1_0 (const T *boys_table, T alpha, T PCx, T PCy, T PCz, T prefactor, const T *X, T *Y)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void fused_backward_1_0 (const T *boys_table, T alpha, T PCx, T PCy, T PCz, T prefactor, const T *T_vec, T *U)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void fused_forward_0_2 (const T *boys_table, T alpha, T PCx, T PCy, T PCz, T prefactor, const T *X, T *Y)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void fused_backward_0_2 (const T *boys_table, T alpha, T PCx, T PCy, T PCz, T prefactor, const T *T_vec, T *U)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void fused_forward_2_0 (const T *boys_table, T alpha, T PCx, T PCy, T PCz, T prefactor, const T *X, T *Y)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void fused_backward_2_0 (const T *boys_table, T alpha, T PCx, T PCy, T PCz, T prefactor, const T *T_vec, T *U)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void fused_forward_1_1 (const T *boys_table, T alpha, T PCx, T PCy, T PCz, T prefactor, const T *X, T *Y)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void fused_backward_1_1 (const T *boys_table, T alpha, T PCx, T PCy, T PCz, T prefactor, const T *T_vec, T *U)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void fused_forward_0_3 (const T *boys_table, T alpha, T PCx, T PCy, T PCz, T prefactor, const T *X, T *Y)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void fused_backward_0_3 (const T *boys_table, T alpha, T PCx, T PCy, T PCz, T prefactor, const T *T_vec, T *U)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void fused_forward_3_0 (const T *boys_table, T alpha, T PCx, T PCy, T PCz, T prefactor, const T *X, T *Y)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void fused_backward_3_0 (const T *boys_table, T alpha, T PCx, T PCy, T PCz, T prefactor, const T *T_vec, T *U)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void fused_forward_1_2 (const T *boys_table, T alpha, T PCx, T PCy, T PCz, T prefactor, const T *X, T *Y)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void fused_backward_1_2 (const T *boys_table, T alpha, T PCx, T PCy, T PCz, T prefactor, const T *T_vec, T *U)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void fused_forward_2_1 (const T *boys_table, T alpha, T PCx, T PCy, T PCz, T prefactor, const T *X, T *Y)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void fused_backward_2_1 (const T *boys_table, T alpha, T PCx, T PCy, T PCz, T prefactor, const T *T_vec, T *U)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE bool fused_forward_dispatch (const T *boys_table, int L_ab, int lc, T alpha, T PCx, T PCy, T PCz, T prefactor, const T *X, T *Y)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE bool fused_backward_dispatch (const T *boys_table, int L_ab, int lc, T alpha, T PCx, T PCy, T PCz, T prefactor, const T *T_vec, T *U)
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void compute_r_ints_3c_dispatch (const T *boys_table, int L, T p, T PCx, T PCy, T PCz, T *R)
 Dispatch to specialized kernel based on runtime L value Falls back to generic compute_r_ints_dynamic for L > 6.
template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void compute_r_ints_3c_dispatch (const T *boys_table, int L, T p, T PCx, T PCy, T PCz, RIntsDynamic< T > &R)
 Version that writes directly to RIntsDynamic.

Variables

constexpr int LMAX = 6
constexpr int E1D_MAX_SIZE = (LMAX + 1) * (LMAX + 1) * (2 * LMAX + 1)
constexpr int RINTS_LMAX = 15
constexpr int RINTS_MAX_SIZE = nhermsum(RINTS_LMAX)

Detailed Description

Effective core potential (ECP) integrals over Cartesian Gaussians.

The operator about an ECP centre C is

U(r) = U_L(r) + sum_{l<L} sum_m |lm> U_l(r) <lm|, U_l(r) = sum_k d_k r^(n_k - 2) exp(-zeta_k r^2),

with the local channel L the highest angular momentum on that centre and the channels below it stored as U_l - U_L (the BSE/Gaussian convention).

The local (type-1) term is a three-centre integral done analytically with McMurchie-Davidson Hermite expansions: r^0 is a plain three-Gaussian overlap, r^-1 reduces to Boys functions and r^-2 to the analogous G_m(T) = int_0^1 (1-v^2)^m exp(-T(1-v^2)) dv.

The semilocal (type-2) term uses the half-numerical scheme of Flores-Moreno et al., J. Comput. Chem. 27, 1009 (2006): each Gaussian is expanded about C in real spherical harmonics with the plane-wave expansion, the angular integrals are exact (tabulated from harmonic polynomials), and the radial integrals

int r^(N+n) exp(-zeta r^2 - a(r-|A|)^2 - b(r-|B|)^2) i~_la(2a|A|r) i~_lb(2b|B|r) dr

(i~ the exponentially scaled modified spherical Bessel function) are done per primitive triple with fixed-order Gauss-Legendre on a window placed around the peak of that integrand. The window depends smoothly on the geometry and the order is fixed, so the integrals are smooth functions of the nuclear positions.

There is no fixed angular momentum limit. Derivatives with respect to the basis centres come from shells with l raised or lowered (l +- 1, l +- 2) and exponent-weighted coefficients; derivatives involving C follow from translational invariance.

Typedef Documentation

◆ BoysDefault

◆ BoysExtended

◆ BoysParamsDefault

◆ BoysParamsExtended

◆ BoysParamsHighRes

Function Documentation

◆ apply_hermite_signs()

template<typename T>
void occ::ints::apply_hermite_signs ( const T * in,
int L_max,
T * out )

Apply Hermite signs to a vector out[h] = sign(h) * in[h] where sign(h) = (-1)^(t+u+v).

◆ aux_to_hermite()

template<typename Scalar>
void occ::ints::aux_to_hermite ( const Scalar * E_c,
const Scalar * d_r,
int nc,
int nherm_c,
Scalar * T_out )

Eq.

20: Transform from aux orbital to Hermite basis T_p = sum_r E^r_p * d_r

Parameters
E_cAux E-matrix [nc * nherm_c] row-major
d_rFitted coefficients [nc]
ncNumber of aux Cartesian functions
nherm_cNumber of aux Hermite functions
T_outOutput [nherm_c]

◆ boys()

const BoysDefault & occ::ints::boys ( )
inline

◆ boys_asymptotic() [1/2]

template<typename T>
OCC_GPU_ENABLED OCC_GPU_INLINE T occ::ints::boys_asymptotic ( T x,
int m )

◆ boys_asymptotic() [2/2]

template<typename T, int N>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::boys_asymptotic ( T x,
int m0,
T * F )

Asymptotic expansion for Boys function: F_m(T) ~ sqrt(pi/(4T)) * prod(i-0.5)/T Valid for T > 30.

◆ boys_evaluate() [1/2]

template<typename T, typename Params>
OCC_GPU_ENABLED OCC_GPU_INLINE T occ::ints::boys_evaluate ( const T * table,
T x,
int m )

◆ boys_evaluate() [2/2]

template<typename T, int N, typename Params>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::boys_evaluate ( const T * table,
T x,
int m0,
T * F )

◆ boys_extended()

const BoysExtended & occ::ints::boys_extended ( )
inline

◆ boys_interpolate() [1/2]

template<typename T, typename Params>
OCC_GPU_ENABLED OCC_GPU_INLINE T occ::ints::boys_interpolate ( const T * table,
T x,
int m )

Interpolate F_m(x) from Chebyshev table.

◆ boys_interpolate() [2/2]

template<typename T, int N, typename Params>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::boys_interpolate ( const T * table,
T x,
int m0,
T * F )

◆ build_aux_e_1d()

template<typename T>
void occ::ints::build_aux_e_1d ( int lc,
T gamma,
T * E_1d )

Build 1D E-coefficients for single-center auxiliary with exponent gamma Uses recurrence: E^{l+1}_t = (1/2γ) E^l_{t-1} + (t+1) E^l_{t+1}.

Parameters
lcAngular momentum
gammaExponent
E_1dOutput: [(lc+1) × (lc+1)] 1D E-coefficients

◆ build_aux_e_matrix_with_gamma()

template<typename T>
void occ::ints::build_aux_e_matrix_with_gamma ( const T * E_1d,
int lc,
T * E_matrix )

Build E-matrix for single-center auxiliary shell with ket signs.

Parameters
E_1d1D E-coefficients from build_aux_e_1d
lcAngular momentum
E_matrixOutput: [nc × nherm] E-matrix with ket signs baked in

◆ build_E_ab_matrix_dynamic()

template<typename T>
void occ::ints::build_E_ab_matrix_dynamic ( const ECoeffs1DDynamic< T > & Ex,
const ECoeffs1DDynamic< T > & Ey,
const ECoeffs1DDynamic< T > & Ez,
int la,
int lb,
T * E_ab )

Build E_ab matrix [nab × nherm_ab] from 3D E-coefficients Row order: standard Cartesian order (descending in first index).

◆ build_E_c_matrix_dynamic()

template<typename T>
void occ::ints::build_E_c_matrix_dynamic ( const T * E_c_1d,
int lc,
T * E_c_matrix )

Build E_c matrix [nc × nherm_c] from single-center E-coefficients with ket signs The sign (-1)^(tx+ty+tz) is baked into the matrix.

◆ build_e_matrix()

template<typename T, int LA, int LB>
void occ::ints::build_e_matrix ( const ECoeffs3D< T, LA, LB > & E,
T * E_matrix )

Build E-matrix for a primitive pair.

◆ build_R_tensor_dynamic()

template<typename T>
void occ::ints::build_R_tensor_dynamic ( const RIntsDynamic< T > & R,
int L_ab,
int lc,
T * R_tensor )

Build R_tensor [nherm_ab × nherm_c] from R-integrals R_tensor[h_ab, h_c] = R[combined_hermite_index(h_ab, h_c)].

◆ compute_accumulated_E_ab()

template<typename T>
void occ::ints::compute_accumulated_E_ab ( const ShellPairData< T > & shell_pair,
T * E_ab_out )

Compute E_ab matrix accumulated over all primitives in a shell pair This is needed for the forward and backward transformations.

NOTE: For TRUE Split-RI-J, we do NOT include prefactors here. The E-matrix is just a pure basis transformation weighted by contraction coefficients. All integral prefactors (2π/p, spherical factors, etc.) go into R_pq.

Parameters
shell_pairPrecomputed shell pair data
E_ab_outOutput [nab * nherm_ab] row-major

◆ compute_accumulated_E_c()

template<typename T>
void occ::ints::compute_accumulated_E_c ( const AuxShellData< T > & aux_shell,
T * E_c_out )

Compute E_c matrix accumulated over all primitives in an aux shell.

Parameters
aux_shellPrecomputed aux shell data
E_c_outOutput [nc * nherm_c] row-major

◆ compute_e_coeffs_1d()

template<typename T, int A, int B>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::compute_e_coeffs_1d ( T a,
T b,
T XAB,
ECoeffs1D< T, A, B > & E )

◆ compute_e_coeffs_1d_dynamic()

template<typename T>
OCC_GPU_ENABLED void occ::ints::compute_e_coeffs_1d_dynamic ( int la,
int lb,
T a,
T b,
T XAB,
ECoeffs1DDynamic< T > & E )

◆ compute_e_coeffs_3d() [1/2]

template<typename T, int LA, int LB>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::compute_e_coeffs_3d ( T a,
T b,
const T * A,
const T * B,
ECoeffs3D< T, LA, LB > & E )

◆ compute_e_coeffs_3d() [2/2]

template<typename T, int LA, int LB>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::compute_e_coeffs_3d ( T a,
T b,
T Ax,
T Ay,
T Az,
T Bx,
T By,
T Bz,
ECoeffs3D< T, LA, LB > & E )

◆ compute_r_ints() [1/2]

template<typename T, int L, typename BoysParams>
OCC_GPU_ENABLED void occ::ints::compute_r_ints ( const T * boys_table,
T p,
T PCx,
T PCy,
T PCz,
RInts< T, L > & R )

◆ compute_r_ints() [2/2]

template<typename T, int L>
OCC_GPU_ENABLED void occ::ints::compute_r_ints ( const T * boys_table,
T p,
T PCx,
T PCy,
T PCz,
T * R_out )

◆ compute_r_ints_3c_dispatch() [1/2]

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::compute_r_ints_3c_dispatch ( const T * boys_table,
int L,
T p,
T PCx,
T PCy,
T PCz,
RIntsDynamic< T > & R )

Version that writes directly to RIntsDynamic.

◆ compute_r_ints_3c_dispatch() [2/2]

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::compute_r_ints_3c_dispatch ( const T * boys_table,
int L,
T p,
T PCx,
T PCy,
T PCz,
T * R )

Dispatch to specialized kernel based on runtime L value Falls back to generic compute_r_ints_dynamic for L > 6.

◆ compute_r_ints_3c_L0()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::compute_r_ints_3c_L0 ( const T * boys_table,
T p,
T PCx,
T PCy,
T PCz,
T * R )

◆ compute_r_ints_3c_L1()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::compute_r_ints_3c_L1 ( const T * boys_table,
T p,
T PCx,
T PCy,
T PCz,
T * R )

◆ compute_r_ints_3c_L2()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::compute_r_ints_3c_L2 ( const T * boys_table,
T p,
T PCx,
T PCy,
T PCz,
T * R )

◆ compute_r_ints_3c_L3()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::compute_r_ints_3c_L3 ( const T * boys_table,
T p,
T PCx,
T PCy,
T PCz,
T * R )

◆ compute_r_ints_3c_L4()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::compute_r_ints_3c_L4 ( const T * boys_table,
T p,
T PCx,
T PCy,
T PCz,
T * R )

◆ compute_r_ints_3c_L5()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::compute_r_ints_3c_L5 ( const T * boys_table,
T p,
T PCx,
T PCy,
T PCz,
T * R )

◆ compute_r_ints_3c_L6()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::compute_r_ints_3c_L6 ( const T * boys_table,
T p,
T PCx,
T PCy,
T PCz,
T * R )

◆ compute_r_ints_batch()

template<typename T, int L, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::compute_r_ints_batch ( const T * boys_table,
T p,
int npts,
const T * PCx,
const T * PCy,
const T * PCz,
T * R_out )

◆ compute_r_ints_batch_direct()

template<typename T, int L, typename BoysParams = BoysParamsDefault>
void occ::ints::compute_r_ints_batch_direct ( const T * boys_table,
T p,
int npts,
T Px,
T Py,
T Pz,
const Eigen::Ref< const Eigen::Matrix< T, 3, Eigen::Dynamic > > & C,
Eigen::Ref< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > > R_out,
T omega = T(0) )

◆ compute_r_ints_dynamic()

template<typename T, typename BoysParams>
OCC_GPU_ENABLED void occ::ints::compute_r_ints_dynamic ( const T * boys_table,
int L,
T p,
T PCx,
T PCy,
T PCz,
RIntsDynamic< T > & R )

◆ compute_r_ints_L0_batch()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::compute_r_ints_L0_batch ( const T * boys_table,
T p,
int npts,
const T * PCx,
const T * PCy,
const T * PCz,
T * R_out )

◆ compute_r_ints_L0_eigen()

template<typename T, typename BoysParams = BoysParamsDefault>
void occ::ints::compute_r_ints_L0_eigen ( const T * boys_table,
T p,
int npts,
const Eigen::Array< T, Eigen::Dynamic, 1 > & PCx,
const Eigen::Array< T, Eigen::Dynamic, 1 > & PCy,
const Eigen::Array< T, Eigen::Dynamic, 1 > & PCz,
Eigen::Ref< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > > R_out )

◆ compute_r_ints_L1_batch()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::compute_r_ints_L1_batch ( const T * boys_table,
T p,
int npts,
const T * PCx,
const T * PCy,
const T * PCz,
T * R_out )

◆ compute_r_ints_L1_eigen()

template<typename T, typename BoysParams = BoysParamsDefault>
void occ::ints::compute_r_ints_L1_eigen ( const T * boys_table,
T p,
int npts,
const Eigen::Array< T, Eigen::Dynamic, 1 > & PCx,
const Eigen::Array< T, Eigen::Dynamic, 1 > & PCy,
const Eigen::Array< T, Eigen::Dynamic, 1 > & PCz,
Eigen::Ref< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > > R_out )

◆ compute_r_ints_L2_batch()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::compute_r_ints_L2_batch ( const T * boys_table,
T p,
int npts,
const T * PCx,
const T * PCy,
const T * PCz,
T * R_out )

◆ compute_r_ints_L2_eigen()

template<typename T, typename BoysParams = BoysParamsDefault>
void occ::ints::compute_r_ints_L2_eigen ( const T * boys_table,
T p,
int npts,
const Eigen::Array< T, Eigen::Dynamic, 1 > & PCx,
const Eigen::Array< T, Eigen::Dynamic, 1 > & PCy,
const Eigen::Array< T, Eigen::Dynamic, 1 > & PCz,
Eigen::Ref< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > > R_out )

◆ compute_r_ints_L3_batch()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::compute_r_ints_L3_batch ( const T * boys_table,
T p,
int npts,
const T * PCx,
const T * PCy,
const T * PCz,
T * R_out )

◆ compute_r_ints_L3_eigen()

template<typename T, typename BoysParams = BoysParamsDefault>
void occ::ints::compute_r_ints_L3_eigen ( const T * boys_table,
T p,
int npts,
const Eigen::Array< T, Eigen::Dynamic, 1 > & PCx,
const Eigen::Array< T, Eigen::Dynamic, 1 > & PCy,
const Eigen::Array< T, Eigen::Dynamic, 1 > & PCz,
Eigen::Ref< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > > R_out )

◆ compute_r_ints_L4_batch()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::compute_r_ints_L4_batch ( const T * boys_table,
T p,
int npts,
const T * PCx,
const T * PCy,
const T * PCz,
T * R_out )

◆ compute_r_ints_L4_eigen()

template<typename T, typename BoysParams = BoysParamsDefault>
void occ::ints::compute_r_ints_L4_eigen ( const T * boys_table,
T p,
int npts,
const Eigen::Array< T, Eigen::Dynamic, 1 > & PCx,
const Eigen::Array< T, Eigen::Dynamic, 1 > & PCy,
const Eigen::Array< T, Eigen::Dynamic, 1 > & PCz,
Eigen::Ref< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > > R_out )

◆ compute_r_ints_L5_batch()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::compute_r_ints_L5_batch ( const T * boys_table,
T p,
int npts,
const T * PCx,
const T * PCy,
const T * PCz,
T * R_out )

◆ compute_r_ints_L6_batch()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::compute_r_ints_L6_batch ( const T * boys_table,
T p,
int npts,
const T * PCx,
const T * PCy,
const T * PCz,
T * R_out )

◆ compute_r_ints_L6_eigen()

template<typename T, typename BoysParams = BoysParamsDefault>
void occ::ints::compute_r_ints_L6_eigen ( const T * boys_table,
T p,
int npts,
const Eigen::Array< T, Eigen::Dynamic, 1 > & PCx,
const Eigen::Array< T, Eigen::Dynamic, 1 > & PCy,
const Eigen::Array< T, Eigen::Dynamic, 1 > & PCz,
Eigen::Ref< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > > R_out )

◆ compute_R_pq_tensor()

template<typename T, typename BoysParams = BoysParamsDefault>
void occ::ints::compute_R_pq_tensor ( const ShellPairData< T > & ao_pair,
const AuxShellData< T > & aux_shell,
const T * boys_table,
T * R_pq_out )

Compute the accumulated R_pq tensor for a shell pair + aux shell.

R_pq connects Hermite indices from AO pair (index q, size nherm_ab) to Hermite indices from aux shell (index p, size nherm_c).

The tensor is: R_pq[q, p] = sum_prims prefactor * R(t_q + t_p, u_q + u_p, v_q + v_p)

where (t_q, u_q, v_q) are Hermite indices for the AO pair and (t_p, u_p, v_p) are Hermite indices for the aux shell.

Parameters
ao_pairPrecomputed AO shell pair data
aux_shellPrecomputed aux shell data
boys_tableBoys function interpolation table
R_pq_outOutput tensor [nherm_ab * nherm_c]

◆ contract_hermite_eri_backward()

template<typename Scalar>
void occ::ints::contract_hermite_eri_backward ( const Scalar * R_pq,
const Scalar * T_p,
int nherm_ab,
int nherm_c,
Scalar * U_q )

Eq.

21: Contract Hermite ERI tensor (backward) U_q = sum_p R_pq * T_p

NOTE: Uses the SAME R_pq as forward pass - this is the key insight!

Parameters
R_pqHermite ERI tensor [nherm_ab * nherm_c] row-major
T_pHermite aux coefficients [nherm_c]
nherm_abRows of R_pq
nherm_cCols of R_pq
U_qOutput [nherm_ab]

◆ contract_hermite_eri_forward()

template<typename T>
void occ::ints::contract_hermite_eri_forward ( const T * R_pq,
const T * X_q,
int nherm_ab,
int nherm_c,
T * Y_p )

Eq.

18: Contract Hermite ERI tensor with Hermite density (forward) Y_p = sum_q R_pq * X_q

Parameters
R_pqHermite ERI tensor [nherm_ab * nherm_c] row-major
X_qHermite density [nherm_ab]
nherm_abRows of R_pq (AO pair Hermite count)
nherm_cCols of R_pq (aux Hermite count)
Y_pOutput [nherm_c]

◆ density_to_hermite()

template<typename T>
void occ::ints::density_to_hermite ( const T * D_block,
const T * E_ab,
int na,
int nb,
int nherm_ab,
T * X_out,
bool apply_sign = true )

Eq.

17: Transform density block to Hermite basis X_q = sum_{ab} D[ab] * E[ab, q] * (-1)^q

This is the first step of Split-RI-J: contract density with E-matrix. The sign (-1)^q is applied here.

Parameters
D_blockDensity matrix block [na * nb] (flattened)
E_abE-matrix [nab, nherm_ab] row-major (from primitives, accumulated)
na,nbShell sizes
nherm_abNumber of Hermite functions
X_outOutput Hermite density [nherm_ab]
apply_signIf true, apply (-1)^q signs (default true)

◆ ecp_cart_index()

int occ::ints::ecp_cart_index ( int i,
int j,
int k )
inlineconstexpr

Index of the Cartesian component (i,j,k) in occ's default ordering.

◆ ecp_centres_from_basis()

std::vector< EcpCentre > occ::ints::ecp_centres_from_basis ( const occ::gto::AOBasis & basis)

◆ ecp_shells_from_basis()

std::vector< EcpBasisShell > occ::ints::ecp_shells_from_basis ( const occ::gto::AOBasis & basis)

◆ ecp_sym_index()

int occ::ints::ecp_sym_index ( int i,
int j )
inlineconstexpr

Position of d2/dX_i dX_j in the packed xx, xy, xz, yy, yz, zz order of the same-centre second-derivative blocks.

◆ eri2c_dynamic()

template<typename T, typename BoysParams = BoysParamsDefault>
void occ::ints::eri2c_dynamic ( int lp,
int lq,
int np_prim,
int nq_prim,
const T * exponents_p,
const T * exponents_q,
const T * coeffs_p,
const T * coeffs_q,
const T * P,
const T * Q,
const T * boys_table,
T * integrals )

Dynamic 2-center Coulomb (P|Q) for runtime angular momentum.

◆ eri2c_evaluate_with_precomputed()

template<typename T, int LP, int LQ, typename BoysParams = BoysParamsDefault>
void occ::ints::eri2c_evaluate_with_precomputed ( const AuxShellData< T > & shell_P,
const AuxShellData< T > & shell_Q,
const T * boys_table,
T * integrals )

2-center Coulomb (P|Q) using precomputed data

Computes: (P|Q) = Σ_prims (2π)/(p+q) × cp × cq × Σ_{tuv} E^{PQ}_{tuv} × R_{tuv}(p+q, P-Q)

Parameters
shell_PPrecomputed auxiliary shell P data
shell_QPrecomputed auxiliary shell Q data
boys_tableBoys function interpolation table
integralsOutput: [nc_P, nc_Q] integrals

◆ eri3c_contracted()

template<typename T, int LA, int LB, int LC, typename BoysParams = BoysParamsDefault>
void occ::ints::eri3c_contracted ( int na_prim,
int nb_prim,
int nc_prim,
const T * exponents_a,
const T * exponents_b,
const T * exponents_c,
const T * coeffs_a,
const T * coeffs_b,
const T * coeffs_c,
const T * A,
const T * B,
const T * C,
const T * boys_table,
T * integrals )

3-center ERI contracted integral (μν|P) for shell triple

◆ eri3c_dispatch()

template<typename T, typename BoysParams = BoysParamsDefault>
void occ::ints::eri3c_dispatch ( int la,
int lb,
int lc,
int na_prim,
int nb_prim,
int nc_prim,
const T * exponents_a,
const T * exponents_b,
const T * exponents_c,
const T * coeffs_a,
const T * coeffs_b,
const T * coeffs_c,
const T * A,
const T * B,
const T * C,
const T * boys_table,
T * integrals )

Dispatch to templated 3c ERI kernel based on runtime angular momenta.

◆ eri3c_dynamic()

template<typename T, typename BoysParams = BoysParamsDefault>
void occ::ints::eri3c_dynamic ( int la,
int lb,
int lc,
int na_prim,
int nb_prim,
int nc_prim,
const T * exponents_a,
const T * exponents_b,
const T * exponents_c,
const T * coeffs_a,
const T * coeffs_b,
const T * coeffs_c,
const T * A,
const T * B,
const T * C,
const T * boys_table,
T * integrals )

Dynamic 3-center ERI (μν|P) for runtime angular momentum.

◆ eri3c_dynamic_matmul()

template<typename T, typename BoysParams = BoysParamsDefault>
void occ::ints::eri3c_dynamic_matmul ( int la,
int lb,
int lc,
int na_prim,
int nb_prim,
int nc_prim,
const T * exponents_a,
const T * exponents_b,
const T * exponents_c,
const T * coeffs_a,
const T * coeffs_b,
const T * coeffs_c,
const T * A,
const T * B,
const T * C,
const T * boys_table,
T * integrals )

Dynamic 3-center ERI using matrix multiplication for contraction This version pre-allocates workspace and uses Eigen matmul.

◆ eri3c_dynamic_matmul_workspace()

template<typename T, typename BoysParams = BoysParamsDefault>
void occ::ints::eri3c_dynamic_matmul_workspace ( int la,
int lb,
int lc,
int na_prim,
int nb_prim,
int nc_prim,
const T * exponents_a,
const T * exponents_b,
const T * exponents_c,
const T * coeffs_a,
const T * coeffs_b,
const T * coeffs_c,
const T * A,
const T * B,
const T * C,
const T * boys_table,
T * integrals,
T * E_ab_workspace,
T * E_c_workspace,
T * R_workspace,
T * temp_workspace )

Dynamic 3-center ERI using matrix multiplication with external workspace This version eliminates internal allocations by using caller-provided buffers.

Parameters
la,lb,lcAngular momenta
na_prim,nb_prim,nc_primNumber of primitives
exponents_a/b/cPrimitive exponents
coeffs_a/b/cContraction coefficients
A,B,CShell centers
boys_tableBoys function interpolation table
integralsOutput buffer [nab × nc]
E_ab_workspaceWorkspace for E_ab matrix [nab × nherm_ab]
E_c_workspaceWorkspace for E_c matrix [nc × nherm_c]
R_workspaceWorkspace for R tensor [nherm_ab × nherm_c]
temp_workspaceWorkspace for temp matrix [nab × nherm_c]

◆ eri3c_evaluate_with_precomputed()

template<typename T, int LA, int LB, int LC, typename BoysParams = BoysParamsDefault>
void occ::ints::eri3c_evaluate_with_precomputed ( const ShellPairData< T > & ao_pair,
const AuxShellData< T > & aux_shell,
const T * boys_table,
T * integrals )

3-center ERI (μν|P) using precomputed data

Computes: (μν|P) = Σ_prims (2π^{5/2})/(p*q*√(p+q)) × ca×cb×cc × Σ_{tuv,xyz} E^{ab}_{tuv} × E^c_{xyz} × R_{t+x,u+y,v+z}(α, PC_scaled) where p = α_a + α_b, q = γ_c, α = pq/(p+q)

Parameters
ao_pairPrecomputed AO shell pair data
aux_shellPrecomputed auxiliary shell data
boys_tableBoys function interpolation table
integralsOutput: [nab, nc] integrals

◆ eri3c_primitive()

template<typename T, int LA, int LB, int LC, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED void occ::ints::eri3c_primitive ( T a,
T b,
T gamma,
const T * A,
const T * B,
const T * C,
const T * boys_table,
T * integrals )

3-center ERI primitive integral (μν|P) Uses templated RInts for efficiency (no dynamic allocation)

◆ eri3c_workspace_sizes()

std::tuple< size_t, size_t, size_t, size_t > occ::ints::eri3c_workspace_sizes ( int la,
int lb,
int lc )
inline

Required workspace sizes for eri3c_dynamic_matmul_workspace Returns sizes as tuple: (E_ab_size, E_c_size, R_tensor_size, temp_size).

◆ eri3c_workspace_sizes_max()

std::tuple< size_t, size_t, size_t, size_t > occ::ints::eri3c_workspace_sizes_max ( int max_l_ao,
int max_l_aux )
inline

Maximum workspace sizes given max angular momenta Useful for pre-allocating workspace for all shell combinations.

◆ esp_contracted()

template<typename T, int LA, int LB, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED void occ::ints::esp_contracted ( int na_prim,
int nb_prim,
const T * exponents_a,
const T * exponents_b,
const T * coeffs_a,
const T * coeffs_b,
const T * A,
const T * B,
const T * C,
const T * boys_table,
T * integrals )

ESP integral for contracted shell pair at a single point.

◆ esp_contracted_batch()

template<typename T, int LA, int LB, typename BoysParams = BoysParamsDefault>
void occ::ints::esp_contracted_batch ( int na_prim,
int nb_prim,
const T * exponents_a,
const T * exponents_b,
const T * coeffs_a,
const T * coeffs_b,
const T * A,
const T * B,
int npts,
const T * C,
const T * boys_table,
T * integrals )

ESP integrals for a shell pair at multiple points (vectorized over points) SHARK-style: E-coefficients computed once per primitive pair, reused for all points.

◆ esp_contracted_dynamic()

template<typename T, typename BoysParams = BoysParamsDefault>
void occ::ints::esp_contracted_dynamic ( int la,
int lb,
int na_prim,
int nb_prim,
const T * exponents_a,
const T * exponents_b,
const T * coeffs_a,
const T * coeffs_b,
const T * A,
const T * B,
const T * C,
const T * boys_table,
T * integrals )

Contracted ESP with runtime angular momentum.

◆ esp_evaluate_with_precomputed()

template<typename T, int LA, int LB, typename BoysParams = BoysParamsDefault>
void occ::ints::esp_evaluate_with_precomputed ( const ShellPairData< T > & shell_pair,
int npts,
const T * C,
const T * boys_table,
T * integrals,
T * workspace )

ESP evaluation using precomputed ShellPairData This is the hot path - E-matrices are already computed!

Parameters
shell_pairPrecomputed shell pair data
nptsNumber of grid points
CGrid point coordinates [3 * npts]
boys_tableBoys function interpolation table
integralsOutput buffer [npts * nab]
workspacePre-allocated workspace (size >= esp_workspace_size<LA,LB>(npts))

◆ esp_primitive()

template<typename T, int LA, int LB, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED void occ::ints::esp_primitive ( T a,
T b,
const T * A,
const T * B,
const T * C,
const T * boys_table,
T * integrals )

ESP integral for a single primitive pair at a single point.

Parameters
aExponent of first primitive
bExponent of second primitive
ACenter of first primitive [3]
BCenter of second primitive [3]
CPoint at which to evaluate potential [3]
boys_tableBoys function interpolation table
integralsOutput: (la+1)(la+2)/2 × (lb+1)(lb+2)/2 integrals

The output layout is [Cartesian_a][Cartesian_b] in standard order

◆ esp_primitive_dynamic()

template<typename T, typename BoysParams = BoysParamsDefault>
void occ::ints::esp_primitive_dynamic ( int la,
int lb,
T a,
T b,
const T * A,
const T * B,
const T * C,
const T * boys_table,
T * integrals )

ESP integral with runtime angular momentum.

◆ esp_workspace_size()

template<int LA, int LB>
size_t occ::ints::esp_workspace_size ( int npts)
constexpr

Calculate workspace size for esp_evaluate_with_precomputed.

◆ fused_backward_0_0()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::fused_backward_0_0 ( const T * boys_table,
T alpha,
T PCx,
T PCy,
T PCz,
T prefactor,
const T * T_vec,
T * U )

◆ fused_backward_0_1()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::fused_backward_0_1 ( const T * boys_table,
T alpha,
T PCx,
T PCy,
T PCz,
T prefactor,
const T * T_vec,
T * U )

◆ fused_backward_0_2()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::fused_backward_0_2 ( const T * boys_table,
T alpha,
T PCx,
T PCy,
T PCz,
T prefactor,
const T * T_vec,
T * U )

◆ fused_backward_0_3()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::fused_backward_0_3 ( const T * boys_table,
T alpha,
T PCx,
T PCy,
T PCz,
T prefactor,
const T * T_vec,
T * U )

◆ fused_backward_1_0()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::fused_backward_1_0 ( const T * boys_table,
T alpha,
T PCx,
T PCy,
T PCz,
T prefactor,
const T * T_vec,
T * U )

◆ fused_backward_1_1()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::fused_backward_1_1 ( const T * boys_table,
T alpha,
T PCx,
T PCy,
T PCz,
T prefactor,
const T * T_vec,
T * U )

◆ fused_backward_1_2()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::fused_backward_1_2 ( const T * boys_table,
T alpha,
T PCx,
T PCy,
T PCz,
T prefactor,
const T * T_vec,
T * U )

◆ fused_backward_2_0()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::fused_backward_2_0 ( const T * boys_table,
T alpha,
T PCx,
T PCy,
T PCz,
T prefactor,
const T * T_vec,
T * U )

◆ fused_backward_2_1()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::fused_backward_2_1 ( const T * boys_table,
T alpha,
T PCx,
T PCy,
T PCz,
T prefactor,
const T * T_vec,
T * U )

◆ fused_backward_3_0()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::fused_backward_3_0 ( const T * boys_table,
T alpha,
T PCx,
T PCy,
T PCz,
T prefactor,
const T * T_vec,
T * U )

◆ fused_backward_dispatch()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE bool occ::ints::fused_backward_dispatch ( const T * boys_table,
int L_ab,
int lc,
T alpha,
T PCx,
T PCy,
T PCz,
T prefactor,
const T * T_vec,
T * U )

◆ fused_forward_0_0()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::fused_forward_0_0 ( const T * boys_table,
T alpha,
T PCx,
T PCy,
T PCz,
T prefactor,
const T * X,
T * Y )

◆ fused_forward_0_1()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::fused_forward_0_1 ( const T * boys_table,
T alpha,
T PCx,
T PCy,
T PCz,
T prefactor,
const T * X,
T * Y )

◆ fused_forward_0_2()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::fused_forward_0_2 ( const T * boys_table,
T alpha,
T PCx,
T PCy,
T PCz,
T prefactor,
const T * X,
T * Y )

◆ fused_forward_0_3()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::fused_forward_0_3 ( const T * boys_table,
T alpha,
T PCx,
T PCy,
T PCz,
T prefactor,
const T * X,
T * Y )

◆ fused_forward_1_0()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::fused_forward_1_0 ( const T * boys_table,
T alpha,
T PCx,
T PCy,
T PCz,
T prefactor,
const T * X,
T * Y )

◆ fused_forward_1_1()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::fused_forward_1_1 ( const T * boys_table,
T alpha,
T PCx,
T PCy,
T PCz,
T prefactor,
const T * X,
T * Y )

◆ fused_forward_1_2()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::fused_forward_1_2 ( const T * boys_table,
T alpha,
T PCx,
T PCy,
T PCz,
T prefactor,
const T * X,
T * Y )

◆ fused_forward_2_0()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::fused_forward_2_0 ( const T * boys_table,
T alpha,
T PCx,
T PCy,
T PCz,
T prefactor,
const T * X,
T * Y )

◆ fused_forward_2_1()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::fused_forward_2_1 ( const T * boys_table,
T alpha,
T PCx,
T PCy,
T PCz,
T prefactor,
const T * X,
T * Y )

◆ fused_forward_3_0()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::fused_forward_3_0 ( const T * boys_table,
T alpha,
T PCx,
T PCy,
T PCz,
T prefactor,
const T * X,
T * Y )

◆ fused_forward_dispatch()

template<typename T, typename BoysParams = BoysParamsDefault>
OCC_GPU_ENABLED OCC_GPU_INLINE bool occ::ints::fused_forward_dispatch ( const T * boys_table,
int L_ab,
int lc,
T alpha,
T PCx,
T PCy,
T PCz,
T prefactor,
const T * X,
T * Y )

◆ hermite_index()

OCC_GPU_ENABLED OCC_GPU_INLINE constexpr int occ::ints::hermite_index ( int t,
int u,
int v )
constexpr

◆ hermite_sign()

template<typename T>
OCC_GPU_ENABLED OCC_GPU_INLINE constexpr T occ::ints::hermite_sign ( int t,
int u,
int v )
constexpr

Compute Hermite sign factor (-1)^(t+u+v) for a given Hermite index.

◆ hermite_to_aux()

template<typename T>
void occ::ints::hermite_to_aux ( const T * E_c,
const T * Y_p,
int nc,
int nherm_c,
T * g_out )

Eq.

19: Transform from Hermite to aux orbital basis g_r = sum_p E^r_p * Y_p

Parameters
E_cAux E-matrix [nc * nherm_c] row-major
Y_pHermite intermediate [nherm_c]
ncNumber of aux Cartesian functions
nherm_cNumber of aux Hermite functions
g_outOutput [nc] (accumulated)

◆ hermite_to_orbital()

template<typename T>
void occ::ints::hermite_to_orbital ( const T * E_ab,
const T * U_q,
int na,
int nb,
int nherm_ab,
T * J_block,
bool apply_sign = true )

Eq.

22: Transform from Hermite to orbital basis (build J block) J_{mu,nu} = sum_q (-1)^q * E^{mu nu}_q * U_q

Parameters
E_abE-matrix [nab * nherm_ab] row-major
U_qHermite coefficients [nherm_ab] (signs already applied)
na,nbShell sizes
nherm_abNumber of Hermite functions
J_blockOutput [na * nb] (accumulated)
apply_signIf true, apply (-1)^q to U before contraction

◆ ncart()

int occ::ints::ncart ( int L)
constexpr

◆ ncartsum()

int occ::ints::ncartsum ( int L)
constexpr

◆ nherm()

int occ::ints::nherm ( int L)
constexpr

◆ nhermsum()

int occ::ints::nhermsum ( int L)
constexpr

◆ precompute_aux_shell()

template<typename T, int L>
AuxShellData< T > occ::ints::precompute_aux_shell ( int nprim,
const T * exponents,
const T * coeffs,
const T * C )

Precompute auxiliary shell data with gamma-dependent E-coefficients.

Parameters
nprimNumber of primitives
exponentsPrimitive exponents [nprim]
coeffsContraction coefficients [nprim]
CShell center [3]

◆ precompute_aux_shell_dispatch()

template<typename T>
AuxShellData< T > occ::ints::precompute_aux_shell_dispatch ( int lc,
int nprim,
const T * exponents,
const T * coeffs,
const T * C )

Dispatch auxiliary shell precomputation based on runtime angular momentum.

◆ precompute_shell_pair()

template<typename T, int LA, int LB>
ShellPairData< T > occ::ints::precompute_shell_pair ( int na_prim,
int nb_prim,
const T * exponents_a,
const T * exponents_b,
const T * coeffs_a,
const T * coeffs_b,
const T * A,
const T * B )

Precompute ShellPairData for a shell pair.

◆ precompute_shell_pair_dispatch()

template<typename T>
ShellPairData< T > occ::ints::precompute_shell_pair_dispatch ( int la,
int lb,
int na_prim,
int nb_prim,
const T * exponents_a,
const T * exponents_b,
const T * coeffs_a,
const T * coeffs_b,
const T * A,
const T * B )

Dispatch shell pair precomputation based on runtime angular momenta Supports angular momenta up to L=4 (g functions).

◆ spherical_harmonic_factor()

template<typename T>
OCC_GPU_ENABLED OCC_GPU_INLINE constexpr T occ::ints::spherical_harmonic_factor ( int l)
constexpr

◆ split_rij_workspace_sizes()

std::tuple< size_t, size_t, size_t, size_t > occ::ints::split_rij_workspace_sizes ( int max_l_ao,
int max_l_aux )
inline

Compute maximum workspace sizes for Split-RI-J.

Parameters
max_l_aoMaximum AO angular momentum
max_l_auxMaximum aux angular momentum
Returns
Tuple of (max_nherm_ab, max_nherm_c, max_nab, max_nc)

Variable Documentation

◆ E1D_MAX_SIZE

int occ::ints::E1D_MAX_SIZE = (LMAX + 1) * (LMAX + 1) * (2 * LMAX + 1)
constexpr

◆ LMAX

int occ::ints::LMAX = 6
constexpr

◆ RINTS_LMAX

int occ::ints::RINTS_LMAX = 15
constexpr

◆ RINTS_MAX_SIZE

int occ::ints::RINTS_MAX_SIZE = nhermsum(RINTS_LMAX)
constexpr