Line data Source code
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
10 : !> \author Jan Wilhelm
11 : !> \date 07.2023
12 : ! **************************************************************************************************
13 : MODULE gw
14 : USE gw_ri_rs_large_cell_Gamma, ONLY: gw_calc_ri_rs_large_cell_Gamma
15 : USE gw_ri_rs_non_periodic, ONLY: gw_calc_ri_rs_non_periodic
16 : USE gw_tensor_large_cell_Gamma, ONLY: gw_calc_tensor_large_cell_Gamma
17 : USE gw_tensor_large_cell_Gamma_static_cohsex,ONLY: gw_calc_tensor_large_cell_Gamma_static_cohsex
18 : USE gw_tensor_small_cell_full_kp, ONLY: gw_calc_tensor_small_cell_full_kp
19 : USE gw_utils, ONLY: create_and_init_bs_env_for_gw
20 : USE input_constants, ONLY: ri_rs_large_cell_Gamma,&
21 : ri_rs_non_periodic,&
22 : tensor_large_cell_Gamma,&
23 : tensor_small_cell_full_kp,&
24 : tensor_static_cohsex
25 : USE input_section_types, ONLY: section_vals_type
26 : USE post_scf_bandstructure_types, ONLY: post_scf_bandstructure_type
27 : USE qs_environment_types, ONLY: qs_environment_type
28 : #include "./base/base_uses.f90"
29 :
30 : IMPLICIT NONE
31 :
32 : PRIVATE
33 :
34 : CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'gw'
35 :
36 : PUBLIC :: run_gw
37 :
38 : CONTAINS
39 :
40 : ! **************************************************************************************************
41 : !> \brief Perform GW band structure calculation
42 : !> \param qs_env ...
43 : !> \param bs_env ...
44 : !> \param post_scf_bandstructure_section ...
45 : !> \par History
46 : !> * 04.2026 Added GW RI-RS module [Ritaj Tyagi]
47 : !> * 07.2023 created [Jan Wilhelm]
48 : ! **************************************************************************************************
49 138 : SUBROUTINE run_gw(qs_env, bs_env, post_scf_bandstructure_section)
50 : TYPE(qs_environment_type), POINTER :: qs_env
51 : TYPE(post_scf_bandstructure_type), POINTER :: bs_env
52 : TYPE(section_vals_type), POINTER :: post_scf_bandstructure_section
53 :
54 : CHARACTER(LEN=*), PARAMETER :: routineN = 'run_gw'
55 :
56 : INTEGER :: handle
57 :
58 138 : CALL timeset(routineN, handle)
59 :
60 138 : CALL create_and_init_bs_env_for_gw(qs_env, bs_env, post_scf_bandstructure_section)
61 :
62 154 : SELECT CASE (bs_env%gw_implementation)
63 :
64 : CASE (tensor_small_cell_full_kp)
65 :
66 16 : CALL gw_calc_tensor_small_cell_full_kp(qs_env, bs_env)
67 :
68 : CASE (tensor_large_cell_Gamma)
69 :
70 74 : CALL gw_calc_tensor_large_cell_Gamma(qs_env, bs_env)
71 :
72 : CASE (ri_rs_large_cell_Gamma)
73 :
74 0 : CALL gw_calc_ri_rs_large_cell_Gamma(qs_env, bs_env)
75 :
76 : CASE (ri_rs_non_periodic)
77 :
78 40 : CALL gw_calc_ri_rs_non_periodic(qs_env, bs_env)
79 :
80 : CASE (tensor_static_cohsex)
81 :
82 8 : CALL gw_calc_tensor_large_cell_Gamma_static_cohsex(qs_env, bs_env)
83 :
84 : CASE DEFAULT
85 :
86 138 : CPABORT("Unknown GW implementation.")
87 :
88 : END SELECT
89 :
90 138 : CALL timestop(handle)
91 :
92 138 : END SUBROUTINE run_gw
93 :
94 : END MODULE gw
|