(git:c5411e0)
Loading...
Searching...
No Matches
hfx_energy_potential Module Reference

Routines to calculate HFX energy and potential. More...

Functions/Subroutines

subroutine, public integrate_four_center (qs_env, x_data, ks_matrix, ehfx, rho_ao, hfx_section, para_env, geometry_did_change, irep, distribute_fock_matrix, ispin)
 computes four center integrals for a full basis set and updates the Kohn-Sham-Matrix and energy. Uses all 8 eri symmetries
 
subroutine, public coulomb4 (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
 

Detailed Description

Routines to calculate HFX energy and potential.

History
11.2006 created [Manuel Guidon]
Author
Manuel Guidon

Function/Subroutine Documentation

◆ integrate_four_center()

subroutine, public hfx_energy_potential::integrate_four_center ( type(qs_environment_type), pointer  qs_env,
type(hfx_type), dimension(:, :), pointer  x_data,
type(dbcsr_p_type), dimension(:, :), pointer  ks_matrix,
real(kind=dp), intent(out)  ehfx,
type(dbcsr_p_type), dimension(:, :), pointer  rho_ao,
type(section_vals_type), pointer  hfx_section,
type(mp_para_env_type), pointer  para_env,
logical  geometry_did_change,
integer  irep,
logical, intent(in)  distribute_fock_matrix,
integer, intent(in)  ispin 
)

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

Parameters
qs_env...
x_data...
ks_matrix...
ehfxenergy calculated with the updated HFX matrix
rho_aodensity matrix in ao basis
hfx_sectioninput_section HFX
para_env...
geometry_did_changeflag that indicates we have to recalc integrals
irepIndex for the HFX replica
distribute_fock_matrixFlag that indicates whether to communicate the new fock matrix or not
ispin...
History
06.2007 created [Manuel Guidon] 08.2007 optimized load balance [Manuel Guidon] 09.2007 new parallelization [Manuel Guidon] 02.2009 completely rewritten screening part [Manuel Guidon] 12.2017 major bug fix. removed wrong cycle that was caussing segfault. see https://groups.google.com/forum/#!topic/cp2k/pc6B14XOALY [Tobias Binninger + Valery Weber]
Author
Manuel Guidon

Definition at line 134 of file hfx_energy_potential.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ coulomb4()

subroutine, public hfx_energy_potential::coulomb4 ( type(cp_libint_t lib,
real(dp), dimension(3), intent(in)  ra,
real(dp), dimension(3), intent(in)  rb,
real(dp), dimension(3), intent(in)  rc,
real(dp), dimension(3), intent(in)  rd,
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), dimension(1:npgfa), intent(in)  zeta,
real(dp), dimension(1:npgfb), intent(in)  zetb,
real(dp), dimension(1:npgfc), intent(in)  zetc,
real(dp), dimension(1:npgfd), intent(in)  zetd,
real(dp), dimension(nsgfa, nsgfb, nsgfc, nsgfd)  primitive_integrals,
type(hfx_potential_type potential_parameter,
type(hfx_cell_type), dimension(:), pointer  neighbor_cells,
real(dp), dimension(2), intent(in)  screen1,
real(dp), dimension(2), intent(in)  screen2,
real(dp), intent(in)  eps_schwarz,
real(dp), intent(in)  max_contraction_val,
real(dp)  cart_estimate,
type(cell_type), pointer  cell,
integer(int_8)  neris_tmp,
real(dp), intent(in)  log10_pmax,
real(dp), intent(in)  log10_eps_schwarz,
type(hfx_screen_coeff_type), dimension(:, :), pointer  r1_pgf,
type(hfx_screen_coeff_type), dimension(:, :), pointer  r2_pgf,
type(hfx_screen_coeff_type), dimension(:, :), pointer  pgf1,
type(hfx_screen_coeff_type), dimension(:, :), pointer  pgf2,
type(hfx_pgf_list), dimension(*)  pgf_list_ij,
type(hfx_pgf_list), dimension(*)  pgf_list_kl,
type(hfx_pgf_product_list), dimension(:), intent(inout), allocatable  pgf_product_list,
integer, dimension(0:), intent(in)  nsgfl_a,
integer, dimension(0:), intent(in)  nsgfl_b,
integer, dimension(0:), intent(in)  nsgfl_c,
integer, dimension(0:), intent(in)  nsgfl_d,
real(dp), dimension(sphi_a_u1, sphi_a_u2, sphi_a_u3), intent(in)  sphi_a_ext,
real(dp), dimension(sphi_b_u1, sphi_b_u2, sphi_b_u3), intent(in)  sphi_b_ext,
real(dp), dimension(sphi_c_u1, sphi_c_u2, sphi_c_u3), intent(in)  sphi_c_ext,
real(dp), dimension(sphi_d_u1, sphi_d_u2, sphi_d_u3), intent(in)  sphi_d_ext,
real(dp), dimension(*)  ee_work,
real(dp), dimension(*)  ee_work2,
real(dp), dimension(*)  ee_buffer1,
real(dp), dimension(*)  ee_buffer2,
real(dp), dimension(*)  ee_primitives_tmp,
integer, dimension(*)  nimages,
logical, intent(in)  do_periodic,
real(dp), dimension(:), pointer  p_work 
)

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

Parameters
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_integralsarray of primitive_integrals
potential_parametercontains info for libint
neighbor_cellsPeriodic images
screen1set based coefficients for near field screening
screen2set based coefficients for near field screening
eps_schwarzthreshold
max_contraction_valmaximum multiplication factor for cart -> sph
cart_estimatemaximum calculated integral value
cellcell
neris_tmpcounter for calculated cart integrals
log10_pmaxlogarithm of initial p matrix max element
log10_eps_schwarzlog of threshold
R1_pgfcoefficients for radii of product distribution function
R2_pgfcoefficients for radii of product distribution function
pgf1schwarz coefficients pgf basid
pgf2schwarz coefficients pgf basid
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...
History
11.2006 created [Manuel Guidon] 02.2009 completely rewritten screening part [Manuel Guidon]
Author
Manuel Guidon

Definition at line 2244 of file hfx_energy_potential.F.

Here is the call graph for this function:
Here is the caller graph for this function: