Documentation for module hfx_energy_potential

Rountines to calculate HFX energy and potential

source: hfx_energy_potential.F
Loading...

public Subroutines/Functions:

calculates two-electron integrals of a quartet/shell using the library lib_int in the periodic case
computes four center integrals for a full basis set and updates the Kohn-Sham-Matrix and energy. Uses all 8 eri symmetries

SUBROUTINEcoulomb4(lib, ra, rb, rc, rd, npgfa, npgfb, npgfc, npgfd, la_min, la_max, lb_min, lb_max, lc_min, lc_max, ld_min, ld_max, nsgfa, nsgfb, nsgfc, nsgfd, sphi_a_u1, sphi_a_u2, sphi_a_u3, sphi_b_u1, sphi_b_u2, sphi_b_u3, sphi_c_u1, sphi_c_u2, sphi_c_u3, sphi_d_u1, sphi_d_u2, sphi_d_u3, zeta, zetb, zetc, zetd, primitive_integrals, potential_parameter, neighbor_cells, screen1, screen2, eps_schwarz, max_contraction_val, cart_estimate, cell, neris_tmp, log10_pmax, log10_eps_schwarz, r1_pgf, r2_pgf, pgf1, pgf2, pgf_list_ij, pgf_list_kl, pgf_product_list, nsgfl_a, nsgfl_b, nsgfl_c, nsgfl_d, sphi_a_ext, sphi_b_ext, sphi_c_ext, sphi_d_ext, ee_work, ee_work2, ee_buffer1, ee_buffer2, ee_primitives_tmp, nimages, do_periodic, p_work)

calculates two-electron integrals of a quartet/shell using the library lib_int in the periodic case

Arguments:
TYPE(lib_int)
:: lib ...
REAL(dp),
INTENT(in)
:: ra(3) ...
REAL(dp),
INTENT(in)
:: rb(3) ...
REAL(dp),
INTENT(in)
:: rc(3) ...
REAL(dp),
INTENT(in)
:: rd(3) ...
INTEGER,
INTENT(in)
:: npgfa ...
INTEGER,
INTENT(in)
:: npgfb ...
INTEGER,
INTENT(in)
:: npgfc ...
INTEGER,
INTENT(in)
:: npgfd ...
INTEGER,
INTENT(in)
:: la_min ...
INTEGER,
INTENT(in)
:: la_max ...
INTEGER,
INTENT(in)
:: lb_min ...
INTEGER,
INTENT(in)
:: lb_max ...
INTEGER,
INTENT(in)
:: lc_min ...
INTEGER,
INTENT(in)
:: lc_max ...
INTEGER,
INTENT(in)
:: ld_min ...
INTEGER,
INTENT(in)
:: ld_max ...
INTEGER,
INTENT(in)
:: nsgfa ...
INTEGER,
INTENT(in)
:: nsgfb ...
INTEGER,
INTENT(in)
:: nsgfc ...
INTEGER,
INTENT(in)
:: nsgfd ...
INTEGER,
INTENT(in)
:: sphi_a_u1 ...
INTEGER,
INTENT(in)
:: sphi_a_u2 ...
INTEGER,
INTENT(in)
:: sphi_a_u3 ...
INTEGER,
INTENT(in)
:: sphi_b_u1 ...
INTEGER,
INTENT(in)
:: sphi_b_u2 ...
INTEGER,
INTENT(in)
:: sphi_b_u3 ...
INTEGER,
INTENT(in)
:: sphi_c_u1 ...
INTEGER,
INTENT(in)
:: sphi_c_u2 ...
INTEGER,
INTENT(in)
:: sphi_c_u3 ...
INTEGER,
INTENT(in)
:: sphi_d_u1 ...
INTEGER,
INTENT(in)
:: sphi_d_u2 ...
INTEGER,
INTENT(in)
:: sphi_d_u3 ...
REAL(dp),
INTENT(in)
:: zeta(1:npgfa) ...
REAL(dp),
INTENT(in)
:: zetb(1:npgfb) ...
REAL(dp),
INTENT(in)
:: zetc(1:npgfc) ...
REAL(dp),
INTENT(in)
:: zetd(1:npgfd) ...
REAL(dp)
:: primitive_integrals(nsgfa,nsgfb,nsgfc,nsgfd) array of primitive_integrals
:: potential_parameter contains info for libint
POINTER
:: neighbor_cells(:) Periodic images
REAL(dp),
INTENT(in)
:: screen1(2) set based coefficients for near field screening
REAL(dp),
INTENT(in)
:: screen2(2) set based coefficients for near field screening
REAL(dp),
INTENT(in)
:: eps_schwarz threshold
REAL(dp),
INTENT(in)
:: max_contraction_val maximum multiplication factor for cart -> sph
REAL(dp)
:: cart_estimate maximum calculated integral value
TYPE(cell_type),
POINTER
:: cell cell
INTEGER(int_8)
:: neris_tmp counter for calculated cart integrals
REAL(dp),
INTENT(in)
:: log10_pmax logarithm of initial p matrix max element
REAL(dp),
INTENT(in)
:: log10_eps_schwarz log of threshold
POINTER
:: r1_pgf(:,:) coefficients for radii of product distribution function
POINTER
:: r2_pgf(:,:) coefficients for radii of product distribution function
POINTER
:: pgf1(:,:) schwarz coefficients pgf basid
POINTER
:: pgf2(:,:) schwarz coefficients pgf basid
:: pgf_list_ij(*) ...
:: pgf_list_kl(*) ...
INTENT(inout),
ALLOCATABLE
:: pgf_product_list(:) ...
INTEGER,
INTENT(in)
:: nsgfl_a(0:) ...
INTEGER,
INTENT(in)
:: nsgfl_b(0:) ...
INTEGER,
INTENT(in)
:: nsgfl_c(0:) ...
INTEGER,
INTENT(in)
:: nsgfl_d(0:) ...
REAL(dp),
INTENT(in)
:: sphi_a_ext(sphi_a_u1,sphi_a_u2,sphi_a_u3) ...
REAL(dp),
INTENT(in)
:: sphi_b_ext(sphi_b_u1,sphi_b_u2,sphi_b_u3) ...
REAL(dp),
INTENT(in)
:: sphi_c_ext(sphi_c_u1,sphi_c_u2,sphi_c_u3) ...
REAL(dp),
INTENT(in)
:: sphi_d_ext(sphi_d_u1,sphi_d_u2,sphi_d_u3) ...
REAL(dp)
:: ee_work(*) ...
REAL(dp)
:: ee_work2(*) ...
REAL(dp)
:: ee_buffer1(*) ...
REAL(dp)
:: ee_buffer2(*) ...
REAL(dp)
:: ee_primitives_tmp(*) ...
INTEGER
:: nimages(*) ...
LOGICAL,
INTENT(in)
:: do_periodic ...
REAL(dp),
POINTER
:: p_work(:) ...

SUBROUTINEintegrate_four_center(qs_env, ks_matrix, energy, rho_ao, hfx_section, para_env, geometry_did_change, irep, distribute_fock_matrix, ispin, do_exx, axk_x_data)

computes four center integrals for a full basis set and updates the Kohn-Sham-Matrix and energy. Uses all 8 eri symmetries

Arguments:
POINTER
:: qs_env ...
POINTER
:: ks_matrix(:,:) ...
POINTER
:: energy ...
POINTER
:: rho_ao(:,:) density matrix in ao basis
POINTER
:: hfx_section input_section HFX
POINTER
:: para_env ...
LOGICAL
:: geometry_did_change flag that indicates we have to recalc integrals
INTEGER
:: irep Index for the HFX replica
LOGICAL,
INTENT(in)
:: distribute_fock_matrix Flag that indicates whether to communicate the new fock matrix or not
INTEGER,
INTENT(in)
:: ispin ...
LOGICAL,
OPTIONAL
:: do_exx ...
TYPE(hfx_type),
OPTIONAL, POINTER
:: axk_x_data(:,:) ...