(git:f2a7cfd)
Loading...
Searching...
No Matches
libgint_wrapper Module Reference

Interface to the LibGint-Library. More...

Data Types

interface  libgint_set_density
interface  libgint_get_fock_matrix

Functions/Subroutines

subroutine, public cp_libgint_init (actual_x_data)
 Sets libGint internal enviroment, must be called at least once before libGint can be used.
subroutine, public libgint_update_env (fac, memory_parameter, do_periodic, cell, actual_x_data, nneighbors, max_pgf, natom, kind_of, particle_set, basis_parameter)
 Initialize and update the libGint computational environment. Must be called at least once after geo_change and before libGint can be used.
subroutine, public libgint_coulomb4 (iatom, jatom, katom, latom, iset, jset, kset, lset, ra, rb, rc, rd, npgfa, npgfb, npgfc, npgfd, potential_parameter, screen1, screen2, log10_pmax, log10_eps_schwarz, pgf1, pgf2, neighbor_cells, cell, do_periodic, screened)
 Assign two-electron integrals of a quartet/shell to libGint.
subroutine, public libgint_update_fock_matrix (symm_fac, iatom, jatom, katom, latom, iset, jset, kset, lset, atomic_offset_ac, atomic_offset_ad, atomic_offset_bc, atomic_offset_bd, offset_ac_set, offset_ad_set, offset_bc_set, offset_bd_set, nsgfa, nsgfb, nsgfc, nsgfd, la_min, la_max, lb_min, lb_max, lc_min, lc_max, ld_min, ld_max, nsgfl_a, nsgfl_b, nsgfl_c, nsgfl_d)
 The previous coulomb_4 function assigned an integral between primitive gaussian. Now we assign the nsgfa(iset)*b*c*d gcc integrals form this set, along with the Pac Pad Pbc Pbd density to the Kbd Kbc Kad Kac Fock matrix.

Detailed Description

Interface to the LibGint-Library.

History
10.2024 Created
Author
Marcello Puligheddu

Function/Subroutine Documentation

◆ cp_libgint_init()

subroutine, public libgint_wrapper::cp_libgint_init ( type(hfx_type), intent(in), pointer actual_x_data)

Sets libGint internal enviroment, must be called at least once before libGint can be used.

Parameters
[in]actual_x_datapointer to hfx_data

Definition at line 71 of file libgint_wrapper.F.

Here is the caller graph for this function:

◆ libgint_update_env()

subroutine, public libgint_wrapper::libgint_update_env ( real(dp) fac,
type(hfx_memory_type), pointer memory_parameter,
logical do_periodic,
type(cell_type), pointer cell,
type(hfx_type), pointer actual_x_data,
integer nneighbors,
integer max_pgf,
integer natom,
integer, dimension(:), allocatable kind_of,
type(particle_type), dimension(:), pointer particle_set,
type(hfx_basis_type), dimension(:), pointer basis_parameter )

Initialize and update the libGint computational environment. Must be called at least once after geo_change and before libGint can be used.

This routine sets up data required by the libGint integral engine, including Hartree–Fock scaling factors, memory limits, periodic cell information, and per-atom/basis-set data. It also allocates CPU-side buffers (bra and ket) used for storing screened Gaussian primitive pairs.

Parameters
[in]facFraction of exact exchange
[in]memory_parameterPointer to memory configuration
[in]do_periodicLogical flag: whether to consider pbc
[in]cellprimitive simulation cell
[in]actual_x_dataHF exchange data
[in]nneighborsLattice points
[in]max_pgfMaximum number of primitive Gaussians per shel
[in]natomNumber of atoms in the system
[in]kind_ofArray mapping atom indices to atomic kinds
[in]particle_setparticle set, we extract the positions
[in]basis_parametergaussian basis set parameters

Definition at line 115 of file libgint_wrapper.F.

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

◆ libgint_coulomb4()

subroutine, public libgint_wrapper::libgint_coulomb4 ( integer, intent(in) iatom,
integer, intent(in) jatom,
integer, intent(in) katom,
integer, intent(in) latom,
integer, intent(in) iset,
integer, intent(in) jset,
integer, intent(in) kset,
integer, intent(in) lset,
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,
type(hfx_potential_type) potential_parameter,
real(dp), dimension(2), intent(in) screen1,
real(dp), dimension(2), intent(in) screen2,
real(dp), intent(in) log10_pmax,
real(dp), intent(in) log10_eps_schwarz,
type(hfx_screen_coeff_type), dimension(:, :), pointer pgf1,
type(hfx_screen_coeff_type), dimension(:, :), pointer pgf2,
type(hfx_cell_type), dimension(:), pointer neighbor_cells,
type(cell_type), pointer cell,
logical, intent(in) do_periodic,
logical, intent(out) screened )

Assign two-electron integrals of a quartet/shell to libGint.

First we build a list of ab primitives and cd primitives using build_pair_list_pbc_pgf These lists will contain (before screening) n_cell * npgf * npgf. We loop over both and send ab(g) | cd(h) to libgint, which will loop internally over n

Parameters
[in]iatomindex of atom I / A
[in]jatomindex of atom J / B
[in]katomindex of atom K / C
[in]latomindex of atom L / D
[in]isetindex of the set for atom iatom we are adding
[in]jsetindex of the set for atom jatom we are adding
[in]ksetindex of the set for atom katom we are adding
[in]lsetindex of the set for atom latom we are adding
[in]raposition of atom iatom
[in]rbposition of atom jatom
[in]rcposition of atom katom
[in]rdposition of atom latom
[in]npgfanumber of gaussians in set iset of atom iatom
[in]npgfbnumber of gaussians in set jset of atom jatom
[in]npgfcnumber of gaussians in set kset of atom katom
[in]npgfdnumber of gaussians in set lset of atom latom
[in]potential_parameterinformation about the potential
[in]screen1screening information for AB pair
[in]screen2screening information for CD pair
[in]log10_pmaxdensity screening factor
[in]log10_eps_schwarzscreening tolerance
[in]pgf1screening information for each AB pair primitive
[in]pgf2screening information for each CD pair primitive
[in]neighbor_cellsarray with lattice vectors
[in]cellinformation about the simulation box
[in]do_periodicflag for pbc
[out]screenedwhether the whole quartet was screened out

Definition at line 313 of file libgint_wrapper.F.

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

◆ libgint_update_fock_matrix()

subroutine, public libgint_wrapper::libgint_update_fock_matrix ( real(dp) symm_fac,
integer iatom,
integer jatom,
integer katom,
integer latom,
integer iset,
integer jset,
integer kset,
integer lset,
integer atomic_offset_ac,
integer atomic_offset_ad,
integer atomic_offset_bc,
integer atomic_offset_bd,
integer, dimension(:, :), pointer offset_ac_set,
integer, dimension(:, :), pointer offset_ad_set,
integer, dimension(:, :), pointer offset_bc_set,
integer, dimension(:, :), pointer offset_bd_set,
integer nsgfa,
integer nsgfb,
integer nsgfc,
integer nsgfd,
integer la_min,
integer la_max,
integer lb_min,
integer lb_max,
integer lc_min,
integer lc_max,
integer ld_min,
integer ld_max,
integer, dimension(:, :), pointer nsgfl_a,
integer, dimension(:, :), pointer nsgfl_b,
integer, dimension(:, :), pointer nsgfl_c,
integer, dimension(:, :), pointer nsgfl_d )

The previous coulomb_4 function assigned an integral between primitive gaussian. Now we assign the nsgfa(iset)*b*c*d gcc integrals form this set, along with the Pac Pad Pbc Pbd density to the Kbd Kbc Kad Kac Fock matrix.

Parameters
[in]symm_facsimmetry factor from iatom=jatom and the like
[in]iatomindex of atom A
[in]jatomindex of atom B
[in]katomindex of atom C
[in]latomindex of atom D
[in]isetindex of set for atom A
[in]jsetindex of set for atom B
[in]ksetindex of set for atom C
[in]lsetindex of set for atom D
[in]atomic_offset_acglobal offset for the pair of A and C atom in the density ( and Fock) matrix
[in]atomic_offset_adglobal offset for the pair of A and D atom in the density ( and Fock) matrix
[in]atomic_offset_bcglobal offset for the pair of B and C atom in the density ( and Fock) matrix
[in]atomic_offset_bdglobal offset for the pair of B and D atom in the density ( and Fock) matrix
[in]offset_ac_setmatrix of sub_offset for sets in atomic_offset_ac
[in]offset_ad_setmatrix of sub_offset for sets in atomic_offset_ad
[in]offset_bc_setmatrix of sub_offset for sets in atomic_offset_bc
[in]offset_bd_setmatrix of sub_offset for sets in atomic_offset_bd
[in]nsgfatotal number of (spherical, contracted) integrals for iset. Used as leading dimension of the AC, AD sublock, depending on transposition
[in]nsgfbtotal number of (spherical, contracted) integrals for jset. Used as leading dimension of the BC, BD sublock, depending on transposition
[in]nsgfctotal number of (spherical, contracted) integrals for kset. Used as leading dimension of the AC, BC sublock, depending on transposition
[in]nsgfdtotal number of (spherical, contracted) integrals for lset. Used as leading dimension of the AD, BD sublock, depending on transposition
[in]la_minminumum angular moment in set iset of atom A
[in]la_maxmaximum angular moment in set iset of atom A
[in]lb_minminumum angular moment in set iset of atom B
[in]lb_maxmaximum angular moment in set iset of atom B
[in]lc_minminumum angular moment in set iset of atom C
[in]lc_maxmaximum angular moment in set iset of atom C
[in]ld_minminumum angular moment in set iset of atom D
[in]ld_maxmaximum angular moment in set iset of atom D
[in]nsgfl_amatrix with the number of linear combinations of primitive gaussians for each angular moment for each set in atom A. We only read iset
[in]nsgfl_bmatrix with the number of linear combinations of primitive gaussians for each angular moment for each set in atom B. We only read jset
[in]nsgfl_cmatrix with the number of linear combinations of primitive gaussians for each angular moment for each set in atom C. We only read kset
[in]nsgfl_dmatrix with the number of linear combinations of primitive gaussians for each angular moment for each set in atom D. We only read lset
Note
The atomic_offset_xy, offset_xy_set matrices provide set offsets which are combined with per-L and per linear combination offsets to produce the final indices into the dense (but block-sparse) density and Fock matrices
  • The routine assumes Fortran column major order and contiguous storage for the per set density subblocks as described in the code comments.
  • The code computes transposition flags to only use the lower part of P and K

Definition at line 499 of file libgint_wrapper.F.

Here is the caller graph for this function: