## Documentation for module eri_mme_lattice_summation

Ewald sums to represent integrals in direct and reciprocal lattice.

source: eri_mme_lattice_summation.F

#### public Subroutines/Functions:

Compute bounding box for ellipsoid. This is needed in order to find summation bounds for sphere for sums over non-orthogonal lattice vectors.
Get summation bounds for 2c integrals
Get summation bounds for 3c integrals
get_l (lco, l, lx, ly, lz)
...
pgf_sum_2c_gspace_1d (s_g, r, alpha, inv_lgth, g_c)
Compute Ewald-like sum for 2-center ERIs in G space in 1 dimension S_G(l, alpha) = (-i)^l*inv_lgth*sum_G( C(l, alpha, G) exp(iGR) ), with C(l, alpha, r) = r^l exp(-alpha*r^2), dG = inv_lgth*twopi and G = -G_bound*dG, (-G_bound + 1)*dG, ..., G_bound*dG for all l < = l_max.
Compute 1d sum S_G(l, alpha) = inv_lgth*sum_G( C(l, alpha, delta_l, G) ) with C(l, alpha, delta_l, G) = prefactor*|G|^(l-delta_l) exp(-alpha*G^2) if G not equal 0 C(l = 0, alpha, delta_l, 0) = 1, C(l>0, alpha, delta_l, 0) = 0 dG = inv_lgth*twopi and G = -G_bound*dG, (-G_bound + 1)*dG, ..., G_bound*dG for all l < = l_max.
As pgf_sum_2c_gspace_1d but 3d sum required for non-orthorhombic cells
pgf_sum_2c_rspace_1d (s_r, r, alpha, lgth, r_c)
Compute Ewald-like sum for 2-center ERIs in R space in 1 dimension S_R(l, alpha) = SQRT(alpha/pi) sum_R'( H(l, alpha, R-R') ), with H(l, alpha, R) = (-d/dR)^l exp(-alpha*R^2), dR = lgth and R' = -R_min*dR, (-R_min + 1)*dR, ..., R_max*dR, for all l < = l_max.
pgf_sum_2c_rspace_3d (s_r, l_max, r, alpha, hmat, h_inv, r_c, r_rad)
As pgf_sum_2c_rspace_1d but 3d sum required for non-orthorhombic cells
Compute Ewald-like sum for 3-center integrals in 1 dimension S_G(l, m, n, alpha, beta, gamma) = i^(l+m+n)*(-1)^(l+m)*inv_lgth^2* sum_G sum_G'( exp(i G R1) C(l,alpha,G) C(m,beta,G'-G) C(n,gamma,G') exp(i G' R2) ) for all l < = l_max, m <= m_max, n <= n_max. a_mm is the minimax exponent. alpha = 1/(4 zeta), beta = 1/(4 zetb), gamma = 1/(4 zetc) + a_mm R1 = RB-RA; R2 = RC-RB Note on method / order arguments: Three equivalent methods (Poisson summation) to compute this sum over Cartesian Gaussians C or Hermite Gaussians H and reciprocal lattice vectors G or direct lattice vectors R: - method 1: sum_G sum_G' C(G) C(G,G') C(G') - method 2: sum_G sum_R C(G) C(R) - method 3: sum_R sum_R' H(R, R') The order parameter selects the Gaussian functions over which the sum is performed method 1: order = 1, 2, 3 method 2: order = 1, 2, 3 method 3: order = 1 If method and order are not present, the method / order that converges fastest is automatically chosen.
As pgf_sum_3c_1d but 3d sum required for non-orthorhombic cells

Compute bounding box for ellipsoid. This is needed in order to find summation bounds for sphere for sums over non-orthogonal lattice vectors.

 Return Value :: REAL(dp)
##### Arguments:
 REAL(dp), INTENT(in) :: s_rad sphere radius REAL(dp), INTENT(in) :: s_to_e(3,3) sphere to ellipsoid trafo

#### SUBROUTINEeri_mme_2c_get_bounds(hmat, h_inv, vol, is_ortho, g_min, r_min, la_max, lb_max, zeta, zetb, a_mm, sum_precision, n_sum_1d, n_sum_3d, g_bounds, g_rad, r_bounds, r_rad)^

Get summation bounds for 2c integrals

##### Arguments:
 REAL(dp), INTENT(in) :: hmat(3,3) ... REAL(dp), INTENT(in) :: h_inv(3,3) ... REAL(dp), INTENT(in) :: vol ... LOGICAL, INTENT(in) :: is_ortho ... REAL(dp), INTENT(in) :: g_min ... REAL(dp), INTENT(in) :: r_min ... INTEGER, INTENT(in) :: la_max ... INTEGER, INTENT(in) :: lb_max ... REAL(dp), INTENT(in) :: zeta ... REAL(dp), INTENT(in) :: zetb ... REAL(dp), INTENT(in) :: a_mm ... REAL(dp), INTENT(in) :: sum_precision ... INTEGER(int_8), INTENT(out) :: n_sum_1d(2,3) ... INTEGER(int_8), INTENT(out) :: n_sum_3d(2) ... REAL(dp), INTENT(out) :: g_bounds(3) ... REAL(dp), INTENT(out) :: g_rad ... REAL(dp), INTENT(out) :: r_bounds(3) ... REAL(dp), INTENT(out) :: r_rad ...

#### SUBROUTINEeri_mme_3c_get_bounds(hmat, h_inv, vol, is_ortho, g_min, r_min, la_max, lb_max, lc_max, zeta, zetb, zetc, a_mm, sum_precision, n_sum_1d, n_sum_3d, g_bounds_1, g_rads_1, r_bounds_2, r_rads_2, r_bounds_3, r_rads_3)^

Get summation bounds for 3c integrals

##### Arguments:
 REAL(dp), INTENT(in) :: hmat(3,3) ... REAL(dp), INTENT(in) :: h_inv(3,3) ... REAL(dp), INTENT(in) :: vol ... LOGICAL, INTENT(in) :: is_ortho ... REAL(dp), INTENT(in) :: g_min ... REAL(dp), INTENT(in) :: r_min ... INTEGER, INTENT(in) :: la_max ... INTEGER, INTENT(in) :: lb_max ... INTEGER, INTENT(in) :: lc_max ... REAL(dp), INTENT(in) :: zeta ... REAL(dp), INTENT(in) :: zetb ... REAL(dp), INTENT(in) :: zetc ... REAL(dp), INTENT(in) :: a_mm ... REAL(dp), INTENT(in) :: sum_precision ... INTEGER(int_8), INTENT(out) :: n_sum_1d(3,3) ... INTEGER(int_8), INTENT(out) :: n_sum_3d(3) ... REAL(dp) :: g_bounds_1(3,3) ... REAL(dp), INTENT(out) :: g_rads_1(3) ... REAL(dp) :: r_bounds_2(3,3) ... REAL(dp), INTENT(out) :: r_rads_2(3) ... REAL(dp) :: r_bounds_3(2,3) ... REAL(dp), INTENT(out) :: r_rads_3(2) ...

#### PURE ELEMENTAL SUBROUTINEget_l(lco, l, lx, ly, lz)^

...

##### Arguments:
 INTEGER, INTENT(in) :: lco ... INTEGER, INTENT(out) :: l ... INTEGER, INTENT(out), OPTIONAL :: lx ... INTEGER, INTENT(out), OPTIONAL :: ly ... INTEGER, INTENT(out), OPTIONAL :: lz ...

#### PURE SUBROUTINEpgf_sum_2c_gspace_1d(s_g, r, alpha, inv_lgth, g_c)^

Compute Ewald-like sum for 2-center ERIs in G space in 1 dimension S_G(l, alpha) = (-i)^l*inv_lgth*sum_G( C(l, alpha, G) exp(iGR) ), with C(l, alpha, r) = r^l exp(-alpha*r^2), dG = inv_lgth*twopi and G = -G_bound*dG, (-G_bound + 1)*dG, ..., G_bound*dG for all l < = l_max.

##### Arguments:
 REAL(dp), INTENT(out) :: s_g(0:) ... REAL(dp), INTENT(in) :: r ... REAL(dp), INTENT(in) :: alpha ... REAL(dp), INTENT(in) :: inv_lgth ... REAL(dp), INTENT(in) :: g_c ...

#### PURE SUBROUTINEpgf_sum_2c_gspace_1d_deltal(s_g, alpha, inv_lgth, g_min, g_c, delta_l, prefactor)^

Compute 1d sum S_G(l, alpha) = inv_lgth*sum_G( C(l, alpha, delta_l, G) ) with C(l, alpha, delta_l, G) = prefactor*|G|^(l-delta_l) exp(-alpha*G^2) if G not equal 0 C(l = 0, alpha, delta_l, 0) = 1, C(l>0, alpha, delta_l, 0) = 0 dG = inv_lgth*twopi and G = -G_bound*dG, (-G_bound + 1)*dG, ..., G_bound*dG for all l < = l_max.

##### Arguments:
 REAL(dp), INTENT(out) :: s_g(0:) ... REAL(dp), INTENT(in) :: alpha ... REAL(dp), INTENT(in) :: inv_lgth ... INTEGER, INTENT(in) :: g_min ... INTEGER, INTENT(in) :: g_c ... REAL(dp), INTENT(in) :: delta_l ... REAL(dp), INTENT(in) :: prefactor ...

#### PURE SUBROUTINEpgf_sum_2c_gspace_3d(s_g, l_max, r, alpha, h_inv, g_c, g_rad, vol, coulomb)^

As pgf_sum_2c_gspace_1d but 3d sum required for non-orthorhombic cells

##### Arguments:
 REAL(dp), INTENT(out) :: s_g(:) ... INTEGER, INTENT(in) :: l_max ... REAL(dp), INTENT(in) :: r(3) ... REAL(dp), INTENT(in) :: alpha ... REAL(dp), INTENT(in) :: h_inv(3,3) ... REAL(dp), INTENT(in) :: g_c(3) ... REAL(dp), INTENT(in) :: g_rad ... REAL(dp), INTENT(in) :: vol ... LOGICAL, INTENT(in), OPTIONAL :: coulomb ...

#### PURE SUBROUTINEpgf_sum_2c_rspace_1d(s_r, r, alpha, lgth, r_c)^

Compute Ewald-like sum for 2-center ERIs in R space in 1 dimension S_R(l, alpha) = SQRT(alpha/pi) sum_R'( H(l, alpha, R-R') ), with H(l, alpha, R) = (-d/dR)^l exp(-alpha*R^2), dR = lgth and R' = -R_min*dR, (-R_min + 1)*dR, ..., R_max*dR, for all l < = l_max.

##### Arguments:
 REAL(dp), INTENT(out) :: s_r(0:) ... REAL(dp), INTENT(in) :: r ... REAL(dp), INTENT(in) :: alpha ... REAL(dp), INTENT(in) :: lgth ... REAL(dp), INTENT(in) :: r_c ...

#### PURE SUBROUTINEpgf_sum_2c_rspace_3d(s_r, l_max, r, alpha, hmat, h_inv, r_c, r_rad)^

As pgf_sum_2c_rspace_1d but 3d sum required for non-orthorhombic cells

##### Arguments:
 REAL(dp), INTENT(out) :: s_r(:) ... INTEGER, INTENT(in) :: l_max ... REAL(dp), INTENT(in) :: r(3) ... REAL(dp), INTENT(in) :: alpha ... REAL(dp), INTENT(in) :: hmat(3,3) ... REAL(dp), INTENT(in) :: h_inv(3,3) ... REAL(dp), INTENT(in) :: r_c(3) ... REAL(dp), INTENT(in) :: r_rad ...

#### SUBROUTINEpgf_sum_3c_1d(s_g, ra, rb, rc, zeta, zetb, zetc, a_mm, lgth, g_bounds_1, r_bounds_2, r_bounds_3, method, method_out, order)^

Compute Ewald-like sum for 3-center integrals in 1 dimension S_G(l, m, n, alpha, beta, gamma) = i^(l+m+n)*(-1)^(l+m)*inv_lgth^2* sum_G sum_G'( exp(i G R1) C(l,alpha,G) C(m,beta,G'-G) C(n,gamma,G') exp(i G' R2) ) for all l < = l_max, m <= m_max, n <= n_max. a_mm is the minimax exponent. alpha = 1/(4 zeta), beta = 1/(4 zetb), gamma = 1/(4 zetc) + a_mm R1 = RB-RA; R2 = RC-RB Note on method / order arguments: Three equivalent methods (Poisson summation) to compute this sum over Cartesian Gaussians C or Hermite Gaussians H and reciprocal lattice vectors G or direct lattice vectors R: - method 1: sum_G sum_G' C(G) C(G,G') C(G') - method 2: sum_G sum_R C(G) C(R) - method 3: sum_R sum_R' H(R, R') The order parameter selects the Gaussian functions over which the sum is performed method 1: order = 1, 2, 3 method 2: order = 1, 2, 3 method 3: order = 1 If method and order are not present, the method / order that converges fastest is automatically chosen.

##### Arguments:
 REAL(dp), INTENT(out) :: s_g(0:,0:,0:) ... REAL(dp), INTENT(in) :: ra ... REAL(dp), INTENT(in) :: rb ... REAL(dp), INTENT(in) :: rc ... REAL(dp), INTENT(in) :: zeta ... REAL(dp), INTENT(in) :: zetb ... REAL(dp), INTENT(in) :: zetc ... REAL(dp), INTENT(in) :: a_mm ... REAL(dp), INTENT(in) :: lgth ... REAL(dp), INTENT(in) :: g_bounds_1(3) ... REAL(dp), INTENT(in) :: r_bounds_2(3) ... REAL(dp), INTENT(in) :: r_bounds_3(2) ... INTEGER, INTENT(in) :: method ... INTEGER, INTENT(out), OPTIONAL :: method_out ... INTEGER, INTENT(in), OPTIONAL :: order ...

#### SUBROUTINEpgf_sum_3c_3d(s_g, la_max, lb_max, lc_max, ra, rb, rc, zeta, zetb, zetc, a_mm, hmat, h_inv, vol, g_bounds_1, r_bounds_2, r_bounds_3, g_rads_1, r_rads_2, r_rads_3, method, method_out, order)^

As pgf_sum_3c_1d but 3d sum required for non-orthorhombic cells

##### Arguments:
 REAL(dp), INTENT(out) :: s_g(:,:,:) ... INTEGER, INTENT(in) :: la_max ... INTEGER, INTENT(in) :: lb_max ... INTEGER, INTENT(in) :: lc_max ... REAL(dp), INTENT(in) :: ra(3) ... REAL(dp), INTENT(in) :: rb(3) ... REAL(dp), INTENT(in) :: rc(3) ... REAL(dp), INTENT(in) :: zeta ... REAL(dp), INTENT(in) :: zetb ... REAL(dp), INTENT(in) :: zetc ... REAL(dp), INTENT(in) :: a_mm ... REAL(dp), INTENT(in) :: hmat(3,3) ... REAL(dp), INTENT(in) :: h_inv(3,3) ... REAL(dp), INTENT(in) :: vol ... REAL(dp), INTENT(in) :: g_bounds_1(3,3) ... REAL(dp), INTENT(in) :: r_bounds_2(3,3) ... REAL(dp), INTENT(in) :: r_bounds_3(2,3) ... REAL(dp), INTENT(in) :: g_rads_1(3) ... REAL(dp), INTENT(in) :: r_rads_2(3) ... REAL(dp), INTENT(in) :: r_rads_3(2) ... INTEGER, INTENT(in) :: method ... INTEGER, INTENT(out), OPTIONAL :: method_out ... INTEGER, INTENT(in), OPTIONAL :: order ...