![]() |
(git:d3d49ac)
|
GW using RI-RS Approximation for molecules. More...
Functions/Subroutines | |
| subroutine, public | gw_calc_non_periodic_ri_rs (qs_env, bs_env) |
| GW calculation using RI-RS formalism for molecules. | |
| subroutine, public | precompute_ri_rs_radii (qs_env, bs_env) |
| Compute per-atom AO and RI basis radii from the most diffuse Gaussian primitive in the AO ("ORB") and RI auxiliary ("RI_AUX") basis sets. Stores results in bs_envri_rsradius_ao_per_atom(:) and bs_envri_rsradius_ri_per_atom(:) and prints a per-atom table. Radius: r_kind = sqrt(-log(eps) / alpha_min_kind) with eps = eps_filter. | |
| subroutine, public | ri_rs_grid_assembler (qs_env, bs_env, ri_rs_grid_points) |
| Compute grid points for RI-RS Right now based on Ivan and Xavier implementation JCP 150, 174120 (2019), JCTC 17, 2383 (2021) | |
| subroutine, public | atomic_basis_at_grid_point (qs_env, bs_env, ri_rs_grid_points, mat_phi_mu_l) |
| Evaluates the AO basis on the RI-RS grid and stores it as the sparse DBCSR matrix Φ_μl = Φ_μ(r_l) (rows = grid points in atom-aligned blocks of at most max_elements_per_block points, columns = one block per atom's full AO set). Grid points outside the reach of an atom's most diffuse Gaussian (or the CUTOFF_RADIUS_RL_AO) are skipped, and only blocks with at least one element > eps_filter are stored. This locality is the source of ALL grid-dimension sparsity used downstream. Also caches the atom centers and the per-chunk centroids needed by the optional CUTOFF_RADIUS_G_W / CUTOFF_RADIUS_RL_W operator truncations. | |
| subroutine, public | get_basis_offsets (particle_set, qs_kind_set, first_sgf, total_sgf) |
| Computes the AO basis offsets: first_sgf(iatom) is the global index of the first spherical Gaussian function (SGF) of iatom, first_sgf(natom+1) = total_sgf + 1, and total_sgf is the total number of AO basis functions. | |
| subroutine, public | compute_coeff_z_lp (qs_env, bs_env, ri_rs_grid_points, mat_phi_mu_l, mat_z_lp) |
| Computes the RI-RS fitting coefficients Z_lP by solving, independently for every RI atom P, a Jacobi-conditioned, Tikhonov-regularized linear system restricted to the grid points r_l inside P's integration sphere |r_l - R_P| <= cutoff_ri(P): D_ll' = [ Σ_μ Φ_μ(r_l) Φ_μ(r_l') ]² (squared grid Gram matrix, Eq. 13) D_lP = Σ_μν Φ_μ(r_l) Φ_ν(r_l) (μν|P) (grid-RI right-hand side, Eq. 15) d_l = 1 / sqrt(D_ll) (Jacobi conditioning vector) D'_ll' = d_l D_ll' d_l' + λ δ_ll' (λ = TIKHONOV_SIGMA regularization) Σ_l' D'_ll' Z'_l'P = d_l D_lP (Cholesky solve, Eq. 14) Z_lP = d_l Z'_l'P (undo the conditioning) Work is distributed over atoms in two phases (planned by classify_z_lp_atoms and lpt_assign_atoms): Phase A solves "small" atoms with single-rank LAPACK (dpotrf/dpotrs); Phase B solves "big" atoms, whose dense Gram matrix would exceed one rank's memory, with ScaLAPACK (pdpotrf/pdpotrs) over rank subgroups of size G. The solved Z columns are scattered into the sparse global mat_Z_lP. If a Z_lP restart file exists, it is read instead and the solve is skipped entirely. | |
| subroutine, public | solve_d_lp_distributed (phi_local, d_vec, d_lp, n_loc, n_ao, n_rhs, tikhonov, para_env_sub, blacs_env_sub, fm_struct_d, fm_struct_b, fm_d, fm_b, info) |
| Distributed pdpotrf/pdpotrs solve of D x = b for one atom of the RI-RS Z_lP build (Phase B, "big" atoms), called with a subgroup of cooperating ranks and an associated BLACS context. Each rank in the subgroup holds the (replicated) phi_local and the (replicated) RHS d_lp; it builds its own block-cyclic slice of the squared+Jacobi-scaled Gram matrix D via tiled DGEMM, factorizes via cp_fm_cholesky_decompose (UPLO='U'), and solves with cp_fm_cholesky_solve. The replicated d_lp is updated in place via cp_fm_get_submatrix. | |
GW using RI-RS Approximation for molecules.
| subroutine, public gw_non_periodic_ri_rs::gw_calc_non_periodic_ri_rs | ( | type(qs_environment_type), pointer | qs_env, |
| type(post_scf_bandstructure_type), pointer | bs_env | ||
| ) |
GW calculation using RI-RS formalism for molecules.
| qs_env | ... |
| bs_env | ... |
Definition at line 122 of file gw_non_periodic_ri_rs.F.
| subroutine, public gw_non_periodic_ri_rs::precompute_ri_rs_radii | ( | type(qs_environment_type), pointer | qs_env, |
| type(post_scf_bandstructure_type), pointer | bs_env | ||
| ) |
Compute per-atom AO and RI basis radii from the most diffuse Gaussian primitive in the AO ("ORB") and RI auxiliary ("RI_AUX") basis sets. Stores results in bs_envri_rsradius_ao_per_atom(:) and bs_envri_rsradius_ri_per_atom(:) and prints a per-atom table. Radius: r_kind = sqrt(-log(eps) / alpha_min_kind) with eps = eps_filter.
| qs_env | ... |
| bs_env | ... |
Definition at line 241 of file gw_non_periodic_ri_rs.F.
| subroutine, public gw_non_periodic_ri_rs::ri_rs_grid_assembler | ( | type(qs_environment_type), pointer | qs_env, |
| type(post_scf_bandstructure_type), pointer | bs_env, | ||
| real(kind=dp), dimension(:, :), intent(out), allocatable | ri_rs_grid_points | ||
| ) |
Compute grid points for RI-RS Right now based on Ivan and Xavier implementation JCP 150, 174120 (2019), JCTC 17, 2383 (2021)
| qs_env | ... |
| bs_env | ... |
| ri_rs_grid_points | ... |
Definition at line 405 of file gw_non_periodic_ri_rs.F.
| subroutine, public gw_non_periodic_ri_rs::atomic_basis_at_grid_point | ( | type(qs_environment_type), pointer | qs_env, |
| type(post_scf_bandstructure_type), pointer | bs_env, | ||
| real(kind=dp), dimension(:, :), intent(inout), allocatable | ri_rs_grid_points, | ||
| type(dbcsr_type), intent(out) | mat_phi_mu_l | ||
| ) |
Evaluates the AO basis on the RI-RS grid and stores it as the sparse DBCSR matrix Φ_μl = Φ_μ(r_l) (rows = grid points in atom-aligned blocks of at most max_elements_per_block points, columns = one block per atom's full AO set). Grid points outside the reach of an atom's most diffuse Gaussian (or the CUTOFF_RADIUS_RL_AO) are skipped, and only blocks with at least one element > eps_filter are stored. This locality is the source of ALL grid-dimension sparsity used downstream. Also caches the atom centers and the per-chunk centroids needed by the optional CUTOFF_RADIUS_G_W / CUTOFF_RADIUS_RL_W operator truncations.
| qs_env | ... |
| bs_env | ... |
| ri_rs_grid_points | ... |
| mat_phi_mu_l | ... |
Definition at line 613 of file gw_non_periodic_ri_rs.F.
| subroutine, public gw_non_periodic_ri_rs::get_basis_offsets | ( | type(particle_type), dimension(:), pointer | particle_set, |
| type(qs_kind_type), dimension(:), pointer | qs_kind_set, | ||
| integer, dimension(:), intent(out) | first_sgf, | ||
| integer, intent(out) | total_sgf | ||
| ) |
Computes the AO basis offsets: first_sgf(iatom) is the global index of the first spherical Gaussian function (SGF) of iatom, first_sgf(natom+1) = total_sgf + 1, and total_sgf is the total number of AO basis functions.
| particle_set | ... |
| qs_kind_set | ... |
| first_sgf | ... |
| total_sgf | ... |
Definition at line 909 of file gw_non_periodic_ri_rs.F.
| subroutine, public gw_non_periodic_ri_rs::compute_coeff_z_lp | ( | type(qs_environment_type), pointer | qs_env, |
| type(post_scf_bandstructure_type), pointer | bs_env, | ||
| real(kind=dp), dimension(:, :), intent(inout), allocatable | ri_rs_grid_points, | ||
| type(dbcsr_type), intent(inout) | mat_phi_mu_l, | ||
| type(dbcsr_type), intent(out) | mat_z_lp | ||
| ) |
Computes the RI-RS fitting coefficients Z_lP by solving, independently for every RI atom P, a Jacobi-conditioned, Tikhonov-regularized linear system restricted to the grid points r_l inside P's integration sphere |r_l - R_P| <= cutoff_ri(P): D_ll' = [ Σ_μ Φ_μ(r_l) Φ_μ(r_l') ]² (squared grid Gram matrix, Eq. 13) D_lP = Σ_μν Φ_μ(r_l) Φ_ν(r_l) (μν|P) (grid-RI right-hand side, Eq. 15) d_l = 1 / sqrt(D_ll) (Jacobi conditioning vector) D'_ll' = d_l D_ll' d_l' + λ δ_ll' (λ = TIKHONOV_SIGMA regularization) Σ_l' D'_ll' Z'_l'P = d_l D_lP (Cholesky solve, Eq. 14) Z_lP = d_l Z'_l'P (undo the conditioning) Work is distributed over atoms in two phases (planned by classify_z_lp_atoms and lpt_assign_atoms): Phase A solves "small" atoms with single-rank LAPACK (dpotrf/dpotrs); Phase B solves "big" atoms, whose dense Gram matrix would exceed one rank's memory, with ScaLAPACK (pdpotrf/pdpotrs) over rank subgroups of size G. The solved Z columns are scattered into the sparse global mat_Z_lP. If a Z_lP restart file exists, it is read instead and the solve is skipped entirely.
| qs_env | ... |
| bs_env | ... |
| ri_rs_grid_points | ... |
| mat_phi_mu_l | ... |
| mat_Z_lP | ... |
Definition at line 956 of file gw_non_periodic_ri_rs.F.
| subroutine, public gw_non_periodic_ri_rs::solve_d_lp_distributed | ( | real(kind=dp), dimension(:, :), intent(in) | phi_local, |
| real(kind=dp), dimension(:), intent(in) | d_vec, | ||
| real(kind=dp), dimension(:, :), intent(inout) | d_lp, | ||
| integer, intent(in) | n_loc, | ||
| integer, intent(in) | n_ao, | ||
| integer, intent(in) | n_rhs, | ||
| real(kind=dp), intent(in) | tikhonov, | ||
| type(mp_para_env_type), pointer | para_env_sub, | ||
| type(cp_blacs_env_type), pointer | blacs_env_sub, | ||
| type(cp_fm_struct_type), pointer | fm_struct_d, | ||
| type(cp_fm_struct_type), pointer | fm_struct_b, | ||
| type(cp_fm_type), intent(inout) | fm_d, | ||
| type(cp_fm_type), intent(inout) | fm_b, | ||
| integer, intent(out) | info | ||
| ) |
Distributed pdpotrf/pdpotrs solve of D x = b for one atom of the RI-RS Z_lP build (Phase B, "big" atoms), called with a subgroup of cooperating ranks and an associated BLACS context. Each rank in the subgroup holds the (replicated) phi_local and the (replicated) RHS d_lp; it builds its own block-cyclic slice of the squared+Jacobi-scaled Gram matrix D via tiled DGEMM, factorizes via cp_fm_cholesky_decompose (UPLO='U'), and solves with cp_fm_cholesky_solve. The replicated d_lp is updated in place via cp_fm_get_submatrix.
| phi_local | ... |
| d_vec | ... |
| d_lp | ... |
| n_loc | ... |
| n_ao | ... |
| n_rhs | ... |
| tikhonov | ... |
| para_env_sub | ... |
| blacs_env_sub | ... |
| fm_struct_D | ... |
| fm_struct_b | ... |
| fm_D | ... |
| fm_b | ... |
| info | ... |
Definition at line 2085 of file gw_non_periodic_ri_rs.F.