GBTOlib: library for evaluation of molecular integrals in mixed Gaussian / B-spline basis  111
Data Types | Functions/Subroutines
bto_gto_integrals_mod Module Reference

Functions/Subroutines

subroutine precalculate_Xlm_for_nuclei (nuclei, max_l)
 Calculates the real spherical harmonics for all l,m up to l=max_l for directions corresponding to the nuclear positions. More...
 
subroutine precalculate_Xlm_for_CGTO_center (RA, max_l, Xlm_CGTO_center)
 Calculates the real spherical harmonics for all l,m up to l=max_l for directions corresponding to the nuclear positions. More...
 
subroutine precalculate_Xlm_for_CGTO_product_center (n_contr_pairs, RA, max_l, Xlm_product_CGTO_center)
 
subroutine, public BTO_GTO_one_electron_integrals (cms_bto, cgto, nuclei, integrals)
 Calculates the one electron mixed integrals between the given shell of CGTOs and all BTOs. It is required that the first break point of the BTO grid lies radially behind the center of the CGTO. The nuclei that form the nuclear potential is also required to lie radially before the BTOs. The calculated integrals are output in the array integrals in the order: (BTO m,BTO l,BTO ind),(CGTO m),(integral type). The types of integrals calculated here are the following: overlap=1,kinetic energy=2,nuclear attraction=3,property (up to l=2)=4,...,12. More...
 
subroutine radial_grid_CGTO (cgto, cms_bto, threshold, x, w, n, n_rng_knot, r_points, weights, n_total_points, R_grid, R_true)
 Determines the radial grid needed to describe, within the accuracy threshold, integrals involving the CGTO and the B-splines on the given grid. We assume that if the CGTO spanned the whole B-spline grid it would be sufficient to use the given quadrature rule (x,w,n) within each knot interval. For CGTOs whose radial extent is smaller than the range of the B-spline grid the number of quadrature points within each knot interval is expanded by the factor ceiling(n_int/R), where R is the extent of the CGTO (determined to coincide with the nearest larger knot) and n_int is the number of distinct intervals of knots in the B-spline basis. More...
 
subroutine, public radial_grid_CGTO_pair (cgto_1, cgto_2, threshold, rmat_radius, x, w, n, n_rng_knot, r_points, weights, n_total_points, R_min, R_max)
 Determines the radial grid needed to describe, within the accuracy threshold, integrals involving the CGTO and the B-splines on the given grid. We assume that if the CGTO spanned the whole B-spline grid it would be sufficient to use the given quadrature rule (x,w,n) within each knot interval. For CGTOs whose radial extent is smaller than the range of the B-spline grid the number of quadrature points within each knot interval is expanded by the factor ceiling(n_int/R), where R is the extent of the CGTO (determined to coincide with the nearest larger knot) and n_int is the number of distinct intervals of knots in the B-spline basis. More...
 
subroutine, public BTO_GTO_two_el_BB_GG (cgto_shell_1, cgto_shell_2, cms_bto, integrals)
 
subroutine omp_radial_integrals_legendre_bsplines (cms_bto, bspline_start_end_r2, legendre_rad, max_l_legendre, r2, w2, n2_total_points, r1, w1, n1_total_points, R_l_ints)
 
subroutine bspline_quadrature_grid (cms_bto, x, w, n, r_points, weights, n_total_points)
 Construct the G-L quadrature rule of the given order between each consecutive pair of knots. More...
 
subroutine, public BTO_GTO_two_el_BG_GG (cgto_shell_1, cgto_shell_2, cms_bto, cgto_shell_3, integrals)
 
subroutine construct_dense_grid_from_sparse_grid (cms_bto, R_max, x_t, w_t, n_t, n_rng_knot, r_sparse, n_sparse_total_points, x, w, n, n_dense_total_points, r_dense, w_dense)
 Takes the quadrature grid r_sparse and constructs from it another grid which contains 2*n+1 quadrature points of the rule x,w in between the quadrature points of the r_sparse grid. The resulting quadrature grid is in r_dense,w_dense and has n_dense_total_points points. The dense grid extends only up to the r_dense point not greater than R_max. More...
 
subroutine, public BTO_GTO_two_el_BG_BG (cgto_shell_1, cgto_shell_2, cms_bto, integrals)
 
subroutine omp_calc_legendre_radial (max_l_legendre, r1, r2, legendre_rad)
 Calculates the part of the Legendre expansion which depends on the B-spline and the radial part of the Legendre expansion. This is calculated on the radial grid r2. The quadrature weights are multiplied in as well. These terms are needed to compute the Y function of the second electron. More...
 
subroutine omp_calculate_Y_BG (cms_bto, last_bspline, lb, mb, cgto_pw_expansion, bspline_start_end_r2, max_l_legendre, n1_total_points, n2_total_points, n_cgto_m, legendre_rad, B_w_r2, Y_mp, Y, r1)
 Calculates the Y function on the radial grid r1 for a given radial B-spline and all its angular parts and all angular parts of the CGTO. The grid at which the CGTO pw expansion has been evaluated is given in r2. More...
 
subroutine omp_mult_gaunt_into_angular_integrals (angular_integrals, l_max, lp_max, gaunt_angular_integrals)
 Multiplies the angular integrals by the Gaunt coefficients and sums over the pp indices. More...
 
subroutine sum_mp_legendre (gaunt_angular_integrals, r_points, weights, Lg, lp_max, l_max, nuclei, nuclei_RA, lp_integrals)
 
subroutine integrate_legendre (lp_integrals, bto_norms, bto_val_0, bto_knots, bto_order, bto_n, Lg, lp_max, l_max, integrals)
 
subroutine swap_dim_1_with_3 (array_in, array_out)
 Naive cyclic swap: dimensions 1,2,3 -> 2,3,1. No cache blocking. More...
 
subroutine, public omp_calculate_CGTO_pw_coefficients_analytic (max_l, cgto, r_points, angular_integrals)
 Calculates the partial wave expansion of CGTO up to partial wave L=max_l and on the grid of radial points r_points. More...
 
real(kind=cfp) function CGTO_pw_coefficient (r, l, Lg, Mg, c_lambda, contraction_besi)
 
real(kind=cfp) function CGTO_pw_coefficient_stable (asym, r, l, lm, Lg, Lg_Mg, c_lambda, contraction_besi, prim_fac, n_prim, besi_args)
 
subroutine, public omp_calculate_CGTO_pair_pw_coefficients_analytic (max_l, cgto_A, cgto_B, r_points, angular_integrals)
 Calculates the partial wave expansion of a product of two CGTOs up to partial wave L=max_l and on the grid of radial points r_points. More...
 
real(kind=cfp) function CGTO_pair_pw_coefficient (r, l, Lg_A, Mg_A, Lg_B, Mg_B, c_pair_lambda, n_contr_pairs, contraction_besi)
 
subroutine precalculate_pair_solh_translation_coeffs (CGTO_A_L, RA_A, Xlm_CGTO_A_center, CGTO_B_L, RA_B, Xlm_CGTO_B_center, transl_cfs_AB)
 
subroutine precalculate_solh_translation_coeffs (CGTO_L, RA, Xlm_CGTO_center, transl_cfs)
 
subroutine calculate_pair_lambda_couplings (l, m, CGTO_A_L, CGTO_B_L, n_contr_pairs, Xlm_product_CGTO_center, transl_cfs_AB, c_pair_lambda)
 
real(kind=cfp) function besi_half_asym (z, l)
 
subroutine, public calculate_Tl_matrix (bspline_sol, Tl)
 
real(wp) function, public wp_eval_radial_free_bspline (data, x)
 
real(ep1) function, public ep_eval_radial_free_bspline (data, x)
 
subroutine, public solve_poisson_equation (bspline_sol, Tl, source_term, r1, r2, r, w, n_total_points, max_l, l, A, B, bspline_cfs)
 Solves the Poission equation for a given angular momentum value (l) and for the source term evaluated on a given quadrature grid. More...
 
subroutine calculate_CGTO_pair_pw_coefficients_numerical (max_l, cgto_A, cgto_B, r, angular_integrals, epsrel, epsabs)
 Calculates partial wave expansion for the product of a pair of CGTOs. More...
 
real(kind=cfp) function, dimension(2 *cgto_b%l+1, 2 *cgto_a%l+1) gto_pair_eval_R_all_m (cgto_A, cgto_B, x, R)
 Evaluates the product of a pair of CGTOs for all m values at radial distance x and for angular direction given by vector R. More...
 
subroutine calculate_CGTO_pw_coefficients_numerical (converged, max_l, cgto, RA, r, angular_integrals, epsrel, epsabs, nuclei, nuclei_RA)
 Assumes that the Xlm have been precalculated on the Lebedev grid and that the Xlm for the nuclei have been precalculated for all l up to l=max_l+cgtol. This routine attempts to integrate using the Lebedev grid until the required relative precision. If the relative precision cannot be reached then we first check if the integral is smaller than epsabs. If it is then we regard it as converged otherwise we resort to the adaptive quadrature - now this is extremely slow and therefore it is used only as a last resort. More...
 
real(kind=cfp) function, dimension(2 *cgto_inp%l+1) gto_eval_R_all_m (cgto_inp, x, R)
 Evaluates CGTO for all m values at radial distance x and for angular direction given by vector R. More...
 
real(kind=cfp) function nuclear_potential (nuclei, n, x, R)
 Evaluates the nuclear attraction potential for electron at point: x*R(1:3). More...
 
real(kind=cfp) function, public eval_Xlm_x_cgto_surface (this, x, y)
 Evaluates the product of CGTO and a real spherical harmonic at a given point in space. x,y are the spherical polar coordinates on the sphere. More...
 
real(kind=cfp) function gto_eval_R (cgto_inp, x, R)
 Evaluates CGTO at radial distance x and for angular direction given by vector R. More...
 
subroutine, public calc_resh_coefficients (L)
 
subroutine, public calc_solh_coefficients (L)
 

Function/Subroutine Documentation

◆ besi_half_asym()

real(kind=cfp) function bto_gto_integrals_mod::besi_half_asym ( real(kind=cfp), intent(in)  z,
integer, intent(in)  l 
)
Here is the call graph for this function:

◆ bspline_quadrature_grid()

subroutine bto_gto_integrals_mod::bspline_quadrature_grid ( type(bto_data), intent(inout)  cms_bto,
real(kind=cfp), dimension(2*n+1), intent(in)  x,
real(kind=cfp), dimension(2*n+1), intent(in)  w,
integer, intent(in)  n,
real(kind=cfp), dimension(:), allocatable  r_points,
real(kind=cfp), dimension(:), allocatable  weights,
integer, intent(out)  n_total_points 
)

Construct the G-L quadrature rule of the given order between each consecutive pair of knots.

◆ BTO_GTO_one_electron_integrals()

subroutine, public bto_gto_integrals_mod::BTO_GTO_one_electron_integrals ( type(bto_data), intent(inout)  cms_bto,
type(cgto_data), intent(inout)  cgto,
type(nucleus_type), dimension(:), intent(in)  nuclei,
real(kind=cfp), dimension(:,:,:), allocatable  integrals 
)

Calculates the one electron mixed integrals between the given shell of CGTOs and all BTOs. It is required that the first break point of the BTO grid lies radially behind the center of the CGTO. The nuclei that form the nuclear potential is also required to lie radially before the BTOs. The calculated integrals are output in the array integrals in the order: (BTO m,BTO l,BTO ind),(CGTO m),(integral type). The types of integrals calculated here are the following: overlap=1,kinetic energy=2,nuclear attraction=3,property (up to l=2)=4,...,12.

Warning
The integrals are calculated for the whole basis of radial B-splines but the Bloch term is only added for r=cms_btoB.
Todo:
make sure the integrals are calculated only for rad. b-splines starting from cms_btoind_0_der!!!!
Todo:
this routine can be called only if the CGTO is indeed non-negligible on the BTO grid otherwise the routine radial_grid_CGTO will not work
Here is the call graph for this function:

◆ BTO_GTO_two_el_BB_GG()

subroutine, public bto_gto_integrals_mod::BTO_GTO_two_el_BB_GG ( type(cgto_data), intent(inout)  cgto_shell_1,
type(cgto_data), intent(inout)  cgto_shell_2,
type(bto_data), intent(inout)  cms_bto,
real(kind=cfp), dimension(:), allocatable  integrals 
)
Here is the call graph for this function:

◆ BTO_GTO_two_el_BG_BG()

subroutine, public bto_gto_integrals_mod::BTO_GTO_two_el_BG_BG ( type(cgto_data), intent(inout)  cgto_shell_1,
type(cgto_data), intent(inout)  cgto_shell_2,
type(bto_data), intent(inout)  cms_bto,
real(kind=cfp), dimension(:), allocatable  integrals 
)
Here is the call graph for this function:

◆ BTO_GTO_two_el_BG_GG()

subroutine, public bto_gto_integrals_mod::BTO_GTO_two_el_BG_GG ( type(cgto_data), intent(inout)  cgto_shell_1,
type(cgto_data), intent(inout)  cgto_shell_2,
type(bto_data), intent(inout)  cms_bto,
type(cgto_data), intent(inout)  cgto_shell_3,
real(kind=cfp), dimension(:), allocatable  integrals 
)
Here is the call graph for this function:

◆ calc_resh_coefficients()

subroutine, public bto_gto_integrals_mod::calc_resh_coefficients ( integer, intent(in)  L)

◆ calc_solh_coefficients()

subroutine, public bto_gto_integrals_mod::calc_solh_coefficients ( integer, intent(in)  L)

◆ calculate_CGTO_pair_pw_coefficients_numerical()

subroutine bto_gto_integrals_mod::calculate_CGTO_pair_pw_coefficients_numerical ( integer, intent(in)  max_l,
type(cgto_data), intent(in)  cgto_A,
type(cgto_data), intent(in)  cgto_B,
real(kind=cfp), dimension(:), intent(in)  r,
real(kind=cfp), dimension(:,:,:,:), allocatable  angular_integrals,
real(kind=cfp), intent(in)  epsrel,
real(kind=cfp), intent(in)  epsabs 
)

Calculates partial wave expansion for the product of a pair of CGTOs.

◆ calculate_CGTO_pw_coefficients_numerical()

subroutine bto_gto_integrals_mod::calculate_CGTO_pw_coefficients_numerical ( logical, dimension(:,:), allocatable  converged,
integer, intent(in)  max_l,
type(cgto_data), intent(in)  cgto,
real(kind=cfp), intent(in)  RA,
real(kind=cfp), intent(in)  r,
real(kind=cfp), dimension(:,:), intent(out)  angular_integrals,
real(kind=cfp), intent(in)  epsrel,
real(kind=cfp), intent(in)  epsabs,
type(nucleus_type), dimension(:), intent(in), optional  nuclei,
real(kind=cfp), dimension(:), intent(in), optional  nuclei_RA 
)

Assumes that the Xlm have been precalculated on the Lebedev grid and that the Xlm for the nuclei have been precalculated for all l up to l=max_l+cgtol. This routine attempts to integrate using the Lebedev grid until the required relative precision. If the relative precision cannot be reached then we first check if the integral is smaller than epsabs. If it is then we regard it as converged otherwise we resort to the adaptive quadrature - now this is extremely slow and therefore it is used only as a last resort.

Here is the call graph for this function:

◆ calculate_pair_lambda_couplings()

subroutine bto_gto_integrals_mod::calculate_pair_lambda_couplings ( integer, intent(in)  l,
integer, intent(in)  m,
integer, intent(in)  CGTO_A_L,
integer, intent(in)  CGTO_B_L,
integer, intent(in)  n_contr_pairs,
real(kind=cfp), dimension(:), allocatable  Xlm_product_CGTO_center,
real(kind=cfp), dimension(:,:,:,:,:), allocatable  transl_cfs_AB,
real(kind=cfp), dimension(:,:,:,:,:), allocatable  c_pair_lambda 
)
Here is the call graph for this function:

◆ calculate_Tl_matrix()

subroutine, public bto_gto_integrals_mod::calculate_Tl_matrix ( type(bto_data), intent(inout)  bspline_sol,
real(kind=cfp), dimension(:,:,:), allocatable  Tl 
)

◆ CGTO_pair_pw_coefficient()

real(kind=cfp) function bto_gto_integrals_mod::CGTO_pair_pw_coefficient ( real(kind=cfp), intent(in)  r,
integer, intent(in)  l,
integer, intent(in)  Lg_A,
integer, intent(in)  Mg_A,
integer, intent(in)  Lg_B,
integer, intent(in)  Mg_B,
real(kind=cfp), dimension(1:,0:,0:,:,:), intent(in)  c_pair_lambda,
integer, intent(in)  n_contr_pairs,
real(kind=cfp), dimension(1:,0:), intent(in)  contraction_besi 
)

◆ CGTO_pw_coefficient()

real(kind=cfp) function bto_gto_integrals_mod::CGTO_pw_coefficient ( real(kind=cfp), intent(in)  r,
integer, intent(in)  l,
integer, intent(in)  Lg,
integer, intent(in)  Mg,
real(kind=cfp), dimension(0:,0:,:), intent(in)  c_lambda,
real(kind=cfp), dimension(0:), intent(in)  contraction_besi 
)

◆ CGTO_pw_coefficient_stable()

real(kind=cfp) function bto_gto_integrals_mod::CGTO_pw_coefficient_stable ( real(kind=cfp), intent(in)  asym,
real(kind=cfp), intent(in)  r,
integer, intent(in)  l,
integer, intent(in)  lm,
integer, intent(in)  Lg,
integer, intent(in)  Lg_Mg,
real(kind=cfp), dimension(0:,0:,:,:), intent(in)  c_lambda,
real(kind=cfp), dimension(0:), intent(in)  contraction_besi,
real(kind=cfp), dimension(n_prim), intent(in)  prim_fac,
integer, intent(in)  n_prim,
real(kind=cfp), dimension(n_prim), intent(in)  besi_args 
)

◆ construct_dense_grid_from_sparse_grid()

subroutine bto_gto_integrals_mod::construct_dense_grid_from_sparse_grid ( type(bto_data), intent(in)  cms_bto,
real(kind=cfp), intent(in)  R_max,
real(kind=cfp), dimension(2*n_t+1), intent(in)  x_t,
real(kind=cfp), dimension(2*n_t+1), intent(in)  w_t,
integer, intent(in)  n_t,
integer, intent(in)  n_rng_knot,
real(kind=cfp), dimension(n_sparse_total_points), intent(in)  r_sparse,
integer, intent(in)  n_sparse_total_points,
real(kind=cfp), dimension(2*n+1), intent(in)  x,
real(kind=cfp), dimension(2*n+1), intent(in)  w,
integer, intent(in)  n,
integer, intent(out)  n_dense_total_points,
real(kind=cfp), dimension(:), allocatable  r_dense,
real(kind=cfp), dimension(:), allocatable  w_dense 
)

Takes the quadrature grid r_sparse and constructs from it another grid which contains 2*n+1 quadrature points of the rule x,w in between the quadrature points of the r_sparse grid. The resulting quadrature grid is in r_dense,w_dense and has n_dense_total_points points. The dense grid extends only up to the r_dense point not greater than R_max.

◆ ep_eval_radial_free_bspline()

real(ep1) function, public bto_gto_integrals_mod::ep_eval_radial_free_bspline ( class(radial_free_bspline)  data,
real(ep1), intent(in)  x 
)

◆ eval_Xlm_x_cgto_surface()

real(kind=cfp) function, public bto_gto_integrals_mod::eval_Xlm_x_cgto_surface ( class(xlm_x_cgto_surface)  this,
real(kind=cfp), intent(in)  x,
real(kind=cfp), intent(in)  y 
)

Evaluates the product of CGTO and a real spherical harmonic at a given point in space. x,y are the spherical polar coordinates on the sphere.

◆ gto_eval_R()

real(kind=cfp) function bto_gto_integrals_mod::gto_eval_R ( type(cgto_data), intent(in)  cgto_inp,
real(kind=cfp), intent(in)  x,
real(kind=cfp), dimension(3), intent(in)  R 
)

Evaluates CGTO at radial distance x and for angular direction given by vector R.

◆ gto_eval_R_all_m()

real(kind=cfp) function, dimension(2*cgto_inp%l+1) bto_gto_integrals_mod::gto_eval_R_all_m ( type(cgto_data), intent(in)  cgto_inp,
real(kind=cfp), intent(in)  x,
real(kind=cfp), dimension(3), intent(in)  R 
)

Evaluates CGTO for all m values at radial distance x and for angular direction given by vector R.

◆ gto_pair_eval_R_all_m()

real(kind=cfp) function, dimension(2*cgto_b%l+1,2*cgto_a%l+1) bto_gto_integrals_mod::gto_pair_eval_R_all_m ( type(cgto_data), intent(in)  cgto_A,
type(cgto_data), intent(in)  cgto_B,
real(kind=cfp), intent(in)  x,
real(kind=cfp), dimension(3), intent(in)  R 
)

Evaluates the product of a pair of CGTOs for all m values at radial distance x and for angular direction given by vector R.

◆ integrate_legendre()

subroutine bto_gto_integrals_mod::integrate_legendre ( real(kind=cfp), dimension(:,:,:,:), allocatable  lp_integrals,
real(kind=cfp), dimension(:), allocatable  bto_norms,
real(kind=cfp), dimension(:,:), allocatable  bto_val_0,
real(kind=cfp), dimension(:), allocatable  bto_knots,
integer, intent(in)  bto_order,
integer, intent(in)  bto_n,
integer, intent(in)  Lg,
integer, intent(in)  lp_max,
integer, intent(in)  l_max,
real(kind=cfp), dimension(:,:), intent(inout)  integrals 
)

◆ nuclear_potential()

real(kind=cfp) function bto_gto_integrals_mod::nuclear_potential ( type(nucleus_type), dimension(n), intent(in)  nuclei,
integer, intent(in)  n,
real(kind=cfp), intent(in)  x,
real(kind=cfp), dimension(3), intent(in)  R 
)

Evaluates the nuclear attraction potential for electron at point: x*R(1:3).

◆ omp_calc_legendre_radial()

subroutine bto_gto_integrals_mod::omp_calc_legendre_radial ( integer, intent(in)  max_l_legendre,
real(kind=cfp), dimension(:), allocatable  r1,
real(kind=cfp), dimension(:), allocatable  r2,
real(kind=cfp), dimension(:,:,:), allocatable  legendre_rad 
)

Calculates the part of the Legendre expansion which depends on the B-spline and the radial part of the Legendre expansion. This is calculated on the radial grid r2. The quadrature weights are multiplied in as well. These terms are needed to compute the Y function of the second electron.

◆ omp_calculate_CGTO_pair_pw_coefficients_analytic()

subroutine, public bto_gto_integrals_mod::omp_calculate_CGTO_pair_pw_coefficients_analytic ( integer, intent(in)  max_l,
type(cgto_data), intent(in)  cgto_A,
type(cgto_data), intent(in)  cgto_B,
real(kind=cfp), dimension(:), allocatable  r_points,
real(kind=cfp), dimension(:,:,:,:), allocatable  angular_integrals 
)

Calculates the partial wave expansion of a product of two CGTOs up to partial wave L=max_l and on the grid of radial points r_points.

Here is the call graph for this function:

◆ omp_calculate_CGTO_pw_coefficients_analytic()

subroutine, public bto_gto_integrals_mod::omp_calculate_CGTO_pw_coefficients_analytic ( integer, intent(in)  max_l,
type(cgto_data), intent(in)  cgto,
real(kind=cfp), dimension(:), allocatable  r_points,
real(kind=cfp), dimension(:,:,:), allocatable  angular_integrals 
)

Calculates the partial wave expansion of CGTO up to partial wave L=max_l and on the grid of radial points r_points.

Here is the call graph for this function:

◆ omp_calculate_Y_BG()

subroutine bto_gto_integrals_mod::omp_calculate_Y_BG ( type(bto_data), intent(inout)  cms_bto,
integer, intent(in)  last_bspline,
integer, intent(in)  lb,
integer, intent(in)  mb,
real(kind=cfp), dimension(:,:,:), allocatable  cgto_pw_expansion,
integer, dimension(:,:), allocatable  bspline_start_end_r2,
integer, intent(in)  max_l_legendre,
integer, intent(in)  n1_total_points,
integer, intent(in)  n2_total_points,
integer, intent(in)  n_cgto_m,
real(kind=cfp), dimension(:,:,:), allocatable  legendre_rad,
real(kind=cfp), dimension(:,:), allocatable  B_w_r2,
real(kind=cfp), dimension(:,:,:,:), allocatable  Y_mp,
real(kind=cfp), dimension(:,:,:,:), allocatable  Y,
real(kind=cfp), dimension(:), allocatable  r1 
)

Calculates the Y function on the radial grid r1 for a given radial B-spline and all its angular parts and all angular parts of the CGTO. The grid at which the CGTO pw expansion has been evaluated is given in r2.

◆ omp_mult_gaunt_into_angular_integrals()

subroutine bto_gto_integrals_mod::omp_mult_gaunt_into_angular_integrals ( real(kind=cfp), dimension(:,:,:), allocatable  angular_integrals,
integer, intent(in)  l_max,
integer, intent(in)  lp_max,
real(kind=cfp), dimension(:,:,:,:), allocatable  gaunt_angular_integrals 
)

Multiplies the angular integrals by the Gaunt coefficients and sums over the pp indices.

◆ omp_radial_integrals_legendre_bsplines()

subroutine bto_gto_integrals_mod::omp_radial_integrals_legendre_bsplines ( type(bto_data), intent(inout)  cms_bto,
integer, dimension(:,:), intent(in)  bspline_start_end_r2,
real(kind=cfp), dimension(:,:,:), allocatable  legendre_rad,
integer, intent(in)  max_l_legendre,
real(kind=cfp), dimension(:), allocatable  r2,
real(kind=cfp), dimension(:), allocatable  w2,
integer, intent(in)  n2_total_points,
real(kind=cfp), dimension(:), allocatable  r1,
real(kind=cfp), dimension(:), allocatable  w1,
integer, intent(in)  n1_total_points,
real(kind=cfp), dimension(:,:,:), allocatable  R_l_ints 
)
Todo:
Parts of this routine can be ran only once such as the evaluation of the B-spline pairs on the r2 quadrature grid.

◆ precalculate_pair_solh_translation_coeffs()

subroutine bto_gto_integrals_mod::precalculate_pair_solh_translation_coeffs ( integer, intent(in)  CGTO_A_L,
real(kind=cfp), intent(in)  RA_A,
real(kind=cfp), dimension(:), allocatable  Xlm_CGTO_A_center,
integer, intent(in)  CGTO_B_L,
real(kind=cfp), intent(in)  RA_B,
real(kind=cfp), dimension(:), allocatable  Xlm_CGTO_B_center,
real(kind=cfp), dimension(:,:,:,:,:), allocatable  transl_cfs_AB 
)
Warning
Requires precalculated values of the real spherical harmonics at the position of the CGTO nucleus. The coupling coefficients should also be precalculated for performance reasons.
Here is the call graph for this function:

◆ precalculate_solh_translation_coeffs()

subroutine bto_gto_integrals_mod::precalculate_solh_translation_coeffs ( integer, intent(in)  CGTO_L,
real(kind=cfp), intent(in)  RA,
real(kind=cfp), dimension(:), allocatable  Xlm_CGTO_center,
real(kind=cfp), dimension(:,:,:), allocatable  transl_cfs 
)
Warning
Requires precalculated values of the real spherical harmonics at the position of the CGTO nucleus. The coupling coefficients should also be precalculated for performance reasons.

◆ precalculate_Xlm_for_CGTO_center()

subroutine bto_gto_integrals_mod::precalculate_Xlm_for_CGTO_center ( real(kind=cfp), dimension(3), intent(in)  RA,
integer, intent(in)  max_l,
real(kind=cfp), dimension(:), allocatable  Xlm_CGTO_center 
)

Calculates the real spherical harmonics for all l,m up to l=max_l for directions corresponding to the nuclear positions.

◆ precalculate_Xlm_for_CGTO_product_center()

subroutine bto_gto_integrals_mod::precalculate_Xlm_for_CGTO_product_center ( integer, intent(in)  n_contr_pairs,
real(kind=cfp), dimension(3,n_contr_pairs), intent(in)  RA,
integer, intent(in)  max_l,
real(kind=cfp), dimension(:), allocatable  Xlm_product_CGTO_center 
)

◆ precalculate_Xlm_for_nuclei()

subroutine bto_gto_integrals_mod::precalculate_Xlm_for_nuclei ( type(nucleus_type), dimension(:), intent(in)  nuclei,
integer, intent(in)  max_l 
)

Calculates the real spherical harmonics for all l,m up to l=max_l for directions corresponding to the nuclear positions.

◆ radial_grid_CGTO()

subroutine bto_gto_integrals_mod::radial_grid_CGTO ( type(cgto_data), intent(inout)  cgto,
type(bto_data), intent(inout)  cms_bto,
real(kind=cfp), intent(in)  threshold,
real(kind=cfp), dimension(2*n+1), intent(in)  x,
real(kind=cfp), dimension(2*n+1), intent(in)  w,
integer, intent(in)  n,
integer, intent(in)  n_rng_knot,
real(kind=cfp), dimension(:), allocatable  r_points,
real(kind=cfp), dimension(:), allocatable  weights,
integer, intent(out)  n_total_points,
real(kind=cfp), intent(out)  R_grid,
real(kind=cfp), intent(out)  R_true 
)

Determines the radial grid needed to describe, within the accuracy threshold, integrals involving the CGTO and the B-splines on the given grid. We assume that if the CGTO spanned the whole B-spline grid it would be sufficient to use the given quadrature rule (x,w,n) within each knot interval. For CGTOs whose radial extent is smaller than the range of the B-spline grid the number of quadrature points within each knot interval is expanded by the factor ceiling(n_int/R), where R is the extent of the CGTO (determined to coincide with the nearest larger knot) and n_int is the number of distinct intervals of knots in the B-spline basis.

◆ radial_grid_CGTO_pair()

subroutine, public bto_gto_integrals_mod::radial_grid_CGTO_pair ( type(cgto_data), intent(inout)  cgto_1,
type(cgto_data), intent(inout)  cgto_2,
real(kind=cfp), intent(in)  threshold,
real(kind=cfp), intent(in)  rmat_radius,
real(kind=cfp), dimension(2*n+1), intent(in)  x,
real(kind=cfp), dimension(2*n+1), intent(in)  w,
integer, intent(in)  n,
integer, intent(in)  n_rng_knot,
real(kind=cfp), dimension(:), allocatable  r_points,
real(kind=cfp), dimension(:), allocatable  weights,
integer, intent(out)  n_total_points,
real(kind=cfp), intent(out)  R_min,
real(kind=cfp), intent(out)  R_max 
)

Determines the radial grid needed to describe, within the accuracy threshold, integrals involving the CGTO and the B-splines on the given grid. We assume that if the CGTO spanned the whole B-spline grid it would be sufficient to use the given quadrature rule (x,w,n) within each knot interval. For CGTOs whose radial extent is smaller than the range of the B-spline grid the number of quadrature points within each knot interval is expanded by the factor ceiling(n_int/R), where R is the extent of the CGTO (determined to coincide with the nearest larger knot) and n_int is the number of distinct intervals of knots in the B-spline basis.

◆ solve_poisson_equation()

subroutine, public bto_gto_integrals_mod::solve_poisson_equation ( type(bto_data), intent(inout)  bspline_sol,
real(kind=cfp), dimension(bspline_sol%n,bspline_sol%n,0:max_l), intent(in)  Tl,
real(kind=cfp), dimension(n_total_points), intent(in)  source_term,
real(kind=cfp), intent(in)  r1,
real(kind=cfp), intent(in)  r2,
real(kind=cfp), dimension(n_total_points), intent(in)  r,
real(kind=cfp), dimension(n_total_points), intent(in)  w,
integer, intent(in)  n_total_points,
integer, intent(in)  max_l,
integer, intent(in)  l,
real(kind=cfp), intent(out)  A,
real(kind=cfp), intent(out)  B,
real(kind=cfp), dimension(bspline_sol%n,1), intent(out)  bspline_cfs 
)

Solves the Poission equation for a given angular momentum value (l) and for the source term evaluated on a given quadrature grid.

◆ sum_mp_legendre()

subroutine bto_gto_integrals_mod::sum_mp_legendre ( real(kind=cfp), dimension(:,:,:,:), allocatable  gaunt_angular_integrals,
real(kind=cfp), dimension(:), allocatable  r_points,
real(kind=cfp), dimension(:), allocatable  weights,
integer, intent(in)  Lg,
integer, intent(in)  lp_max,
integer, intent(in)  l_max,
type(nucleus_type), dimension(:), intent(in)  nuclei,
real(kind=cfp), dimension(:), allocatable  nuclei_RA,
real(kind=cfp), dimension(:,:,:,:), allocatable  lp_integrals 
)

◆ swap_dim_1_with_3()

subroutine bto_gto_integrals_mod::swap_dim_1_with_3 ( real(kind=cfp), dimension(:,:,:), intent(inout)  array_in,
real(kind=cfp), dimension(:,:,:), intent(inout)  array_out 
)

Naive cyclic swap: dimensions 1,2,3 -> 2,3,1. No cache blocking.

◆ wp_eval_radial_free_bspline()

real(wp) function, public bto_gto_integrals_mod::wp_eval_radial_free_bspline ( class(radial_free_bspline)  data,
real(wp), intent(in)  x 
)