(git:27c966b)
Loading...
Searching...
No Matches
gw_ri_rs_large_cell_gamma.F
Go to the documentation of this file.
1!--------------------------------------------------------------------------------------------------!
2! CP2K: A general program to perform molecular dynamics simulations !
3! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
4! !
5! SPDX-License-Identifier: GPL-2.0-or-later !
6!--------------------------------------------------------------------------------------------------!
7
8! **************************************************************************************************
9!> \brief GW using the RI-RS approximation for large periodic cells at Gamma
10!> \par History
11!> 04.2026 created [Ritaj Tyagi]
12! **************************************************************************************************
14 USE cp_fm_types, ONLY: cp_fm_type
20 USE gw_utils, ONLY: de_init_bs_env
21 USE kinds, ONLY: dp
25#include "./base/base_uses.f90"
26
27 IMPLICIT NONE
28
29 PRIVATE
30
31 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'gw_ri_rs_large_cell_Gamma'
32
34
35CONTAINS
36
37! **************************************************************************************************
38!> \brief GW calculation using RI-RS formalism for large periodic cells at Gamma
39!> \param qs_env ...
40!> \param bs_env Band-structure environment containing GW parameters.
41! **************************************************************************************************
42
43 SUBROUTINE gw_calc_ri_rs_large_cell_gamma(qs_env, bs_env)
44
45 TYPE(qs_environment_type), POINTER :: qs_env
46 TYPE(post_scf_bandstructure_type), POINTER :: bs_env
47
48 CHARACTER(LEN=*), PARAMETER :: routinen = 'gw_calc_ri_rs_large_cell_Gamma'
49
50 INTEGER :: handle
51 TYPE(cp_fm_type), ALLOCATABLE, DIMENSION(:) :: fm_sigma_x_gamma, fm_w_time
52 TYPE(cp_fm_type), ALLOCATABLE, DIMENSION(:, :, :) :: fm_sigma_c_gamma_time
53
54 CALL timeset(routinen, handle)
55
56 ! Build the common grid, phi and Z representation with the system's boundary conditions.
57 CALL ensure_ri_rs_representation(qs_env, bs_env)
58
59 !!========================================================================
60 !! 4. Compute Independent-Particle Polarizability (χ)
61 !! G^occ_µλ(i|τ|) = sum_n^occ C_µn e^(-|(ϵ_n-ϵ_F)τ|) C_λn
62 !! G^vir_µλ(i|τ|) = sum_n^vir C_µn e^(-|(ϵ_n-ϵ_F)τ|) C_λn
63 !! G^occ_ll'(i|τ|) = sum_µν ϕ_µ(r_l) G^occ_µν ϕ_ν(r_l')
64 !! G^vir_ll'(i|τ|) = sum_µν ϕ_µ(r_l) G^vir_µν ϕ_ν(r_l')
65 !! χ_ll'(iτ) = G^occ_ll'(i|τ|) * G^vir_ll'(i|τ|)
66 !! χ_PQ(iτ) = sum_ll' Z_lP χ_ll'(iτ) Z_l'Q
67 !!========================================================================
68 CALL get_mat_chi_gamma_tau(bs_env, bs_env%mat_chi_Gamma_tau, cutoff=0.0_dp)
69
70 !!========================================================================
71 !! 5. Compute Screened Interaction (W^MIC)
72 !! χ_PQ(iτ) -> χ_PQ(iω) -> ε_PQ(iω) -> W_PQ(iω) -> W^MIC_PQ(iτ)
73 !!========================================================================
74 CALL get_w_mic(bs_env, qs_env, bs_env%mat_chi_Gamma_tau, fm_w_time)
75
76 !!========================================================================
77 !! 6. Compute Exact Exchange Self-Energy (Σ^x)
78 !! D_µν = sum_n^occ C_µn C_νn
79 !! D_ll' = sum_µν ϕ_µ(r_l) D_µν ϕ_ν(r_l')
80 !! V^trunc_ll' = sum_PQ Z_lP V^trunc_PQ Z_l'Q
81 !! Σ^x_ll' = D_ll' * V^trunc_ll'
82 !! Σ^x_λσ(k=0) = -sum_ll' ϕ_λ(r_l) Σ^x_ll' ϕ_σ(r_l')
83 !!========================================================================
84 CALL compute_sigma_x(bs_env, qs_env, fm_sigma_x_gamma, cutoff=0.0_dp)
85
86 !!========================================================================
87 !! 7. Compute Correlation Self-Energy (Σ^c)
88 !! W^MIC_ll'(iτ) = sum_PQ Z_lP W^MIC_PQ(iτ) Z_l'Q
89 !! Σ^c_ll'(iτ) = -G^occ_ll'(i|τ|) * W^MIC_ll'(iτ), for τ < 0
90 !! Σ^c_ll'(iτ) = G^vir_ll'(i|τ|) * W^MIC_ll'(iτ), for τ > 0
91 !! Σ^c_λσ(iτ) = sum_ll' ϕ_λ(r_l) Σ^c_ll'(iτ) ϕ_σ(r_l')
92 !!========================================================================
93 CALL compute_sigma_c(bs_env, fm_w_time, fm_sigma_c_gamma_time, cutoff=0.0_dp)
94
95 !!========================================================================
96 !! 8. Compute Quasiparticle Energies
97 !! Σ^c_λσ(iτ) -> Σ^c_nn(ϵ)
98 !! ϵ_nk^GW = ϵ_nk^DFT + Σ^c_nn(ϵ) + Σ^x_nn - v^xc_nn
99 !!========================================================================
100 CALL compute_qp_energies(bs_env, qs_env, fm_sigma_x_gamma, fm_sigma_c_gamma_time)
101
102 CALL de_init_bs_env(qs_env, bs_env)
103
104 CALL timestop(handle)
105
106 END SUBROUTINE gw_calc_ri_rs_large_cell_gamma
107
represent a full matrix distributed on many processors
Definition cp_fm_types.F:15
Coulomb matrices and screened interactions for imaginary-time GW.
subroutine, public get_w_mic(bs_env, qs_env, mat_chi_gamma_tau, fm_w_mic_time)
...
Shared RI-RS polarizability and self-energy assembly.
subroutine, public compute_sigma_c(bs_env, fm_w_time, fm_sigma_c_gamma_time, cutoff, keep_w_and_files)
Computes the correlation part of the GW self-energy on the imaginary-time grid: Σ^c_λσ(iτ<0) = -Σ_ll'...
subroutine, public get_mat_chi_gamma_tau(bs_env, mat_chi_gamma_tau, cutoff)
Computes χ_PQ(iτ) from the occupied and virtual Green's functions.
subroutine, public compute_sigma_x(bs_env, qs_env, fm_sigma_x_gamma, cutoff)
Computes the exact-exchange part of the GW self-energy: D_μν = Σ_n^occ C_μn C_νn (density matrix = G^...
GW using the RI-RS approximation for large periodic cells at Gamma.
subroutine, public gw_calc_ri_rs_large_cell_gamma(qs_env, bs_env)
GW calculation using RI-RS formalism for large periodic cells at Gamma.
Routines from paper [Graml2024].
subroutine, public compute_qp_energies(bs_env, qs_env, fm_sigma_x_gamma, fm_sigma_c_gamma_time)
...
subroutine, public de_init_bs_env(qs_env, bs_env)
Releases the memory-heavy GW intermediates that cannot be freed in bs_env_release,...
Definition gw_utils.F:3562
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
Builds the shared RI-RS grid, AO collocation and fitting representation.
Definition ri_rs_setup.F:15
subroutine, public ensure_ri_rs_representation(qs_env, bs_env)
Populate the RI-RS grid, AO collocation and auxiliary fitting coefficients once. Periodic systems use...
Definition ri_rs_setup.F:79
represent a full matrix