14 USE ieee_arithmetic,
ONLY: ieee_is_finite
36#include "../base/base_uses.f90"
42 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'nlo_read_input'
56 CHARACTER(LEN=6) :: frequency_name
57 INTEGER :: i_frequency
61 cpassert(.NOT.
ASSOCIATED(section))
62 CALL section_create(section, __location__, name=
"NONLINEAR_OPTICS", &
64 "Frequency-dependent nonlinear optical response of an insulating "// &
65 "periodic Kohn-Sham system in the independent-particle "// &
66 "approximation (no explicit excited-state treatment, in particular"// &
67 " no TDDFT, GW-BSE or excitonic effects). The induced polarization"// &
68 " is expanded in powers of the electric field. With $E(t)=\sum_ω "// &
69 "E(ω)e^{-iωt}"//
"$, the second- through fifth-order "// &
70 "contributions are "// &
71 achar(10)//achar(10)// &
72 "$$P_i^{(2)}(Ω)=ε_0\sum_{ab}\sum_{ω_1+ω_2=Ω} "// &
73 "χ_{i;ab}^{(2)}(ω_1,ω_2)E_a(ω_1)E_b(ω_2),$$"// &
74 achar(10)//achar(10)// &
75 achar(10)//achar(10)// &
76 "$$P_i^{(3)}(Ω)=ε_0\sum_{abc} \sum_{ω_1+ω_2+ω_3=Ω} "// &
77 "χ_{i;abc}^{(3)}(ω_1,ω_2,ω_3) E_a(ω_1)E_b(ω_2)E_c(ω_3),$$"// &
79 achar(10)//achar(10)//achar(10)// &
80 "$$P_i^{(4)}(Ω)=ε_0\sum_{abcd} \sum_{ω_1+ω_2+ω_3+ω_4=Ω} "// &
81 "χ_{i;abcd}^{(4)}(ω_1,ω_2,ω_3,ω_4) "// &
82 "E_a(ω_1)E_b(ω_2)E_c(ω_3)E_d(ω_4),$$"// &
83 achar(10)//achar(10)//achar(10)// &
85 "$$P_i^{(5)}(Ω)=ε_0\sum_{abcde} \sum_{ω_1+ω_2+ω_3+ω_4+ω_5=Ω} "// &
86 "χ_{i;abcde}^{(5)}(ω_1,ω_2,ω_3,ω_4,ω_5) "// &
87 "E_a(ω_1)E_b(ω_2)E_c(ω_3)E_d(ω_4)E_e(ω_5).$$"// &
88 achar(10)//achar(10)// &
89 "Here i,a,... denote Cartesian directions and ε_0 is the vacuum "// &
90 "permittivity. Each tensor is averaged over all simultaneous "// &
91 "permutations of its incident frequency-direction pairs. The "// &
92 "frequency sums include ordered tuples, so no extra factorial "// &
93 "occurs in these formulas. Negative frequencies describe "// &
94 "complex-conjugate fields; harmonic generation uses equal positive"// &
95 " frequencies. The input specifies photon energies ℏω_j in eV, "// &
96 "with Ω≠0. The density matrix is expanded recursively in the "// &
97 "fields, using all AO bands and analytic derivatives with respect "// &
98 "to k. In the energy eigenbasis the usual "// &
99 "population and coherence relaxation terms are "//achar(10)//achar(10)// &
100 "$$\left.\dot{ρ}_{mn}\right|_{\mathrm{rel}}= "// &
101 "-δ_{mn}(ρ_{nn}-f_n)/T_1 -(1-δ_{mn})ρ_{mn}/T_2.$$"//achar(10)// &
103 "Here $f_n$ is the equilibrium occupation. With T1_T2, "// &
104 "$T_1=T_2=T$ and the relaxation is "// &
105 "$-(ρ-ρ_{\mathrm{eq}})/T$. With separate T1 and T2, "// &
106 "the rate for bands m and n changes smoothly with their energy "// &
107 "difference Δε: "//achar(10)//achar(10)// &
108 "$$γ_{mn}=1/T_1+(1/T_2-1/T_1) "// &
109 "[1-\exp(-(Δε/w)^2)],\qquad Δε=ε_m-ε_n.$$"//achar(10)//achar(10)// &
110 "The width w is T1_T2_SMOOTHING_WIDTH. At exact degeneracy the "// &
111 "rate is 1/T1 for all matrices within the degenerate band "// &
112 "subspace. The Gaussian function of the Hamiltonian commutator "// &
113 "gives a basis-covariant transition without band grouping. "// &
114 "At each response step, denominators are "// &
115 "$ε_m-ε_n-ℏΩ-iγ_{mn}$. The "// &
116 "current includes the field-dependent contribution "// &
117 "required by the projected position operator. In "// &
118 "atomic units, with r_i=i∂_{k_i}+A_i, "//achar(10)//achar(10)// &
119 "$$F_{ia}=∂_{k_i}A_a-∂_{k_a}A_i-i[A_i,A_a], \qquad "// &
120 "v_i(E)=i[H+E_ar_a, r_i]=v_i(0)+E_aF_{ia}.$$"//achar(10)//achar(10)// &
121 "Let I^{(n)} denote the cell-integrated current response, "// &
122 "including the Brillouin-zone weights and spin "// &
123 "occupations, in SI units. The volume normalization and "// &
124 "conversion to susceptibility are "//achar(10)//achar(10)// &
125 "$$V=|\det(\mathbf a_1,\mathbf a_2,\mathbf a_3)|, \qquad "// &
126 "j^{(n)}=I^{(n)}/V,\qquad χ_{\mathrm{3D}}^{(n)}= "// &
127 "σ_{\mathrm{3D}}^{(n)}/(-iΩε_0),$$"//achar(10)//achar(10)// &
128 "where $σ^{(n)}"//
"$ is the coefficient of the n field factors in "// &
129 "$j^{(n)}"//
"$. For a two-dimensional slab with vacuum along "// &
130 "nonperiodic z, the following sheet quantities remove the "// &
131 "dependence on the chosen vacuum height: "//achar(10)//achar(10)// &
132 "$$A=|\mathbf a_1\times\mathbf a_2|,\qquad L_z=V/A, \qquad "// &
133 "P_{\mathrm{2D}}^{(n)}=L_zP_{\mathrm{3D}}^{(n)}, \qquad "// &
134 "χ_{\mathrm{2D}}^{(n)}=L_z χ_{\mathrm{3D}}^{(n)}.$$"//achar(10)// &
136 "The units are $(m/V)^{n-1}"//
"$ for $χ_{3D}"//
"$ and "// &
137 "$m^n/V^{n-1}"//
"$ for "// &
138 "$χ_{2D}"//
"$. Converge the basis set, the k mesh in the SCF "// &
139 "calculation, and the k mesh used for the NLO susceptibility "// &
140 "separately. Higher-order susceptibilities "// &
141 "usually require large optical k meshes.", &
142 n_keywords=10, n_subsections=0, repeats=.false.)
144 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
146 "Activates the nonlinear optical susceptibility calculation.", &
147 default_l_val=.false., lone_keyword_l_val=.true.)
153 "Order n of the electric-field response $χ^{(n)}"//
"$; "// &
154 "supported values are 2, 3, 4, and 5. Exactly "// &
155 "FREQ_1 through FREQ_n must be set.", &
156 usage=
"ORDER 2", type_of_var=
integer_t, n_var=1, default_i_val=2)
162 "Susceptibility elements to compute and print. Use -1 alone for "// &
163 "all elements (default), or a list of Cartesian index strings. "// &
164 "Each string has ORDER+1 letters X, Y, or Z: the output direction "// &
165 "followed by the input directions in FREQ_1 through FREQ_ORDER "// &
166 "order. For example, YXX selects $χ^{(2)}_{y;xx}"//
"$, and XYYYX "// &
167 "selects $χ^{(4)}_{x;yyyx}"//
"$. Uppercase and "// &
168 "lowercase are accepted."// &
169 " Repeat the keyword to continue a long list. Duplicate entries "// &
170 "are computed once. Only selected elements and their required "// &
171 "intermediate responses are evaluated; unselected "// &
172 "elements are omitted from the output. Do not "// &
173 "combine -1 with explicit elements.", &
174 usage=
"ELEMENTS YXX YYY", type_of_var=
char_t, n_var=-1, &
175 repeats=.true., default_c_vals=[
"-1"])
179 DO i_frequency = 1, 5
180 WRITE (frequency_name,
'(A,I1)')
"FREQ_", i_frequency
181 CALL keyword_create(keyword, __location__, name=trim(frequency_name), &
183 "Input photon energy in eV. VALUE specifies one energy; RANGE "// &
184 "gives inclusive start, end, and positive step; SAME_AS and "// &
185 "MINUS_OF reference an earlier input frequency. "// &
186 "Independent ranges produce every combination. The sum "// &
187 "of input energies must be nonzero.", &
188 usage=trim(frequency_name)//
" RANGE 0.5 1.0 0.01", &
189 type_of_var=
char_t, n_var=-1)
196 "Common relaxation time $T_1=T_2=T$. Usually T₁ relaxes band "// &
197 "occupations (the diagonal density-matrix elements $ρ_{nn}"//
"$) "// &
198 "towards equilibrium; T₂ describes decoherence, damping "// &
199 "off-diagonal elements $ρ_{mn}"//
"$ to zero in the energy "// &
201 "Using one time gives $-(ρ-ρ_{eq})/T$ and removes the "// &
202 "basis-dependent distinction between populations and coherences "// &
203 "inside degenerate subspaces. This provides a simple, numerically "// &
204 "robust first approximation near band degeneracies and close "// &
205 "bands. It does not establish that the physical lifetimes are "// &
206 "equal. For relaxation-dependent singularities near the graphene "// &
207 "Dirac point, see Cheng, Vermeulen and Sipe (2015). The "// &
208 "broadening is $Γ=ℏ/T_2$. Must be positive; the default is 30 fs.", &
209 usage=
"T1_T2 [fs] 30", type_of_var=
real_t, n_var=1, unit_str=
"fs", &
217 "Relaxation time for diagonal band occupations. Set together with "// &
218 "T2 to use separate population and coherence times. Must satisfy "// &
219 "T1 >= T2 > 0. Do not combine with an explicitly set T1_T2.", &
220 usage=
"T1 [fs] 300", type_of_var=
real_t, n_var=1, unit_str=
"fs")
226 "Decoherence time for well-separated bands. Set together with T1. "// &
227 "Near degenerate bands the relaxation rate changes smoothly to 1/T1.", &
228 usage=
"T2 [fs] 30", type_of_var=
real_t, n_var=1, unit_str=
"fs")
232 CALL keyword_create(keyword, __location__, name=
"T1_T2_SMOOTHING_WIDTH", &
234 "Positive energy width w of the smooth transition between population "// &
235 "and coherence relaxation. The band-pair rate is "// &
236 "1/T1 + (1/T2 - 1/T1)[1 - exp(-((epsilon_m-epsilon_n)/w)^2)]. "// &
237 "The default 0.025 eV is a model choice to converge for each system.", &
238 usage=
"T1_T2_SMOOTHING_WIDTH [eV] 0.025", type_of_var=
real_t, &
239 n_var=1, unit_str=
"eV", &
246 "Monkhorst-Pack-type uniform k mesh, shifted to include Γ, for the"// &
247 " Brillouin-zone integration required for $χ^{(n)}"//
"$. Fractional "// &
248 "coordinates are k_i=j_i/N_i with j_i=0,...,N_i-1; no symmetry "// &
249 "reduction is used. This mesh can differ from the required k-point"// &
250 " SCF mesh. Higher-order nonlinear susceptibilities usually "// &
251 "require denser k meshes. Every entry must be "// &
252 "positive; use one in each nonperiodic direction.", &
253 usage=
"K_MESH 24 24 1", type_of_var=
integer_t, n_var=3)
266 TYPE(
nlo_type),
INTENT(OUT) :: nlo_env
268 CHARACTER(len=*),
PARAMETER :: routinen =
'read_nlo_input'
270 INTEGER :: handle, i_case
271 LOGICAL :: zero_output
272 REAL(kind=
dp) :: energy_ev(5)
275 CALL timeset(routinen, handle)
279 CALL read_nlo_values(section, nlo_env)
280 DO i_case = 1, nlo_env%n_frequency_combinations
281 CALL nlo_frequency_case(nlo_env%frequency, nlo_env%order, i_case, energy_ev, zero_output)
282 IF (zero_output) cpabort(
'NLO output frequency must be nonzero.')
285 CALL timestop(handle)
294 SUBROUTINE read_nlo_values(section, nlo_env)
296 TYPE(
nlo_type),
INTENT(OUT) :: nlo_env
298 CHARACTER(len=6) :: frequency_name
299 CHARACTER(len=default_string_length),
POINTER :: words(:)
300 INTEGER :: i_frequency
301 LOGICAL :: common_explicit, t1_explicit, &
303 INTEGER,
POINTER :: mesh(:)
304 TYPE(
val_type),
POINTER :: input_value
307 IF (.NOT.
ASSOCIATED(section)) cpabort(
'NLO input section is missing.')
308 NULLIFY (input_value, mesh, words)
310 IF (nlo_env%order < 2 .OR. nlo_env%order > 5)
THEN
311 cpabort(
'NLO ORDER must be between 2 and 5.')
313 CALL read_nlo_elements(section, nlo_env)
315 IF (.NOT. ieee_is_finite(nlo_env%t1_au) .OR. nlo_env%t1_au <= 0.0_dp)
THEN
316 cpabort(
'NONLINEAR_OPTICS T1_T2 must be a positive, finite time.')
321 IF (t1_explicit .NEQV. t2_explicit)
THEN
322 cpabort(
'NONLINEAR_OPTICS requires both T1 and T2 when either is set.')
324 IF (t1_explicit .AND. common_explicit)
THEN
325 cpabort(
'NONLINEAR_OPTICS cannot combine T1_T2 with T1 and T2.')
327 nlo_env%t2_au = nlo_env%t1_au
328 IF (t1_explicit)
THEN
332 IF (.NOT. ieee_is_finite(nlo_env%t1_au) .OR. &
333 .NOT. ieee_is_finite(nlo_env%t2_au))
THEN
334 cpabort(
'NONLINEAR_OPTICS T1 and T2 must be finite times.')
336 IF (nlo_env%t2_au <= 0.0_dp .OR. nlo_env%t1_au < nlo_env%t2_au)
THEN
337 cpabort(
'NONLINEAR_OPTICS requires T1 >= T2 > 0.')
340 r_val=nlo_env%transition_width_au)
341 IF (.NOT. ieee_is_finite(nlo_env%transition_width_au) .OR. &
342 nlo_env%transition_width_au <= 0.0_dp)
THEN
343 cpabort(
'NONLINEAR_OPTICS requires a positive, finite transition width.')
346 IF (.NOT.
ASSOCIATED(input_value)) cpabort(
'NONLINEAR_OPTICS requires K_MESH.')
348 IF (.NOT.
ASSOCIATED(mesh)) cpabort(
'NLO requires three K_MESH entries.')
349 IF (
SIZE(mesh) /= 3) cpabort(
'NLO requires three K_MESH entries.')
350 IF (any(mesh <= 0)) cpabort(
'NONLINEAR_OPTICS K_MESH entries must be positive.')
351 nlo_env%k_mesh = mesh
352 DO i_frequency = 1, 5
353 WRITE (frequency_name,
'(A,I1)')
'FREQ_', i_frequency
354 NULLIFY (input_value)
356 IF (i_frequency > nlo_env%order)
THEN
357 IF (
ASSOCIATED(input_value))
THEN
358 cpabort(
'Do not set input frequencies beyond NONLINEAR_OPTICS ORDER.')
362 IF (.NOT.
ASSOCIATED(input_value)) cpabort(
'Set all FREQ_1 through FREQ_ORDER.')
365 IF (.NOT.
ASSOCIATED(words)) cpabort(
'NLO frequency specification is empty.')
366 CALL parse_nlo_frequency(words, i_frequency, nlo_env%frequency(i_frequency))
370 nlo_env%n_frequency_combinations)
372 END SUBROUTINE read_nlo_values
379 SUBROUTINE read_nlo_elements(section, nlo_env)
381 TYPE(
nlo_type),
INTENT(INOUT) :: nlo_env
383 CHARACTER(len=default_string_length),
POINTER :: words(:)
384 INTEGER :: i_rep, n_rep
385 LOGICAL,
ALLOCATABLE :: elements(:, :)
387 ALLOCATE (nlo_env%elements(3, 3**nlo_env%order), elements(3, 3**nlo_env%order))
388 nlo_env%elements = .false.
390 DO i_rep = 1, max(1, n_rep)
393 IF (.NOT.
ASSOCIATED(words)) cpabort(
'NLO ELEMENTS list is empty.')
394 IF (any(words ==
'-1') .AND. n_rep > 1)
THEN
395 cpabort(
'NLO ELEMENTS: -1 cannot be repeated.')
397 CALL parse_nlo_elements(words, nlo_env%order, elements)
398 nlo_env%elements(:, :) = nlo_env%elements .OR. elements
401 END SUBROUTINE read_nlo_elements
410 SUBROUTINE parse_nlo_elements(tokens, order, elements)
411 CHARACTER(len=*),
INTENT(IN) :: tokens(:)
412 INTEGER,
INTENT(IN) :: order
413 LOGICAL,
INTENT(OUT) :: elements(:, :)
415 CHARACTER(len=6) :: element
416 INTEGER :: i_code, i_direction, i_letter, i_out, &
420 IF (order < 2 .OR. order > 5)
THEN
421 cpabort(
'NONLINEAR_OPTICS ELEMENTS requires ORDER 2 through 5.')
423 IF (any(shape(elements) /= [3, 3**order]) .OR.
SIZE(tokens) == 0)
THEN
424 cpabort(
'NLO ELEMENTS list is empty.')
426 IF (any(tokens ==
'-1'))
THEN
427 IF (
SIZE(tokens) /= 1) cpabort(
'NLO ELEMENTS: -1 must appear alone.')
431 DO i_token = 1,
SIZE(tokens)
432 IF (len_trim(tokens(i_token)) /= order + 1)
THEN
433 cpabort(
'NLO ELEMENTS: use ORDER+1 letters, output first.')
435 element = tokens(i_token)
439 DO i_letter = 1, order + 1
440 i_direction = index(
'XYZ', element(i_letter:i_letter))
441 IF (i_direction == 0)
THEN
442 cpabort(
'NONLINEAR_OPTICS ELEMENTS: use only X, Y, Z in each element.')
444 IF (i_letter == 1)
THEN
447 i_code = i_code + (i_direction - 1)*3**(i_letter - 2)
450 elements(i_out, i_code) = .true.
453 END SUBROUTINE parse_nlo_elements
461 SUBROUTINE parse_nlo_frequency(tokens, i_frequency, frequency)
462 CHARACTER(len=*),
INTENT(IN) :: tokens(:)
463 INTEGER,
INTENT(IN) :: i_frequency
466 CHARACTER(len=32) :: mode, reference_name
467 INTEGER :: i_reference, io_error
468 REAL(kind=
dp) :: end_ev, interval_count
471 IF (i_frequency < 1 .OR. i_frequency > 5 .OR.
SIZE(tokens) < 1)
THEN
472 cpabort(
'Invalid FREQ index or empty frequency specification.')
476 SELECT CASE (trim(mode))
478 IF (
SIZE(tokens) /= 2) cpabort(
'FREQ VALUE needs one energy in eV.')
479 READ (tokens(2), *, iostat=io_error) frequency%start_ev
480 IF (io_error /= 0) cpabort(
'FREQ VALUE requires a finite photon energy in eV.')
481 IF (.NOT. ieee_is_finite(frequency%start_ev))
THEN
482 cpabort(
'FREQ VALUE requires a finite photon energy in eV.')
484 frequency%n_values = 1
486 IF (
SIZE(tokens) /= 4) cpabort(
'FREQ RANGE requires start, end and step in eV.')
487 READ (tokens(2), *, iostat=io_error) frequency%start_ev
488 IF (io_error /= 0) cpabort(
'Invalid FREQ RANGE start energy.')
489 READ (tokens(3), *, iostat=io_error) end_ev
490 IF (io_error /= 0) cpabort(
'Invalid FREQ RANGE end energy.')
491 READ (tokens(4), *, iostat=io_error) frequency%step_ev
492 IF (io_error /= 0) cpabort(
'Invalid FREQ RANGE step energy.')
493 IF (.NOT. ieee_is_finite(frequency%start_ev) .OR. .NOT. ieee_is_finite(end_ev) .OR. &
494 .NOT. ieee_is_finite(frequency%step_ev))
THEN
495 cpabort(
'FREQ RANGE energies and step must be finite.')
497 IF (frequency%step_ev <= 0.0_dp .OR. end_ev < frequency%start_ev)
THEN
498 cpabort(
'FREQ RANGE requires positive step and end >= start.')
500 interval_count = (end_ev - frequency%start_ev)/frequency%step_ev
501 IF (.NOT. ieee_is_finite(interval_count) &
502 .OR. interval_count >= real(huge(frequency%n_values) - 1, kind=
dp))
THEN
503 cpabort(
'FREQ RANGE contains too many values.')
505 frequency%n_values = 1 + floor(interval_count + &
506 32.0_dp*epsilon(interval_count)*max(1.0_dp, interval_count))
507 CASE (
'SAME_AS',
'MINUS_OF')
508 IF (
SIZE(tokens) /= 2) cpabort(
'FREQ relation needs one earlier index.')
509 reference_name = tokens(2)
511 IF (len_trim(reference_name) /= 6 .OR. reference_name(1:5) /=
'FREQ_')
THEN
512 cpabort(
'Frequency reference must be FREQ_1, FREQ_2, etc.')
514 READ (reference_name(6:6), *, iostat=io_error) i_reference
515 IF (io_error /= 0) cpabort(
'Invalid frequency reference index.')
516 IF (i_reference < 1 .OR. i_reference >= i_frequency)
THEN
517 cpabort(
'Frequency references must point to an earlier FREQ.')
519 frequency%reference = i_reference
520 IF (trim(mode) ==
'MINUS_OF') frequency%sign = -1
522 cpabort(
'FREQ must use VALUE, RANGE, SAME_AS or MINUS_OF.')
525 END SUBROUTINE parse_nlo_frequency
535 INTEGER,
INTENT(IN) :: order
536 INTEGER,
INTENT(OUT) :: n_frequency_combinations
538 INTEGER :: i_frequency
540 n_frequency_combinations = 1
541 IF (order < 2 .OR. order > 5) cpabort(
'NLO ORDER must be between 2 and 5.')
542 DO i_frequency = 1, order
543 IF (frequencies(i_frequency)%reference > 0)
THEN
544 IF (frequencies(i_frequency)%reference >= i_frequency)
THEN
545 cpabort(
'Frequency reference must point to an earlier FREQ.')
548 IF (frequencies(i_frequency)%n_values < 1)
THEN
549 cpabort(
'Every input frequency through ORDER must be specified.')
551 IF (n_frequency_combinations > &
552 huge(n_frequency_combinations)/frequencies(i_frequency)%n_values)
THEN
553 cpabort(
'Too many independent frequency combinations.')
555 n_frequency_combinations = n_frequency_combinations*frequencies(i_frequency)%n_values
571 INTEGER,
INTENT(IN) :: order, i_case
572 REAL(kind=
dp),
INTENT(OUT) :: energy_ev(5)
573 LOGICAL,
INTENT(OUT) :: zero_output
575 INTEGER :: case_offset, i_frequency, i_value, &
576 n_frequency_combinations
577 REAL(kind=
dp) :: scale
580 zero_output = .false.
582 IF (i_case < 1 .OR. i_case > n_frequency_combinations)
THEN
583 cpabort(
'Frequency case index is out of range.')
585 case_offset = i_case - 1
586 DO i_frequency = 1, order
587 IF (frequencies(i_frequency)%reference > 0)
THEN
588 energy_ev(i_frequency) &
589 = frequencies(i_frequency)%sign*energy_ev(frequencies(i_frequency)%reference)
591 i_value = mod(case_offset, frequencies(i_frequency)%n_values)
592 case_offset = case_offset/frequencies(i_frequency)%n_values
593 energy_ev(i_frequency) = frequencies(i_frequency)%start_ev &
594 + i_value*frequencies(i_frequency)%step_ev
597 scale = max(1.0_dp, sum(abs(energy_ev(1:order))))
598 zero_output = abs(sum(energy_ev(1:order))) <= 64.0_dp*epsilon(scale)*scale
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public cheng2015
real(kind=dp) function, public cp_unit_to_cp2k(value, unit_str, defaults, power)
converts to the internal cp2k units to the given unit
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_string_length
Nonlinear optical environment: input parameters and data shared by calculation stages.
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.
Utilities for string manipulations.
elemental subroutine, public uppercase(string)
Convert all lower case characters in a string to upper case.