## Documentation for module generic_shg_integrals

Calculation of contracted, spherical Gaussian integrals using the solid harmonic Gaussian (SHG) integral scheme. Routines for the following two-center integrals: i) (a|O(r12)|b) where O(r12) is the overlap, coulomb operator etc. ii) (aba) and (abb) s-overlaps

source: generic_shg_integrals.F

#### public Subroutines/Functions:

obtain integrals (a,b,fb) by symmetry relations from (a,b,fa) if basis sets at a and b are of the same kind, i.e. a and b are same atom type
Calcululates the two-center integrals of the type (a|O(r12)|b) using the SHG scheme
calculate integrals (a,b,fa)
calculate integrals (a,b,fa); requires angular-dependent part as input
calculate integrals (a,b,fb)
calculate integrals (a,b,fb); requires angular-dependent part as input
calculate overlap integrals (a,b)
calculate overlap integrals (a,b); requires angular-dependent part as input
Calcululates the two-center integrals of the type (a|(r-Ra)^(2m)|b) using the SHG scheme
calculate integrals (a|ra^2m)|b); requires angular-dependent part as input
precalculates the angular part of the SHG integrals for the matrices (fa,fb), (a,b), (a,b,fa) and (b,fb,a); the same Waux_mat can then be used for all for integrals; specific for LRIGPW

#### SUBROUTINEget_abb_same_kind(abbint, dabbint, abaint, dabdaint, rab, oba, fba, calculate_forces)^

obtain integrals (a,b,fb) by symmetry relations from (a,b,fa) if basis sets at a and b are of the same kind, i.e. a and b are same atom type

##### Arguments:
 REAL(dp), INTENT(inout) :: abbint(:,:,:) integral (a,b,fb) REAL(dp), INTENT(inout), ALLOCATABLE :: dabbint(:,:,:,:) derivative of abbint REAL(dp), INTENT(inout) :: abaint(:,:,:) integral (a,b,fa) REAL(dp), INTENT(inout), ALLOCATABLE :: dabdaint(:,:,:,:) derivative of abaint REAL(dp), INTENT(in) :: rab(3) distance vector between A and B TYPE(gto_basis_set_type), POINTER :: oba orbital basis at center A TYPE(gto_basis_set_type), POINTER :: fba auxiliary basis set at center A LOGICAL, INTENT(in) :: calculate_forces ...

#### SUBROUTINEint_operators_r12_ab_shg(r12_operator, vab, dvab, rab, fba, fbb, scona_shg, sconb_shg, omega, calculate_forces)^

Calcululates the two-center integrals of the type (a|O(r12)|b) using the SHG scheme

##### Arguments:
 INTEGER, INTENT(in) :: r12_operator the integral operator, which depends on r12=|r1-r2| REAL(dp), INTENT(inout) :: vab(:,:) integral matrix of spherical contracted Gaussian functions REAL(dp), INTENT(inout) :: dvab(:,:,:) derivative of the integrals REAL(dp), INTENT(in) :: rab(3) distance vector between center A and B TYPE(gto_basis_set_type), POINTER :: fba basis at center A TYPE(gto_basis_set_type), POINTER :: fbb basis at center B REAL(dp), POINTER :: scona_shg(:,:,:) SHG contraction matrix for A REAL(dp), POINTER :: sconb_shg(:,:,:) SHG contraction matrix for B REAL(dp), INTENT(in), OPTIONAL :: omega parameter in the operator LOGICAL, INTENT(in) :: calculate_forces ...

#### SUBROUTINEint_overlap_aba_shg(saba, dsaba, rab, oba, obb, fba, scon_obb, scona_mix, oba_index, fba_index, cg_coeff, cg_none0_list, ncg_none0, calculate_forces, screen)^

calculate integrals (a,b,fa)

##### Arguments:
 REAL(dp), INTENT(inout), ALLOCATABLE :: saba(:,:,:) integral [aba] REAL(dp), INTENT(inout), ALLOCATABLE :: dsaba(:,:,:,:) derivative of [aba] REAL(dp), INTENT(in) :: rab(3) distance vector between A and B TYPE(gto_basis_set_type), POINTER :: oba orbital basis at center A TYPE(gto_basis_set_type), POINTER :: obb orbital basis at center B TYPE(gto_basis_set_type), POINTER :: fba auxiliary basis set at center A REAL(dp), INTENT(in) :: scon_obb(:,:,:) contraction matrix for orb bas on B REAL(dp), INTENT(in) :: scona_mix(:,:,:,:) mixed contraction matrix orb + ri basis on A INTEGER, INTENT(in) :: oba_index(:,:,:) orbital basis index for scona_mix INTEGER, INTENT(in) :: fba_index(:,:,:) ri basis index for scona_mix REAL(dp), INTENT(in) :: cg_coeff(:,:,:) Clebsch-Gordon coefficients INTEGER, INTENT(in) :: cg_none0_list(:,:,:) list of none-zero Clebsch-Gordon coefficients INTEGER, INTENT(in) :: ncg_none0(:,:) number of non-zero Clebsch-Gordon coefficients LOGICAL, INTENT(in) :: calculate_forces ... REAL(dp), INTENT(inout) :: screen(:) ...

#### SUBROUTINEint_overlap_aba_shg_low(abaint, dabdaint, rab, oba, obb, fba, scon_obb, scona_mix, oba_index, fba_index, cg_coeff, cg_none0_list, ncg_none0, waux_mat, dwaux_mat, calculate_forces, screen)^

calculate integrals (a,b,fa); requires angular-dependent part as input

##### Arguments:
 REAL(dp), INTENT(inout), ALLOCATABLE :: abaint(:,:,:) integral (a,b,fa) REAL(dp), INTENT(inout), ALLOCATABLE :: dabdaint(:,:,:,:) ... REAL(dp), INTENT(in) :: rab(3) distance vector between A and B TYPE(gto_basis_set_type), POINTER :: oba orbital basis at center A TYPE(gto_basis_set_type), POINTER :: obb orbital basis at center B TYPE(gto_basis_set_type), POINTER :: fba auxiliary basis set at center A REAL(dp), INTENT(in) :: scon_obb(:,:,:) contraction matrix for orb bas on B REAL(dp), INTENT(in) :: scona_mix(:,:,:,:) mixed contraction matrix orb + ri basis on A INTEGER, INTENT(in) :: oba_index(:,:,:) orbital basis index for scona_mix INTEGER, INTENT(in) :: fba_index(:,:,:) ri basis index for scona_mix REAL(dp), INTENT(in) :: cg_coeff(:,:,:) Clebsch-Gordon coefficients INTEGER, INTENT(in) :: cg_none0_list(:,:,:) list of none-zero Clebsch-Gordon coefficients INTEGER, INTENT(in) :: ncg_none0(:,:) number of non-zero Clebsch-Gordon coefficients REAL(dp), INTENT(in) :: waux_mat(:,:,:) W matrix that contains the angular-dependent part REAL(dp), INTENT(in) :: dwaux_mat(:,:,:,:) derivative of the W matrix LOGICAL, INTENT(in) :: calculate_forces ... REAL(dp), INTENT(inout) :: screen(:) ...

#### SUBROUTINEint_overlap_abb_shg(sabb, dsabb, rab, oba, obb, fbb, scon_oba, sconb_mix, obb_index, fbb_index, cg_coeff, cg_none0_list, ncg_none0, calculate_forces, screen)^

calculate integrals (a,b,fb)

##### Arguments:
 REAL(dp), INTENT(inout), ALLOCATABLE :: sabb(:,:,:) integral [abb] REAL(dp), INTENT(inout), ALLOCATABLE :: dsabb(:,:,:,:) derivative of [abb] REAL(dp), INTENT(in) :: rab(3) distance vector between A and B TYPE(gto_basis_set_type), POINTER :: oba orbital basis at center A TYPE(gto_basis_set_type), POINTER :: obb orbital basis at center B TYPE(gto_basis_set_type), POINTER :: fbb auxiliary basis set at center B REAL(dp), INTENT(in) :: scon_oba(:,:,:) contraction matrix for orb bas on A REAL(dp), INTENT(in) :: sconb_mix(:,:,:,:) mixed contraction matrix orb + ri basis on B INTEGER, INTENT(in) :: obb_index(:,:,:) orbital basis index for sconb_mix INTEGER, INTENT(in) :: fbb_index(:,:,:) ri basis index for sconb_mix REAL(dp), INTENT(in) :: cg_coeff(:,:,:) Clebsch-Gordon coefficients INTEGER, INTENT(in) :: cg_none0_list(:,:,:) list of none-zero Clebsch-Gordon coefficients INTEGER, INTENT(in) :: ncg_none0(:,:) number of non-zero Clebsch-Gordon coefficients LOGICAL, INTENT(in) :: calculate_forces ... REAL(dp), INTENT(inout) :: screen(:) ...

#### SUBROUTINEint_overlap_abb_shg_low(abbint, dabbint, rab, oba, obb, fbb, scon_oba, sconb_mix, obb_index, fbb_index, cg_coeff, cg_none0_list, ncg_none0, waux_mat, dwaux_mat, calculate_forces, screen)^

calculate integrals (a,b,fb); requires angular-dependent part as input

##### Arguments:
 REAL(dp), INTENT(inout), ALLOCATABLE :: abbint(:,:,:) integral (a,b,fb) REAL(dp), INTENT(inout), ALLOCATABLE :: dabbint(:,:,:,:) derivative of abbint REAL(dp), INTENT(in) :: rab(3) distance vector between A and B TYPE(gto_basis_set_type), POINTER :: oba orbital basis at center A TYPE(gto_basis_set_type), POINTER :: obb orbital basis at center B TYPE(gto_basis_set_type), POINTER :: fbb auxiliary basis set at center B REAL(dp), INTENT(in) :: scon_oba(:,:,:) contraction matrix for orb bas on A REAL(dp), INTENT(in) :: sconb_mix(:,:,:,:) mixed contraction matrix orb + ri basis on B INTEGER, INTENT(in) :: obb_index(:,:,:) orbital basis index for sconb_mix INTEGER, INTENT(in) :: fbb_index(:,:,:) ri basis index for sconb_mix REAL(dp), INTENT(in) :: cg_coeff(:,:,:) Clebsch-Gordon coefficients INTEGER, INTENT(in) :: cg_none0_list(:,:,:) list of none-zero Clebsch-Gordon coefficients INTEGER, INTENT(in) :: ncg_none0(:,:) number of non-zero Clebsch-Gordon coefficients REAL(dp), INTENT(in) :: waux_mat(:,:,:) W matrix that contains the angular-dependent part REAL(dp), INTENT(in) :: dwaux_mat(:,:,:,:) derivative of the W matrix LOGICAL, INTENT(in) :: calculate_forces ... REAL(dp), INTENT(inout) :: screen(:) ...

#### SUBROUTINEint_overlap_ab_shg(vab, dvab, rab, fba, fbb, scona_shg, sconb_shg, calculate_forces)^

calculate overlap integrals (a,b)

##### Arguments:
 REAL(dp), INTENT(inout), ALLOCATABLE :: vab(:,:) integral (a,b) REAL(dp), INTENT(inout), ALLOCATABLE :: dvab(:,:,:) derivative of sab REAL(dp), INTENT(in) :: rab(3) distance vector TYPE(gto_basis_set_type), POINTER :: fba basis at center A TYPE(gto_basis_set_type), POINTER :: fbb basis at center B REAL(dp), INTENT(in) :: scona_shg(:,:,:) contraction matrix A REAL(dp), INTENT(in) :: sconb_shg(:,:,:) contraxtion matrix B LOGICAL, INTENT(in) :: calculate_forces ...

#### SUBROUTINEint_overlap_ab_shg_low(sab, dsab, rab, fba, fbb, scona_shg, sconb_shg, waux_mat, dwaux_mat, calculate_forces, contraction_high)^

calculate overlap integrals (a,b); requires angular-dependent part as input

##### Arguments:
 REAL(dp), INTENT(inout), ALLOCATABLE :: sab(:,:) integral (a,b) REAL(dp), INTENT(inout), ALLOCATABLE :: dsab(:,:,:) derivative of sab REAL(dp), INTENT(in) :: rab(3) distance vector TYPE(gto_basis_set_type), POINTER :: fba basis at center A TYPE(gto_basis_set_type), POINTER :: fbb basis at center B REAL(dp), INTENT(in) :: scona_shg(:,:,:) contraction matrix A REAL(dp), INTENT(in) :: sconb_shg(:,:,:) contraxtion matrix B REAL(dp), INTENT(in) :: waux_mat(:,:,:) W matrix that contains the angular-dependent part REAL(dp), INTENT(in) :: dwaux_mat(:,:,:,:) derivative of the W matrix LOGICAL, INTENT(in) :: calculate_forces ... LOGICAL, INTENT(in), OPTIONAL :: contraction_high ...

#### SUBROUTINEint_ra2m_ab_shg(vab, dvab, rab, fba, fbb, scon_ra2m, sconb_shg, m, calculate_forces)^

Calcululates the two-center integrals of the type (a|(r-Ra)^(2m)|b) using the SHG scheme

##### Arguments:
 REAL(dp), INTENT(inout) :: vab(:,:) integral matrix of spherical contracted Gaussian functions REAL(dp), INTENT(inout) :: dvab(:,:,:) derivative of the integrals REAL(dp), INTENT(in) :: rab(3) distance vector between center A and B TYPE(gto_basis_set_type), POINTER :: fba basis at center A TYPE(gto_basis_set_type), POINTER :: fbb basis at center B REAL(dp), INTENT(in) :: scon_ra2m(:,:,:,:) contraction matrix for A including the combinatorial factors REAL(dp), INTENT(in) :: sconb_shg(:,:,:) SHG contraction matrix for B INTEGER, INTENT(in) :: m exponent in (r-Ra)^(2m) operator LOGICAL, INTENT(in) :: calculate_forces ...

#### SUBROUTINEint_ra2m_ab_shg_low(vab, dvab, rab, fba, fbb, sconb_shg, scon_ra2m, m, waux_mat, dwaux_mat, calculate_forces)^

calculate integrals (a|ra^2m)|b); requires angular-dependent part as input

##### Arguments:
 REAL(dp), INTENT(inout) :: vab(:,:) integral matrix of spherical contracted Gaussian functions REAL(dp), INTENT(inout) :: dvab(:,:,:) derivative of the integrals REAL(dp), INTENT(in) :: rab(3) distance vector between center A and B TYPE(gto_basis_set_type), POINTER :: fba basis at center A TYPE(gto_basis_set_type), POINTER :: fbb basis at center B REAL(dp), INTENT(in) :: sconb_shg(:,:,:) SHG contraction matrix for B REAL(dp), INTENT(in) :: scon_ra2m(:,:,:,:) contraction matrix for A including the combinatorial factors INTEGER, INTENT(in) :: m exponent in (r-Ra)^(2m) operator REAL(dp), INTENT(in) :: waux_mat(:,:,:) W matrix that contains the angular-dependent part REAL(dp), INTENT(in) :: dwaux_mat(:,:,:,:) derivative of the W matrix LOGICAL, INTENT(in) :: calculate_forces ...

#### SUBROUTINElri_precalc_angular_shg_part(oba, obb, fba, fbb, rab, waux_mat, dwaux_mat, calculate_forces)^

precalculates the angular part of the SHG integrals for the matrices (fa,fb), (a,b), (a,b,fa) and (b,fb,a); the same Waux_mat can then be used for all for integrals; specific for LRIGPW

##### Arguments:
 TYPE(gto_basis_set_type), POINTER :: oba orbital basis on a TYPE(gto_basis_set_type), POINTER :: obb orbital basis on b TYPE(gto_basis_set_type), POINTER :: fba aux basis on a TYPE(gto_basis_set_type), POINTER :: fbb aux basis on b REAL(dp), INTENT(in) :: rab(3) distance vector between a and b REAL(dp), INTENT(out), ALLOCATABLE :: waux_mat(:,:,:) W matrix that contains the angular-dependent part REAL(dp), INTENT(out), ALLOCATABLE :: dwaux_mat(:,:,:,:) derivative of the W matrix LOGICAL, INTENT(in) :: calculate_forces ...