(git:7fc1fe1)
Loading...
Searching...
No Matches
nlo.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!> \author Jan Wilhelm, with help from ChatGPT
9
10MODULE nlo
12 USE cp_dbcsr_api, ONLY: dbcsr_get_info,&
21 USE kinds, ONLY: dp
24 USE kpoint_types, ONLY: kpoint_create,&
26 USE mathlib, ONLY: vector_product
31 USE nlo_types, ONLY: nlo_type,&
33 USE physcon, ONLY: a_bohr,&
34 c_light,&
35 e_charge,&
36 evolt,&
38 joule,&
45#include "../base/base_uses.f90"
46
47 IMPLICIT NONE
48
49 PRIVATE
50
51 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'nlo'
52
54
55CONTAINS
56
57! **************************************************************************************************
58!> \brief Calculate frequency-dependent χ^(2) to χ^(5) after the ground-state SCF.
59!> \param qs_env Converged k-point SCF environment
60!> \note The independent-particle approximation uses the converged SCF Hamiltonian.
61!> Excitonic effects and time-dependent screening (TDDFT, GW-BSE) are absent.
62!>
63!> Method: length-gauge density-matrix response in the spirit of
64!> Aversa and Sipe, Phys. Rev. B 52, 14636 (1995),
65!> DOI: 10.1103/PhysRevB.52.14636; analytic covariant k derivatives follow
66!> Ventura et al., Phys. Rev. B 96, 035431 (2017),
67!> DOI: 10.1103/PhysRevB.96.035431. The finite AO projection, analytic
68!> position curvature, and numerical implementation are defined below
69!> and in nlo_current_tensor_derivatives.
70!>
71!> 1. Read the optical k mesh, incident frequencies, tensor elements,
72!> and either a common time T₁ = T₂ or separate relaxation times.
73!>
74!> 2. Build lattice-image matrices for the AO Hamiltonian H, overlap S,
75!> dipole d.
76!> d_μν(R) = ⟨ϕ_(μ0)|r|ϕ_(νR)⟩ is a position matrix; the electron
77!> charge enters the later SI conversion. At each optical k point:
78!>
79!> X(k) = Σ_R exp(2π i k_frac · R) X(R), with X = H, S, d.
80!>
81!> Differentiating the phase gives every required k derivative.
82!> The AO overlap is removed, then H and position matrices are
83!> expressed in the eigenvector basis of H at the current k point.
84!>
85!> 3. At each optical k point, diagonalize the Hamiltonian once.
86!> The occupied bands define the equilibrium density matrix.
87!> A light field changes that density matrix: first order uses the
88!> equilibrium matrix, second order uses first-order responses,
89!> and so on through fifth order. Each new response is obtained
90!> from the previous one by an analytic k derivative and a
91!> band-energy denominator ε_m - ε_n - Ω - iΓ_mn. Here ε_m and ε_n
92!> are band energies, Ω is the sum of the incident photon energies,
93!> and Γ is the band-pair relaxation rate. For T₁ = T₂ it is the
94!> constant 1/T₁. For separate times, with γᵢ = 1/Tᵢ and
95!> Δε = ε_m - ε_n, it is
96!>
97!> Γ_mn = γ₁ + (γ₂ - γ₁)[1 - exp(-(Δε/w)²)].
98!>
99!> The positive width w sets the smooth transition at nearly
100!> degenerate bands. Its basis-covariant operator form is
101!> Γ_H(X) = γ₂X + (γ₁ - γ₂)exp[-(ad_H/w)²]X,
102!> where ad_H(X) = [H,X]. Its analytic k derivatives enter the
103!> response. All possible orders of
104!> the incident fields are averaged. No numerical derivatives of
105!> separately diagonalized bands or their phases are used.
106!>
107!> The position operator in the band representation is
108!>
109!> r_a = i ∂/∂k_a + A_a .
110!>
111!> The subscript a denotes x, y or z. A_a is the matrix obtained
112!> from the AO dipole matrix after orthonormalizing and rotating
113!> into the central band basis. It is the finite-basis part of
114!> the position operator. When a field changes the current,
115!> an additional term from this matrix is required:
116!>
117!> F_ia = ∂A_a/∂k_i - ∂A_i/∂k_a - i [A_i, A_a] .
118!>
119!> Here i is the output-current direction. F_ia is the position
120!> curvature; its contribution to the current is always included.
121!> The other current contribution is the band-velocity matrix
122!> multiplied by the density response.
123!> Summing over optical k points and spin gives the
124!> cell-integrated current response I^(n) in atomic units,
125!> stored locally on each MPI rank.
126!>
127!> 4. Sum I^(n) across MPI ranks, convert it to SI units and
128!> divide by the simulation-cell volume V. The result is the
129!> nonlinear conductivity σ^(n) for each field order. For an
130!> output frequency Ω, the corresponding polarization obeys
131!> J(Ω) = -i Ω P(Ω). Hence:
132!>
133!> χ²_iab = σ²_iab / [-i (ω₁+ω₂) ε₀]
134!> χ³_iabc = σ³_iabc / [-i (ω₁+ω₂+ω₃) ε₀]
135!> χ⁴_iabcd = σ⁴_iabcd / [-i (ω₁+ω₂+ω₃+ω₄) ε₀]
136!> χ⁵_iabcde = σ⁵_iabcde / [-i (ω₁+ω₂+ω₃+ω₄+ω₅) ε₀] .
137!>
138!> The SI conversion is in nlo_write_susceptibility. For a
139!> two-dimensional slab of in-plane area A, the sheet response
140!> is χ_sheet = (V/A) χ_volume. Ω must be nonzero.
141!>
142!> 5. Release the NLO matrices.
143! **************************************************************************************************
144 SUBROUTINE run_nlo(qs_env)
145 TYPE(qs_environment_type), POINTER :: qs_env
146
147 CHARACTER(len=*), PARAMETER :: routinen = 'run_nlo'
148
149 INTEGER :: handle
150 LOGICAL :: nlo_present
151 TYPE(nlo_type) :: nlo_env
152 TYPE(section_vals_type), POINTER :: input, nlo_section
153
154 CALL get_qs_env(qs_env, input=input)
155 nlo_section => section_vals_get_subs_vals(input, 'PROPERTIES%NONLINEAR_OPTICS')
156 CALL section_vals_val_get(nlo_section, '_SECTION_PARAMETERS_', l_val=nlo_present)
157 IF (.NOT. nlo_present) RETURN
158
159 CALL timeset(routinen, handle)
160
161 ! 1. Read and validate the nonlinear optical input.
162 CALL read_nlo_input(qs_env, nlo_env)
163
164 ! 2. Prepare the AO matrices from the converged SCF calculation.
165 CALL nlo_prepare_environment(qs_env, nlo_env)
166
167 ! 3. Calculate the density response and integrate the current over k.
168 ! I^(n) = -sum_(spin,k) w_k Tr[v(E) rho^(n)] in atomic units.
169 CALL nlo_bz_integration(nlo_env)
170
171 ! 4. Convert the current to susceptibility and print the requested tensors.
172 ! chi^(n) = I^(n) / [V epsilon_0 (-i Omega)] after SI conversion.
173 CALL nlo_write_susceptibility(nlo_env)
174
175 ! 5. Release the NLO matrices.
176 CALL release_nlo_environment(nlo_env)
177
178 CALL timestop(handle)
179
180 END SUBROUTINE run_nlo
181
182! **************************************************************************************************
183!> \brief Build the real-space Hamiltonian, overlap and position matrices from the SCF result.
184!> \param qs_env Converged k-point SCF environment
185!> \param nlo_env NLO settings and data for the calculation
186! **************************************************************************************************
187 SUBROUTINE nlo_prepare_environment(qs_env, nlo_env)
188 TYPE(qs_environment_type), POINTER :: qs_env
189 TYPE(nlo_type), INTENT(INOUT) :: nlo_env
190
191 CHARACTER(len=*), PARAMETER :: routinen = 'nlo_prepare_environment'
192
193 INTEGER :: handle, ik, iw
194 LOGICAL :: scf_has_kpoints
195 TYPE(dbcsr_p_type), POINTER :: dr(:, :), hr(:, :), sr(:, :)
196 TYPE(dft_control_type), POINTER :: dft_control
197 TYPE(kpoint_type), POINTER :: scf
198 TYPE(neighbor_list_set_p_type), POINTER :: all_pairs(:)
199 TYPE(scf_control_type), POINTER :: scf_control
200
201 CALL timeset(routinen, handle)
202
203 CALL get_qs_env(qs_env, do_kpoints=scf_has_kpoints, dft_control=dft_control, &
204 scf_control=scf_control)
205 IF (scf_control%smear%do_smear) cpabort('NONLINEAR_OPTICS requires SCF without smearing.')
206 IF (.NOT. scf_has_kpoints) THEN
207 cpabort('NONLINEAR_OPTICS requires k-point SCF; Gamma-only SCF is unsupported.')
208 END IF
209 SELECT CASE (dft_control%qs_control%method_id)
211 CASE DEFAULT
212 cpabort('NONLINEAR_OPTICS currently supports GPW/GAPW only.')
213 END SELECT
214 nlo_env%n_kpoints = 1
215 DO ik = 1, 3
216 IF (nlo_env%n_kpoints > huge(nlo_env%n_kpoints)/nlo_env%k_mesh(ik)) THEN
217 cpabort('NONLINEAR_OPTICS K_MESH exceeds integer indexing.')
218 END IF
219 nlo_env%n_kpoints = nlo_env%n_kpoints*nlo_env%k_mesh(ik)
220 END DO
221 NULLIFY (nlo_env%images, dr)
222 CALL get_qs_env(qs_env, cell=nlo_env%cell, para_env=nlo_env%para_env, matrix_ks_kp=hr, &
223 matrix_s_kp=sr, sab_all=all_pairs, kpoints=scf, mos=nlo_env%mos)
224 IF (any(nlo_env%cell%perd == 0 .AND. nlo_env%k_mesh /= 1)) THEN
225 cpabort('NONLINEAR_OPTICS K_MESH must be one in each nonperiodic direction.')
226 END IF
227 IF (nlo_env%cell%deth <= 0.0_dp) cpabort('NONLINEAR_OPTICS requires positive cell volume.')
228 CALL dbcsr_get_info(sr(1, 1)%matrix, nfullrows_total=nlo_env%n_ao)
229 nlo_env%n_spin = SIZE(hr, 1)
230 nlo_env%n_bands = nlo_env%n_ao
231 CALL kpoint_create(nlo_env%images)
232 CALL kpoint_init_cell_index(nlo_env%images, all_pairs, nlo_env%para_env, nlo_env%n_images)
233 ALLOCATE (dr(3, nlo_env%n_images))
234 CALL build_local_moment_matrix_rs_img(qs_env, dr)
235 ALLOCATE (nlo_env%h_ao_R(nlo_env%n_spin, nlo_env%n_ao, nlo_env%n_ao, nlo_env%n_images), &
236 source=0.0_dp)
237 ALLOCATE (nlo_env%s_ao_R(1, nlo_env%n_ao, nlo_env%n_ao, nlo_env%n_images), source=0.0_dp)
238 ALLOCATE (nlo_env%d_ao_R(3, nlo_env%n_ao, nlo_env%n_ao, nlo_env%n_images), source=0.0_dp)
239 ! H(R), S(R), d(R) supply X(k) = sum_R exp(2 pi i k_frac.R) X(R).
240 CALL replicate_rs_matrices(hr, scf, nlo_env%h_ao_R, nlo_env%images%cell_to_index)
241 CALL replicate_rs_matrices(sr, scf, nlo_env%s_ao_R, nlo_env%images%cell_to_index)
242 CALL replicate_rs_matrices(dr, nlo_env%images, nlo_env%d_ao_R, nlo_env%images%cell_to_index)
245 IF (iw > 0) THEN
246 WRITE (iw, '()')
247 WRITE (iw, '()')
248 WRITE (iw, '(T2,A,T69,I12)') 'NONLINEAR_OPTICS| Selected tensor elements:', &
249 count(nlo_env%elements)
250 WRITE (iw, '(T2,A,T69,I12)') 'NONLINEAR_OPTICS| Bands in response:', nlo_env%n_bands
251 IF (nlo_env%t1_au == nlo_env%t2_au) THEN
252 WRITE (iw, '(T2,A,T70,F8.1,1X,A)') 'NONLINEAR_OPTICS| T1 = T2:', &
253 nlo_env%t1_au*femtoseconds, 'fs'
254 WRITE (iw, '(T2,A,T73,F8.1,1X,A)') 'NONLINEAR_OPTICS| ℏ/T1 = ℏ/T2:', &
255 1000.0_dp*evolt/nlo_env%t1_au, 'meV'
256 ELSE
257 WRITE (iw, '(T2,A,T70,F8.1,1X,A)') 'NONLINEAR_OPTICS| T1:', &
258 nlo_env%t1_au*femtoseconds, 'fs'
259 WRITE (iw, '(T2,A,T70,F8.1,1X,A)') 'NONLINEAR_OPTICS| T2:', &
260 nlo_env%t2_au*femtoseconds, 'fs'
261 WRITE (iw, '(T2,A,T71,F8.1,1X,A)') 'NONLINEAR_OPTICS| ℏ/T1:', &
262 1000.0_dp*evolt/nlo_env%t1_au, 'meV'
263 WRITE (iw, '(T2,A,T71,F8.1,1X,A)') 'NONLINEAR_OPTICS| ℏ/T2:', &
264 1000.0_dp*evolt/nlo_env%t2_au, 'meV'
265 WRITE (iw, '(T2,A,T69,F8.1,1X,A)') 'NONLINEAR_OPTICS| Band transition width:', &
266 1000.0_dp*nlo_env%transition_width_au*evolt, 'meV'
267 END IF
268 END IF
269
270 CALL timestop(handle)
271
272 END SUBROUTINE nlo_prepare_environment
273
274! **************************************************************************************************
275!> \brief Sum the rank-local currents and convert them to volume and sheet susceptibilities.
276!> \param nlo_env NLO settings and data for the calculation
277! **************************************************************************************************
278 SUBROUTINE nlo_write_susceptibility(nlo_env)
279 TYPE(nlo_type), INTENT(INOUT) :: nlo_env
280
281 CHARACTER(len=*), PARAMETER :: routinen = 'nlo_write_susceptibility'
282 CHARACTER(len=3), PARAMETER :: &
283 omega_subscript(5) = [character(len=3) :: '₁', '₂', '₃', '₄', '₅']
284
285 CHARACTER(len=80) :: heading_2d, heading_3d
286 COMPLEX(dp), ALLOCATABLE :: chi_flat(:, :), current_flat_sum(:, :)
287 INTEGER :: a, c, code, handle, i_case, iw
288 LOGICAL :: zero_output
289 REAL(kind=dp) :: area, energy_ev(5), factor, omega(5), &
290 sheet_height
291
292 CALL timeset(routinen, handle)
293
294 ALLOCATE (current_flat_sum(3, 3**nlo_env%order), chi_flat(3, 3**nlo_env%order))
295 SELECT CASE (nlo_env%order)
296 CASE (2)
297 heading_3d = 'NONLINEAR_OPTICS| χ² 3D (m/V)'
298 heading_2d = 'NONLINEAR_OPTICS| χ² 2D (m²/V)'
299 CASE (3)
300 heading_3d = 'NONLINEAR_OPTICS| χ³ 3D (m²/V²)'
301 heading_2d = 'NONLINEAR_OPTICS| χ³ 2D (m³/V²)'
302 CASE (4)
303 heading_3d = 'NONLINEAR_OPTICS| χ⁴ 3D (m³/V³)'
304 heading_2d = 'NONLINEAR_OPTICS| χ⁴ 2D (m⁴/V³)'
305 CASE (5)
306 heading_3d = 'NONLINEAR_OPTICS| χ⁵ 3D (m⁴/V⁴)'
307 heading_2d = 'NONLINEAR_OPTICS| χ⁵ 2D (m⁵/V⁴)'
308 END SELECT
309 DO i_case = 1, nlo_env%n_frequency_combinations
310 CALL nlo_frequency_case(nlo_env%frequency, nlo_env%order, i_case, &
311 energy_ev, zero_output)
312 IF (zero_output) cpabort('Invalid NONLINEAR_OPTICS frequency case.')
313 omega = 0.0_dp
314 omega(1:nlo_env%order) = energy_ev(1:nlo_env%order)/evolt
315 current_flat_sum(:, :) = nlo_env%current_spectrum(:, :, i_case)
316 CALL nlo_env%para_env%sum(current_flat_sum)
317 factor = e_charge**(nlo_env%order + 1)*a_bohr**(nlo_env%order - 2)* &
318 mu_perm*c_light**2/(joule**nlo_env%order*nlo_env%cell%deth)
319 chi_flat(:, :) = current_flat_sum*factor/cmplx(0.0_dp, -sum(omega), dp)
320 area = sqrt(sum(vector_product(nlo_env%cell%hmat(:, 1), &
321 nlo_env%cell%hmat(:, 2))**2))
322 IF (area <= 0.0_dp) cpabort('NONLINEAR_OPTICS requires nonzero in-plane area.')
323 sheet_height = nlo_env%cell%deth/area*a_bohr
325 IF (iw <= 0) cycle
326 WRITE (iw, '()')
327 WRITE (iw, '(T2,A,I0,A,I0)') 'NONLINEAR_OPTICS| Frequency case ', &
328 i_case, ' / ', nlo_env%n_frequency_combinations
329 ! Adjust tab columns for the multibyte ω and subscript characters.
330 DO a = 1, nlo_env%order
331 WRITE (iw, '(T2,A,A,A,T72,F9.3,1X,A)') 'NONLINEAR_OPTICS| ω', &
332 omega_subscript(a), ' =', energy_ev(a), 'eV'
333 END DO
334 WRITE (iw, '(T2,A,T70,F9.3,1X,A)') 'NONLINEAR_OPTICS| ω_out =', &
335 sum(energy_ev(1:nlo_env%order)), 'eV'
336 WRITE (iw, '(T2,A,T50,A,T72,A)') trim(heading_3d), 'Real', 'Imag'
337 DO code = 1, 3**nlo_env%order
338 DO c = 1, 3
339 IF (.NOT. nlo_env%elements(c, code)) cycle
340 WRITE (iw, '(T2,A,A6,T37,2ES22.12)') 'NONLINEAR_OPTICS| 3D ', &
341 nlo_tensor_indices(nlo_env%order, c, code), &
342 REAL(chi_flat(c, code), kind=dp), aimag(chi_flat(c, code))
343 END DO
344 END DO
345 IF (all(nlo_env%cell%perd(1:2) /= 0) .AND. nlo_env%cell%perd(3) == 0) THEN
346 WRITE (iw, '(T2,A,T62,ES15.6,1X,A)') &
347 'NONLINEAR_OPTICS| Effective sheet height:', sheet_height, 'm'
348 WRITE (iw, '(T2,A,T50,A,T72,A)') trim(heading_2d), 'Real', 'Imag'
349 DO code = 1, 3**nlo_env%order
350 DO c = 1, 3
351 IF (.NOT. nlo_env%elements(c, code)) cycle
352 WRITE (iw, '(T2,A,A6,T37,2ES22.12)') 'NONLINEAR_OPTICS| 2D ', &
353 nlo_tensor_indices(nlo_env%order, c, code), &
354 REAL(chi_flat(c, code)*sheet_height, kind=dp), &
355 aimag(chi_flat(c, code)*sheet_height)
356 END DO
357 END DO
358 END IF
359 END DO
360
361 CALL timestop(handle)
362
363 END SUBROUTINE nlo_write_susceptibility
364
365! **************************************************************************************************
366!> \brief Decode the output and input Cartesian directions of one tensor element.
367!> \param order Rank of the susceptibility tensor
368!> \param output_direction Cartesian direction of the induced current
369!> \param code Base-three code for the field directions
370!> \return Cartesian indices for one tensor component
371! **************************************************************************************************
372 PURE FUNCTION nlo_tensor_indices(order, output_direction, code) RESULT(indices)
373 INTEGER, INTENT(IN) :: order, output_direction, code
374 CHARACTER(len=6) :: indices
375
376 CHARACTER(len=*), PARAMETER :: axes = 'XYZ'
377
378 INTEGER :: field, input_direction, remaining_code
379
380 indices = ' '
381 indices(1:1) = axes(output_direction:output_direction)
382 remaining_code = code - 1
383 DO field = 1, order
384 input_direction = mod(remaining_code, 3) + 1
385 indices(field + 1:field + 1) = axes(input_direction:input_direction)
386 remaining_code = remaining_code/3
387 END DO
388
389 END FUNCTION nlo_tensor_indices
390
391END MODULE nlo
Defines control structures, which contain the parameters and the settings for the DFT-based calculati...
subroutine, public dbcsr_get_info(matrix, nblkrows_total, nblkcols_total, nfullrows_total, nfullcols_total, nblkrows_local, nblkcols_local, nfullrows_local, nfullcols_local, my_prow, my_pcol, local_rows, local_cols, proc_row_dist, proc_col_dist, row_blk_size, col_blk_size, row_blk_offset, col_blk_offset, distribution, name, matrix_type, group)
...
DBCSR operations in CP2K.
various routines to log and control the output. The idea is that decisions about where to log should ...
integer function, public cp_logger_get_default_io_unit(logger)
returns the unit nr for the ionode (-1 on all other processors) skips as well checks if the procs cal...
collects all constants needed in input so that they can be used without circular dependencies
integer, parameter, public do_method_gpw
integer, parameter, public do_method_gapw
objects that represent the structure of input sections and the data contained in an input section
recursive type(section_vals_type) function, pointer, public section_vals_get_subs_vals(section_vals, subsection_name, i_rep_section, can_return_null)
returns the values of the requested subsection
subroutine, public section_vals_val_get(section_vals, keyword_name, i_rep_section, i_rep_val, n_rep_val, val, l_val, i_val, r_val, c_val, l_vals, i_vals, r_vals, c_vals, explicit)
returns the requested value
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
Implements simple k-space/R-space transformations and Gamma-point MIC reconstruction.
subroutine, public replicate_rs_matrices(rs_dbcsr_in, kpoint_in, rs_array_out, cell_to_index_out)
Convert dbcsr matrices representing operators in real-space image cells to arrays.
Routines needed for kpoint calculation.
subroutine, public kpoint_init_cell_index(kpoint, sab_nl, para_env, nimages)
Generates the mapping of cell indices and linear RS index CELL (0,0,0) is always mapped to index 1.
Types and basic routines needed for a kpoint calculation.
subroutine, public kpoint_create(kpoint)
Create a kpoint environment.
Collection of simple mathematical functions and subroutines.
Definition mathlib.F:15
pure real(kind=dp) function, dimension(3), public vector_product(a, b)
Calculation of the vector product c = a x b.
Definition mathlib.F:1272
subroutine, public nlo_bz_integration(nlo_env)
Integrate the density-response current over the Brillouin zone.
subroutine, public read_nlo_input(qs_env, nlo_env)
Read the activated input into nlo_env and reject invalid frequency combinations.
subroutine, public nlo_frequency_case(frequencies, order, i_case, energy_ev, zero_output)
Resolve one Cartesian-product case, preserving SAME_AS and MINUS_OF links.
subroutine, public create_nonlinear_optics_section(section)
Define the nonlinear susceptibility model, conventions, and input parameters.
Nonlinear optical environment: input parameters and data shared by calculation stages.
Definition nlo_types.F:10
subroutine, public release_nlo_environment(nlo_env)
Release NLO-owned matrices and the auxiliary k-point environment, if created.
Definition nlo_types.F:95
Definition nlo.F:10
subroutine, public run_nlo(qs_env)
Calculate frequency-dependent χ^(2) to χ^(5) after the ground-state SCF.
Definition nlo.F:145
Definition of physical constants:
Definition physcon.F:68
real(kind=dp), parameter, public mu_perm
Definition physcon.F:93
real(kind=dp), parameter, public a_bohr
Definition physcon.F:136
real(kind=dp), parameter, public e_charge
Definition physcon.F:106
real(kind=dp), parameter, public femtoseconds
Definition physcon.F:153
real(kind=dp), parameter, public c_light
Definition physcon.F:88
real(kind=dp), parameter, public joule
Definition physcon.F:159
real(kind=dp), parameter, public evolt
Definition physcon.F:183
subroutine, public get_qs_env(qs_env, atomic_kind_set, qs_kind_set, cell, super_cell, cell_ref, use_ref_cell, kpoints, dft_control, mos, sab_orb, sab_all, qmmm, qmmm_periodic, mimic, sac_ae, sac_ppl, sac_lri, sap_ppnl, sab_vdw, sab_scp, sap_oce, sab_lrc, sab_se, sab_xtbe, sab_tbe, sab_core, sab_xb, sab_xtb_pp, sab_xtb_nonbond, sab_almo, sab_kp, sab_kp_nosym, sab_cneo, particle_set, energy, force, matrix_h, matrix_h_im, matrix_ks, matrix_ks_im, matrix_vxc, run_rtp, rtp, matrix_h_kp, matrix_h_im_kp, matrix_ks_kp, matrix_ks_im_kp, matrix_vxc_kp, kinetic_kp, matrix_s_kp, matrix_w_kp, matrix_s_ri_aux_kp, matrix_s, matrix_s_ri_aux, matrix_w, matrix_p_mp2, matrix_p_mp2_admm, matrix_vhxc, rho, rho_xc, pw_env, ewald_env, ewald_pw, active_space, mpools, input, para_env, blacs_env, scf_control, rel_control, kinetic, qs_charges, vppl, xcint_weights, rho_core, rho_nlcc, rho_nlcc_g, ks_env, ks_qmmm_env, wf_history, scf_env, local_particles, local_molecules, distribution_2d, dbcsr_dist, molecule_kind_set, molecule_set, subsys, cp_subsys, oce, local_rho_set, rho_atom_set, task_list, task_list_soft, rho0_atom_set, rho0_mpole, rhoz_set, rhoz_cneo_set, ecoul_1c, rho0_s_rs, rho0_s_gs, rhoz_cneo_s_rs, rhoz_cneo_s_gs, do_kpoints, has_unit_metric, requires_mo_derivs, mo_derivs, mo_loc_history, nkind, natom, nelectron_total, nelectron_spin, efield, neighbor_list_id, linres_control, xas_env, virial, cp_ddapc_env, cp_ddapc_ewald, outer_scf_history, outer_scf_ihistory, x_data, et_coupling, dftb_potential, results, se_taper, se_store_int_env, se_nddo_mpole, se_nonbond_env, admm_env, lri_env, lri_density, exstate_env, ec_env, harris_env, dispersion_env, gcp_env, vee, rho_external, external_vxc, mask, mp2_env, bs_env, kg_env, wanniercentres, atprop, ls_scf_env, do_transport, transport_env, v_hartree_rspace, s_mstruct_changed, rho_changed, potential_changed, forces_up_to_date, mscfg_env, almo_scf_env, gradient_history, variable_history, embed_pot, spin_embed_pot, polar_env, mos_last_converged, eeq, rhs, do_rixs, tb_tblite)
Get the QUICKSTEP environment.
Calculates the moment integrals <a|r^m|b> and <a|r x d/dr|b>.
Definition qs_moments.F:14
subroutine, public build_local_moment_matrix_rs_img(qs_env, moments_rs_img, rcc)
Calculate local moment matrix for a periodic system for all image cells.
Define the neighbor list data types and the corresponding functionality.
parameters that control an scf iteration
Contains information about kpoints.