(git:27c966b)
Loading...
Searching...
No Matches
gw_ri_rs_small_cell_full_kp_lattice Module Reference

RI lattice matrices, real-space cells and data distribution shared by χ, W, Σ and the Gamma correction of periodic RI-RS GW. More...

Functions/Subroutines

subroutine, public assemble_aa_contraction (bs_env, u_pp)
 Assembles the q-independent, atom-diagonal AA contraction from stored coefficients.
subroutine, public owned_mo_coefficients (bs_env, mo_coeff, coeff)
 Dense MO coefficients of the cyclically owned SCF k points (owner of k: MODULO(k-1, ranks)). The locally stored parts of the distributed matrices are summed to the owner in batches of k points: few large reductions instead of one global gather per k, and no rank stores the coefficients of k points it does not own.
subroutine, public build_full_cell_grid (bs_env, index_to_cell)
 Construct a complete cell grid dual to the uniform SCF k-point mesh.
real(kind=dp) function, public ri_metric_head_zero (bs_env)
 Zero-wave-vector Fourier value of the selected RI metric kernel.
subroutine, public build_ri_2c_lattice (fm_r, cells, potential, regularization, bs_env, qs_env, reference_basis)
 Form distributed I_PQ(R) = (φ_P,0 | v | φ_Q,R) over every screened neighbor cell.
subroutine, public ri_2c_lattice_to_kp (fm_r, cells, qpoint, matrix_q)
 Evaluate I_PQ(q) = sum_R exp(i q.R) I_PQ(R) collectively into an existing dense matrix.
subroutine, public gamma_auxiliary_charges (qs_env, charge)
 Integrate each auxiliary function for the Gamma charge-mode projection. For a primitive x^(2m) exp(-α x²), I_0=sqrt(π/α), I_2m=(2m-1)I_(2m-2)/(2α). Odd Cartesian moments vanish; the existing spherical contraction supplies normalization.
pure subroutine, public block_range (n, rank, n_rank, first, n_local)
 Return the contiguous part of 1..n owned by one rank of a block distribution.

Variables

real(kind=dp), parameter, public real_bytes = REAL(dp_size, dp)
real(kind=dp), parameter, public complex_bytes = 2.0_dp*real_bytes

Detailed Description

RI lattice matrices, real-space cells and data distribution shared by χ, W, Σ and the Gamma correction of periodic RI-RS GW.

Author
Jan Wilhelm (with help of ChatGPT, GPT-6 Sol and GPT-6 Astra)

Function/Subroutine Documentation

◆ assemble_aa_contraction()

subroutine, public gw_ri_rs_small_cell_full_kp_lattice::assemble_aa_contraction ( type(post_scf_bandstructure_type), pointer bs_env,
complex(kind=dp), dimension(:, :), intent(out), allocatable u_pp )

Assembles the q-independent, atom-diagonal AA contraction from stored coefficients.

Parameters
bs_env...
U_PpAtom-diagonal reference-to-optimized AA contraction.

Definition at line 90 of file gw_ri_rs_small_cell_full_kp_lattice.F.

Here is the caller graph for this function:

◆ owned_mo_coefficients()

subroutine, public gw_ri_rs_small_cell_full_kp_lattice::owned_mo_coefficients ( type(post_scf_bandstructure_type), pointer bs_env,
type(cp_cfm_type), dimension(:, :), intent(in) mo_coeff,
complex(kind=dp), dimension(:, :, :, :), intent(out), allocatable coeff )

Dense MO coefficients of the cyclically owned SCF k points (owner of k: MODULO(k-1, ranks)). The locally stored parts of the distributed matrices are summed to the owner in batches of k points: few large reductions instead of one global gather per k, and no rank stores the coefficients of k points it does not own.

Parameters
bs_env...
mo_coeffdistributed MO coefficients per k point and spin
coeffcoeff(:, :, k_local, spin) for the owned k points

Definition at line 136 of file gw_ri_rs_small_cell_full_kp_lattice.F.

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

◆ build_full_cell_grid()

subroutine, public gw_ri_rs_small_cell_full_kp_lattice::build_full_cell_grid ( type(post_scf_bandstructure_type), pointer bs_env,
integer, dimension(:, :), intent(out), allocatable index_to_cell )

Construct a complete cell grid dual to the uniform SCF k-point mesh.

Parameters
bs_env...
index_to_cell...

Definition at line 209 of file gw_ri_rs_small_cell_full_kp_lattice.F.

Here is the caller graph for this function:

◆ ri_metric_head_zero()

real(kind=dp) function, public gw_ri_rs_small_cell_full_kp_lattice::ri_metric_head_zero ( type(post_scf_bandstructure_type), pointer bs_env)

Zero-wave-vector Fourier value of the selected RI metric kernel.

Parameters
bs_env...
Returns
...

Definition at line 240 of file gw_ri_rs_small_cell_full_kp_lattice.F.

Here is the caller graph for this function:

◆ build_ri_2c_lattice()

subroutine, public gw_ri_rs_small_cell_full_kp_lattice::build_ri_2c_lattice ( type(cp_fm_type), dimension(:), intent(out), allocatable fm_r,
integer, dimension(:, :), intent(out), allocatable cells,
type(coulomb_operator_type), intent(in) potential,
real(kind=dp), intent(in) regularization,
type(post_scf_bandstructure_type), pointer bs_env,
type(qs_environment_type), pointer qs_env,
logical, intent(in), optional reference_basis )

Form distributed I_PQ(R) = (φ_P,0 | v | φ_Q,R) over every screened neighbor cell.

The finite-range potential v and the Gaussian screening radii determine the cell set. No cell is dropped because it lies outside the SCF Born-von Karman cell. Each real matrix remains distributed over the existing RI matrix communicator; callers release fm_R. The reciprocal interaction is I_PQ(q) = sum_R exp(i q.R) I_PQ(R).

Parameters
fm_R...
cells...
potential...
regularization...
bs_env...
qs_env...
reference_basis...

Definition at line 272 of file gw_ri_rs_small_cell_full_kp_lattice.F.

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

◆ ri_2c_lattice_to_kp()

subroutine, public gw_ri_rs_small_cell_full_kp_lattice::ri_2c_lattice_to_kp ( type(cp_fm_type), dimension(:), intent(in) fm_r,
integer, dimension(:, :), intent(in) cells,
real(kind=dp), dimension(3), intent(in) qpoint,
complex(kind=dp), dimension(:, :), intent(out) matrix_q )

Evaluate I_PQ(q) = sum_R exp(i q.R) I_PQ(R) collectively into an existing dense matrix.

q is in reciprocal fractional coordinates, so q.R includes 2π. The real-space matrices stay distributed; no global RI-by-RI-by-cell array is replicated on the ranks.

Parameters
fm_R...
cells...
qpoint...
matrix_q...

Definition at line 401 of file gw_ri_rs_small_cell_full_kp_lattice.F.

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

◆ gamma_auxiliary_charges()

subroutine, public gw_ri_rs_small_cell_full_kp_lattice::gamma_auxiliary_charges ( type(qs_environment_type), pointer qs_env,
complex(kind=dp), dimension(:), intent(out) charge )

Integrate each auxiliary function for the Gamma charge-mode projection. For a primitive x^(2m) exp(-α x²), I_0=sqrt(π/α), I_2m=(2m-1)I_(2m-2)/(2α). Odd Cartesian moments vanish; the existing spherical contraction supplies normalization.

Parameters
qs_envAtomic auxiliary bases.
chargeIntegrals of the reference auxiliary functions.

Definition at line 442 of file gw_ri_rs_small_cell_full_kp_lattice.F.

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

◆ block_range()

pure subroutine, public gw_ri_rs_small_cell_full_kp_lattice::block_range ( integer, intent(in) n,
integer, intent(in) rank,
integer, intent(in) n_rank,
integer, intent(out) first,
integer, intent(out) n_local )

Return the contiguous part of 1..n owned by one rank of a block distribution.

Parameters
nNumber of distributed items (grid rows or ordered grid pairs).
rank...
n_rank...
firstFirst owned item.
n_localNumber of owned items.

Definition at line 496 of file gw_ri_rs_small_cell_full_kp_lattice.F.

Here is the caller graph for this function:

Variable Documentation

◆ real_bytes

real(kind=dp), parameter, public gw_ri_rs_small_cell_full_kp_lattice::real_bytes = REAL(dp_size, dp)

Definition at line 81 of file gw_ri_rs_small_cell_full_kp_lattice.F.

◆ complex_bytes

real(kind=dp), parameter, public gw_ri_rs_small_cell_full_kp_lattice::complex_bytes = 2.0_dp*real_bytes

Definition at line 81 of file gw_ri_rs_small_cell_full_kp_lattice.F.