(git:b1f098b)
Loading...
Searching...
No Matches
post_scf_bandstructure_methods.F
Go to the documentation of this file.
1!--------------------------------------------------------------------------------------------------!
2! CP2K: A general program to perform molecular dynamics simulations !
3! Copyright 2000-2024 CP2K developers group <https://cp2k.org> !
4! !
5! SPDX-License-Identifier: GPL-2.0-or-later !
6!--------------------------------------------------------------------------------------------------!
7
9 USE gw_methods, ONLY: gw
17 USE qs_scf, ONLY: scf
20#include "./base/base_uses.f90"
21
22 IMPLICIT NONE
23
24 PRIVATE
25
26 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'post_scf_bandstructure_methods'
27
29
30CONTAINS
31
32! **************************************************************************************************
33!> \brief Perform post-SCF band structure calculations from higher level methods
34!> \param qs_env Quickstep environment
35!> \param post_scf_bandstructure_section ...
36!> \par History
37!> * 07.2023 created [Jan Wilhelm]
38! **************************************************************************************************
39 SUBROUTINE post_scf_bandstructure(qs_env, post_scf_bandstructure_section)
40 TYPE(qs_environment_type), POINTER :: qs_env
41 TYPE(section_vals_type), POINTER :: post_scf_bandstructure_section
42
43 CHARACTER(LEN=*), PARAMETER :: routinen = 'post_scf_bandstructure'
44
45 INTEGER :: handle
46
47 CALL timeset(routinen, handle)
48
49 ! general setup of post SCF bandstructure calculation
50 CALL create_and_init_bs_env(qs_env, qs_env%bs_env, post_scf_bandstructure_section)
51
52 ! shifts of eigenvalues/bandstructure due to spin-orbit coupling from pseudopotentials
53 IF (qs_env%bs_env%do_soc) THEN
54 CALL soc(qs_env, qs_env%bs_env)
55 END IF
56
57 ! GW calculation for eigenvalues/bandstructure
58 IF (qs_env%bs_env%do_gw) THEN
59 CALL gw(qs_env, qs_env%bs_env, post_scf_bandstructure_section)
60 END IF
61
62 ! density of states (DOS) and projected DOS for DFT, DFT+SOC, G0W0, G0W0+SOC, also
63 ! quantities from local DOS (LDOS) as local valence band maximum (VBM), local conduction
64 ! band minimum (CBM), and local gap are calculated (local: as function of space r)
65 CALL dos_pdos_ldos(qs_env, qs_env%bs_env)
66
67 ! band structure of primitive unit cell for DFT, DFT+SOC, G0W0, G0W0+SOC
68 IF (qs_env%bs_env%do_bs_primitive_cell) THEN
69 CALL bandstructure_primitive_cell_all_methods(qs_env, qs_env%bs_env)
70 END IF
71
72 CALL timestop(handle)
73
74 END SUBROUTINE post_scf_bandstructure
75
76! **************************************************************************************************
77!> \brief ...
78!> \param qs_env ...
79!> \param bs_env ...
80! **************************************************************************************************
81 SUBROUTINE soc(qs_env, bs_env)
82 TYPE(qs_environment_type), POINTER :: qs_env
83 TYPE(post_scf_bandstructure_type), POINTER :: bs_env
84
85 CHARACTER(LEN=*), PARAMETER :: routinen = 'soc'
86
87 INTEGER :: handle
88
89 CALL timeset(routinen, handle)
90
91 ! Compute V^SOC_µν^(α) = ħ/2 < ϕ_µ | sum_ℓ ΔV_ℓ^SO(r,r') L^(α) | ϕ_ν >, α = x, y, z, see
92 ! Hartwigsen, Goedecker, Hutter, Eq.(18), (19) (doi.org/10.1103/PhysRevB.58.3641)
93 CALL v_soc_xyz_from_pseudopotential(qs_env, bs_env%mat_V_SOC_xyz)
94
95 ! Spinor KS-matrix H_µν,σσ' = h^SCF_µν*δ_σσ' + sum_α V^SOC_µν^(α)*Pauli-matrix^(α)_σσ', see
96 ! Hartwigsen, Goedecker, Hutter, Eq.(18) (doi.org/10.1103/PhysRevB.58.3641)
97 CALL h_ks_spinor(bs_env%cfm_ks_spinor_ao_Gamma, bs_env%fm_ks_Gamma(1:2), bs_env%n_spin, &
98 bs_env%mat_V_SOC_xyz(:, 1), bs_env%cfm_s_spinor_Gamma, bs_env%fm_s_Gamma, &
99 bs_env%cfm_SOC_spinor_ao_Gamma)
100
101 CALL timestop(handle)
102
103 END SUBROUTINE soc
104
105! **************************************************************************************************
106!> \brief ...
107!> \param qs_env ...
108!> \param bs_env ...
109! **************************************************************************************************
110 SUBROUTINE bandstructure_primitive_cell_all_methods(qs_env, bs_env)
111
112 TYPE(qs_environment_type), POINTER :: qs_env
113 TYPE(post_scf_bandstructure_type), POINTER :: bs_env
114
115 CHARACTER(LEN=*), PARAMETER :: routinen = 'bandstructure_primitive_cell_all_methods'
116
117 INTEGER :: handle
118
119 CALL timeset(routinen, handle)
120
121 CALL bandstructure_primitive_cell(qs_env, bs_env, &
122 bs_env%eigenval_prim_cell_scf, &
123 "bandstructure_SCF.bs", &
124 bs_env%fm_ks_Gamma(1))
125 IF (bs_env%do_gw) THEN
126 CALL bandstructure_primitive_cell(qs_env, bs_env, &
127 bs_env%eigenval_prim_cell_G0W0, &
128 "bandstructure_G0W0.bs", &
129 bs_env%fm_h_G0W0_Gamma)
130 END IF
131
132 IF (bs_env%do_soc) THEN
133 CALL bandstructure_primitive_cell_spinor(qs_env, bs_env, &
134 bs_env%eigenval_prim_cell_scf_soc, &
135 "bandstructure_SCF_SOC.bs", &
136 bs_env%cfm_ks_spinor_ao_Gamma)
137 END IF
138
139 CALL timestop(handle)
140
141 END SUBROUTINE bandstructure_primitive_cell_all_methods
142
subroutine, public gw(qs_env, bs_env, post_scf_bandstructure_section)
Perform GW band structure calculation.
Definition gw_methods.F:111
objects that represent the structure of input sections and the data contained in an input section
subroutine, public post_scf_bandstructure(qs_env, post_scf_bandstructure_section)
Perform post-SCF band structure calculations from higher level methods.
subroutine, public dos_pdos_ldos(qs_env, bs_env)
...
subroutine, public bandstructure_primitive_cell_spinor(qs_env, bs_env, eigenvalues, filename, cfm_h_gamma_spinor)
...
subroutine, public bandstructure_primitive_cell(qs_env, bs_env, eigenvalues, filename, fm_h_gamma)
...
subroutine, public create_and_init_bs_env(qs_env, bs_env, post_scf_bandstructure_section)
...
Routines for the Quickstep SCF run.
Definition qs_scf.F:47
subroutine, public scf(qs_env, has_converged, total_scf_steps)
perform an scf procedure in the given qs_env
Definition qs_scf.F:201
subroutine, public h_ks_spinor(cfm_ks_spinor_ao, fm_ks, n_spin, mat_v_soc_xyz, cfm_s_double, fm_s, cfm_soc_spinor_ao)
Spinor KS-matrix H_µν,σσ' = h_µν,σ*δ_σσ' + sum_α V^SOC_µν^(α)*Pauli-matrix^(α)_σσ',...
subroutine, public v_soc_xyz_from_pseudopotential(qs_env, mat_v_soc_xyz)
Compute V^SOC_µν^(α) = ħ/2 < ϕ_µ | sum_ℓ ΔV_ℓ^SO(r,r') L^(α) | ϕ_ν >, α = x, y, z,...