|
occ
|
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) |
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.
| using occ::ints::BoysDefault = Boys<BoysParamsDefault> |
| using occ::ints::BoysParamsDefault = BoysTableParams<7, 16, 36, 252> |
| using occ::ints::BoysParamsExtended = BoysTableParams<7, 32, 117, 819> |
| using occ::ints::BoysParamsHighRes = BoysTableParams<7, 16, 36, 504> |
| 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).
| 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
| E_c | Aux E-matrix [nc * nherm_c] row-major |
| d_r | Fitted coefficients [nc] |
| nc | Number of aux Cartesian functions |
| nherm_c | Number of aux Hermite functions |
| T_out | Output [nherm_c] |
|
inline |
| OCC_GPU_ENABLED OCC_GPU_INLINE T occ::ints::boys_asymptotic | ( | T | x, |
| int | m ) |
| 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.
| OCC_GPU_ENABLED OCC_GPU_INLINE T occ::ints::boys_evaluate | ( | const T * | table, |
| T | x, | ||
| int | m ) |
| OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::boys_evaluate | ( | const T * | table, |
| T | x, | ||
| int | m0, | ||
| T * | F ) |
|
inline |
| 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.
| OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::boys_interpolate | ( | const T * | table, |
| T | x, | ||
| int | m0, | ||
| T * | F ) |
| 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}.
| lc | Angular momentum |
| gamma | Exponent |
| E_1d | Output: [(lc+1) × (lc+1)] 1D E-coefficients |
| 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.
| E_1d | 1D E-coefficients from build_aux_e_1d |
| lc | Angular momentum |
| E_matrix | Output: [nc × nherm] E-matrix with ket signs baked in |
| 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).
| 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.
| void occ::ints::build_e_matrix | ( | const ECoeffs3D< T, LA, LB > & | E, |
| T * | E_matrix ) |
Build E-matrix for a primitive pair.
| 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)].
| 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.
| shell_pair | Precomputed shell pair data |
| E_ab_out | Output [nab * nherm_ab] row-major |
| 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.
| aux_shell | Precomputed aux shell data |
| E_c_out | Output [nc * nherm_c] row-major |
| OCC_GPU_ENABLED OCC_GPU_INLINE void occ::ints::compute_e_coeffs_1d | ( | T | a, |
| T | b, | ||
| T | XAB, | ||
| ECoeffs1D< T, A, B > & | E ) |
| OCC_GPU_ENABLED void occ::ints::compute_e_coeffs_1d_dynamic | ( | int | la, |
| int | lb, | ||
| T | a, | ||
| T | b, | ||
| T | XAB, | ||
| ECoeffs1DDynamic< T > & | E ) |
| 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 ) |
| 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 ) |
| 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 ) |
| OCC_GPU_ENABLED void occ::ints::compute_r_ints | ( | const T * | boys_table, |
| T | p, | ||
| T | PCx, | ||
| T | PCy, | ||
| T | PCz, | ||
| T * | R_out ) |
| 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.
| 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.
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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) ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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.
| ao_pair | Precomputed AO shell pair data |
| aux_shell | Precomputed aux shell data |
| boys_table | Boys function interpolation table |
| R_pq_out | Output tensor [nherm_ab * nherm_c] |
| 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!
| R_pq | Hermite ERI tensor [nherm_ab * nherm_c] row-major |
| T_p | Hermite aux coefficients [nherm_c] |
| nherm_ab | Rows of R_pq |
| nherm_c | Cols of R_pq |
| U_q | Output [nherm_ab] |
| 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
| R_pq | Hermite ERI tensor [nherm_ab * nherm_c] row-major |
| X_q | Hermite density [nherm_ab] |
| nherm_ab | Rows of R_pq (AO pair Hermite count) |
| nherm_c | Cols of R_pq (aux Hermite count) |
| Y_p | Output [nherm_c] |
| 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.
| D_block | Density matrix block [na * nb] (flattened) |
| E_ab | E-matrix [nab, nherm_ab] row-major (from primitives, accumulated) |
| na,nb | Shell sizes |
| nherm_ab | Number of Hermite functions |
| X_out | Output Hermite density [nherm_ab] |
| apply_sign | If true, apply (-1)^q signs (default true) |
|
inlineconstexpr |
Index of the Cartesian component (i,j,k) in occ's default ordering.
| std::vector< EcpCentre > occ::ints::ecp_centres_from_basis | ( | const occ::gto::AOBasis & | basis | ) |
| std::vector< EcpBasisShell > occ::ints::ecp_shells_from_basis | ( | const occ::gto::AOBasis & | basis | ) |
|
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.
| 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.
| 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)
| shell_P | Precomputed auxiliary shell P data |
| shell_Q | Precomputed auxiliary shell Q data |
| boys_table | Boys function interpolation table |
| integrals | Output: [nc_P, nc_Q] integrals |
| 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
| 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.
| 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.
| 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.
| 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.
| la,lb,lc | Angular momenta |
| na_prim,nb_prim,nc_prim | Number of primitives |
| exponents_a/b/c | Primitive exponents |
| coeffs_a/b/c | Contraction coefficients |
| A,B,C | Shell centers |
| boys_table | Boys function interpolation table |
| integrals | Output buffer [nab × nc] |
| E_ab_workspace | Workspace for E_ab matrix [nab × nherm_ab] |
| E_c_workspace | Workspace for E_c matrix [nc × nherm_c] |
| R_workspace | Workspace for R tensor [nherm_ab × nherm_c] |
| temp_workspace | Workspace for temp matrix [nab × nherm_c] |
| 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)
| ao_pair | Precomputed AO shell pair data |
| aux_shell | Precomputed auxiliary shell data |
| boys_table | Boys function interpolation table |
| integrals | Output: [nab, nc] integrals |
| 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)
|
inline |
Required workspace sizes for eri3c_dynamic_matmul_workspace Returns sizes as tuple: (E_ab_size, E_c_size, R_tensor_size, temp_size).
|
inline |
Maximum workspace sizes given max angular momenta Useful for pre-allocating workspace for all shell combinations.
| 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.
| 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.
| 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.
| 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!
| shell_pair | Precomputed shell pair data |
| npts | Number of grid points |
| C | Grid point coordinates [3 * npts] |
| boys_table | Boys function interpolation table |
| integrals | Output buffer [npts * nab] |
| workspace | Pre-allocated workspace (size >= esp_workspace_size<LA,LB>(npts)) |
| 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.
| a | Exponent of first primitive |
| b | Exponent of second primitive |
| A | Center of first primitive [3] |
| B | Center of second primitive [3] |
| C | Point at which to evaluate potential [3] |
| boys_table | Boys function interpolation table |
| integrals | Output: (la+1)(la+2)/2 × (lb+1)(lb+2)/2 integrals |
The output layout is [Cartesian_a][Cartesian_b] in standard order
| 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.
|
constexpr |
Calculate workspace size for esp_evaluate_with_precomputed.
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
| 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 ) |
|
constexpr |
|
constexpr |
Compute Hermite sign factor (-1)^(t+u+v) for a given Hermite index.
| 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
| E_c | Aux E-matrix [nc * nherm_c] row-major |
| Y_p | Hermite intermediate [nherm_c] |
| nc | Number of aux Cartesian functions |
| nherm_c | Number of aux Hermite functions |
| g_out | Output [nc] (accumulated) |
| 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
| E_ab | E-matrix [nab * nherm_ab] row-major |
| U_q | Hermite coefficients [nherm_ab] (signs already applied) |
| na,nb | Shell sizes |
| nherm_ab | Number of Hermite functions |
| J_block | Output [na * nb] (accumulated) |
| apply_sign | If true, apply (-1)^q to U before contraction |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
| 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.
| nprim | Number of primitives |
| exponents | Primitive exponents [nprim] |
| coeffs | Contraction coefficients [nprim] |
| C | Shell center [3] |
| 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.
| 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.
| 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).
|
constexpr |
|
inline |
Compute maximum workspace sizes for Split-RI-J.
| max_l_ao | Maximum AO angular momentum |
| max_l_aux | Maximum aux angular momentum |
|
constexpr |
|
constexpr |
|
constexpr |