(git:3f0d10b)
Loading...
Searching...
No Matches
input_cp2k_properties_dft.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 function that build the dft section of the input
10!> \par History
11!> 01.2013 moved out of input_cp2k_dft [MI]
12!> \author MI
13! **************************************************************************************************
16 hedin1965, &
19 tyagi2024, &
20 tyagi2026, &
21 ditler2021, &
22 ditler2022, &
26 kondov2007, &
28 luber2014, &
32 weber2009, &
35 graml2024, &
45 USE cp_units, ONLY: cp_unit_to_cp2k
46 USE input_constants, ONLY: &
51 evgw0, g0w0, &
78 USE input_val_types, ONLY: char_t, enum_t, &
79 integer_t, &
80 lchar_t, &
81 logical_t, &
82 real_t
84 USE nlo, ONLY: create_nonlinear_optics_section
85 USE kinds, ONLY: dp
86 USE string_utilities, ONLY: s2a
87#include "./base/base_uses.f90"
88
89 IMPLICIT NONE
90 PRIVATE
91
92 LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .true.
93 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_properties_dft'
94
96
97CONTAINS
98
99! **************************************************************************************************
100!> \brief Create the PROPERTIES section
101!> \param section the section to create
102!> \author teo
103! **************************************************************************************************
104 SUBROUTINE create_properties_section(section)
105 TYPE(section_type), POINTER :: section
106
107 TYPE(keyword_type), POINTER :: keyword
108 TYPE(section_type), POINTER :: subsection
109
110 cpassert(.NOT. ASSOCIATED(section))
111 CALL section_create(section, __location__, name="PROPERTIES", &
112 description="This section is used to set up the PROPERTIES calculation.", &
113 n_keywords=0, n_subsections=7, repeats=.false.)
114
115 NULLIFY (subsection, keyword)
116
117 CALL create_linres_section(subsection, create_subsections=.true.)
118 CALL section_add_subsection(section, subsection)
119 CALL section_release(subsection)
120
121 CALL create_et_coupling_section(subsection)
122 CALL section_add_subsection(section, subsection)
123 CALL section_release(subsection)
124
125 CALL create_resp_section(subsection)
126 CALL section_add_subsection(section, subsection)
127 CALL section_release(subsection)
128
129 CALL create_atprop_section(subsection)
130 CALL section_add_subsection(section, subsection)
131 CALL section_release(subsection)
132
133 CALL cp_print_key_section_create(subsection, __location__, name="FIT_CHARGE", &
134 description="This section is used to print the density derived atomic point charges. "// &
135 "The fit of the charges is controlled through the DENSITY_FITTING section", &
136 print_level=high_print_level, filename="__STD_OUT__")
137 CALL keyword_create(keyword, __location__, name="TYPE_OF_DENSITY", &
138 description="Specifies the type of density used for the fitting", &
139 usage="TYPE_OF_DENSITY (FULL|SPIN)", &
140 enum_c_vals=s2a("FULL", "SPIN"), &
141 enum_i_vals=[do_full_density, do_spin_density], &
142 enum_desc=s2a("Full density", "Spin density"), &
143 default_i_val=do_full_density)
144 CALL section_add_keyword(subsection, keyword)
145 CALL keyword_release(keyword)
146 CALL section_add_subsection(section, subsection)
147 CALL section_release(subsection)
148
149 CALL create_tddfpt2_section(subsection)
150 CALL section_add_subsection(section, subsection)
151 CALL section_release(subsection)
152
153 CALL create_rixs_section(subsection)
154 CALL section_add_subsection(section, subsection)
155 CALL section_release(subsection)
156
157 CALL create_nonlinear_optics_section(subsection)
158 CALL section_add_subsection(section, subsection)
159 CALL section_release(subsection)
160
161 CALL create_kubo_transport_section(subsection)
162 CALL section_add_subsection(section, subsection)
163 CALL section_release(subsection)
164
165 CALL create_spectral_localizer_section(subsection)
166 CALL section_add_subsection(section, subsection)
167 CALL section_release(subsection)
168 CALL create_quadratic_pseudospectrum_section(subsection)
169 CALL section_add_subsection(section, subsection)
170 CALL section_release(subsection)
171
172 CALL create_bandstructure_section(subsection)
173 CALL section_add_subsection(section, subsection)
174 CALL section_release(subsection)
175
176 CALL create_bse_section(subsection, run_bse_from_band_structure_section=.true.)
177 CALL section_add_subsection(section, subsection)
178 CALL section_release(subsection)
179
180 CALL create_tipscan_section(subsection)
181 CALL section_add_subsection(section, subsection)
182 CALL section_release(subsection)
183
184 END SUBROUTINE create_properties_section
185
186! **************************************************************************************************
187!> \brief creates the input structure used to activate finite-volume Kubo transport
188! **************************************************************************************************
189
190 SUBROUTINE create_kubo_transport_section(section)
191 TYPE(section_type), POINTER :: section
192 TYPE(keyword_type), POINTER :: keyword
193
194 cpassert(.NOT. ASSOCIATED(section))
195
196 NULLIFY (keyword)
197
198 CALL section_create(section, __location__, name="KUBO_TRANSPORT", &
199 description="Finite-volume Kubo-Greenwood transport coefficients from the "// &
200 "converged Quickstep Hamiltonian, overlap matrix, and atomic geometry. "// &
201 "For one- and two-dimensional cells, transport is projected onto the "// &
202 "periodic subspace and normalized by the periodic length or area.", &
203 n_keywords=8, n_subsections=0, repeats=.false., &
204 citations=[kuhneheskeprodan2020])
205
206 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
207 description="Controls the activation of the Kubo transport calculation.", &
208 default_l_val=.false., &
209 lone_keyword_l_val=.true.)
210 CALL section_add_keyword(section, keyword)
211 CALL keyword_release(keyword)
212
213 CALL keyword_create(keyword, __location__, name="METHOD", &
214 description="Transport algorithm. DIAGONALIZATION evaluates the finite-volume "// &
215 "Kubo-Greenwood expression from the explicit spectrum. TD and CHEBYSHEV are "// &
216 "reserved for future diagonalization-free implementations.", &
217 usage="METHOD DIAGONALIZATION", &
218 n_var=1, type_of_var=char_t, default_c_val="DIAGONALIZATION")
219 CALL section_add_keyword(section, keyword)
220 CALL keyword_release(keyword)
221
222 CALL keyword_create(keyword, __location__, name="CURRENT_OPERATOR", type_of_var=enum_t, &
223 description="ATOM_EMBEDDING retains the finite-volume atom-coordinate model. "// &
224 "PROJECTED_AO uses analytic AO positions and the metric-aware commutator "// &
225 "H*S^-1*X-X*S^-1*H, with complex spinors when SOC is enabled. "// &
226 "PROJECTED_AO requires PERIODIC NONE and GPW/GAPW. This is the current of the "// &
227 "projected AO Hamiltonian. BLOCH evaluates analytic Hamiltonian/overlap k derivatives "// &
228 "and the AO connection on a full MP_GRID, with optional SOC and intraband terms. "// &
229 "BLOCH requires a periodic GPW/GAPW calculation.", &
230 enum_c_vals=s2a("ATOM_EMBEDDING", "PROJECTED_AO", "BLOCH"), enum_i_vals=[0, 1, 2], default_i_val=0)
231 CALL section_add_keyword(section, keyword)
232 CALL keyword_release(keyword)
233 CALL keyword_create(keyword, __location__, name="SOC", &
234 description="Add GTH-SOC in the complete AO spinor space after a restricted SCF. "// &
235 "Requires CURRENT_OPERATOR PROJECTED_AO or BLOCH and SOC pseudopotential parameters. "// &
236 "Does not perform self-consistent noncollinear DFT. A time-reversal-symmetric "// &
237 "Hamiltonian has zero net charge Hall response.", default_l_val=.false.)
238 CALL section_add_keyword(section, keyword)
239 CALL keyword_release(keyword)
240 CALL keyword_create(keyword, __location__, name="HALL_RESPONSE", &
241 description="Include the antisymmetric DC charge response in the conductivity tensor "// &
242 "and print its three independent components separately. Requires PROJECTED_AO or BLOCH. "// &
243 "Uses the same positive scalar DISSIPATION; does not add magnetic order, an applied "// &
244 "magnetic field, spin Hall currents, or microscopic scattering mechanisms.", default_l_val=.false.)
245 CALL section_add_keyword(section, keyword)
246 CALL keyword_release(keyword)
247 CALL keyword_create(keyword, __location__, name="MAX_AO", &
248 description="Safety limit on scalar AO dimension for PROJECTED_AO or BLOCH. "// &
249 "Dense spinor matrices have dimension 2*NAO when SOC is enabled.", default_i_val=512)
250 CALL section_add_keyword(section, keyword)
251 CALL keyword_release(keyword)
252
253 CALL keyword_create(keyword, __location__, name="MP_GRID", &
254 description="Full Gamma-centered property mesh for CURRENT_OPERATOR BLOCH. "// &
255 "Independent of SCF sampling and symmetry reduction, at the frozen SCF potential. "// &
256 "Nonperiodic directions must be one.", &
257 type_of_var=integer_t, n_var=3, default_i_vals=[1, 1, 1])
258 CALL section_add_keyword(section, keyword)
259 CALL keyword_release(keyword)
260 CALL keyword_create(keyword, __location__, name="MAX_MEMORY_MB", &
261 description="Safety bound in MiB on replicated BLOCH array storage per MPI rank. "// &
262 "Excludes CP2K/DBCSR environment and library workspace.", default_i_val=1024)
263 CALL section_add_keyword(section, keyword)
264 CALL keyword_release(keyword)
265
266 CALL keyword_create(keyword, __location__, name="SYMMETRY", &
267 description="Reconstruct equivalent BLOCH property eigenframes from independent irreducible points. "// &
268 "Includes atom/AO, cell-image and physical SOC spin transformations. "// &
269 "Every reconstructed frame is checked against the target H/S and current; "// &
270 "an inconsistent frozen SCF potential aborts instead of silently changing the response.", &
271 default_l_val=.false.)
272 CALL section_add_keyword(section, keyword)
273 CALL keyword_release(keyword)
274 CALL keyword_create(keyword, __location__, name="SYMMETRY_BACKEND", type_of_var=enum_t, &
275 description="Backend for the independent BLOCH property symmetry mesh.", &
276 enum_c_vals=s2a("K290", "SPGLIB"), &
278 default_i_val=use_k290_kpoint_backend)
279 CALL section_add_keyword(section, keyword)
280 CALL keyword_release(keyword)
281 CALL keyword_create(keyword, __location__, name="EPS_SYMMETRY", &
282 description="Geometric tolerance for BLOCH property symmetry detection.", default_r_val=1.e-6_dp)
283 CALL section_add_keyword(section, keyword)
284 CALL keyword_release(keyword)
285 CALL keyword_create(keyword, __location__, name="EPS_SYMMETRY_OPERATORS", &
286 description="Tolerance for target metric, energy-scaled Hamiltonian, and current covariance checks. "// &
287 "The current error is scaled by max(1,|J|) in atomic units.", default_r_val=1.e-8_dp)
288 CALL section_add_keyword(section, keyword)
289 CALL keyword_release(keyword)
290
291 CALL keyword_create(keyword, __location__, name="TEMPERATURE", &
292 description="Electronic temperature used in the Fermi operator.", &
293 usage="TEMPERATURE 1.0", &
294 default_r_val=cp_unit_to_cp2k(value=1.0_dp, unit_str="K"), &
295 n_var=1, type_of_var=real_t, unit_str="K")
296 CALL section_add_keyword(section, keyword)
297 CALL keyword_release(keyword)
298
299 CALL keyword_create(keyword, __location__, name="DISSIPATION", &
300 description="Dissipation/broadening parameter in the finite-temperature "// &
301 "Kubo formula.", &
302 usage="DISSIPATION 300.0", &
303 default_r_val=cp_unit_to_cp2k(value=300.0_dp, unit_str="K"), &
304 n_var=1, type_of_var=real_t, unit_str="K")
305 CALL section_add_keyword(section, keyword)
306 CALL keyword_release(keyword)
307
308 CALL keyword_create(keyword, __location__, name="ENERGY_RANGE", &
309 description="Absolute chemical-potential range. The default 0 0 uses the "// &
310 "full eigenvalue range of the finite-volume Hamiltonian.", &
311 usage="ENERGY_RANGE -0.5 0.5", &
312 default_r_vals=[0.0_dp, 0.0_dp], n_var=2, type_of_var=real_t, &
313 unit_str="hartree")
314 CALL section_add_keyword(section, keyword)
315 CALL keyword_release(keyword)
316
317 CALL keyword_create(keyword, __location__, name="NEUTRAL_MU", &
318 description="Optional fixed neutral chemical potential. If omitted, the "// &
319 "neutral point is found from the eigenvalue spectrum and total electron count.", &
320 usage="NEUTRAL_MU 0.245467619658419", &
321 n_var=1, type_of_var=real_t, unit_str="hartree")
322 CALL section_add_keyword(section, keyword)
323 CALL keyword_release(keyword)
324
325 CALL keyword_create(keyword, __location__, name="N_MU", &
326 description="Number of chemical-potential grid points.", &
327 usage="N_MU 200", &
328 default_i_val=200, n_var=1, type_of_var=integer_t)
329 CALL section_add_keyword(section, keyword)
330 CALL keyword_release(keyword)
331
332 CALL keyword_create(keyword, __location__, name="NEUTRAL_GRID", &
333 description="Number of grid points used to locate the neutral chemical potential.", &
334 usage="NEUTRAL_GRID 10000", &
335 default_i_val=10000, n_var=1, type_of_var=integer_t)
336 CALL section_add_keyword(section, keyword)
337 CALL keyword_release(keyword)
338
339 END SUBROUTINE create_kubo_transport_section
340
341! **************************************************************************************************
342!> \brief creates the input structure used to activate
343!> a resonant inelastic xray scattering (RIXS) calculation
344! **************************************************************************************************
345
346 SUBROUTINE create_rixs_section(section)
347 TYPE(section_type), POINTER :: section
348 TYPE(section_type), POINTER :: subsection, print_key
349 TYPE(keyword_type), POINTER :: keyword
350
351 cpassert(.NOT. ASSOCIATED(section))
352
353 NULLIFY (keyword, subsection, print_key)
354
355 CALL section_create(section, __location__, name="RIXS", &
356 description="Resonant Inelastic Xray Scattering using XAS_TDP and TDDFPT.", &
357 n_keywords=1, n_subsections=3, repeats=.false., &
358 citations=[vazdacruz2021])
359
360 CALL keyword_create(keyword, __location__, &
361 name="_SECTION_PARAMETERS_", &
362 description="Controls the activation of the RIXS procedure", &
363 default_l_val=.false., &
364 lone_keyword_l_val=.true.)
365 CALL section_add_keyword(section, keyword)
366 CALL keyword_release(keyword)
367
368 CALL keyword_create(keyword, __location__, name="CORE_STATES", &
369 description="Number of core excited states to be used in the RIXS "// &
370 "calculation. Restricting this number reduces computational cost. "// &
371 "-1 means all available core states will be used.", &
372 n_var=1, type_of_var=integer_t, default_i_val=-1)
373 CALL section_add_keyword(section, keyword)
374 CALL keyword_release(keyword)
375
376 CALL keyword_create(keyword, __location__, name="VALENCE_STATES", &
377 description="Number of valence excited states to be used in the RIXS "// &
378 "calculation. Restricting this number reduces computational cost, but "// &
379 "removes spectral features corresponding to higher excitations. Should be "// &
380 "used with care. -1 means all available valence states will be used.", &
381 n_var=1, type_of_var=integer_t, default_i_val=-1)
382 CALL section_add_keyword(section, keyword)
383 CALL keyword_release(keyword)
384
385 CALL create_tddfpt2_section(subsection)
386 CALL section_add_subsection(section, subsection)
387 CALL section_release(subsection)
388
389 CALL create_xas_tdp_section(subsection)
390 CALL section_add_subsection(section, subsection)
391 CALL section_release(subsection)
392
393 CALL section_create(subsection, __location__, "PRINT", "Controls the printing of information "// &
394 "during RIXS calculations", repeats=.false.)
395
396 CALL cp_print_key_section_create(print_key, __location__, name="SPECTRUM", &
397 description="Controles the printing of the RIXS spectrum "// &
398 "in output files", &
399 print_level=low_print_level, filename="", &
400 common_iter_levels=3)
401 CALL section_add_subsection(subsection, print_key)
402 CALL section_release(print_key)
403
404 CALL section_add_subsection(section, subsection)
405 CALL section_release(subsection)
406
407 END SUBROUTINE create_rixs_section
408
409! **************************************************************************************************
410!> \brief creates the input structure used to activate
411!> a linear response calculation
412!> Available properties : none
413!> \param section the section to create
414!> \param create_subsections indicates whether or not subsections should be created
415!> \param default_set_tdlr default parameters to be used if called from TDDFPT
416!> \author MI
417! **************************************************************************************************
418 SUBROUTINE create_linres_section(section, create_subsections, default_set_tdlr)
419 TYPE(section_type), POINTER :: section
420 LOGICAL, INTENT(in) :: create_subsections
421 LOGICAL, INTENT(IN), OPTIONAL :: default_set_tdlr
422
423 INTEGER :: def_max_iter, def_precond
424 REAL(kind=dp) :: def_egap, def_eps, def_eps_filter
425 TYPE(keyword_type), POINTER :: keyword
426 TYPE(section_type), POINTER :: print_key, subsection
427
428 CHARACTER(len=256) :: desc
429
430 NULLIFY (keyword, print_key)
431
432 IF (PRESENT(default_set_tdlr)) THEN
433 def_egap = 0.02_dp
434 def_eps = 1.0e-10_dp
435 def_eps_filter = 1.0e-15_dp
436 def_max_iter = 100
438 desc = "Controls the parameters of the LINRES force calculations for excited states."
439 ELSE
440 def_egap = 0.2_dp
441 def_eps = 1.e-6_dp
442 def_eps_filter = 0.0_dp
443 def_max_iter = 50
444 def_precond = ot_precond_none
445 desc = "The linear response is used to calculate one of the following properties: nmr, epr, raman, ..."
446 END IF
447
448 cpassert(.NOT. ASSOCIATED(section))
449 CALL section_create(section, __location__, name="linres", &
450 description=desc, n_keywords=5, n_subsections=2, repeats=.false., &
451 citations=[putrino2000, hanasaki2025])
452
453 CALL keyword_create(keyword, __location__, name="EPS", &
454 description="target accuracy for the convergence of the conjugate gradient.", &
455 usage="EPS 1.e-6", default_r_val=def_eps)
456 CALL section_add_keyword(section, keyword)
457 CALL keyword_release(keyword)
458
459 CALL keyword_create(keyword, __location__, name="EPS_FILTER", &
460 description="Filter threshold for response density matrix.", &
461 usage="EPS_FILTER 1.e-8", default_r_val=def_eps_filter)
462 CALL section_add_keyword(section, keyword)
463 CALL keyword_release(keyword)
464
465 CALL keyword_create(keyword, __location__, name="MAX_ITER", &
466 description="Maximum number of conjugate gradient iteration to be performed for one optimization.", &
467 usage="MAX_ITER 200", default_i_val=def_max_iter)
468 CALL section_add_keyword(section, keyword)
469 CALL keyword_release(keyword)
470
471 CALL keyword_create(keyword, __location__, name="RESTART_EVERY", &
472 description="Restart the conjugate gradient after the specified number of iterations.", &
473 usage="RESTART_EVERY 200", default_i_val=50)
474 CALL section_add_keyword(section, keyword)
475 CALL keyword_release(keyword)
476
477 CALL keyword_create( &
478 keyword, __location__, name="PRECONDITIONER", &
479 description="Type of preconditioner to be used with all minimization schemes. "// &
480 "They differ in effectiveness, cost of construction, cost of application. "// &
481 "Properly preconditioned minimization can be orders of magnitude faster than doing nothing.", &
482 usage="PRECONDITIONER FULL_ALL", &
483 default_i_val=def_precond, &
484 enum_c_vals=s2a("FULL_ALL", "FULL_SINGLE_INVERSE", "FULL_SINGLE", "FULL_KINETIC", "FULL_S_INVERSE", &
485 "NONE"), &
486 enum_desc=s2a("Most effective state selective preconditioner based on diagonalization, "// &
487 "requires the ENERGY_GAP parameter to be an underestimate of the HOMO-LUMO gap. "// &
488 "This preconditioner is recommended for almost all systems, except very large systems where "// &
489 "make_preconditioner would dominate the total computational cost.", &
490 "Based on H-eS cholesky inversion, similar to FULL_SINGLE in preconditioning efficiency "// &
491 "but cheaper to construct, "// &
492 "might be somewhat less robust. Recommended for large systems.", &
493 "Based on H-eS diagonalisation, not as good as FULL_ALL, but somewhat cheaper to apply. ", &
494 "Cholesky inversion of S and T, fast construction, robust, and relatively good, "// &
495 "use for very large systems.", &
496 "Cholesky inversion of S, not as good as FULL_KINETIC, yet equally expensive.", &
497 "skip preconditioning"), &
500 CALL section_add_keyword(section, keyword)
501 CALL keyword_release(keyword)
502
503 CALL keyword_create(keyword, __location__, name="ENERGY_GAP", &
504 description="Energy gap estimate [a.u.] for preconditioning", &
505 usage="ENERGY_GAP 0.1", &
506 default_r_val=def_egap)
507 CALL section_add_keyword(section, keyword)
508 CALL keyword_release(keyword)
509
510 CALL keyword_create(keyword, __location__, name="EVERY_N_STEP", &
511 description="Perform a linear response calculation every N-th step for MD run", &
512 usage="EVERY_N_STEP 50", default_i_val=1)
513 CALL section_add_keyword(section, keyword)
514 CALL keyword_release(keyword)
515
516 CALL keyword_create(keyword, __location__, name="RESTART", &
517 description="Restart the response calculation if the restart file exists", &
518 usage="RESTART", &
519 default_l_val=.false., lone_keyword_l_val=.true.)
520 CALL section_add_keyword(section, keyword)
521 CALL keyword_release(keyword)
522
523 CALL keyword_create(keyword, __location__, name="WFN_RESTART_FILE_NAME", &
524 variants=["RESTART_FILE_NAME"], &
525 description="Root of the file names where to read the response functions from "// &
526 "which to restart the calculation of the linear response", &
527 usage="WFN_RESTART_FILE_NAME <FILENAME>", &
528 type_of_var=lchar_t)
529 CALL section_add_keyword(section, keyword)
530 CALL keyword_release(keyword)
531
532 IF (create_subsections) THEN
533 NULLIFY (subsection)
534
535 CALL create_localize_section(subsection)
536 CALL section_add_subsection(section, subsection)
537 CALL section_release(subsection)
538
539 CALL create_current_section(subsection)
540 CALL section_add_subsection(section, subsection)
541 CALL section_release(subsection)
542
543 CALL create_nmr_section(subsection)
544 CALL section_add_subsection(section, subsection)
545 CALL section_release(subsection)
546
547 CALL create_spin_spin_section(subsection)
548 CALL section_add_subsection(section, subsection)
549 CALL section_release(subsection)
550
551 CALL create_epr_section(subsection)
552 CALL section_add_subsection(section, subsection)
553 CALL section_release(subsection)
554
555 CALL create_polarizability_section(subsection)
556 CALL section_add_subsection(section, subsection)
557 CALL section_release(subsection)
558
559 CALL create_dcdr_section(subsection)
560 CALL section_add_subsection(section, subsection)
561 CALL section_release(subsection)
562
563 CALL create_vcd_section(subsection)
564 CALL section_add_subsection(section, subsection)
565 CALL section_release(subsection)
566
567 CALL section_create(subsection, __location__, name="PRINT", &
568 description="printing of information during the linear response calculation", &
569 repeats=.false.)
570
572 print_key, __location__, "program_run_info", &
573 description="Controls the printing of basic iteration information during the LINRES calculation", &
574 print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
575 CALL section_add_subsection(subsection, print_key)
576 CALL section_release(print_key)
577
578 CALL cp_print_key_section_create(print_key, __location__, "RESTART", &
579 description="Controls the dumping of restart file of the response wavefunction. "// &
580 "For each set of response functions, i.e. for each perturbation, "// &
581 "one different restart file is dumped. These restart files should be "// &
582 "employed only to restart the same type of LINRES calculation, "// &
583 "i.e. with the same perturbation.", &
584 print_level=low_print_level, common_iter_levels=3, each_iter_names=s2a("ITER"), &
585 add_last=add_last_numeric, each_iter_values=[3], filename="")
586 CALL section_add_subsection(subsection, print_key)
587 CALL section_release(print_key)
588
589 CALL section_add_subsection(section, subsection)
590 CALL section_release(subsection)
591
592 END IF
593
594 END SUBROUTINE create_linres_section
595
596! **************************************************************************************************
597!> \brief creates the input structure used to activate
598!> calculation of position perturbation DFPT
599!> \param section ...
600!> \author Sandra Luber, Edward Ditler
601! **************************************************************************************************
602 SUBROUTINE create_dcdr_section(section)
603
604 TYPE(section_type), POINTER :: section
605
606 LOGICAL :: failure
607 TYPE(keyword_type), POINTER :: keyword
608 TYPE(section_type), POINTER :: print_key, subsection
609
610 failure = .false.
611 NULLIFY (keyword, print_key, subsection)
612
613 cpassert(.NOT. ASSOCIATED(section))
614
615 IF (.NOT. failure) THEN
616 CALL section_create(section, __location__, name="DCDR", &
617 description="Compute analytical gradients the dipole moments.", &
618 n_keywords=50, n_subsections=1, repeats=.false., citations=[ditler2021])
619
620 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
621 description="Controls the activation of the APT calculation. "// &
622 "Analytical derivatives are not available for functionals that depend on "// &
623 "the kinetic energy density; use APT_FD for these functionals.", &
624 usage="&DCDR T", &
625 default_l_val=.false., &
626 lone_keyword_l_val=.true.)
627 CALL section_add_keyword(section, keyword)
628 CALL keyword_release(keyword)
629
630 CALL keyword_create(keyword, __location__, name="LIST_OF_ATOMS", &
631 description="Specifies a list of atoms.", &
632 usage="LIST_OF_ATOMS {integer} {integer} .. {integer}", repeats=.true., &
633 n_var=-1, type_of_var=integer_t)
634 CALL section_add_keyword(section, keyword)
635 CALL keyword_release(keyword)
636
637 CALL keyword_create(keyword, __location__, name="DISTRIBUTED_ORIGIN", &
638 variants=["DO_GAUGE"], &
639 description="Use the distributed origin (DO) gauge?", &
640 usage="DISTRIBUTED_ORIGIN T", &
641 default_l_val=.false., lone_keyword_l_val=.true.)
642 CALL section_add_keyword(section, keyword)
643 CALL keyword_release(keyword)
644
645 CALL keyword_create(keyword, __location__, name="ORBITAL_CENTER", &
646 description="The orbital center.", &
647 usage="ORBITAL_CENTER WANNIER", &
648 default_i_val=current_orb_center_wannier, &
649 enum_c_vals=s2a("WANNIER", "COMMON", "ATOM", "BOX"), &
650 enum_desc=s2a("Use the Wannier centers.", &
651 "Use a common center (works only for an isolate molecule).", &
652 "Use the atoms as center.", &
653 "Boxing."), &
656 CALL section_add_keyword(section, keyword)
657 CALL keyword_release(keyword)
658
659 CALL keyword_create(keyword, __location__, name="REFERENCE", &
660 description="Gauge origin of the velocity gauge factor.", &
661 enum_c_vals=s2a("COM", "COAC", "USER_DEFINED", "ZERO"), &
662 enum_desc=s2a("Use Center of Mass", &
663 "Use Center of Atomic Charges", &
664 "Use User-defined Point", &
665 "Use Origin of Coordinate System"), &
666 enum_i_vals=[use_mom_ref_com, &
670 default_i_val=use_mom_ref_zero)
671 CALL section_add_keyword(section, keyword)
672 CALL keyword_release(keyword)
673
674 CALL keyword_create(keyword, __location__, name="REFERENCE_POINT", &
675 description="User-defined reference point of the velocity gauge factor.", &
676 usage="REFERENCE_POINT x y z", &
677 repeats=.false., n_var=3, type_of_var=real_t, unit_str='bohr')
678 CALL section_add_keyword(section, keyword)
679 CALL keyword_release(keyword)
680
681 CALL keyword_create(keyword, __location__, name="Z_MATRIX_METHOD", &
682 description="Use Z_matrix method to solve the response equation", &
683 usage="Z_MATRIX_METHOD T", &
684 default_l_val=.false., lone_keyword_l_val=.true.)
685 CALL section_add_keyword(section, keyword)
686 CALL keyword_release(keyword)
687
688 CALL keyword_create(keyword, __location__, name="APT_FD", &
689 description="Use numerical differentiation to compute the APT, "// &
690 "switches off the calculation of dcdr analytical derivatives. "// &
691 "Requires RUN_TYPE = ENERGY_FORCE or MD.", &
692 usage="APT_FD T", &
693 default_l_val=.false., lone_keyword_l_val=.true.)
694 CALL section_add_keyword(section, keyword)
695 CALL keyword_release(keyword)
696
697 CALL keyword_create(keyword, __location__, name="APT_FD_DE", &
698 description="Electric field strength (atomic units) to use for finite differences", &
699 repeats=.false., &
700 n_var=1, &
701 type_of_var=real_t, &
702 default_r_val=0.0003_dp, &
703 usage="APT_FD_DE 1.0E-4")
704 CALL section_add_keyword(section, keyword)
705 CALL keyword_release(keyword)
706
707 CALL keyword_create(keyword, __location__, name="APT_FD_METHOD", &
708 description="Numerical differentiation method", &
709 usage="APT_FD_METHOD FD", &
710 default_i_val=1, &
711 !enum_c_vals=s2a("FD", "2PNT"), &
712 enum_c_vals=s2a("2PNT"), &
713 !enum_desc=s2a("Forward differences.", &
714 ! "Symmetric two-point differences."), &
715 enum_desc=s2a("Symmetric two-point differences."), &
716 !enum_i_vals=(/0, 1/))
717 enum_i_vals=[1])
718 CALL section_add_keyword(section, keyword)
719 CALL keyword_release(keyword)
720
721 NULLIFY (subsection)
722 CALL section_create(subsection, __location__, name="PRINT", &
723 description="print results of the magnetic dipole moment calculation", &
724 repeats=.false.)
725
726 CALL cp_print_key_section_create(print_key, __location__, "APT", &
727 description="Controls the printing of the electric dipole gradient", &
728 print_level=low_print_level, add_last=add_last_numeric, filename="")
729 CALL section_add_subsection(subsection, print_key)
730 CALL section_release(print_key)
731
732 CALL section_add_subsection(section, subsection)
733 CALL section_release(subsection)
734
735 NULLIFY (subsection)
736 CALL create_interp_section(subsection)
737 CALL section_add_subsection(section, subsection)
738 CALL section_release(subsection)
739
740 END IF
741
742 END SUBROUTINE create_dcdr_section
743
744! **************************************************************************************************
745!> \brief creates the input structure used to activate
746!> calculation of VCD spectra using DFPT
747!> \param section ...
748!> \author Sandra Luber, Tomas Zimmermann, Edward Ditler
749! **************************************************************************************************
750 SUBROUTINE create_vcd_section(section)
751
752 TYPE(section_type), POINTER :: section
753
754 TYPE(keyword_type), POINTER :: keyword
755 TYPE(section_type), POINTER :: print_key, subsection
756
757 NULLIFY (keyword, print_key, subsection)
758
759 cpassert(.NOT. ASSOCIATED(section))
760
761 CALL section_create(section, __location__, name="VCD", &
762 description="Carry out a VCD calculation.", &
763 n_keywords=50, n_subsections=1, repeats=.false., &
764 citations=[ditler2022])
765
766 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
767 description="controls the activation of the APT/AAT calculation", &
768 usage="&VCD T", &
769 default_l_val=.false., &
770 lone_keyword_l_val=.true.)
771 CALL section_add_keyword(section, keyword)
772 CALL keyword_release(keyword)
773
774 CALL keyword_create(keyword, __location__, name="LIST_OF_ATOMS", &
775 description="Specifies a list of atoms.", &
776 usage="LIST_OF_ATOMS {integer} {integer} .. {integer}", repeats=.true., &
777 n_var=-1, type_of_var=integer_t)
778 CALL section_add_keyword(section, keyword)
779 CALL keyword_release(keyword)
780
781 CALL keyword_create(keyword, __location__, name="DISTRIBUTED_ORIGIN", &
782 variants=["DO_GAUGE"], &
783 description="Use the distributed origin (DO) gauge?", &
784 usage="DISTRIBUTED_ORIGIN T", &
785 default_l_val=.false., lone_keyword_l_val=.true.)
786 CALL section_add_keyword(section, keyword)
787 CALL keyword_release(keyword)
788
789 CALL keyword_create(keyword, __location__, name="ORIGIN_DEPENDENT_MFP", &
790 description="Use the origin dependent MFP operator.", &
791 usage="ORIGIN_DEPENDENT_MFP T", &
792 default_l_val=.false., lone_keyword_l_val=.true.)
793 CALL section_add_keyword(section, keyword)
794 CALL keyword_release(keyword)
795
796 CALL keyword_create(keyword, __location__, name="ORBITAL_CENTER", &
797 description="The orbital center.", &
798 usage="ORBITAL_CENTER WANNIER", &
799 default_i_val=current_orb_center_wannier, &
800 enum_c_vals=s2a("WANNIER", "COMMON", "ATOM", "BOX"), &
801 enum_desc=s2a("Use the Wannier centers.", &
802 "Use a common center (works only for an isolate molecule).", &
803 "Use the atoms as center.", &
804 "Boxing."), &
807 CALL section_add_keyword(section, keyword)
808 CALL keyword_release(keyword)
809
810 ! The origin of the magnetic dipole operator (r - MAGNETIC_ORIGIN) x momentum
811 CALL keyword_create(keyword, __location__, name="MAGNETIC_ORIGIN", &
812 description="Gauge origin of the magnetic dipole operator.", &
813 enum_c_vals=s2a("COM", "COAC", "USER_DEFINED", "ZERO"), &
814 enum_desc=s2a("Use Center of Mass", &
815 "Use Center of Atomic Charges", &
816 "Use User-defined Point", &
817 "Use Origin of Coordinate System"), &
818 enum_i_vals=[use_mom_ref_com, &
822 default_i_val=use_mom_ref_zero)
823 CALL section_add_keyword(section, keyword)
824 CALL keyword_release(keyword)
825
826 CALL keyword_create(keyword, __location__, name="MAGNETIC_ORIGIN_REFERENCE", &
827 description="User-defined reference point of the magnetic dipole operator.", &
828 usage="MAGNETIC_ORIGIN_REFERENCE x y z", &
829 repeats=.false., n_var=3, type_of_var=real_t, unit_str='bohr')
830 CALL section_add_keyword(section, keyword)
831 CALL keyword_release(keyword)
832
833 ! The origin of the coordinate system
834 CALL keyword_create(keyword, __location__, name="SPATIAL_ORIGIN", &
835 description="Gauge origin of the velocity gauge factor/spatial origin.", &
836 enum_c_vals=s2a("COM", "COAC", "USER_DEFINED", "ZERO"), &
837 enum_desc=s2a("Use Center of Mass", &
838 "Use Center of Atomic Charges", &
839 "Use User-defined Point", &
840 "Use Origin of Coordinate System"), &
841 enum_i_vals=[use_mom_ref_com, &
845 default_i_val=use_mom_ref_zero)
846 CALL section_add_keyword(section, keyword)
847 CALL keyword_release(keyword)
848
849 CALL keyword_create(keyword, __location__, name="SPATIAL_ORIGIN_REFERENCE", &
850 description="User-defined reference point of the velocity gauge factor/spatial origin.", &
851 usage="SPATIAL_ORIGIN_REFERENCE x y z", &
852 repeats=.false., n_var=3, type_of_var=real_t, unit_str='bohr')
853 CALL section_add_keyword(section, keyword)
854 CALL keyword_release(keyword)
855
856 NULLIFY (subsection)
857 CALL section_create(subsection, __location__, name="PRINT", &
858 description="print results of the magnetic dipole moment calculation", &
859 repeats=.false.)
860
861 CALL cp_print_key_section_create(print_key, __location__, "VCD", &
862 description="Controls the printing of the APTs and AATs", &
863 print_level=low_print_level, add_last=add_last_numeric, filename="")
864 CALL section_add_subsection(subsection, print_key)
865 CALL section_release(print_key)
866
867 CALL section_add_subsection(section, subsection)
868 CALL section_release(subsection)
869
870 NULLIFY (subsection)
871 CALL create_interp_section(subsection)
872 CALL section_add_subsection(section, subsection)
873 CALL section_release(subsection)
874
875 END SUBROUTINE create_vcd_section
876
877! **************************************************************************************************
878!> \brief creates the input structure used to activate
879!> calculation of induced current DFPT
880!> Available properties : none
881!> \param section the section to create
882!> \author MI/VW
883! **************************************************************************************************
884 SUBROUTINE create_current_section(section)
885 TYPE(section_type), POINTER :: section
886
887 TYPE(keyword_type), POINTER :: keyword
888 TYPE(section_type), POINTER :: print_key, subsection
889
890 NULLIFY (keyword, print_key, subsection)
891
892 cpassert(.NOT. ASSOCIATED(section))
893 CALL section_create(section, __location__, name="current", &
894 description="The induced current density is calculated by DFPT.", &
895 n_keywords=4, n_subsections=1, repeats=.false., &
896 citations=[sebastiani2001, weber2009])
897
898 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
899 description="controls the activation of the induced current calculation", &
900 usage="&CURRENT T", &
901 default_l_val=.false., &
902 lone_keyword_l_val=.true.)
903 CALL section_add_keyword(section, keyword)
904 CALL keyword_release(keyword)
905
906 CALL keyword_create(keyword, __location__, name="GAUGE", &
907 description="The gauge used to compute the induced current within GAPW.", &
908 usage="GAUGE R", &
909 default_i_val=current_gauge_r_and_step_func, &
910 enum_c_vals=s2a("R", "R_AND_STEP_FUNCTION", "ATOM"), &
911 enum_desc=s2a("Position gauge (doesnt work well).", &
912 "Position and step function for the soft and the local parts, respectively.", &
913 "Atoms."), &
915 CALL section_add_keyword(section, keyword)
916 CALL keyword_release(keyword)
917
918 CALL keyword_create(keyword, __location__, name="GAUGE_ATOM_RADIUS", &
919 description="Build the gauge=atom using only the atoms within this radius.", &
920 usage="GAUGE_ATOM_RADIUS 10.0", &
921 type_of_var=real_t, &
922 default_r_val=cp_unit_to_cp2k(value=4.0_dp, unit_str="angstrom"), &
923 unit_str="angstrom")
924 CALL section_add_keyword(section, keyword)
925 CALL keyword_release(keyword)
926
927 CALL keyword_create(keyword, __location__, name="USE_OLD_GAUGE_ATOM", &
928 description="Use the old way to compute the gauge.", &
929 usage="USE_OLD_GAUGE_ATOM T", &
930 default_l_val=.true., lone_keyword_l_val=.true.)
931 CALL section_add_keyword(section, keyword)
932 CALL keyword_release(keyword)
933
934 CALL keyword_create(keyword, __location__, name="ORBITAL_CENTER", &
935 description="The orbital center.", &
936 usage="ORBITAL_CENTER WANNIER", &
937 default_i_val=current_orb_center_wannier, &
938 enum_c_vals=s2a("WANNIER", "COMMON", "ATOM", "BOX"), &
939 enum_desc=s2a("Use the Wannier centers.", &
940 "Use a common center (works only for an isolate molecule).", &
941 "Use the atoms as center.", &
942 "Boxing."), &
945 CALL section_add_keyword(section, keyword)
946 CALL keyword_release(keyword)
947
948 CALL keyword_create(keyword, __location__, name="COMMON_CENTER", &
949 description="The common center ", usage="COMMON_CENTER 0.0 1.0 0.0", &
950 n_var=3, default_r_vals=[0.0_dp, 0.0_dp, 0.0_dp], type_of_var=real_t, &
951 unit_str="angstrom")
952 CALL section_add_keyword(section, keyword)
953 CALL keyword_release(keyword)
954
955 CALL keyword_create(keyword, __location__, name="NBOX", &
956 description="How many boxes along each directions ", usage="NBOX 6 6 5", &
957 n_var=3, default_i_vals=[4, 4, 4], type_of_var=integer_t)
958 CALL section_add_keyword(section, keyword)
959 CALL keyword_release(keyword)
960
961 CALL keyword_create(keyword, __location__, name="CHI_PBC", &
962 description="Calculate the succeptibility correction to the shift with PBC", &
963 usage="CHI_PBC T", &
964 default_l_val=.false., lone_keyword_l_val=.true.)
965 CALL section_add_keyword(section, keyword)
966 CALL keyword_release(keyword)
967
968 CALL keyword_create(keyword, __location__, name="FORCE_NO_FULL", &
969 description="Avoid the calculation of the state dependent perturbation term, "// &
970 "even if the orbital centers are set at Wannier centers or at Atom centers", &
971 usage="FORCE_NO_FULL T", &
972 default_l_val=.false., lone_keyword_l_val=.true.)
973 CALL section_add_keyword(section, keyword)
974 CALL keyword_release(keyword)
975
976 CALL keyword_create(keyword, __location__, name="SELECTED_STATES_ON_ATOM_LIST", &
977 description="Indexes of the atoms for selecting"// &
978 " the states to be used for the response calculations.", &
979 usage="SELECTED_STATES_ON_ATOM_LIST 1 2 10", &
980 n_var=-1, type_of_var=integer_t, repeats=.true.)
981 CALL section_add_keyword(section, keyword)
982 CALL keyword_release(keyword)
983
984 CALL keyword_create(keyword, __location__, name="SELECTED_STATES_ATOM_RADIUS", &
985 description="Select all the states included in the given radius around each atoms "// &
986 "in SELECTED_STATES_ON_ATOM_LIST.", &
987 usage="SELECTED_STATES_ATOM_RADIUS 2.0", &
988 type_of_var=real_t, &
989 default_r_val=cp_unit_to_cp2k(value=4.0_dp, unit_str="angstrom"), &
990 unit_str="angstrom")
991 CALL section_add_keyword(section, keyword)
992 CALL keyword_release(keyword)
993
994 CALL keyword_create(keyword, __location__, name="RESTART_CURRENT", &
995 description="Restart the induced current density calculation"// &
996 " from a previous run (not working yet).", &
997 usage="RESTART_CURRENT", default_l_val=.false., &
998 lone_keyword_l_val=.true.)
999 CALL section_add_keyword(section, keyword)
1000 CALL keyword_release(keyword)
1001
1002 NULLIFY (subsection)
1003 CALL section_create(subsection, __location__, name="PRINT", &
1004 description="print results of induced current density calculation", &
1005 repeats=.false.)
1006
1007 CALL cp_print_key_section_create(print_key, __location__, "CURRENT_CUBES", &
1008 description="Controls the printing of the induced current density (not working yet).", &
1009 print_level=high_print_level, add_last=add_last_numeric, filename="")
1010 CALL keyword_create(keyword, __location__, name="stride", &
1011 description="The stride (X,Y,Z) used to write the cube file "// &
1012 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1013 " 1 number valid for all components (not working yet).", &
1014 usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
1015 CALL section_add_keyword(print_key, keyword)
1016 CALL keyword_release(keyword)
1017 CALL keyword_create(keyword, __location__, name="APPEND", &
1018 description="append the cube files when they already exist", &
1019 default_l_val=.false., lone_keyword_l_val=.true.)
1020 CALL section_add_keyword(print_key, keyword)
1021 CALL keyword_release(keyword)
1022
1023 CALL section_add_subsection(subsection, print_key)
1024 CALL section_release(print_key)
1025
1026 CALL cp_print_key_section_create(print_key, __location__, "RESPONSE_FUNCTION_CUBES", &
1027 description="Controls the printing of the response functions (not working yet).", &
1028 print_level=high_print_level, add_last=add_last_numeric, filename="")
1029 CALL keyword_create(keyword, __location__, name="stride", &
1030 description="The stride (X,Y,Z) used to write the cube file "// &
1031 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1032 " 1 number valid for all components (not working yet).", &
1033 usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
1034 CALL section_add_keyword(print_key, keyword)
1035 CALL keyword_release(keyword)
1036
1037 CALL keyword_create(keyword, __location__, name="CUBES_LU_BOUNDS", &
1038 variants=["CUBES_LU"], &
1039 description="The lower and upper index of the states to be printed as cube (not working yet).", &
1040 usage="CUBES_LU_BOUNDS integer integer", &
1041 n_var=2, default_i_vals=[0, -2], type_of_var=integer_t)
1042 CALL section_add_keyword(print_key, keyword)
1043 CALL keyword_release(keyword)
1044
1045 CALL keyword_create(keyword, __location__, name="CUBES_LIST", &
1046 description="Indexes of the states to be printed as cube files "// &
1047 "This keyword can be repeated several times "// &
1048 "(useful if you have to specify many indexes) (not working yet).", &
1049 usage="CUBES_LIST 1 2", &
1050 n_var=-1, type_of_var=integer_t, repeats=.true.)
1051 CALL section_add_keyword(print_key, keyword)
1052 CALL keyword_release(keyword)
1053 CALL keyword_create(keyword, __location__, name="APPEND", &
1054 description="append the cube files when they already exist", &
1055 default_l_val=.false., lone_keyword_l_val=.true.)
1056 CALL section_add_keyword(print_key, keyword)
1057 CALL keyword_release(keyword)
1058
1059 CALL section_add_subsection(subsection, print_key)
1060 CALL section_release(print_key)
1061
1062 CALL section_add_subsection(section, subsection)
1063 CALL section_release(subsection)
1064
1065 NULLIFY (subsection)
1066 CALL create_interp_section(subsection)
1067 CALL section_add_subsection(section, subsection)
1068 CALL section_release(subsection)
1069
1070 END SUBROUTINE create_current_section
1071
1072! **************************************************************************************************
1073!> \brief creates the input structure used to activate
1074!> calculation of NMR chemical shift using
1075!> the induced current obtained from DFPT
1076!> Available properties : none
1077!> \param section the section to create
1078!> \author MI/VW
1079! **************************************************************************************************
1080 SUBROUTINE create_nmr_section(section)
1081 TYPE(section_type), POINTER :: section
1082
1083 TYPE(keyword_type), POINTER :: keyword
1084 TYPE(section_type), POINTER :: print_key, subsection
1085
1086 NULLIFY (keyword, print_key, subsection)
1087
1088 cpassert(.NOT. ASSOCIATED(section))
1089 CALL section_create(section, __location__, name="nmr", &
1090 description="The chemical shift is calculated by DFPT.", &
1091 n_keywords=5, n_subsections=1, repeats=.false., &
1092 citations=[weber2009])
1093
1094 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
1095 description="controls the activation of the nmr calculation", &
1096 usage="&NMR T", &
1097 default_l_val=.false., &
1098 lone_keyword_l_val=.true.)
1099 CALL section_add_keyword(section, keyword)
1100 CALL keyword_release(keyword)
1101
1102 CALL keyword_create(keyword, __location__, name="INTERPOLATE_SHIFT", &
1103 description="Calculate the soft part of the chemical shift by interpolation ", &
1104 usage="INTERPOLATE_SHIFT T", &
1105 default_l_val=.false., lone_keyword_l_val=.true.)
1106 CALL section_add_keyword(section, keyword)
1107 CALL keyword_release(keyword)
1108
1109 CALL keyword_create(keyword, __location__, name="NICS", &
1110 description="Calculate the chemical shift in a set of points"// &
1111 " given from an external file", usage="NICS", &
1112 default_l_val=.false., lone_keyword_l_val=.true.)
1113 CALL section_add_keyword(section, keyword)
1114 CALL keyword_release(keyword)
1115
1116 CALL keyword_create(keyword, __location__, name="NICS_FILE_NAME", &
1117 description="Name of the file with the NICS points coordinates", &
1118 usage="NICS_FILE_NAME nics_file", &
1119 default_lc_val="nics_file")
1120 CALL section_add_keyword(section, keyword)
1121 CALL keyword_release(keyword)
1122
1123 CALL keyword_create(keyword, __location__, name="RESTART_NMR", &
1124 description="Restart the NMR calculation from a previous run (NOT WORKING YET)", &
1125 usage="RESTART_NMR", default_l_val=.false., &
1126 lone_keyword_l_val=.true.)
1127 CALL section_add_keyword(section, keyword)
1128 CALL keyword_release(keyword)
1129
1130 CALL keyword_create(keyword, __location__, name="SHIFT_GAPW_RADIUS", &
1131 description="While computing the local part of the shift (GAPW), "// &
1132 "the integration is restricted to nuclei that are within this radius.", &
1133 usage="SHIFT_GAPW_RADIUS 20.0", &
1134 type_of_var=real_t, &
1135 default_r_val=cp_unit_to_cp2k(value=60.0_dp, unit_str="angstrom"), &
1136 unit_str="angstrom")
1137 CALL section_add_keyword(section, keyword)
1138 CALL keyword_release(keyword)
1139
1140 NULLIFY (subsection)
1141 CALL section_create(subsection, __location__, name="PRINT", &
1142 description="print results of nmr calculation", &
1143 repeats=.false.)
1144
1145 CALL cp_print_key_section_create(print_key, __location__, "RESPONSE_FUNCTION_CUBES", &
1146 description="Controls the printing of the response functions ", &
1147 print_level=high_print_level, add_last=add_last_numeric, filename="")
1148 CALL keyword_create(keyword, __location__, name="stride", &
1149 description="The stride (X,Y,Z) used to write the cube file "// &
1150 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1151 " 1 number valid for all components.", &
1152 usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
1153 CALL section_add_keyword(print_key, keyword)
1154 CALL keyword_release(keyword)
1155
1156 CALL keyword_create(keyword, __location__, name="CUBES_LU_BOUNDS", &
1157 variants=["CUBES_LU"], &
1158 description="The lower and upper index of the states to be printed as cube", &
1159 usage="CUBES_LU_BOUNDS integer integer", &
1160 n_var=2, default_i_vals=[0, -2], type_of_var=integer_t)
1161 CALL section_add_keyword(print_key, keyword)
1162 CALL keyword_release(keyword)
1163
1164 CALL keyword_create(keyword, __location__, name="CUBES_LIST", &
1165 description="Indexes of the states to be printed as cube files "// &
1166 "This keyword can be repeated several times "// &
1167 "(useful if you have to specify many indexes).", &
1168 usage="CUBES_LIST 1 2", &
1169 n_var=-1, type_of_var=integer_t, repeats=.true.)
1170 CALL section_add_keyword(print_key, keyword)
1171 CALL keyword_release(keyword)
1172 CALL keyword_create(keyword, __location__, name="APPEND", &
1173 description="append the cube files when they already exist", &
1174 default_l_val=.false., lone_keyword_l_val=.true.)
1175 CALL section_add_keyword(print_key, keyword)
1176 CALL keyword_release(keyword)
1177
1178 CALL section_add_subsection(subsection, print_key)
1179 CALL section_release(print_key)
1180
1181 CALL cp_print_key_section_create(print_key, __location__, "CHI_TENSOR", &
1182 description="Controls the printing of susceptibility", &
1183 print_level=high_print_level, add_last=add_last_numeric, filename="")
1184 CALL section_add_subsection(subsection, print_key)
1185 CALL section_release(print_key)
1186
1187 CALL cp_print_key_section_create(print_key, __location__, "SHIELDING_TENSOR", &
1188 description="Controls the printing of the chemical shift", &
1189 print_level=low_print_level, add_last=add_last_numeric, filename="")
1190
1191 CALL keyword_create(keyword, __location__, name="ATOMS_LU_BOUNDS", &
1192 variants=["ATOMS_LU"], &
1193 description="The lower and upper atomic index for which the tensor is printed", &
1194 usage="ATOMS_LU_BOUNDS integer integer", &
1195 n_var=2, default_i_vals=[0, -2], type_of_var=integer_t)
1196 CALL section_add_keyword(print_key, keyword)
1197 CALL keyword_release(keyword)
1198
1199 CALL keyword_create(keyword, __location__, name="ATOMS_LIST", &
1200 description="list of atoms for which the shift is printed into a file ", &
1201 usage="ATOMS_LIST 1 2", n_var=-1, &
1202 type_of_var=integer_t, repeats=.true.)
1203 CALL section_add_keyword(print_key, keyword)
1204 CALL keyword_release(keyword)
1205
1206 CALL section_add_subsection(subsection, print_key)
1207 CALL section_release(print_key)
1208
1209 CALL section_add_subsection(section, subsection)
1210 CALL section_release(subsection)
1211
1212 NULLIFY (subsection)
1213 CALL create_interp_section(subsection)
1214 CALL section_add_subsection(section, subsection)
1215 CALL section_release(subsection)
1216
1217 END SUBROUTINE create_nmr_section
1218
1219! **************************************************************************************************
1220!> \brief creates the input structure used to activate
1221!> calculation of NMR spin-spin coupling (implementation not operating)
1222!> Available properties : none
1223!> \param section the section to create
1224!> \author VW
1225! **************************************************************************************************
1226 SUBROUTINE create_spin_spin_section(section)
1227 TYPE(section_type), POINTER :: section
1228
1229 TYPE(keyword_type), POINTER :: keyword
1230 TYPE(section_type), POINTER :: print_key, subsection
1231
1232 NULLIFY (keyword, print_key, subsection)
1233
1234 cpassert(.NOT. ASSOCIATED(section))
1235 CALL section_create(section, __location__, name="spinspin", &
1236 description="Compute indirect spin-spin coupling constants.", &
1237 n_keywords=5, n_subsections=1, repeats=.false.)
1238
1239 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
1240 description="controls the activation of the nmr calculation", &
1241 usage="&SPINSPIN T", &
1242 default_l_val=.false., &
1243 lone_keyword_l_val=.true.)
1244 CALL section_add_keyword(section, keyword)
1245 CALL keyword_release(keyword)
1246
1247 CALL keyword_create(keyword, __location__, name="RESTART_SPINSPIN", &
1248 description="Restart the spin-spin calculation from a previous run (NOT WORKING YET)", &
1249 usage="RESTART_SPINSPIN", default_l_val=.false., &
1250 lone_keyword_l_val=.true.)
1251 CALL section_add_keyword(section, keyword)
1252 CALL keyword_release(keyword)
1253
1254 CALL keyword_create(keyword, __location__, name="ISSC_ON_ATOM_LIST", &
1255 description="Atoms for which the issc is computed.", &
1256 usage="ISSC_ON_ATOM_LIST 1 2 10", &
1257 n_var=-1, type_of_var=integer_t, repeats=.true.)
1258 CALL section_add_keyword(section, keyword)
1259 CALL keyword_release(keyword)
1260
1261 CALL keyword_create(keyword, __location__, name="DO_FC", &
1262 description="Compute the Fermi contact contribution", &
1263 usage="DO_FC F", &
1264 default_l_val=.true., lone_keyword_l_val=.true.)
1265 CALL section_add_keyword(section, keyword)
1266 CALL keyword_release(keyword)
1267
1268 CALL keyword_create(keyword, __location__, name="DO_SD", &
1269 description="Compute the spin-dipolar contribution", &
1270 usage="DO_SD F", &
1271 default_l_val=.true., lone_keyword_l_val=.true.)
1272 CALL section_add_keyword(section, keyword)
1273 CALL keyword_release(keyword)
1274
1275 CALL keyword_create(keyword, __location__, name="DO_PSO", &
1276 description="Compute the paramagnetic spin-orbit contribution", &
1277 usage="DO_PSO F", &
1278 default_l_val=.true., lone_keyword_l_val=.true.)
1279 CALL section_add_keyword(section, keyword)
1280 CALL keyword_release(keyword)
1281
1282 CALL keyword_create(keyword, __location__, name="DO_DSO", &
1283 description="Compute the diamagnetic spin-orbit contribution (NOT YET IMPLEMENTED)", &
1284 usage="DO_DSO F", &
1285 default_l_val=.true., lone_keyword_l_val=.true.)
1286 CALL section_add_keyword(section, keyword)
1287 CALL keyword_release(keyword)
1288
1289 NULLIFY (subsection)
1290 CALL section_create(subsection, __location__, name="PRINT", &
1291 description="print results of the indirect spin-spin calculation", &
1292 repeats=.false.)
1293
1294 CALL cp_print_key_section_create(print_key, __location__, "K_MATRIX", &
1295 description="Controls the printing of the indirect spin-spin matrix", &
1296 print_level=low_print_level, add_last=add_last_numeric, filename="")
1297
1298 CALL keyword_create(keyword, __location__, name="ATOMS_LIST", &
1299 description="list of atoms for which the indirect spin-spin is printed into a file ", &
1300 usage="ATOMS_LIST 1 2", n_var=-1, &
1301 type_of_var=integer_t, repeats=.true.)
1302 CALL section_add_keyword(print_key, keyword)
1303 CALL keyword_release(keyword)
1304
1305 CALL section_add_subsection(subsection, print_key)
1306 CALL section_release(print_key)
1307
1308 CALL section_add_subsection(section, subsection)
1309 CALL section_release(subsection)
1310
1311 NULLIFY (subsection)
1312 CALL create_interp_section(subsection)
1313 CALL section_add_subsection(section, subsection)
1314 CALL section_release(subsection)
1315
1316 END SUBROUTINE create_spin_spin_section
1317
1318! **************************************************************************************************
1319!> \brief creates the input structure used to activate
1320!> calculation of EPR using
1321!> the induced current obtained from DFPT
1322!> Available properties : none
1323!> \param section the section to create
1324!> \author VW
1325! **************************************************************************************************
1326 SUBROUTINE create_epr_section(section)
1327 TYPE(section_type), POINTER :: section
1328
1329 TYPE(keyword_type), POINTER :: keyword
1330 TYPE(section_type), POINTER :: print_key, subsection, subsubsection
1331
1332 NULLIFY (keyword, print_key, subsection, subsubsection)
1333
1334 cpassert(.NOT. ASSOCIATED(section))
1335 CALL section_create(section, __location__, name="EPR", &
1336 description="The g tensor is calculated by DFPT ", &
1337 n_keywords=5, n_subsections=1, repeats=.false., &
1338 citations=[weber2009])
1339
1340 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
1341 description="controls the activation of the epr calculation", &
1342 usage="&EPR T", &
1343 default_l_val=.false., &
1344 lone_keyword_l_val=.true.)
1345 CALL section_add_keyword(section, keyword)
1346 CALL keyword_release(keyword)
1347
1348 CALL keyword_create(keyword, __location__, name="RESTART_EPR", &
1349 description="Restart the EPR calculation from a previous run (NOT WORKING)", &
1350 usage="RESTART_EPR", default_l_val=.false., &
1351 lone_keyword_l_val=.true.)
1352 CALL section_add_keyword(section, keyword)
1353 CALL keyword_release(keyword)
1354
1355 NULLIFY (subsection)
1356 CALL section_create(subsection, __location__, name="PRINT", &
1357 description="print results of epr calculation", &
1358 repeats=.false.)
1359
1360 CALL cp_print_key_section_create(print_key, __location__, "NABLAVKS_CUBES", &
1361 description="Controls the printing of the components of nabla v_ks ", &
1362 print_level=high_print_level, add_last=add_last_numeric, filename="")
1363 CALL keyword_create(keyword, __location__, name="stride", &
1364 description="The stride (X,Y,Z) used to write the cube file "// &
1365 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1366 " 1 number valid for all components.", &
1367 usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
1368 CALL section_add_keyword(print_key, keyword)
1369 CALL keyword_release(keyword)
1370 CALL keyword_create(keyword, __location__, name="APPEND", &
1371 description="append the cube files when they already exist", &
1372 default_l_val=.false., lone_keyword_l_val=.true.)
1373 CALL section_add_keyword(print_key, keyword)
1374 CALL keyword_release(keyword)
1375
1376 CALL section_add_subsection(subsection, print_key)
1377 CALL section_release(print_key)
1378
1379 CALL cp_print_key_section_create(print_key, __location__, "G_TENSOR", &
1380 description="Controls the printing of the g tensor", &
1381 print_level=high_print_level, add_last=add_last_numeric, filename="")
1382 CALL create_xc_section(subsubsection)
1383 CALL section_add_subsection(print_key, subsubsection)
1384 CALL section_release(subsubsection)
1385
1386 CALL keyword_create(keyword, __location__, name="GAPW_MAX_ALPHA", &
1387 description="Maximum alpha of GTH potentials allowed on the soft grids ", &
1388 usage="GAPW_MAX_ALPHA real", default_r_val=5.0_dp)
1389 CALL section_add_keyword(print_key, keyword)
1390 CALL keyword_release(keyword)
1391
1392 CALL keyword_create(keyword, __location__, name="SOO_RHO_HARD", &
1393 description="Whether or not to include the atomic parts of the density "// &
1394 "in the SOO part of the g tensor", usage="SOO_RHO_HARD", &
1395 default_l_val=.false., lone_keyword_l_val=.true.)
1396 CALL section_add_keyword(print_key, keyword)
1397 CALL keyword_release(keyword)
1398
1399 CALL section_add_subsection(subsection, print_key)
1400 CALL section_release(print_key)
1401
1402 CALL cp_print_key_section_create(print_key, __location__, "RESPONSE_FUNCTION_CUBES", &
1403 description="Controls the printing of the response functions ", &
1404 print_level=high_print_level, add_last=add_last_numeric, filename="")
1405 CALL keyword_create(keyword, __location__, name="stride", &
1406 description="The stride (X,Y,Z) used to write the cube file "// &
1407 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1408 " 1 number valid for all components.", &
1409 usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
1410 CALL section_add_keyword(print_key, keyword)
1411 CALL keyword_release(keyword)
1412
1413 CALL keyword_create(keyword, __location__, name="CUBES_LU_BOUNDS", &
1414 variants=["CUBES_LU"], &
1415 description="The lower and upper index of the states to be printed as cube", &
1416 usage="CUBES_LU_BOUNDS integer integer", &
1417 n_var=2, default_i_vals=[0, -2], type_of_var=integer_t)
1418 CALL section_add_keyword(print_key, keyword)
1419 CALL keyword_release(keyword)
1420
1421 CALL keyword_create(keyword, __location__, name="CUBES_LIST", &
1422 description="Indexes of the states to be printed as cube files "// &
1423 "This keyword can be repeated several times "// &
1424 "(useful if you have to specify many indexes).", &
1425 usage="CUBES_LIST 1 2", &
1426 n_var=-1, type_of_var=integer_t, repeats=.true.)
1427 CALL section_add_keyword(print_key, keyword)
1428 CALL keyword_release(keyword)
1429 CALL keyword_create(keyword, __location__, name="APPEND", &
1430 description="append the cube files when they already exist", &
1431 default_l_val=.false., lone_keyword_l_val=.true.)
1432 CALL section_add_keyword(print_key, keyword)
1433 CALL keyword_release(keyword)
1434
1435 CALL section_add_subsection(subsection, print_key)
1436 CALL section_release(print_key)
1437
1438 CALL section_add_subsection(section, subsection)
1439 CALL section_release(subsection)
1440
1441 NULLIFY (subsection)
1442 CALL create_interp_section(subsection)
1443 CALL section_add_subsection(section, subsection)
1444 CALL section_release(subsection)
1445
1446 END SUBROUTINE create_epr_section
1447
1448! **************************************************************************************************
1449!> \brief creates the input structure used to activate
1450!> calculation of polarizability tensor DFPT
1451!> Available properties : none
1452!> \param section the section to create
1453!> \author SL
1454! **************************************************************************************************
1455 SUBROUTINE create_polarizability_section(section)
1456
1457 TYPE(section_type), POINTER :: section
1458
1459 TYPE(keyword_type), POINTER :: keyword
1460 TYPE(section_type), POINTER :: print_key, subsection
1461
1462 NULLIFY (keyword, print_key, subsection)
1463
1464 cpassert(.NOT. ASSOCIATED(section))
1465 CALL section_create(section, __location__, name="POLAR", &
1466 description="Compute polarizabilities.", &
1467 n_keywords=5, n_subsections=1, repeats=.false., &
1468 citations=[putrino2002, luber2014])
1469
1470 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
1471 description="controls the activation of the polarizability calculation", &
1472 usage="&POLAR T", &
1473 default_l_val=.false., &
1474 lone_keyword_l_val=.true.)
1475 CALL section_add_keyword(section, keyword)
1476 CALL keyword_release(keyword)
1477
1478 CALL keyword_create(keyword, __location__, name="DO_RAMAN", &
1479 description="Compute the electric-dipole--electric-dipole polarizability", &
1480 usage="DO_RAMAN F", &
1481 default_l_val=.true., lone_keyword_l_val=.true.)
1482 CALL section_add_keyword(section, keyword)
1483 CALL keyword_release(keyword)
1484
1485 CALL keyword_create(keyword, __location__, name="PERIODIC_DIPOLE_OPERATOR", &
1486 description="Type of dipole operator: Berry phase(T) or Local(F)", &
1487 usage="PERIODIC_DIPOLE_OPERATOR T", &
1488 default_l_val=.true., lone_keyword_l_val=.true.)
1489 CALL section_add_keyword(section, keyword)
1490 CALL keyword_release(keyword)
1491
1492 NULLIFY (subsection)
1493 CALL section_create(subsection, __location__, name="PRINT", &
1494 description="print results of the polarizability calculation", &
1495 repeats=.false.)
1496
1497 CALL cp_print_key_section_create(print_key, __location__, "POLAR_MATRIX", &
1498 description="Controls the printing of the polarizabilities", &
1499 print_level=low_print_level, add_last=add_last_numeric, filename="")
1500
1501 CALL section_add_subsection(subsection, print_key)
1502 CALL section_release(print_key)
1503 CALL section_add_subsection(section, subsection)
1504 CALL section_release(subsection)
1505
1506 NULLIFY (subsection)
1507 CALL create_interp_section(subsection)
1508 CALL section_add_subsection(section, subsection)
1509 CALL section_release(subsection)
1510
1511 END SUBROUTINE create_polarizability_section
1512
1513! **************************************************************************************************
1514!> \brief creates the section for electron transfer coupling
1515!> \param section ...
1516!> \author fschiff
1517! **************************************************************************************************
1518 SUBROUTINE create_et_coupling_section(section)
1519 TYPE(section_type), POINTER :: section
1520
1521 TYPE(keyword_type), POINTER :: keyword
1522 TYPE(section_type), POINTER :: print_key, subsection
1523
1524 NULLIFY (keyword)
1525 cpassert(.NOT. ASSOCIATED(section))
1526 CALL section_create(section, __location__, name="ET_COUPLING", &
1527 description="specifies the two constraints/restraints for extracting ET coupling elements", &
1528 n_keywords=1, n_subsections=4, repeats=.false., citations=[kondov2007, futera2017])
1529
1530 NULLIFY (subsection)
1531 CALL create_ddapc_restraint_section(subsection, "DDAPC_RESTRAINT_A")
1532 CALL section_add_subsection(section, subsection)
1533 CALL section_release(subsection)
1534
1535 NULLIFY (subsection)
1536 CALL create_ddapc_restraint_section(subsection, "DDAPC_RESTRAINT_B")
1537 CALL section_add_subsection(section, subsection)
1538 CALL section_release(subsection)
1539
1540 NULLIFY (subsection)
1541 CALL create_projection(subsection, "PROJECTION")
1542 CALL section_add_subsection(section, subsection)
1543 CALL section_release(subsection)
1544
1545 CALL keyword_create(keyword, __location__, name="TYPE_OF_CONSTRAINT", &
1546 description="Specifies the type of constraint", &
1547 usage="TYPE_OF_CONSTRAINT DDAPC", &
1548 enum_c_vals=s2a("NONE", "DDAPC"), &
1549 enum_i_vals=[do_no_et, do_et_ddapc], &
1550 enum_desc=s2a("NONE", "DDAPC Constraint"), &
1551 default_i_val=do_no_et)
1552 CALL section_add_keyword(section, keyword)
1553 CALL keyword_release(keyword)
1554
1555 NULLIFY (print_key)
1556 CALL cp_print_key_section_create(print_key, __location__, "PROGRAM_RUN_INFO", &
1557 description="Controls the printing basic info about the method", &
1558 print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
1559 CALL section_add_subsection(section, print_key)
1560 CALL section_release(print_key)
1561
1562 END SUBROUTINE create_et_coupling_section
1563
1564! **************************************************************************************************
1565!> \brief defines input sections for specification of Hilbert space partitioning
1566!> in projection-operator approach of electronic coupling calulation
1567!> \param section pointer to the section data structure
1568!> \param section_name name of the projection section
1569!> \author Z. Futera (02.2017)
1570! **************************************************************************************************
1571 SUBROUTINE create_projection(section, section_name)
1572
1573 ! Routine arguments
1574 TYPE(section_type), POINTER :: section
1575 CHARACTER(len=*), INTENT(in) :: section_name
1576
1577 TYPE(keyword_type), POINTER :: keyword
1578 TYPE(section_type), POINTER :: print_key, section_block, section_print
1579
1580! Routine name for dubug purposes
1581
1582 ! Sanity check
1583 cpassert(.NOT. ASSOCIATED(section))
1584
1585 ! Initialization
1586 NULLIFY (keyword)
1587 NULLIFY (print_key)
1588 NULLIFY (section_block)
1589 NULLIFY (section_print)
1590
1591 ! Input-file section definition
1592 CALL section_create(section, __location__, name=trim(adjustl(section_name)), &
1593 description="Projection-operator approach fo ET coupling calculation", &
1594 n_keywords=0, n_subsections=2, repeats=.false.)
1595
1596 ! Subsection #0: Log printing
1597 CALL cp_print_key_section_create(print_key, __location__, 'PROGRAM_RUN_INFO', &
1598 description="Controls printing of data and informations to log file", &
1599 print_level=low_print_level, filename="__STD_OUT__")
1600 CALL section_add_subsection(section, print_key)
1601 CALL section_release(print_key)
1602
1603 ! Subsection #1: Atomic blocks
1604 CALL section_create(section_block, __location__, name='BLOCK', &
1605 description="Part of the system (donor, acceptor, bridge,...)", &
1606 n_keywords=2, n_subsections=1, repeats=.true.)
1607 CALL section_add_subsection(section, section_block)
1608
1609 ! S#1 - Keyword #1: Atom IDs defining a Hilbert space block
1610 CALL keyword_create(keyword, __location__, name='ATOMS', &
1611 description="Array of atom IDs in the system part", &
1612 usage="ATOMS {integer} {integer} .. {integer}", &
1613 n_var=-1, type_of_var=integer_t, repeats=.false.)
1614 CALL section_add_keyword(section_block, keyword)
1615 CALL keyword_release(keyword)
1616
1617 ! S#1 - Keyword #1: Atom IDs defining a Hilbert space block
1618 CALL keyword_create(keyword, __location__, name='NELECTRON', &
1619 description="Number of electrons expected in the system part", &
1620 usage="NELECTRON {integer}", default_i_val=0)
1621 CALL section_add_keyword(section_block, keyword)
1622 CALL keyword_release(keyword)
1623
1624 ! S#1 - Subsection #1: Printing setting
1625 CALL section_create(section_print, __location__, name='PRINT', &
1626 description="Possible printing options in ET system part", &
1627 n_keywords=0, n_subsections=0, repeats=.false.)
1628 CALL section_add_subsection(section_block, section_print)
1629
1630 ! S#1 - S#1 - Keyword #1: MO coefficient on specific atom
1631 CALL keyword_create(keyword, __location__, name='MO_COEFF_ATOM', &
1632 description="Print out MO coeffiecients on given atom", &
1633 usage="MO_COEFF_ATOM {integer} {integer} .. {integer}", &
1634 type_of_var=integer_t, n_var=-1, repeats=.true.)
1635 CALL section_add_keyword(section_print, keyword)
1636 CALL keyword_release(keyword)
1637
1638 ! S#1 - S#1 - Keyword #1: MO coefficient of specific state
1639 CALL keyword_create(keyword, __location__, name='MO_COEFF_ATOM_STATE', &
1640 description="Print out MO coeffiecients of specific state", &
1641 usage="MO_COEFF_ATOM_STATE {integer} {integer} .. {integer}", &
1642 type_of_var=integer_t, n_var=-1, repeats=.true.)
1643 CALL section_add_keyword(section_print, keyword)
1644 CALL keyword_release(keyword)
1645
1646 ! S#1 - S#1 - Subsection #1: Saving MOs to CUBE files
1647 CALL cp_print_key_section_create(print_key, __location__, 'MO_CUBES', &
1648 description="Controls saving of MO cube files", &
1649 print_level=high_print_level, filename="")
1650
1651 ! S#1 - S#1 - S#1 - Keyword #1: Stride
1652 CALL keyword_create(keyword, __location__, name='STRIDE', &
1653 description="The stride (X,Y,Z) used to write the cube file", &
1654 usage="STRIDE {integer} {integer} {integer}", n_var=-1, &
1655 default_i_vals=[2, 2, 2], type_of_var=integer_t)
1656 CALL section_add_keyword(print_key, keyword)
1657 CALL keyword_release(keyword)
1658
1659 ! S#1 - S#1 - S#1 - Keyword #2: List of MO IDs
1660 CALL keyword_create(keyword, __location__, name='MO_LIST', &
1661 description="Indices of molecular orbitals to save", &
1662 usage="MO_LIST {integer} {integer} .. {integer}", &
1663 type_of_var=integer_t, n_var=-1, repeats=.true.)
1664 CALL section_add_keyword(print_key, keyword)
1665 CALL keyword_release(keyword)
1666
1667 ! S#1 - S#1 - S#1 - Keyword #2: Number of unoccupied states
1668 CALL keyword_create(keyword, __location__, name='NLUMO', &
1669 description="Number of unoccupied molecular orbitals to save", &
1670 usage="NLUMO {integer}", default_i_val=1)
1671 CALL section_add_keyword(print_key, keyword)
1672 CALL keyword_release(keyword)
1673
1674 ! S#1 - S#1 - S#1 - Keyword #3: Number of occupied states
1675 CALL keyword_create(keyword, __location__, name='NHOMO', &
1676 description="Number of occupied molecular orbitals to save", &
1677 usage="NHOMO {integer}", default_i_val=1)
1678 CALL section_add_keyword(print_key, keyword)
1679 CALL keyword_release(keyword)
1680
1681 CALL section_add_subsection(section_print, print_key)
1682 CALL section_release(print_key)
1683
1684 ! S#1 - S#1 - Clean
1685 CALL section_release(section_print)
1686
1687 ! S#1 - Clean
1688 CALL section_release(section_block)
1689
1690 ! S#1 - Subsection #1: Printing setting
1691 CALL section_create(section_print, __location__, name='PRINT', &
1692 description="Possible printing options in ET", &
1693 n_keywords=0, n_subsections=0, repeats=.false.)
1694 CALL section_add_subsection(section, section_print)
1695
1696 ! Print couplings
1697 CALL cp_print_key_section_create(print_key, __location__, 'COUPLINGS', &
1698 description="Controls printing couplings onto file", &
1699 print_level=low_print_level, filename="")
1700
1701 CALL keyword_create(keyword, __location__, name="APPEND", &
1702 description="append the files when they already exist", &
1703 default_l_val=.false., lone_keyword_l_val=.true.)
1704 CALL section_add_keyword(print_key, keyword)
1705 CALL keyword_release(keyword)
1706
1707 CALL section_add_subsection(section_print, print_key)
1708 CALL section_release(print_key)
1709
1710 CALL section_release(section_print)
1711
1712 END SUBROUTINE create_projection
1713
1714! **************************************************************************************************
1715!> \brief creates an input section for tddfpt calculation
1716!> \param section section to create
1717!> \par History
1718!> * 05.2016 forked from create_tddfpt_section [Sergey Chulkov]
1719!> * 08.2016 moved from module input_cp2k_dft [Sergey Chulkov]
1720! **************************************************************************************************
1721 SUBROUTINE create_tddfpt2_section(section)
1722 TYPE(section_type), POINTER :: section
1723
1724 TYPE(keyword_type), POINTER :: keyword
1725 TYPE(section_type), POINTER :: print_key, subsection
1726
1727 cpassert(.NOT. ASSOCIATED(section))
1728 CALL section_create(section, __location__, name="TDDFPT", &
1729 description="Controls time-dependent density functional perturbation theory "// &
1730 "(TDDFPT) calculations for electronic excitations and related properties.", &
1731 n_keywords=14, n_subsections=4, repeats=.false., &
1733
1734 NULLIFY (keyword, print_key, subsection)
1735
1736 CALL keyword_create(keyword, __location__, &
1737 name="_SECTION_PARAMETERS_", &
1738 description="Activates the TDDFPT procedure.", &
1739 default_l_val=.false., &
1740 lone_keyword_l_val=.true.)
1741 CALL section_add_keyword(section, keyword)
1742 CALL keyword_release(keyword)
1743
1744 ! Integer
1745 CALL keyword_create(keyword, __location__, name="NSTATES", &
1746 description="Number of excited states to converge.", &
1747 n_var=1, type_of_var=integer_t, &
1748 default_i_val=1)
1749 CALL section_add_keyword(section, keyword)
1750 CALL keyword_release(keyword)
1751
1752 CALL keyword_create(keyword, __location__, name="MAX_ITER", &
1753 description="Maximal number of iterations to be performed.", &
1754 n_var=1, type_of_var=integer_t, &
1755 default_i_val=50)
1756 CALL section_add_keyword(section, keyword)
1757 CALL keyword_release(keyword)
1758
1759 CALL keyword_create(keyword, __location__, name="MAX_KV", &
1760 description="Maximal number of Krylov space vectors. "// &
1761 "Davidson iterations will be restarted upon reaching this limit.", &
1762 n_var=1, type_of_var=integer_t, &
1763 default_i_val=5000)
1764 CALL section_add_keyword(section, keyword)
1765 CALL keyword_release(keyword)
1766
1767 CALL keyword_create(keyword, __location__, name="NLUMO", &
1768 description="Number of unoccupied orbitals to consider. "// &
1769 "Default is to use all unoccupied orbitals (-1).", &
1770 n_var=1, type_of_var=integer_t, &
1771 default_i_val=-1)
1772 CALL section_add_keyword(section, keyword)
1773 CALL keyword_release(keyword)
1774
1775 CALL keyword_create(keyword, __location__, name="NPROC_STATE", &
1776 description="Number of MPI processes to be used per excited state. "// &
1777 "Default is to use all MPI processes (0).", &
1778 n_var=1, type_of_var=integer_t, &
1779 default_i_val=0)
1780 CALL section_add_keyword(section, keyword)
1781 CALL keyword_release(keyword)
1782
1783 ! kernel type
1784 CALL keyword_create(keyword, __location__, name="KERNEL", &
1785 description="Options to compute the kernel", &
1786 usage="KERNEL FULL", &
1787 enum_c_vals=s2a("FULL", "sTDA", "NONE"), &
1789 default_i_val=tddfpt_kernel_full)
1790 CALL section_add_keyword(section, keyword)
1791 CALL keyword_release(keyword)
1792
1793 ! spin-flip TDDFPT options
1794 CALL keyword_create(keyword, __location__, name="SPINFLIP", &
1795 description="Selects the type of spin-flip TDDFPT kernel", &
1796 usage="SPINFLIP NONCOLLINEAR", &
1797 enum_c_vals=s2a("NONE", "COLLINEAR", "NONCOLLINEAR"), &
1799 enum_desc=s2a("Only molecular orbital energy differences are considered", &
1800 "MO energy diferences and Fock exchange contributions are "// &
1801 "considered", &
1802 "MO energy differences, Fock exchange and "// &
1803 "Noncollinear local exchange-correlation "// &
1804 "kernel are considered"), &
1805 default_i_val=no_sf_tddfpt, citations=[hernandez2025])
1806 CALL section_add_keyword(section, keyword)
1807 CALL keyword_release(keyword)
1808
1809 CALL keyword_create(keyword, __location__, name="OE_CORR", &
1810 description="Orbital energy correction potential.", &
1811 enum_c_vals=s2a("NONE", "LB94", "GLLB", "SAOP", "SHIFT"), &
1812 enum_i_vals=[oe_none, oe_lb, oe_gllb, oe_saop, oe_shift], &
1813 enum_desc=s2a("No orbital correction scheme is used", &
1814 "van Leeuwen and Baerends. PRA, 49:2421, 1994", &
1815 "Gritsenko, van Leeuwen, van Lenthe, Baerends. PRA, 51:1944, 1995", &
1816 "Gritsenko, Schipper, Baerends. Chem. Phys. Lett., 302:199, 1999", &
1817 "Constant shift of virtual and/or open-shell orbitals"), &
1818 default_i_val=oe_none)
1819 CALL section_add_keyword(section, keyword)
1820 CALL keyword_release(keyword)
1821
1822 ! SHIFTS
1823 CALL keyword_create(keyword, __location__, name="EV_SHIFT", &
1824 variants=s2a("VIRTUAL_SHIFT"), &
1825 description="Constant shift of virtual state eigenvalues.", &
1826 usage="EV_SHIFT 0.500", &
1827 n_var=1, type_of_var=real_t, &
1828 unit_str="eV", &
1829 default_r_val=0.0_dp)
1830 CALL section_add_keyword(section, keyword)
1831 CALL keyword_release(keyword)
1832 !
1833 CALL keyword_create(keyword, __location__, name="EOS_SHIFT", &
1834 variants=s2a("OPEN_SHELL_SHIFT"), &
1835 description="Constant shift of open shell eigenvalues.", &
1836 usage="EOS_SHIFT 0.200", &
1837 n_var=1, type_of_var=real_t, &
1838 unit_str="eV", &
1839 default_r_val=0.0_dp)
1840 CALL section_add_keyword(section, keyword)
1841 CALL keyword_release(keyword)
1842
1843 ! Real
1844 CALL keyword_create(keyword, __location__, name="CONVERGENCE", &
1845 description="Target accuracy for excited state energies.", &
1846 n_var=1, type_of_var=real_t, unit_str="hartree", &
1847 default_r_val=1.0e-5_dp)
1848 CALL section_add_keyword(section, keyword)
1849 CALL keyword_release(keyword)
1850
1851 CALL keyword_create(keyword, __location__, name="MIN_AMPLITUDE", &
1852 description="The smallest excitation amplitude to print.", &
1853 n_var=1, type_of_var=real_t, &
1854 default_r_val=5.0e-2_dp)
1855 CALL section_add_keyword(section, keyword)
1856 CALL keyword_release(keyword)
1857
1858 CALL keyword_create(keyword, __location__, name="ORTHOGONAL_EPS", &
1859 description="The largest possible overlap between the ground state and "// &
1860 "orthogonalised excited state wave-functions. Davidson iterations "// &
1861 "will be restarted when the overlap goes beyond this threshold in "// &
1862 "order to prevent numerical instability.", &
1863 n_var=1, type_of_var=real_t, &
1864 default_r_val=1.0e-4_dp)
1865 CALL section_add_keyword(section, keyword)
1866 CALL keyword_release(keyword)
1867
1868 ! Logical
1869 CALL keyword_create(keyword, __location__, name="RESTART", &
1870 description="Restart the TDDFPT calculation if a restart file exists", &
1871 n_var=1, type_of_var=logical_t, &
1872 default_l_val=.false., lone_keyword_l_val=.true.)
1873 CALL section_add_keyword(section, keyword)
1874 CALL keyword_release(keyword)
1875
1876 CALL keyword_create(keyword, __location__, name="RKS_TRIPLETS", &
1877 description="Compute triplet excited states using spin-unpolarised molecular orbitals.", &
1878 n_var=1, type_of_var=logical_t, &
1879 default_l_val=.false.)
1880 CALL section_add_keyword(section, keyword)
1881 CALL keyword_release(keyword)
1882
1883 CALL keyword_create(keyword, __location__, name="ADMM_KERNEL_XC_CORRECTION", &
1884 description="Use/Ignore ADMM correction xc functional for TD kernel. "// &
1885 "XC correction functional is defined in ground state XC section.", &
1886 n_var=1, type_of_var=logical_t, &
1887 default_l_val=.true., lone_keyword_l_val=.true.)
1888 CALL section_add_keyword(section, keyword)
1889 CALL keyword_release(keyword)
1890
1891 CALL keyword_create(keyword, __location__, name="ADMM_KERNEL_CORRECTION_SYMMETRIC", &
1892 description="ADMM correction functional in kernel is applied symmetrically. "// &
1893 "Original implementation is using a non-symmetric formula.", &
1894 n_var=1, type_of_var=logical_t, &
1895 default_l_val=.true., lone_keyword_l_val=.true.)
1896 CALL section_add_keyword(section, keyword)
1897 CALL keyword_release(keyword)
1898
1899 CALL keyword_create(keyword, __location__, name="DO_LRIGPW", &
1900 description="Local resolution of identity for Coulomb contribution.", &
1901 n_var=1, type_of_var=logical_t, &
1902 default_l_val=.false.)
1903 CALL section_add_keyword(section, keyword)
1904 CALL keyword_release(keyword)
1905
1906 CALL keyword_create(keyword, __location__, name="AUTO_BASIS", &
1907 description="Specify type and size of automatically generated auxiliary "// &
1908 "(RI) basis sets. Exactly two arguments are required for this option. "// &
1909 "The first argument of basis type should be one of the following: "// &
1910 "`P_LRI_AUX`. The second argument of basis size should be one of the "// &
1911 "following: `SMALL`, `MEDIUM`, `LARGE`, or `HUGE`. The default is not "// &
1912 "using any of these basis sets, requested by `AUTO_BASIS X X` (exactly "// &
1913 "as written here).", &
1914 usage="AUTO_BASIS {basis_type} {basis_size}", &
1915 type_of_var=char_t, repeats=.true., n_var=-1, default_c_vals=["X", "X"])
1916 CALL section_add_keyword(section, keyword)
1917 CALL keyword_release(keyword)
1918
1919 CALL keyword_create(keyword, __location__, name="DO_SMEARING", &
1920 description="Implying smeared occupation. ", &
1921 n_var=1, type_of_var=logical_t, &
1922 default_l_val=.false., lone_keyword_l_val=.true.)
1923 CALL section_add_keyword(section, keyword)
1924 CALL keyword_release(keyword)
1925
1926 CALL keyword_create(keyword, __location__, name="EXCITON_DESCRIPTORS", &
1927 description="Compute exciton descriptors. "// &
1928 "Details given in Manual section about Bethe Salpeter equation.", &
1929 n_var=1, type_of_var=logical_t, &
1930 default_l_val=.false.)
1931 CALL section_add_keyword(section, keyword)
1932 CALL keyword_release(keyword)
1933
1934 CALL keyword_create(keyword, __location__, name="DIRECTIONAL_EXCITON_DESCRIPTORS", &
1935 description="Print cartesian components of exciton descriptors.", &
1936 n_var=1, type_of_var=logical_t, &
1937 default_l_val=.false.)
1938 CALL section_add_keyword(section, keyword)
1939 CALL keyword_release(keyword)
1940
1941 CALL keyword_create(keyword, __location__, name="DIRECTIONAL_EXCITON_CROSSCORRELATION", &
1942 description="Print the electron-hole crosscorrelation matrix as part of the "// &
1943 "cartesian components of exciton descriptors. Only active together with "// &
1944 "DIRECTIONAL_EXCITON_DESCRIPTORS.", &
1945 n_var=1, type_of_var=logical_t, &
1946 default_l_val=.true.)
1947 CALL section_add_keyword(section, keyword)
1948 CALL keyword_release(keyword)
1949
1950 ! Strings
1951 CALL keyword_create(keyword, __location__, name="WFN_RESTART_FILE_NAME", &
1952 variants=["RESTART_FILE_NAME"], &
1953 description="Name of the wave function restart file, may include a path."// &
1954 " If no file is specified, the default is to open the file as generated by"// &
1955 " the wave function restart print key.", &
1956 usage="WFN_RESTART_FILE_NAME <FILENAME>", &
1957 type_of_var=lchar_t)
1958 CALL section_add_keyword(section, keyword)
1959 CALL keyword_release(keyword)
1960
1961 ! DIPOLE subsection
1962 CALL section_create(subsection, __location__, name="DIPOLE_MOMENTS", &
1963 description="Parameters to compute oscillator strengths in the dipole approximation.", &
1964 n_keywords=3, n_subsections=0, repeats=.false.)
1965
1966 CALL keyword_create(keyword, __location__, name="DIPOLE_FORM", &
1967 description="Form of dipole transition integrals.", &
1968 enum_c_vals=s2a("BERRY", "LENGTH", "VELOCITY", "VELOCITY_OLD", &
1969 "SCF_MOMENT"), &
1970 enum_desc=s2a("Based on Berry phase formula (valid for fully periodic molecular systems only)", &
1971 "Length form &lang; i | r | j &rang; (valid for non-periodic molecular systems only)", &
1972 "Velocity form &lang; i | d/dr | j &rang;", &
1973 "Old velocity form &lang; i | d/dr | j &rang;", &
1974 "SCF molecular-orbital moment form for k-point TDDFPT"), &
1978 default_i_val=tddfpt_dipole_velocity)
1979 CALL section_add_keyword(subsection, keyword)
1980 CALL keyword_release(keyword)
1981
1982 CALL keyword_create(keyword, __location__, name="REFERENCE", &
1983 description="Reference point to calculate electric "// &
1984 "dipole moments using the dipole integrals in the length form.", &
1985 enum_c_vals=s2a("COM", "COAC", "USER_DEFINED", "ZERO"), &
1986 enum_desc=s2a("Use Center of Mass", &
1987 "Use Center of Atomic Charges", &
1988 "Use User-defined Point", &
1989 "Use Origin of Coordinate System"), &
1990 enum_i_vals=[use_mom_ref_com, &
1994 default_i_val=use_mom_ref_com)
1995 CALL section_add_keyword(subsection, keyword)
1996 CALL keyword_release(keyword)
1997
1998 CALL keyword_create(keyword, __location__, name="REFERENCE_POINT", &
1999 description="User-defined reference point.", &
2000 usage="REFERENCE_POINT x y z", &
2001 repeats=.false., n_var=3, type_of_var=real_t, unit_str='bohr')
2002 CALL section_add_keyword(subsection, keyword)
2003 CALL keyword_release(keyword)
2004
2005 CALL section_add_subsection(section, subsection)
2006 CALL section_release(subsection)
2007
2008 ! SOC functional
2009
2010 CALL section_create(subsection, __location__, name="SOC", &
2011 description="Is jet to be implemented", &
2012 n_keywords=2, n_subsections=0, repeats=.false.)
2013
2014 CALL keyword_create(keyword, __location__, name="EPS_FILTER", &
2015 variants=s2a("EPS_FILTER_MATRIX"), &
2016 description="The threshold used for sparse matrix operations", &
2017 usage="EPS_FILTER {real}", &
2018 type_of_var=real_t, &
2019 default_r_val=1.0e-10_dp)
2020 CALL section_add_keyword(subsection, keyword)
2021 CALL keyword_release(keyword)
2022
2023 CALL keyword_create(keyword, __location__, name="GRID", &
2024 variants=["ATOMIC_GRID"], &
2025 description="Specification of the atomic angular and radial grids for "// &
2026 "a atomic kind. This keyword must be repeated for all kinds! "// &
2027 "Usage: GRID < LEBEDEV_GRID > < RADIAL_GRID >", &
2028 usage="GRID {string} {integer} {integer}", &
2029 n_var=3, type_of_var=char_t, repeats=.true.)
2030 CALL section_add_keyword(subsection, keyword)
2031 CALL keyword_release(keyword)
2032
2033 CALL section_add_subsection(section, subsection)
2034 CALL section_release(subsection)
2035
2036 ! kernel XC functional
2037 CALL create_xc_section(subsection)
2038 CALL section_add_subsection(section, subsection)
2039 CALL section_release(subsection)
2040
2041 ! MGRID subsection
2042 CALL create_mgrid_section(subsection, create_subsections=.false.)
2043 CALL section_add_subsection(section, subsection)
2044 CALL section_release(subsection)
2045
2046 ! sTDA subsection
2047 CALL create_stda_section(subsection)
2048 CALL section_add_subsection(section, subsection)
2049 CALL section_release(subsection)
2050
2051 ! RSE subsection
2052 CALL create_res_section(subsection)
2053 CALL section_add_subsection(section, subsection)
2054 CALL section_release(subsection)
2055
2056 CALL keyword_create(keyword, __location__, name="DO_BSE", &
2057 description="Choosing BSE kernel.", &
2058 usage="DO_BSE", default_l_val=.false., lone_keyword_l_val=.true.)
2059 CALL section_add_keyword(section, keyword)
2060 CALL keyword_release(keyword)
2061
2062 CALL keyword_create(keyword, __location__, name="DO_BSE_W_ONLY", &
2063 description="Debug option for BSE kernel.", &
2064 usage="DO_BSE_W_ONLY", default_l_val=.false., lone_keyword_l_val=.true.)
2065 CALL section_add_keyword(section, keyword)
2066 CALL keyword_release(keyword)
2067
2068 CALL keyword_create(keyword, __location__, name="DO_BSE_GW_ONLY", &
2069 description="Debug option for BSE kernel.", &
2070 usage="DO_BSE_GW_ONLY", default_l_val=.false., lone_keyword_l_val=.true.)
2071 CALL section_add_keyword(section, keyword)
2072 CALL keyword_release(keyword)
2073
2074 ! LRI subsection
2075 CALL create_lrigpw_section(subsection)
2076 CALL section_add_subsection(section, subsection)
2077 CALL section_release(subsection)
2078
2079 ! LINRES section
2080 CALL create_linres_section(subsection, create_subsections=.false., default_set_tdlr=.true.)
2081 CALL section_add_subsection(section, subsection)
2082 CALL section_release(subsection)
2083
2084 ! PRINT subsection
2085 CALL section_create(subsection, __location__, name="PRINT", &
2086 description="Printing of information during the TDDFT run.", repeats=.false.)
2087
2088 CALL cp_print_key_section_create(print_key, __location__, name="PROGRAM_BANNER", &
2089 description="Controls the printing of the banner for TDDFPT program", &
2090 print_level=silent_print_level, filename="__STD_OUT__")
2091 CALL section_add_subsection(subsection, print_key)
2092 CALL section_release(print_key)
2093
2094 CALL cp_print_key_section_create(print_key, __location__, name="GUESS_VECTORS", &
2095 description="Controls the printing of initial guess vectors.", &
2096 print_level=low_print_level, filename="__STD_OUT__")
2097 CALL section_add_subsection(subsection, print_key)
2098 CALL section_release(print_key)
2099
2100 CALL cp_print_key_section_create(print_key, __location__, name="ITERATION_INFO", &
2101 description="Controls the printing of basic iteration information "// &
2102 "during the TDDFT run.", &
2103 print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
2104 CALL section_add_subsection(subsection, print_key)
2105 CALL section_release(print_key)
2106
2107 CALL cp_print_key_section_create(print_key, __location__, name="DETAILED_ENERGY", &
2108 description="Controls the printing of detailed energy information "// &
2109 "during the TDDFT run.", &
2110 print_level=medium_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
2111 CALL section_add_subsection(subsection, print_key)
2112 CALL section_release(print_key)
2113
2114 CALL cp_print_key_section_create(print_key, __location__, name="BASIS_SET_FILE", &
2115 description="Controls the printing of a file with all basis sets used.", &
2116 print_level=debug_print_level, filename="BASIS_SETS")
2117 CALL section_add_subsection(subsection, print_key)
2118 CALL section_release(print_key)
2119
2120 CALL cp_print_key_section_create(print_key, __location__, name="RESTART", &
2121 description="Controls the dumping of the latest wavefunction "// &
2122 "restart file during TDDFPT.", &
2123 print_level=low_print_level, common_iter_levels=3, &
2124 each_iter_names=s2a("TDDFT_SCF"), each_iter_values=[10], &
2125 add_last=add_last_numeric, filename="RESTART", do_backup=.true.)
2126 CALL section_add_subsection(subsection, print_key)
2127 CALL section_release(print_key)
2128
2129 CALL cp_print_key_section_create(print_key, __location__, name="NTO_ANALYSIS", &
2130 description="Perform a natural transition orbital analysis.", &
2131 print_level=medium_print_level)
2132 CALL keyword_create(keyword, __location__, name="THRESHOLD", &
2133 description="Threshold for sum of NTO eigenvalues considered", &
2134 usage="Threshold 0.95", &
2135 n_var=1, &
2136 type_of_var=real_t, &
2137 default_r_val=0.975_dp)
2138 CALL section_add_keyword(print_key, keyword)
2139 CALL keyword_release(keyword)
2140 CALL keyword_create(keyword, __location__, name="INTENSITY_THRESHOLD", &
2141 description="Threshold for oscillator strength to screen states.", &
2142 usage="Intensity_threshold 0.01", &
2143 n_var=1, &
2144 type_of_var=real_t, &
2145 default_r_val=0.0_dp)
2146 CALL section_add_keyword(print_key, keyword)
2147 CALL keyword_release(keyword)
2148 CALL keyword_create(keyword, __location__, name="STATE_LIST", &
2149 description="Specifies a list of states for the NTO calculations.", &
2150 usage="STATE_LIST {integer} {integer} .. {integer}", &
2151 n_var=-1, type_of_var=integer_t)
2152 CALL section_add_keyword(print_key, keyword)
2153 CALL keyword_release(keyword)
2154 CALL keyword_create(keyword, __location__, name="CUBE_FILES", &
2155 description="Print NTOs on Cube Files", &
2156 usage="CUBE_FILES {logical}", repeats=.false., n_var=1, &
2157 default_l_val=.false., lone_keyword_l_val=.true., type_of_var=logical_t)
2158 CALL section_add_keyword(print_key, keyword)
2159 CALL keyword_release(keyword)
2160 CALL keyword_create(keyword, __location__, name="STRIDE", &
2161 description="The stride (X,Y,Z) used to write the cube file "// &
2162 "(larger values result in smaller cube files). Provide 3 numbers (for X,Y,Z) or"// &
2163 " 1 number valid for all components.", &
2164 usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
2165 CALL section_add_keyword(print_key, keyword)
2166 CALL keyword_release(keyword)
2167 CALL keyword_create(keyword, __location__, name="APPEND", &
2168 description="append the cube files when they already exist", &
2169 default_l_val=.false., lone_keyword_l_val=.true.)
2170 CALL section_add_keyword(print_key, keyword)
2171 CALL keyword_release(keyword)
2172 CALL section_add_subsection(subsection, print_key)
2173 CALL section_release(print_key)
2174
2175 CALL cp_print_key_section_create(print_key, __location__, "MOS_MOLDEN", &
2176 description="Write the NTO in Molden file format, for visualisation.", &
2177 print_level=debug_print_level + 1, add_last=add_last_numeric, filename="MOS")
2178 CALL keyword_create(keyword, __location__, name="UNIT", &
2179 description="Unit for coordinates and cell in the MOLDEN file.", &
2180 usage="UNIT ANGSTROM", &
2181 enum_c_vals=s2a("BOHR", "ANGSTROM"), &
2182 enum_desc=s2a("Write in Bohr (AU)", "Write in Angstrom"), &
2183 enum_i_vals=[1, 2], &
2184 default_i_val=1)
2185 CALL section_add_keyword(print_key, keyword)
2186 CALL keyword_release(keyword)
2187 CALL keyword_create(keyword, __location__, name="WRITE_CELL", &
2188 description="Controls whether the [Cell] block is written to the MOLDEN file.", &
2189 usage="WRITE_CELL TRUE", &
2190 default_l_val=.false., lone_keyword_l_val=.true.)
2191 CALL section_add_keyword(print_key, keyword)
2192 CALL keyword_release(keyword)
2193 CALL keyword_create(keyword, __location__, name="WRITE_PSEUDO", &
2194 description="Controls whether the [Pseudo] block is written to the MOLDEN file.", &
2195 usage="WRITE_PSEUDO TRUE", &
2196 default_l_val=.false., lone_keyword_l_val=.true.)
2197 CALL section_add_keyword(print_key, keyword)
2198 CALL keyword_release(keyword)
2199 CALL keyword_create(keyword, __location__, name="MARK_GHOST", &
2200 description="Controls whether ghost atoms are marked in the [Atoms] block by "// &
2201 "setting their atomic number to zero.", &
2202 usage="MARK_GHOST T", &
2203 default_l_val=.false., lone_keyword_l_val=.true.)
2204 CALL section_add_keyword(print_key, keyword)
2205 CALL keyword_release(keyword)
2206 CALL keyword_create(keyword, __location__, name="NDIGITS", &
2207 description="Specifies the number of significant digits retained. 3 is OK for visualization.", &
2208 usage="NDIGITS {int}", &
2209 default_i_val=3)
2210 CALL section_add_keyword(print_key, keyword)
2211 CALL keyword_release(keyword)
2212 CALL keyword_create(keyword, __location__, name="GTO_KIND", &
2213 description="Representation of Gaussian-type orbitals", &
2214 default_i_val=gto_spherical, &
2215 enum_c_vals=s2a("CARTESIAN", "SPHERICAL"), &
2216 enum_desc=s2a( &
2217 "Cartesian Gaussian orbitals. Use with caution", &
2218 "Spherical Gaussian orbitals. Incompatible with VMD"), &
2219 enum_i_vals=[gto_cartesian, gto_spherical])
2220 CALL section_add_keyword(print_key, keyword)
2221 CALL keyword_release(keyword)
2222 CALL section_add_subsection(subsection, print_key)
2223 CALL section_release(print_key)
2224
2225 CALL cp_print_key_section_create(print_key, __location__, name="NAMD_PRINT", &
2226 description="Controls the printout required for NAMD with NEWTONX.", &
2227 print_level=debug_print_level + 1, filename="CP2K_NEWTONX")
2228 CALL keyword_create(keyword, __location__, name="PRINT_VIRTUALS", &
2229 description="Print occupied AND virtual molecular orbital coefficients", &
2230 default_l_val=.false., lone_keyword_l_val=.true.)
2231 CALL section_add_keyword(print_key, keyword)
2232 CALL keyword_release(keyword)
2233 CALL keyword_create(keyword, __location__, name="PRINT_PHASES", &
2234 description="Print phases of occupied and virtuals MOs.", &
2235 default_l_val=.false., lone_keyword_l_val=.true.)
2236 CALL section_add_keyword(print_key, keyword)
2237 CALL keyword_release(keyword)
2238 CALL keyword_create(keyword, __location__, name="SCALE_WITH_PHASES", &
2239 description="Scale ES eigenvectors with phases of occupied and virtuals MOs.", &
2240 default_l_val=.false., lone_keyword_l_val=.true.)
2241 CALL section_add_keyword(print_key, keyword)
2242 CALL keyword_release(keyword)
2243 CALL section_add_subsection(subsection, print_key)
2244 CALL section_release(print_key)
2245
2246 !! SOC PRINT SECTION
2247 CALL cp_print_key_section_create(print_key, __location__, name="SOC_PRINT", &
2248 description="Controls the printout of the tddfpt2_soc modul", &
2249 print_level=debug_print_level + 1, filename="SOC")
2250 CALL keyword_create(keyword, __location__, name="UNIT_eV", &
2251 description="Will detrement if output in eVolt will be printef.", &
2252 default_l_val=.true., lone_keyword_l_val=.true.)
2253 CALL section_add_keyword(print_key, keyword)
2254 CALL keyword_release(keyword)
2255 CALL keyword_create(keyword, __location__, name="UNIT_wn", &
2256 description="Will detrement if output in wavenumbers will be printed.", &
2257 default_l_val=.false., lone_keyword_l_val=.true.)
2258 CALL section_add_keyword(print_key, keyword)
2259 CALL keyword_release(keyword)
2260 CALL keyword_create(keyword, __location__, name="SPLITTING", &
2261 description="Will add the SOC-Splitting as additional output", &
2262 default_l_val=.false., lone_keyword_l_val=.true.)
2263 CALL section_add_keyword(print_key, keyword)
2264 CALL keyword_release(keyword)
2265 CALL keyword_create(keyword, __location__, name="SOME", &
2266 description="Will add the SOC-Matrix as additional output in a different file", &
2267 default_l_val=.false., lone_keyword_l_val=.true.)
2268 CALL section_add_keyword(print_key, keyword)
2269 CALL keyword_release(keyword)
2270 CALL section_add_subsection(subsection, print_key)
2271 CALL section_release(print_key)
2272
2273 CALL cp_print_key_section_create(print_key, __location__, name="FORCES", &
2274 description="Controls the calculation and printing of excited state forces. "// &
2275 "This needs a RUN_TYPE that includes force evaluation, e.g. ENERGY_FORCE", &
2276 print_level=debug_print_level, filename="TDFORCE")
2277 CALL keyword_create(keyword, __location__, name="LIST", &
2278 description="Specifies a list of states for the force calculations.", &
2279 usage="LIST {integer} {integer} .. {integer}", repeats=.true., &
2280 n_var=-1, type_of_var=integer_t)
2281 CALL section_add_keyword(print_key, keyword)
2282 CALL keyword_release(keyword)
2283 CALL keyword_create(keyword, __location__, name="THRESHOLD", &
2284 description="Threshold for oszillator strength to screen states.", &
2285 usage="Threshold 0.01", &
2286 n_var=1, &
2287 type_of_var=real_t, &
2288 default_r_val=0.0_dp)
2289 CALL section_add_keyword(print_key, keyword)
2290 CALL keyword_release(keyword)
2291 CALL section_add_subsection(subsection, print_key)
2292 CALL section_release(print_key)
2293
2294 CALL section_add_subsection(section, subsection)
2295 CALL section_release(subsection)
2296
2297 END SUBROUTINE create_tddfpt2_section
2298
2299! **************************************************************************************************
2300!> \brief creates the stda input section (simplified Tamm Dancoff Approximation)
2301!> \param section the section to create
2302! **************************************************************************************************
2303 SUBROUTINE create_stda_section(section)
2304 TYPE(section_type), POINTER :: section
2305
2306 TYPE(keyword_type), POINTER :: keyword
2307
2308 cpassert(.NOT. ASSOCIATED(section))
2309 CALL section_create(section, __location__, name="sTDA", &
2310 description="parameters needed and setup for sTDA calculations", &
2311 n_keywords=3, n_subsections=0, repeats=.false.)
2312 NULLIFY (keyword)
2313
2314 CALL keyword_create(keyword, __location__, name="FRACTION", &
2315 variants=["HFX_FRACTION"], &
2316 description="The fraction of TB Hartree-Fock exchange to use in the Kernel. "// &
2317 "0.0 implies no HFX part is used in the kernel. ", &
2318 usage="FRACTION 0.0", default_r_val=0.0_dp)
2319 CALL section_add_keyword(section, keyword)
2320 CALL keyword_release(keyword)
2321
2322 ! even if scaling parameter for exchange FRACTION (see above) is zero, the semi-empirical electron repulsion
2323 ! operator for exchange is not, so that a keyword is required to switch off sTDA exchange (if wanted)
2324 CALL keyword_create(keyword, __location__, name="DO_EXCHANGE", &
2325 description="Explicitly including or switching off sTDA exchange", &
2326 usage="DO_EXCHANGE", default_l_val=.true., lone_keyword_l_val=.true.)
2327 CALL section_add_keyword(section, keyword)
2328 CALL keyword_release(keyword)
2329
2330 CALL keyword_create(keyword, __location__, name="DO_EWALD", &
2331 description="Use Ewald type method for Coulomb interaction", &
2332 usage="DO_EWALD", default_l_val=.false., lone_keyword_l_val=.true.)
2333 CALL section_add_keyword(section, keyword)
2334 CALL keyword_release(keyword)
2335
2336 CALL keyword_create(keyword, __location__, name="EPS_TD_FILTER", &
2337 description="Threshold for filtering the transition density matrix", &
2338 usage="EPS_TD_FILTER epsf", default_r_val=1.e-10_dp)
2339 CALL section_add_keyword(section, keyword)
2340 CALL keyword_release(keyword)
2341
2342 CALL keyword_create(keyword, __location__, name="MATAGA_NISHIMOTO_CEXP", &
2343 description="Exponent used in Mataga-Nishimoto formula for Coulomb (alpha). "// &
2344 "Default value is method dependent!", &
2345 usage="MATAGA_NISHIMOTO_CEXP cexp", default_r_val=-99.0_dp)
2346 CALL section_add_keyword(section, keyword)
2347 CALL keyword_release(keyword)
2348
2349 CALL keyword_create(keyword, __location__, name="MATAGA_NISHIMOTO_XEXP", &
2350 description="Exponent used in Mataga-Nishimoto formula for Exchange (beta). "// &
2351 "Default value is method dependent!", &
2352 usage="MATAGA_NISHIMOTO_XEXP xexp", default_r_val=-99.0_dp)
2353 CALL section_add_keyword(section, keyword)
2354 CALL keyword_release(keyword)
2355
2356 CALL keyword_create(keyword, __location__, name="COULOMB_SR_CUT", &
2357 description="Maximum range of short range part of Coulomb interaction.", &
2358 usage="COULOMB_SR_CUT rcut", default_r_val=20.0_dp)
2359 CALL section_add_keyword(section, keyword)
2360 CALL keyword_release(keyword)
2361
2362 CALL keyword_create(keyword, __location__, name="COULOMB_SR_EPS", &
2363 description="Threshold for short range part of Coulomb interaction.", &
2364 usage="COULOMB_SR_EPS sreps", default_r_val=1.e-03_dp)
2365 CALL section_add_keyword(section, keyword)
2366 CALL keyword_release(keyword)
2367
2368 END SUBROUTINE create_stda_section
2369
2370! **************************************************************************************************
2371!> \brief creates the RES input section (Reduced Excitation Space)
2372!> \param section the section to create
2373! **************************************************************************************************
2374 SUBROUTINE create_res_section(section)
2375 TYPE(section_type), POINTER :: section
2376
2377 TYPE(keyword_type), POINTER :: keyword
2378
2379 cpassert(.NOT. ASSOCIATED(section))
2380 CALL section_create(section, __location__, name="REDUCED_EXCITATION_SPACE", &
2381 description="Sets up a restricted (reduced) excitation space for TDDFT", &
2382 n_keywords=3, n_subsections=0, repeats=.false.)
2383
2384 NULLIFY (keyword)
2385 CALL keyword_create(keyword, __location__, &
2386 name="_SECTION_PARAMETERS_", &
2387 description="Controls the activation of RES calculation.", &
2388 default_l_val=.false., &
2389 lone_keyword_l_val=.true.)
2390 CALL section_add_keyword(section, keyword)
2391 CALL keyword_release(keyword)
2392
2393 CALL keyword_create(keyword, __location__, name="ENERGY_WINDOW", &
2394 description="Upper and lower cutoffs [eV] for orbitals to be included for excitations. ", &
2395 usage="ENERGY_WINDOW -5.0 0.0", default_r_vals=[-1.0e10_dp, 1.0e10_dp], &
2396 type_of_var=real_t, unit_str="eV")
2397 CALL section_add_keyword(section, keyword)
2398 CALL keyword_release(keyword)
2399
2400 CALL keyword_create(keyword, __location__, name="UPPER_ENERGY_CUTOFF", &
2401 description="Upper energy cutoff [eV] for orbitals to be included in excitations.", &
2402 usage="UPPER_ENERGY_CUTOFF -5.0", default_r_val=1.0e10_dp, &
2403 type_of_var=real_t, unit_str="eV")
2404 CALL section_add_keyword(section, keyword)
2405 CALL keyword_release(keyword)
2406
2407 CALL keyword_create(keyword, __location__, name="LOWER_ENERGY_CUTOFF", &
2408 description="Lower energy cutoff [eV] for orbitals to be included in excitations.", &
2409 usage="LOWER_ENERGY_CUTOFF -5.0", default_r_val=-1.0e10_dp, &
2410 type_of_var=real_t, unit_str="eV")
2411 CALL section_add_keyword(section, keyword)
2412 CALL keyword_release(keyword)
2413
2414 CALL keyword_create(keyword, __location__, name="MOLECULE_LIST", &
2415 description="Indices of molecules to be excited. "// &
2416 "This implies the calculation of molecular states through orbital location "// &
2417 "and subspace diagonalization.", &
2418 usage="MOLECULE_LIST {integer} {integer} .. {integer} ", &
2419 n_var=-1, type_of_var=integer_t, repeats=.false.)
2420 CALL section_add_keyword(section, keyword)
2421 CALL keyword_release(keyword)
2422
2423 END SUBROUTINE create_res_section
2424
2425! **************************************************************************************************
2426!> \brief creates an input section for electronic band structure calculations
2427!> \param section section to create
2428!> \par History
2429!> * 07.2023 created [Jan Wilhelm]
2430! **************************************************************************************************
2431 SUBROUTINE create_bandstructure_section(section)
2432 TYPE(section_type), POINTER :: section
2433
2434 TYPE(keyword_type), POINTER :: keyword
2435 TYPE(section_type), POINTER :: subsection
2436
2437 cpassert(.NOT. ASSOCIATED(section))
2438 CALL section_create(section, __location__, name="BANDSTRUCTURE", &
2439 description="Parameters needed to set up a calculation for "// &
2440 "electronic level energies of molecules and the electronic band "// &
2441 "structure of materials from post-SCF schemes (GW, perturbative "// &
2442 "spin-orbit coupling from GTH pseudopotentials), and Floquet "// &
2443 "band structures as response to continuous driving with light.", &
2444 n_keywords=1, n_subsections=1, repeats=.false.)
2445
2446 NULLIFY (keyword, subsection)
2447 CALL keyword_create(keyword, __location__, &
2448 name="_SECTION_PARAMETERS_", &
2449 description="Controls the activation of the band structure calculation.", &
2450 default_l_val=.false., &
2451 lone_keyword_l_val=.true.)
2452 CALL section_add_keyword(section, keyword)
2453 CALL keyword_release(keyword)
2454
2455 ! here we generate a subsection for getting a k-point path for the bandstructure
2456 CALL create_kpoint_set_section(subsection, "BANDSTRUCTURE_PATH")
2457 CALL section_add_subsection(section, subsection)
2458 CALL section_release(subsection)
2459
2460 CALL create_gw_section(subsection)
2461 CALL section_add_subsection(section, subsection)
2462 CALL section_release(subsection)
2463
2464 CALL create_soc_section(subsection)
2465 CALL section_add_subsection(section, subsection)
2466 CALL section_release(subsection)
2467
2468 CALL create_dos_section(subsection)
2469 CALL section_add_subsection(section, subsection)
2470 CALL section_release(subsection)
2471
2472 CALL create_floquet_section(subsection)
2473 CALL section_add_subsection(section, subsection)
2474 CALL section_release(subsection)
2475
2476 END SUBROUTINE create_bandstructure_section
2477
2478! **************************************************************************************************
2479!> \brief creates an input section for a GW calculation for the electronic band structure
2480!> \param section section to create
2481!> \par History
2482!> * 07.2023 created [Jan Wilhelm]
2483! **************************************************************************************************
2484 SUBROUTINE create_gw_section(section)
2485 TYPE(section_type), POINTER :: section
2486
2487 TYPE(keyword_type), POINTER :: keyword
2488 TYPE(section_type), POINTER :: print_key, subsection
2489
2490 cpassert(.NOT. ASSOCIATED(section))
2491 CALL section_create(section, __location__, name="GW", &
2492 description="Parameters needed to set up a GW calculation for "// &
2493 "electronic level energies $\varepsilon_{n\mathbf{k}}^{G_0W_0}$ "// &
2494 "of molecules and the band structure of materials: "// &
2495 "$\varepsilon_{n\mathbf{k}}^{G_0W_0}= "// &
2496 "\varepsilon_{n\mathbf{k}}^\text{DFT}+\Sigma_{n\mathbf{k}} "// &
2497 "-v^\text{xc}_{n\mathbf{k}}$. "// &
2498 "For the GW algorithm for molecules, see \‍[Wilhelm2021\‍]. "// &
2499 "For 2D materials, see \‍[Graml2024\‍].", &
2500 citations=[wilhelm2021, graml2024], &
2501 n_keywords=1, n_subsections=5, repeats=.false.)
2502
2503 NULLIFY (keyword)
2504 CALL keyword_create(keyword, __location__, &
2505 name="_SECTION_PARAMETERS_", &
2506 description="Controls the activation of the GW calculation.", &
2507 default_l_val=.false., &
2508 lone_keyword_l_val=.true.)
2509 CALL section_add_keyword(section, keyword)
2510 CALL keyword_release(keyword)
2511
2512 CALL keyword_create(keyword, __location__, name="NUM_TIME_FREQ_POINTS", &
2513 description="Number of discrete points for the imaginary-time "// &
2514 "grid and the imaginary-frequency grid. The more points, the more "// &
2515 "precise is the calculation. Typically, 10 points are good "// &
2516 "for 0.1 eV precision of band structures and molecular energy "// &
2517 "levels, 20 points for 0.03 eV precision, "// &
2518 "and 30 points for 0.01 eV precision, see Table I in "// &
2519 "\‍[Wilhelm2021\‍]. GW computation time "// &
2520 "increases linearly with `NUM_TIME_FREQ_POINTS`.", &
2521 usage="NUM_TIME_FREQ_POINTS 30", &
2522 default_i_val=30)
2523 CALL section_add_keyword(section, keyword)
2524 CALL keyword_release(keyword)
2525
2526 CALL keyword_create(keyword, __location__, name="EPS_FILTER", &
2527 description="Threshold for sparse operations on spatially local "// &
2528 "matrices, including DBCSR matrix multiplication. EPS_FILTER "// &
2529 "usually controls the accuracy and runtime of low-scaling GW: "// &
2530 "a smaller value increases numerical precision and computational "// &
2531 "cost.", &
2532 usage="EPS_FILTER 1.0E-6", &
2533 default_r_val=1.0e-8_dp)
2534 CALL section_add_keyword(section, keyword)
2535 CALL keyword_release(keyword)
2536
2537 CALL keyword_create(keyword, __location__, name="REGULARIZATION_MINIMAX", &
2538 description="Parameter to regularize the Fourier transformation with minimax grids. "// &
2539 "In case the parameter 0.0 is chosen, no regularization is performed.", &
2540 usage="REGULARIZATION_MINIMAX 1.0E-4", &
2541 default_r_val=-1.0_dp)
2542 CALL section_add_keyword(section, keyword)
2543 CALL keyword_release(keyword)
2544
2545 CALL keyword_create(keyword, __location__, name="REGULARIZATION_RI", &
2546 description="Regularization applied to the GW RI fitting matrix "// &
2547 "$M_{PQ}$. A negative value selects the context-dependent default: "// &
2548 "zero for molecules, 1.0E-8 for periodic RI-RS GW and 1.0E-2 "// &
2549 "for other periodic systems.", &
2550 usage="REGULARIZATION_RI 1.0E-4", &
2551 default_r_val=-1.0_dp)
2552 CALL section_add_keyword(section, keyword)
2553 CALL keyword_release(keyword)
2554
2555 CALL keyword_create(keyword, __location__, name="CUTOFF_RADIUS_RI", &
2556 description="The cutoff radius (in Angstrom) for the truncated "// &
2557 "Coulomb operator. The larger the cutoff radius, the faster "// &
2558 "converges the resolution of the identity (RI) with respect to the "// &
2559 "RI basis set size. Larger cutoff radius means higher computational "// &
2560 "cost.", &
2561 usage="CUTOFF_RADIUS_RI 3.0", &
2562 default_r_val=cp_unit_to_cp2k(value=3.0_dp, unit_str="angstrom"), &
2563 type_of_var=real_t, unit_str="angstrom")
2564 CALL section_add_keyword(section, keyword)
2565 CALL keyword_release(keyword)
2566
2567 CALL keyword_create(keyword, __location__, name="RI_CUTOFF_ATTENUATION", &
2568 description="Positive attenuation omega (in inverse bohr) of the "// &
2569 "erfc(omega*r)/r RI metric used by periodic full-k RI-RS GW. "// &
2570 "The default is 0.3 bohr^-1. Other GW implementations use "// &
2571 "the truncated Coulomb metric set by CUTOFF_RADIUS_RI.", &
2572 usage="RI_CUTOFF_ATTENUATION 0.3", default_r_val=0.3_dp, &
2573 type_of_var=real_t, unit_str="bohr^-1")
2574 CALL section_add_keyword(section, keyword)
2575 CALL keyword_release(keyword)
2576
2577 CALL keyword_create(keyword, __location__, name="MEMORY_PER_PROC", &
2578 description="Specify the available memory per MPI process (in GB). The "// &
2579 "default value -1 means that the available memory per MPI process is detected "// &
2580 "automatically from the free memory of the node divided by the number "// &
2581 "of MPI processes running on that node; this is the recommended setting. "// &
2582 "Note: This keyword is not used for GW calculations with RI-RS, "// &
2583 "where the available memory is always detected automatically.", &
2584 usage="MEMORY_PER_PROC 16", &
2585 default_r_val=-1.0_dp)
2586 CALL section_add_keyword(section, keyword)
2587 CALL keyword_release(keyword)
2588
2589 CALL keyword_create(keyword, __location__, name="APPROX_KP_EXTRAPOL", &
2590 description="If true, use only a 4x4 kpoint mesh for frequency "// &
2591 "points $\omega_j, j \ge 2$ (instead of a 4x4 and 6x6 k-point mesh). "// &
2592 "The k-point extrapolation of $W_{PQ}(i\omega_j,\mathbf{q})$ "// &
2593 "is done approximately from $W_{PQ}(i\omega_1,\mathbf{q})$.", &
2594 usage="APPROX_KP_EXTRAPOL", &
2595 default_l_val=.false., lone_keyword_l_val=.true.)
2596 CALL section_add_keyword(section, keyword)
2597 CALL keyword_release(keyword)
2598
2599 CALL keyword_create(keyword, __location__, name="SIZE_LATTICE_SUM", &
2600 description="Parameter determines how many neighbor cells $\mathbf{R}$ "// &
2601 "are used for computing "// &
2602 "$V_{PQ}(\mathbf{k}) = "// &
2603 "\sum_{\mathbf{R}} e^{i\mathbf{k}\cdot\mathbf{R}}\,\langle P, "// &
2604 "\text{cell}{=}\mathbf{0}|1/r|Q,\text{cell}{=}\mathbf{R}\rangle$. "// &
2605 "Normally, parameter does not need to be touched.", &
2606 usage="SIZE_LATTICE_SUM 4", &
2607 default_i_val=3)
2608 CALL section_add_keyword(section, keyword)
2609 CALL keyword_release(keyword)
2610
2611 CALL keyword_create( &
2612 keyword, __location__, name="KPOINTS_W", &
2613 description="Monkhorst-Pack k-point mesh of size N_x, N_y, N_z for calculating "// &
2614 "$W_{PQ}^\mathbf{R}=\int_\text{BZ}\frac{d\mathbf{k}}{\Omega_\text{BZ}}\, "// &
2615 "e^{-i\mathbf{k}\cdot\mathbf{R}}\,W_{PQ}(\mathbf{k})$. "// &
2616 "For non-periodic directions α, choose N_α = 1. "// &
2617 "Automatic choice of the k-point mesh for negative "// &
2618 "values, i.e. KPOINTS_W -1 -1 -1. "// &
2619 "K-point extrapolation of W is automatically switched on.", &
2620 usage="KPOINTS_W N_x N_y N_z", &
2621 n_var=3, type_of_var=integer_t, default_i_vals=[-1, -1, -1])
2622 CALL section_add_keyword(section, keyword)
2623 CALL keyword_release(keyword)
2624
2625 CALL keyword_create(keyword, __location__, name="HEDIN_SHIFT", &
2626 description="If true, use Hedin's shift in G0W0, evGW and evGW0. "// &
2627 "Details see in Li et al. JCTC 18, 7570 "// &
2628 "(2022), Figure 1. G0W0 with Hedin's shift should give "// &
2629 "similar GW eigenvalues as evGW0; at a lower "// &
2630 "computational cost.", &
2631 usage="HEDIN_SHIFT", &
2632 default_l_val=.false., &
2633 lone_keyword_l_val=.true.)
2634 CALL section_add_keyword(section, keyword)
2635 CALL keyword_release(keyword)
2636
2637 CALL keyword_create(keyword, __location__, name="FREQ_MAX_FIT", &
2638 description="For analytic continuation, a fit on Σ(iω) is performed. "// &
2639 "This fit is then evaluated at a real frequency, Σ(ω), which is used "// &
2640 "in the quasiparticle equation "// &
2641 "$\varepsilon_{n\mathbf{k}}^{G_0W_0}= "// &
2642 "\varepsilon_{n\mathbf{k}}^\text{DFT}+\Sigma_{n\mathbf{k}} "// &
2643 "-v^\text{xc}_{n\mathbf{k}}$. The keyword FREQ_MAX_FIT "// &
2644 "determines fitting range for the self-energy Σ(iω) on "// &
2645 "imaginary axis: i*[0, ω_max] for empty orbitals/bands, i*[-ω_max,0] "// &
2646 "for occ orbitals. A smaller ω_max might lead to better numerical "// &
2647 "stability (i.e., if you observe clearly wrong GW eigenvalues/bands "// &
2648 "around HOMO/LUMO, decreasing ω_max might fix this issue). "// &
2649 "A small benchmark of ω_max is contained in Fig. 5 of "// &
2650 "J. Wilhelm et al., JCTC 12, 3623-3635 (2016). "// &
2651 "Note that we used ω_max = 1 Ha = 27.211 eV in the benchmark "// &
2652 "M. Azizi et al., PRB 109, 245101 (2024).", &
2653 unit_str="eV", &
2654 usage="FREQ_MAX_FIT 20.0", &
2655 default_r_val=cp_unit_to_cp2k(value=10.0_dp, unit_str="eV"))
2656 CALL section_add_keyword(section, keyword)
2657 CALL keyword_release(keyword)
2658
2659 NULLIFY (subsection)
2660 CALL section_create(subsection, __location__, name="COHSEX", &
2661 description="Static Coulomb-hole screened-exchange (COHSEX) approximation "// &
2662 "and scaling of its correlation self-energy.", &
2663 n_keywords=3, n_subsections=0, repeats=.false.)
2664
2665 NULLIFY (keyword)
2666 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
2667 description="Static Coulomb-hole screened-exchange (COHSEX) approximation to "// &
2668 "$G_0W_0$. Only the static screened Coulomb interaction $W(\omega=0)$ is computed; "// &
2669 "its correlation part $W^\text{c}(0) = W(0) - v$ gives the static correlation "// &
2670 "self-energy $\Sigma^\text{c}_{mn} = \frac{1}{2}\sum_p \text{sgn}(\varepsilon_p - "// &
2671 "\varepsilon_\text{F})\, W^\text{c}_{mp,pn}(\omega=0)$. The quasiparticle Hamiltonian "// &
2672 "$H^\text{QP}_{mn} = \varepsilon_n^\text{DFT}\delta_{mn} + \Sigma^\text{x}_{mn} - "// &
2673 "v^\text{xc}_{mn} + \Sigma^\text{c}_{mn}$ is built in the Kohn-Sham MO basis; its "// &
2674 "occupied-virtual blocks are set to zero. The quasiparticle energies are written to "// &
2675 "the file Quasiparticle_energies_singlepole.", &
2676 usage="&COHSEX QP_UPDATE", &
2677 enum_c_vals=s2a("OFF", "DIAGONAL", "QP_UPDATE"), &
2679 enum_desc=s2a("No static COHSEX (default without the section).", &
2680 "Diagonal static COHSEX (Hedin 1965; Hybertsen and Louie 1986): the "// &
2681 "quasiparticle energies are the diagonal elements "// &
2682 "$\varepsilon_n^\text{DG} = H^\text{QP}_{nn}$. "// &
2683 "Default of the section without a parameter.", &
2684 "Static COHSEX with quasiparticle update (Tyagi and Voora 2024): "// &
2685 "$H^\text{QP}$ is diagonalized, giving the canonical static COHSEX "// &
2686 "energies $\varepsilon_n^\text{CN}$ and MOs. Both "// &
2687 "$\varepsilon_n^\text{DG}$ and $\varepsilon_n^\text{CN}$ are printed, "// &
2688 "the MOs at the $\Gamma$ point with DFT%PRINT%MO and DFT%PRINT%MO_CUBES."), &
2689 citations=[hedin1965, hybertsen1986, tyagi2024], &
2690 default_i_val=cohsex_off, lone_keyword_i_val=cohsex_diagonal)
2691 CALL section_add_keyword(subsection, keyword)
2692 CALL keyword_release(keyword)
2693
2694 CALL keyword_create(keyword, __location__, name="SCALE_OCC", &
2695 description="Scaling factor of the static COHSEX correlation self-energy in the "// &
2696 "occupied-occupied block of $H^\text{QP}$.", &
2697 usage="SCALE_OCC 0.6", &
2698 citations=[tyagi2026], &
2699 default_r_val=1.0_dp)
2700 CALL section_add_keyword(subsection, keyword)
2701 CALL keyword_release(keyword)
2702
2703 CALL keyword_create(keyword, __location__, name="SCALE_VIRT", &
2704 description="Scaling factor of the static COHSEX correlation self-energy in the "// &
2705 "virtual-virtual block of $H^\text{QP}$.", &
2706 usage="SCALE_VIRT 0.6", &
2707 citations=[tyagi2026], &
2708 default_r_val=1.0_dp)
2709 CALL section_add_keyword(subsection, keyword)
2710 CALL keyword_release(keyword)
2711
2712 CALL section_add_subsection(section, subsection)
2713 CALL section_release(subsection)
2714
2715 NULLIFY (subsection, print_key)
2716 CALL section_create(subsection, __location__, name="PRINT", &
2717 description="Printing of GW restarts.", &
2718 n_keywords=2, n_subsections=1, repeats=.false.)
2719 CALL cp_print_key_section_create(print_key, __location__, "RESTART", &
2720 description="Controls the printing of restart files "// &
2721 "for χ, W, Σ.", &
2722 filename="", print_level=low_print_level, &
2723 common_iter_levels=3)
2724 CALL section_add_subsection(subsection, print_key)
2725 CALL section_release(print_key)
2726
2727 CALL section_add_subsection(section, subsection)
2728 CALL section_release(subsection)
2729
2730 NULLIFY (subsection)
2731 CALL create_ri_rs_section(subsection)
2732 CALL section_add_subsection(section, subsection)
2733 CALL section_release(subsection)
2734
2735 NULLIFY (subsection)
2736 CALL create_auto_ri_section(subsection)
2737 CALL section_add_subsection(section, subsection)
2738 CALL section_release(subsection)
2739
2740 NULLIFY (subsection)
2741 CALL create_evgw0_section(subsection)
2742 CALL section_add_subsection(section, subsection)
2743 CALL section_release(subsection)
2744
2745 END SUBROUTINE create_gw_section
2746
2747! **************************************************************************************************
2748!> \brief Creates the automatic RI basis set optimization section.
2749!> \param section AUTO_RI input section
2750! **************************************************************************************************
2751 SUBROUTINE create_auto_ri_section(section)
2752 TYPE(section_type), POINTER :: section
2753
2754 TYPE(keyword_type), POINTER :: keyword
2755
2756 cpassert(.NOT. ASSOCIATED(section))
2757 CALL section_create(section, __location__, name="AUTO_RI", &
2758 description="Optimizes an RI basis for molecular "// &
2759 "and full-k periodic RI-RS GW. The fitting target combines "// &
2760 "occupied-empty transitions and exchange products.", &
2761 n_keywords=3, n_subsections=0, repeats=.false.)
2762 NULLIFY (keyword)
2763 CALL keyword_create(keyword, __location__, name="RI_AO_RATIO", &
2764 description="Ratio between the numbers of optimized RI and AO basis "// &
2765 "functions. For example, RI_AO_RATIO 3 requires an RI basis with "// &
2766 "three times as many functions as the AO basis. Compare values such "// &
2767 "as 1, 1.5, 2, 3 and 4 until the GW energies are converged. "// &
2768 "Larger values increase time and memory, but also increase the "// &
2769 "numerical accuracy.", &
2770 default_r_val=3.0_dp, usage="RI_AO_RATIO 3")
2771 CALL section_add_keyword(section, keyword)
2772 CALL keyword_release(keyword)
2773
2774 CALL keyword_create(keyword, __location__, name="OCC_EMPTY_FRONTIER_ORBITAL_WINDOW", &
2775 description="The exchange contribution to the RI optimization "// &
2776 "objective includes GW levels within the energy window "// &
2777 "$[\epsilon_{\mathrm{HOMO}}-w,\epsilon_{\mathrm{LUMO}}+w]$. "// &
2778 "The default of 5 eV is usually sufficient, for example for "// &
2779 "GW-BSE excitations up to 10 eV.", &
2780 default_r_val=cp_unit_to_cp2k(value=5.0_dp, unit_str="eV"), &
2781 unit_str="eV", usage="OCC_EMPTY_FRONTIER_ORBITAL_WINDOW [eV] 5.0")
2782 CALL section_add_keyword(section, keyword)
2783 CALL keyword_release(keyword)
2784
2785 END SUBROUTINE create_auto_ri_section
2786
2787! **************************************************************************************************
2788!> \brief creates the input section collecting all parameters of the real-space resolution of
2789!> the identity (RI-RS) used in GW
2790!> \param section section to create
2791! **************************************************************************************************
2792 SUBROUTINE create_ri_rs_section(section)
2793 TYPE(section_type), POINTER :: section
2794
2795 TYPE(keyword_type), POINTER :: keyword
2796 TYPE(section_type), POINTER :: subsection
2797
2798 cpassert(.NOT. ASSOCIATED(section))
2799 CALL section_create(section, __location__, name="RI_RS", &
2800 description="Real-Space Resolution of Identity (RI-RS) method. This "// &
2801 "approximation replaces the conventional 3-center RI integrals "// &
2802 "$(\mu\nu|P)$ by a factorized representation on an atom-centered "// &
2803 "real-space grid with points $\mathbf{r}_\ell$: "// &
2804 "$(\mu\nu|P) \approx \sum_\ell \varphi_\mu(\mathbf{r}_\ell) "// &
2805 "\varphi_\nu(\mathbf{r}_\ell) Z_{\ell P}$. "// &
2806 "The coefficients $Z_{\ell P}$ combine the numerical integration "// &
2807 "weights and the Coulomb potential of the auxiliary basis function "// &
2808 "$P$ evaluated at grid point $\mathbf{r}_\ell$. To reduce the "// &
2809 "computational cost, only grid points within the sphere $B^P$ around "// &
2810 "atom $P$ are included, i.e. the points with "// &
2811 "$|\mathbf{r}_\ell - \mathbf{R}_P| < R_c + r_P$. "// &
2812 "Here, $r_P$ is the effective radius of the most diffuse RI "// &
2813 "auxiliary Gaussian on atom $P$, at which the basis function "// &
2814 "magnitude falls below a threshold $\delta$ "// &
2815 "(currently controlled through EPS_FILTER). "// &
2816 "This locality approximation yields a sparse representation of the "// &
2817 "3-center integrals and enables reduced computational cost. "// &
2818 "See details in \‍[Duchemin2019\‍].", &
2819 citations=[duchemin2019, duchemin2021], &
2820 n_keywords=11, n_subsections=1, repeats=.false.)
2821
2822 NULLIFY (keyword)
2823 CALL keyword_create(keyword, __location__, &
2824 name="_SECTION_PARAMETERS_", &
2825 description="Controls the activation of RI-RS in the GW calculation. "// &
2826 "An empty section, &RI_RS ... &END RI_RS, switches RI-RS on with "// &
2827 "default parameters.", &
2828 usage="&RI_RS .TRUE.", &
2829 default_l_val=.false., &
2830 lone_keyword_l_val=.true.)
2831 CALL section_add_keyword(section, keyword)
2832 CALL keyword_release(keyword)
2833
2834 CALL keyword_create(keyword, __location__, name="TIKHONOV", &
2835 description="Regularization parameter $\alpha$ used to stabilize "// &
2836 "the inversion of the grid-overlap matrix "// &
2837 "$D$ in the RI-RS method. "// &
2838 "See Equation (9) in \‍[Duchemin2019\‍].", &
2839 usage="TIKHONOV 1.0E-8", &
2840 default_r_val=1.0e-08_dp)
2841 CALL section_add_keyword(section, keyword)
2842 CALL keyword_release(keyword)
2843
2844 CALL keyword_create(keyword, __location__, name="GRID_SELECT", &
2845 description="Selection of the atom-centered grid type used "// &
2846 "in RI-RS optimized by Duchemin and Blase. "// &
2847 "(1) def2-TZVPP: Available for elements up to the fourth row "// &
2848 "of the periodic table (see \‍[Duchemin2021\‍]). "// &
2849 "(2) cc-pVTZ: Available for H, C, N, and O atoms "// &
2850 "(see \‍[Duchemin2019\‍]). "// &
2851 "(3) User-provided grids: per-element grid files supplied by the "// &
2852 "user, read as ri_rs_grid/<Element><suffix> in the same format as "// &
2853 "the built-in sets, with the suffix _rirs.ion.", &
2854 usage="GRID_SELECT 1", &
2855 default_i_val=1)
2856 CALL section_add_keyword(section, keyword)
2857 CALL keyword_release(keyword)
2858
2859 CALL keyword_create(keyword, __location__, name="CUTOFF_RADIUS_RL_AO", &
2860 description="Real-space cutoff radius (in Angstrom) for evaluating "// &
2861 "the AO basis functions on the RI-RS grid. Override the default radius "// &
2862 "derived automatically from the most diffuse AO Gaussian on each atom. ", &
2863 usage="CUTOFF_RADIUS_RL_AO 8.0", &
2864 default_r_val=cp_unit_to_cp2k(value=-1.0_dp, unit_str="angstrom"), &
2865 type_of_var=real_t, unit_str="angstrom")
2866 CALL section_add_keyword(section, keyword)
2867 CALL keyword_release(keyword)
2868
2869 CALL keyword_create(keyword, __location__, name="CUTOFF_RADIUS_RL_W", &
2870 description="Real-space truncation radius (Angstrom) for the grid-basis "// &
2871 "G operators in the RI-RS GW self-energy. "// &
2872 "Default -1.0 disables the truncation (exact grid-basis operators).", &
2873 usage="CUTOFF_RADIUS_RL_W 20.0", &
2874 default_r_val=cp_unit_to_cp2k(value=-1.0_dp, unit_str="angstrom"), &
2875 type_of_var=real_t, unit_str="angstrom")
2876 CALL section_add_keyword(section, keyword)
2877 CALL keyword_release(keyword)
2878
2879 NULLIFY (subsection)
2880 CALL create_ri_rs_grid_optimization_section(subsection)
2881 CALL section_add_subsection(section, subsection)
2882 CALL section_release(subsection)
2883
2884 END SUBROUTINE create_ri_rs_section
2885
2886! **************************************************************************************************
2887!> \brief Creates the GW RI-RS in-memory grid optimizer section.
2888!> \param section ...
2889! **************************************************************************************************
2890 SUBROUTINE create_ri_rs_grid_optimization_section(section)
2891 TYPE(section_type), POINTER :: section
2892
2893 TYPE(keyword_type), POINTER :: keyword
2894 NULLIFY (keyword)
2895 cpassert(.NOT. ASSOCIATED(section))
2896 CALL section_create( &
2897 section, __location__, name="GRID_OPTIMIZATION", repeats=.false., &
2898 description="Optimizes RI-RS grid using small local atomic environments. For every atom "// &
2899 "in the structure, a cluster is formed from all atoms whose distance from the centre atom "// &
2900 "is smaller than CUTOFF_ATOMIC_CLUSTER. The grid points are optimized such that the "// &
2901 "corresponding RI-RS three-centre integrals reproduce the analytic integrals: "// &
2902 "For a cluster $C_I$, the normalized squared RI-RS error is "// &
2903 "$E_I = \frac{1}{N_I} \sum_{P\mu\nu \in C_I} \left|(\mu\nu|P) - "// &
2904 "\sum_{\mathbf{r}_{A\ell} \in C_I} \phi_\mu(\mathbf{r}_{A\ell}) "// &
2905 "\phi_\nu(\mathbf{r}_{A\ell}) Z_{A\ell P}\right|^2$. The total objective is "// &
2906 "the average over all local clusters, $E_\mathrm{loc} = \frac{1}{N_\mathrm{at}} "// &
2907 "\sum_{I=1}^{N_\mathrm{at}} E_I$. Starting points are generated on radial-Lebedev grids "// &
2908 "and selected by diagonal Cholesky decomposition in independent atomic clusters. "// &
2909 "If the selection reaches numerical rank before the requested grid size, unused points "// &
2910 "in the central atom's Voronoi cell are added by geometric maximin distance. "// &
2911 "Before Voronoi filtering, the candidate grid contains at least "// &
2912 "max(30, 2 RS_AO_RATIO) times the number of AO functions. RS_AO_RATIO is the sole "// &
2913 "control of the retained points per atom. "// &
2914 "The optimization adapts the grid to the chemical environment and composition of the "// &
2915 "structure and can permit substantially smaller grids. Compact grids often work well for "// &
2916 "small basis sets, but RS_AO_RATIO "// &
2917 "should be tuned and converged for the chosen basis sets and chemical system.")
2918
2919 CALL keyword_create( &
2920 keyword, __location__, name="RS_AO_RATIO", &
2921 description="Number of retained real-space points per atomic-orbital (AO) basis function. "// &
2922 "For every atom A, the count is $N_R^A=\lceil\alpha N_{\mathrm{AO}}^A\rceil$, where "// &
2923 "$\alpha$ is RS_AO_RATIO and $N_{\mathrm{AO}}^A$ is that atom's number of AO functions. ", &
2924 usage="RS_AO_RATIO 7", default_r_val=7.0_dp)
2925 CALL section_add_keyword(section, keyword)
2926 CALL keyword_release(keyword)
2927
2928 CALL keyword_create( &
2929 keyword, __location__, name="CUTOFF_ATOMIC_CLUSTER", &
2930 description="Radius of the atom-centred cluster used to optimize the grid points. "// &
2931 "All atoms within this distance of the centre atom are included. "// &
2932 "A negative value selects 1.4 times the distance to the nearest neighbouring atom.", &
2933 usage="CUTOFF_ATOMIC_CLUSTER -1", type_of_var=real_t, &
2934 default_r_val=cp_unit_to_cp2k(value=-1.0_dp, unit_str="angstrom"), &
2935 unit_str="angstrom")
2936 CALL section_add_keyword(section, keyword)
2937 CALL keyword_release(keyword)
2938
2939 CALL keyword_create( &
2940 keyword, __location__, name="MAX_ITER", &
2941 description="Maximum number of objective-and-gradient evaluations in the single "// &
2942 "cooperative Cartesian grid optimization.", &
2943 usage="MAX_ITER 20", default_i_val=20)
2944 CALL section_add_keyword(section, keyword)
2945 CALL keyword_release(keyword)
2946
2947 END SUBROUTINE create_ri_rs_grid_optimization_section
2948
2949! **************************************************************************************************
2950!> \brief creates the input section for eigenvalue self-consistent GW0 (evGW0)
2951!> \param section section to create
2952! **************************************************************************************************
2953 SUBROUTINE create_evgw0_section(section)
2954 TYPE(section_type), POINTER :: section
2955
2956 TYPE(keyword_type), POINTER :: keyword
2957
2958 cpassert(.NOT. ASSOCIATED(section))
2959 CALL section_create(section, __location__, name="EVGW0", &
2960 description="Eigenvalue self-consistent GW0. The quasiparticle "// &
2961 "energies replace the Kohn-Sham eigenvalues in the Green's function "// &
2962 "and the cycle is repeated, while the screened Coulomb interaction "// &
2963 "$W$ stays at its RPA@DFT value. Only the correlation self-energy "// &
2964 "and the quasiparticle equation are recomputed per cycle; $W$, the "// &
2965 "exchange self-energy and the RI-RS grid quantities are computed "// &
2966 "once. This implementation requires RI-RS. Without this section a "// &
2967 "single-shot G0W0 calculation is performed.", &
2968 n_keywords=3, n_subsections=0, repeats=.false.)
2969
2970 NULLIFY (keyword)
2971 CALL keyword_create(keyword, __location__, &
2972 name="_SECTION_PARAMETERS_", &
2973 description="Controls the activation of evGW0. An empty section, "// &
2974 "&EVGW0 ... &END EVGW0, switches evGW0 on with default parameters.", &
2975 usage="&EVGW0 .TRUE.", &
2976 default_l_val=.false., &
2977 lone_keyword_l_val=.true.)
2978 CALL section_add_keyword(section, keyword)
2979 CALL keyword_release(keyword)
2980
2981 CALL keyword_create(keyword, __location__, name="MAX_ITER", &
2982 description="Maximum number of evGW0 cycles.", &
2983 usage="MAX_ITER 20", &
2984 default_i_val=20)
2985 CALL section_add_keyword(section, keyword)
2986 CALL keyword_release(keyword)
2987
2988 CALL keyword_create(keyword, __location__, name="EPS_ITER", &
2989 description="Target accuracy of the eigenvalue self-consistency. "// &
2990 "The cycle stops once the quasiparticle HOMO, the quasiparticle "// &
2991 "LUMO and the HOMO-LUMO gap all change by less than this value "// &
2992 "between two successive cycles. Unit: Hartree.", &
2993 usage="EPS_ITER 0.00005", &
2994 default_r_val=5.0e-5_dp)
2995 CALL section_add_keyword(section, keyword)
2996 CALL keyword_release(keyword)
2997
2998 END SUBROUTINE create_evgw0_section
2999
3000! **************************************************************************************************
3001!> \brief creates an input section for calculation SOC for the electronic band structure
3002!> \param section section to create
3003!> \par History
3004!> * 09.2023 created [Jan Wilhelm]
3005! **************************************************************************************************
3006 SUBROUTINE create_soc_section(section)
3007 TYPE(section_type), POINTER :: section
3008
3009 TYPE(keyword_type), POINTER :: keyword
3010
3011 cpassert(.NOT. ASSOCIATED(section))
3012 CALL section_create(section, __location__, name="SOC", &
3013 description="Switch on or off spin-orbit coupling. Use SOC "// &
3014 "parameters from non-local pseudopotentials as given in "// &
3015 "Hartwigsen, Goedecker, Hutter, Eq.(18), (19), "// &
3016 "\‍[Hartwigsen1998\‍], with "// &
3017 "$V_{\mu\nu}^{\mathrm{SOC}, (\alpha)} = "// &
3018 "(\hbar/2) \langle \phi_\mu | \sum_l \Delta "// &
3019 "V_l^\mathrm{SO}(\mathbf{r},\mathbf{r}') "// &
3020 "L^{(\alpha)} | \phi_\nu \rangle, "// &
3021 "\alpha = x, y, z$.", citations=[hartwigsen1998], &
3022 n_keywords=1, n_subsections=1, repeats=.false.)
3023
3024 NULLIFY (keyword)
3025 CALL keyword_create(keyword, __location__, &
3026 name="_SECTION_PARAMETERS_", &
3027 description="Controls the activation of the SOC calculation.", &
3028 default_l_val=.false., &
3029 lone_keyword_l_val=.true.)
3030 CALL section_add_keyword(section, keyword)
3031 CALL keyword_release(keyword)
3032
3033 CALL keyword_create(keyword, __location__, name="SOC_WINDOW_OCC", &
3034 description="Apply SOC only for states with eigenvalues below VBM "// &
3035 "in the interval $[\varepsilon_\mathrm{VBM}-E_\mathrm{window\_occ}, \ "// &
3036 "\varepsilon_\mathrm{VBM}]$. "// &
3037 "to use for large systems to prevent numerical instabilities.", &
3038 usage="SOC_WINDOW_OCC 5.0", &
3039 default_r_val=-1.0_dp, &
3040 unit_str="eV")
3041 CALL section_add_keyword(section, keyword)
3042 CALL keyword_release(keyword)
3043
3044 CALL keyword_create(keyword, __location__, name="SOC_WINDOW_VIRT", &
3045 description="Apply SOC only for states with eigenvalues above CBM "// &
3046 "in the interval $[\varepsilon_\mathrm{CBM},\ "// &
3047 "\varepsilon_\mathrm{CBM}+E_\mathrm{window\_virt}]$, "// &
3048 "to use for large systems to prevent numerical instabilities.", &
3049 usage="SOC_WINDOW_VIRT 5.0", &
3050 default_r_val=-1.0_dp, &
3051 unit_str="eV")
3052 CALL section_add_keyword(section, keyword)
3053 CALL keyword_release(keyword)
3054
3055 CALL keyword_create(keyword, __location__, name="SOC_WINDOW_SMEARING", &
3056 description="Width of the Fermi-like smoothing at the SOC energy-window edge. "// &
3057 "Default reproduces the value of 1 eV. "// &
3058 "only effective when at least one SOC window is active.", &
3059 usage="SOC_WINDOW_SMEARING 1.0", &
3060 default_r_val=cp_unit_to_cp2k(value=1.0_dp, unit_str="eV"), &
3061 unit_str="eV")
3062 CALL section_add_keyword(section, keyword)
3063 CALL keyword_release(keyword)
3064
3065 CALL keyword_create(keyword, __location__, name="SOC_NBANDS_OCC", &
3066 description="Truncate the second-variational SOC diagonalization to this "// &
3067 "many occupied bands below the Fermi level (per spin). Must be used "// &
3068 "together with SOC_NBANDS_VIRT. Default -1 = off. ", &
3069 usage="SOC_NBANDS_OCC 2000", &
3070 default_i_val=-1)
3071 CALL section_add_keyword(section, keyword)
3072 CALL keyword_release(keyword)
3073
3074 CALL keyword_create(keyword, __location__, name="SOC_NBANDS_VIRT", &
3075 description="Truncate the second-variational SOC diagonalization to this "// &
3076 "many virtual bands above the Fermi level (per spin). See SOC_NBANDS_OCC. "// &
3077 "Default -1 = off.", &
3078 usage="SOC_NBANDS_VIRT 2000", &
3079 default_i_val=-1)
3080 CALL section_add_keyword(section, keyword)
3081 CALL keyword_release(keyword)
3082
3083 END SUBROUTINE create_soc_section
3084
3085! **************************************************************************************************
3086!> \brief input section for computing the density of states and the projected density of states
3087!> \param section section to create
3088!> \par History
3089!> * 09.2023 created [Jan Wilhelm]
3090! **************************************************************************************************
3091 SUBROUTINE create_dos_section(section)
3092 TYPE(section_type), POINTER :: section
3093
3094 TYPE(keyword_type), POINTER :: keyword
3095 TYPE(section_type), POINTER :: subsection
3096
3097 cpassert(.NOT. ASSOCIATED(section))
3098 CALL section_create(section, __location__, name="DOS", &
3099 description="Parameters needed to calculate the density of states "// &
3100 "(DOS) and the projected density of states (PDOS).", &
3101 n_keywords=1, n_subsections=1, repeats=.false.)
3102
3103 NULLIFY (keyword)
3104 CALL keyword_create(keyword, __location__, &
3105 name="_SECTION_PARAMETERS_", &
3106 description="Controls the activation of the DOS calculation.", &
3107 default_l_val=.false., &
3108 lone_keyword_l_val=.true.)
3109 CALL section_add_keyword(section, keyword)
3110 CALL keyword_release(keyword)
3111
3112 CALL keyword_create(keyword, __location__, name="ENERGY_WINDOW", &
3113 description="Print DOS and PDOS in the energy window "// &
3114 "$[\varepsilon_\mathrm{VBM}-E_\mathrm{window}/2, "// &
3115 "\varepsilon_\mathrm{CBM}+E_\mathrm{window}/2]$,"// &
3116 " where VBM is the valence "// &
3117 "band maximum (or highest occupied molecular orbital, HOMO, for "// &
3118 "molecules) and CBM the conduction band minimum (or lowest "// &
3119 "unoccupied molecular orbital, LUMO, for molecules).", &
3120 usage="ENERGY_WINDOW 5.0", &
3121 default_r_val=cp_unit_to_cp2k(value=10.0_dp, unit_str="eV"), &
3122 unit_str="eV")
3123 CALL section_add_keyword(section, keyword)
3124 CALL keyword_release(keyword)
3125
3126 CALL keyword_create(keyword, __location__, name="ENERGY_STEP", &
3127 description="Resolution of the energy E when computing the $\rho(E)$.", &
3128 usage="ENERGY_STEP 0.01", &
3129 default_r_val=cp_unit_to_cp2k(value=0.01_dp, unit_str="eV"), &
3130 unit_str="eV")
3131 CALL section_add_keyword(section, keyword)
3132 CALL keyword_release(keyword)
3133
3134 CALL keyword_create(keyword, __location__, name="BROADENING", &
3135 description="Broadening α in Gaussians used in the DOS; "// &
3136 "$\rho(E) = \sum_n \exp(((E-\varepsilon_n)/\alpha)^2)/("// &
3137 " \sqrt{2\pi} \alpha)$.", &
3138 usage="BROADENING 0.01", &
3139 default_r_val=cp_unit_to_cp2k(value=0.01_dp, unit_str="eV"), &
3140 unit_str="eV")
3141 CALL section_add_keyword(section, keyword)
3142 CALL keyword_release(keyword)
3143
3144 CALL keyword_create( &
3145 keyword, __location__, name="KPOINTS", &
3146 description="Monkhorst-Pack k-point mesh of size N_x, N_y, N_z for calculating "// &
3147 "the density of states (DOS). In GW, the KPOINT_DOS mesh is thus used as k-point "// &
3148 "mesh for the self-energy. For non-periodic directions α, choose N_α = 1. "// &
3149 "Automatic choice of the k-point mesh for negative "// &
3150 "values, i.e. KPOINTS_DOS -1 -1 -1 (automatic choice: N_α = 1 in non-periodic "// &
3151 "direction, 8 k-points in periodic direction). If you like to compute a "// &
3152 "band structure along a k-path, you can specify the k-path in "// &
3153 "&KPOINT_SET.", &
3154 usage="KPOINTS N_x N_y N_z", &
3155 n_var=3, type_of_var=integer_t, default_i_vals=[-1, -1, -1])
3156 CALL section_add_keyword(section, keyword)
3157 CALL keyword_release(keyword)
3158
3159 NULLIFY (subsection)
3160 CALL create_ldos_section(subsection)
3161 CALL section_add_subsection(section, subsection)
3162 CALL section_release(subsection)
3163
3164 END SUBROUTINE create_dos_section
3165
3166! **************************************************************************************************
3167!> \brief ...
3168!> \param section ...
3169! **************************************************************************************************
3170 SUBROUTINE create_ldos_section(section)
3171 TYPE(section_type), POINTER :: section
3172
3173 TYPE(keyword_type), POINTER :: keyword
3174
3175 cpassert(.NOT. ASSOCIATED(section))
3176 CALL section_create(section, __location__, name="LDOS", &
3177 description="Parameters needed to calculate the local density "// &
3178 "of states (LDOS). "// &
3179 "The LDOS is computed as $\rho(\mathbf{r},E) = "// &
3180 "\sum\limits_{n,\mathbf{k}}"// &
3181 " |\psi_{n\mathbf{k}}(r)|^2\, w_\mathbf{k}\, g(E-\varepsilon_{n\mathbf{k}})$ "// &
3182 "using the Gaussian weight function "// &
3183 "$g(x) = \exp(x^2/\alpha^2)/(\sqrt{2\pi}\alpha)$, $\alpha$ is the broadening "// &
3184 "from the &DOS section, and the k-point weight "// &
3185 "$w_\mathbf{k}$. The k-mesh is taken from the &DOS section.", &
3186 n_keywords=2, repeats=.false.)
3187
3188 NULLIFY (keyword)
3189 CALL keyword_create(keyword, __location__, &
3190 name="_SECTION_PARAMETERS_", &
3191 description="Activates the local VBM CBM gap calculation.", &
3192 default_l_val=.false., &
3193 lone_keyword_l_val=.true.)
3194 CALL section_add_keyword(section, keyword)
3195 CALL keyword_release(keyword)
3196
3197 CALL keyword_create(keyword, __location__, name="INTEGRATION", &
3198 description="Defines whether the LDOS is integrated along a "// &
3199 "coordinate. As an example, for INTEGRATION Z, the LDOS "// &
3200 "$\rho(x,y,E) = \int dz\, \rho(x,y,z,E)$ is computed.", &
3201 usage="INTEGRATION Z", &
3202 enum_c_vals=s2a("X", "Y", "Z", "NONE"), &
3203 enum_i_vals=[int_ldos_x, int_ldos_y, int_ldos_z, int_ldos_none], &
3204 enum_desc=s2a("Integrate over x coordinate (not yet implemented).", &
3205 "Integrate over y coordinate (not yet implemented).", &
3206 "Integrate over z coordinate.", &
3207 "No integration, print cube file as function "// &
3208 "of x,y,z (not yet implemented)."), &
3209 default_i_val=int_ldos_z)
3210 CALL section_add_keyword(section, keyword)
3211 CALL keyword_release(keyword)
3212
3213 CALL keyword_create( &
3214 keyword, __location__, name="BIN_MESH", &
3215 description="Mesh of size n x m for binning the space coordinates x and y of "// &
3216 "the LDOS $\rho(x,y,E)$. If -1, no binning is performed and the "// &
3217 "fine x, y resolution of the electron density from SCF is used.", &
3218 usage="BIN_MESH n m", &
3219 n_var=2, type_of_var=integer_t, default_i_vals=[10, 10])
3220 CALL section_add_keyword(section, keyword)
3221 CALL keyword_release(keyword)
3222
3223 END SUBROUTINE create_ldos_section
3224
3225! **************************************************************************************************
3226!> \brief creates an input section for a tip scan calculation
3227!> \param section section to create
3228!> \par History
3229!> * 04.2021 created [JGH]
3230! **************************************************************************************************
3231 SUBROUTINE create_tipscan_section(section)
3232 TYPE(section_type), POINTER :: section
3233
3234 TYPE(keyword_type), POINTER :: keyword
3235
3236 cpassert(.NOT. ASSOCIATED(section))
3237 CALL section_create(section, __location__, name="TIP_SCAN", &
3238 description="Parameters needed to set up a Tip Scan. "// &
3239 "Needs external definition of tip induced field.", &
3240 n_keywords=1, n_subsections=1, repeats=.false.)
3241
3242 NULLIFY (keyword)
3243
3244 CALL keyword_create(keyword, __location__, &
3245 name="_SECTION_PARAMETERS_", &
3246 description="Controls the activation of the Tip Scan procedure", &
3247 default_l_val=.false., &
3248 lone_keyword_l_val=.true.)
3249 CALL section_add_keyword(section, keyword)
3250 CALL keyword_release(keyword)
3251
3252 CALL keyword_create(keyword, __location__, name="SCAN_DIRECTION", &
3253 description="Defines scan direction and scan type(line, plane).", &
3254 usage="SCAN_DIRECTION XY", &
3255 enum_c_vals=s2a("X", "Y", "Z", "XY", "XZ", "YZ", "XYZ"), &
3256 enum_i_vals=[scan_x, scan_y, scan_z, scan_xy, scan_xz, scan_yz, scan_xyz], &
3257 default_i_val=scan_xy)
3258 CALL section_add_keyword(section, keyword)
3259 CALL keyword_release(keyword)
3260
3261 CALL keyword_create(keyword, __location__, name="REFERENCE_POINT", &
3262 description="The reference point to define the absolute position of the scan. ", &
3263 usage="REFERENCE_POINT 0.0 0.0 1.0", &
3264 n_var=3, default_r_vals=[0.0_dp, 0.0_dp, 0.0_dp], type_of_var=real_t, &
3265 unit_str="angstrom")
3266 CALL section_add_keyword(section, keyword)
3267 CALL keyword_release(keyword)
3268
3269 CALL keyword_create(keyword, __location__, name="SCAN_POINTS", &
3270 description="Number of points calculated for each scan direction.", &
3271 usage="SCAN_POINTS 20 20", &
3272 n_var=-1, type_of_var=integer_t)
3273 CALL section_add_keyword(section, keyword)
3274 CALL keyword_release(keyword)
3275
3276 CALL keyword_create(keyword, __location__, name="SCAN_STEP", &
3277 description="Step size for each scan direction.", &
3278 usage="SCAN_STEP 0.01 0.01", &
3279 n_var=-1, type_of_var=real_t, unit_str="angstrom")
3280 CALL section_add_keyword(section, keyword)
3281 CALL keyword_release(keyword)
3282
3283 CALL keyword_create(keyword, __location__, name="TIP_FILENAME", &
3284 description="Filename of tip potential defined in cube file format.", &
3285 usage="TIP_FILENAME <filename>", &
3286 type_of_var=lchar_t)
3287 CALL section_add_keyword(section, keyword)
3288 CALL keyword_release(keyword)
3289
3290 END SUBROUTINE create_tipscan_section
3291
3292! **************************************************************************************************
3293!> \brief ...
3294!> \param section ...
3295!> \param section_name ...
3296!> \author Shridhar Shanbhag
3297! **************************************************************************************************
3298 SUBROUTINE create_floquet_section(section)
3299 TYPE(section_type), POINTER :: section
3300
3301 TYPE(keyword_type), POINTER :: keyword
3302
3303 CALL section_create(section, __location__, name="FLOQUET", &
3304 description="Parameters controlling the calculation of the "// &
3305 "Floquet band structure and Quasi-energies of a system driven "// &
3306 "by a periodic monochromatic electric field with any arbitrary "// &
3307 "polarisation state.", &
3308 n_keywords=1, n_subsections=0, repeats=.false.)
3309 NULLIFY (keyword)
3310
3311 CALL keyword_create(keyword, __location__, name="AMPLITUDE", &
3312 description="Electric field amplitude of the monochromatic light.", &
3313 usage="AMPLITUDE [Vm-1] 1.0E9", n_var=1, type_of_var=real_t, &
3314 unit_str="Vm-1", default_r_val=0.0_dp)
3315 CALL section_add_keyword(section, keyword)
3316 CALL keyword_release(keyword)
3317
3318 CALL keyword_create(keyword, __location__, name="FREQUENCY", &
3319 description="Frequency of the electric field for Floquet calculations "// &
3320 "expressed in terms of the energy of a photon in eV.", &
3321 usage="FREQUENCY 1.5", unit_str="eV", n_var=1, type_of_var=real_t, &
3322 default_r_val=cp_unit_to_cp2k(value=1.0_dp, unit_str="eV"))
3323 CALL section_add_keyword(section, keyword)
3324 CALL keyword_release(keyword)
3325
3326 CALL keyword_create(keyword, __location__, name="POLARISATION", &
3327 description="Polarisation vector of the input light. The "// &
3328 "amplitude in each direction is the product of the AMPLITUDE "// &
3329 "and the POLARISATION vector component. Eg. for light polarized "// &
3330 "in the x direction, use 1 0 0. For left-circularly polarized "// &
3331 "light travelling in the +z direction use 1 1 0 and set "// &
3332 "PHASE_OFFSET 0 0.5 0 for a +Ï€/2 offset", &
3333 usage="POLARISATION 0.0 0.0 1.0", &
3334 default_r_vals=[0.0_dp, 0.0_dp, 1.0_dp])
3335 CALL section_add_keyword(section, keyword)
3336 CALL keyword_release(keyword)
3337
3338 CALL keyword_create(keyword, __location__, name="PHASE_OFFSETS", &
3339 description="Phase offset of the electric field in the "// &
3340 "x, y, and z directions given in multiples of π. For "// &
3341 "linearly polarized light, use 0 0 0 and for left-circularly "// &
3342 "polarized light travelling in the +z direction use "// &
3343 "PHASE_OFFSET 0.0 0.5 0 ", &
3344 usage="PHASE_OFFSETS 0.5 0 0", &
3345 default_r_vals=[0.0_dp, 0.0_dp, 0.0_dp])
3346 CALL section_add_keyword(section, keyword)
3347 CALL keyword_release(keyword)
3348
3349 CALL keyword_create(keyword, __location__, name="MAX_FLOQUET_INDEX", &
3350 description="Largest absolute Floquet index up to which "// &
3351 "Floquet Hamiltonian is truncated. Use a larger value to "// &
3352 "ensure convergence at higher computational cost and a "// &
3353 "smaller value for faster computation. EPS_FLOQUET checks "// &
3354 "to ensure that the error due to truncation is small.", &
3355 usage="MAX_FLOQUET_INDEX 50", &
3356 default_i_val=50)
3357 CALL section_add_keyword(section, keyword)
3358 CALL keyword_release(keyword)
3359
3360 CALL keyword_create(keyword, __location__, name="MAX_NMO", &
3361 description="Maximum number of Kohn-Sham eigenstates closest "// &
3362 "to the valence band maximum used in the Floquet calculation. "// &
3363 "The Floquet Hamiltonian is built only from this band window, "// &
3364 "greatly reducing its size and the diagonalisation cost for "// &
3365 "large (e.g. moire) cells. 0 means use all bands. The window "// &
3366 "must be wide enough that the bands of interest do not couple "// &
3367 "significantly to the excluded bands; converge results by "// &
3368 "increasing MAX_NMO.", &
3369 usage="MAX_NMO 20", &
3370 default_i_val=0)
3371 CALL section_add_keyword(section, keyword)
3372 CALL keyword_release(keyword)
3373
3374 CALL keyword_create(keyword, __location__, name="EPS_FLOQUET", &
3375 description="Threshold on the error due to truncation of "// &
3376 "the Floquet Hamiltonian. Used to verify that MAX_FLOQUET_INDEX "// &
3377 "is large enough that truncation errors are small. "// &
3378 "If negative, the check is removed (not recommended).", &
3379 usage="EPS_FLOQUET 1.e-10", default_r_val=1.0e-10_dp)
3380 CALL section_add_keyword(section, keyword)
3381 CALL keyword_release(keyword)
3382
3383 CALL keyword_create(keyword, __location__, name="ENERGY_WINDOW", &
3384 description="Half-width of the energy range, in eV, centred "// &
3385 "on the Fermi level, over which the Floquet spectral "// &
3386 "function is evaluated.", &
3387 usage="ENERGY_WINDOW 5.0", &
3388 default_r_val=cp_unit_to_cp2k(value=10.0_dp, unit_str="eV"), &
3389 unit_str="eV")
3390 CALL section_add_keyword(section, keyword)
3391 CALL keyword_release(keyword)
3392
3393 CALL keyword_create(keyword, __location__, name="ENERGY_STEP", &
3394 description="Resolution of the energy E used to compute the "// &
3395 "spectral function within the energy window.", &
3396 usage="ENERGY_STEP 0.01", &
3397 default_r_val=cp_unit_to_cp2k(value=0.01_dp, unit_str="eV"), &
3398 unit_str="eV")
3399 CALL section_add_keyword(section, keyword)
3400 CALL keyword_release(keyword)
3401
3402 CALL keyword_create(keyword, __location__, name="BROADENING", &
3403 description="Lorentzian broadening applied to the peaks of the "// &
3404 "Floquet spectral function.", &
3405 usage="BROADENING 0.02", &
3406 default_r_val=cp_unit_to_cp2k(value=0.02_dp, unit_str="eV"), &
3407 unit_str="eV")
3408 CALL section_add_keyword(section, keyword)
3409 CALL keyword_release(keyword)
3410
3411 CALL keyword_create(keyword, __location__, name="TEMPERATURE", &
3412 description="Electronic temperature (in K) of the wide-band fermion "// &
3413 "bath used to weight the Floquet DOS by Fermi-Dirac occupations, adding "// &
3414 "an occupied spectral-weight column f(E)*A(E) to the DOS file. If "// &
3415 "negative (default), that column is not written.", &
3416 usage="TEMPERATURE 300.0", default_r_val=-1.0_dp)
3417 CALL section_add_keyword(section, keyword)
3418 CALL keyword_release(keyword)
3419
3420 CALL keyword_create(keyword, __location__, name="FLOQUET_DOS_FILE_NAME", &
3421 description="File name used for the Floquet spectral function.", &
3422 usage="FLOQUET_DOS_FILE_NAME FLOQUET_DOS", &
3423 default_lc_val="FLOQUET_DOS")
3424 CALL section_add_keyword(section, keyword)
3425 CALL keyword_release(keyword)
3426
3427 CALL keyword_create(keyword, __location__, name="QUASI_ENERGIES_FILE_NAME", &
3428 description="File name used for the Floquet quasi-energies.", &
3429 usage="QUASI_ENERGIES_FILE_NAME QUASI_ENERGIES", &
3430 default_lc_val="QUASI_ENERGIES")
3431 CALL section_add_keyword(section, keyword)
3432 CALL keyword_release(keyword)
3433
3434 CALL keyword_create(keyword, __location__, name="FLOQUET_BS_FILE_NAME", &
3435 description="File name used for the Floquet m=0 (central-sector) "// &
3436 "band structure.", &
3437 usage="FLOQUET_BS_FILE_NAME FLOQUET_BANDSTRUCTURE", &
3438 default_lc_val="FLOQUET_BANDSTRUCTURE")
3439 CALL section_add_keyword(section, keyword)
3440 CALL keyword_release(keyword)
3441
3442 CALL keyword_create(keyword, __location__, name="MEM_FILL_FRACTION", &
3443 description="Fraction of the computation memory that may be filled "// &
3444 "by Floquet Hamiltonian matrices. Reduce if process gets OOMP killed.", &
3445 usage="MEM_FILL_FRACTION 0.5", default_r_val=0.8_dp)
3446 CALL section_add_keyword(section, keyword)
3447 CALL keyword_release(keyword)
3448
3449 END SUBROUTINE create_floquet_section
3450
3451! **************************************************************************************************
3452!> \brief Create the post-SCF analysis input.
3453!> \param section New properties section
3454! **************************************************************************************************
3455 SUBROUTINE create_spectral_localizer_section(section)
3456 TYPE(section_type), POINTER :: section
3457 TYPE(keyword_type), POINTER :: keyword
3458
3459 NULLIFY (keyword)
3460 CALL section_create(section, __location__, name="SPECTRAL_LOCALIZER", &
3461 description="Spectral localizer for isolated or two- and three-dimensionally periodic GPW/GAPW systems. "// &
3462 "Uses the full converged AO Hamiltonian, overlap, and analytic position or Berry integrals. "// &
3463 "Independent of KUBO_TRANSPORT and WANNIER90 Wilson/Z2/Chern or inversion-TQC analysis. "// &
3464 "Reports a finite-basis local index and protection gap, not a bulk-gap certificate. "// &
3465 "Requires convergence with basis, system size, and position/energy scale.", &
3466 repeats=.false., citations=[dixon2023, wong2026, doll2025, loring2015])
3467 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
3468 description="Activate post-SCF spectral localizer analysis.", &
3469 default_l_val=.false., lone_keyword_l_val=.true.)
3470 CALL section_add_keyword(section, keyword)
3471 CALL keyword_release(keyword)
3472 CALL keyword_create(keyword, __location__, name="FORMULATION", type_of_var=enum_t, &
3473 description="FINITE uses Cartesian first moments for PERIODIC NONE. PERIODIC uses "// &
3474 "analytic cos(G.r)/sin(G.r) integrals on a two- or three-dimensional Born-von-Karman torus. "// &
3475 "MP_GRID controls its size; this is not an independent localizer at each k.", &
3476 enum_c_vals=s2a("FINITE", "PERIODIC"), enum_i_vals=[0, 1], default_i_val=0)
3477 CALL section_add_keyword(section, keyword)
3478 CALL keyword_release(keyword)
3479 CALL keyword_create(keyword, __location__, name="MP_GRID", &
3480 description="Full Gamma-centered analysis mesh for FORMULATION PERIODIC. "// &
3481 "Equivalent to a Gamma supercell with these replication factors, at the frozen SCF potential. "// &
3482 "Independent of the SCF KPOINTS scheme or symmetry reduction. Nonperiodic directions "// &
3483 "must have size one. MAX_AO applies to the entire torus, not the primitive cell.", &
3484 type_of_var=integer_t, n_var=3, default_i_vals=[1, 1, 1])
3485 CALL section_add_keyword(section, keyword)
3486 CALL keyword_release(keyword)
3487 CALL keyword_create(keyword, __location__, name="ETA", &
3488 description="Positive energy scales for FORMULATION PERIODIC, multiplying the "// &
3489 "dimensionless trigonometric coordinates. Choose on the scale of H-ENERGY and "// &
3490 "check size/basis/ETA convergence. Replaces KAPPA for this formulation. "// &
3491 "The localizer and reported gaps retain energy units.", &
3492 type_of_var=real_t, n_var=-1, unit_str="hartree", default_r_vals=[1.0_dp])
3493 CALL section_add_keyword(section, keyword)
3494 CALL keyword_release(keyword)
3495 CALL keyword_create(keyword, __location__, name="SOLVER", type_of_var=enum_t, &
3496 description="Dense LAPACK reference calculation in the AO overlap metric.", &
3497 enum_c_vals=s2a("DENSE"), enum_i_vals=[0], default_i_val=0)
3498 CALL section_add_keyword(section, keyword)
3499 CALL keyword_release(keyword)
3500 CALL keyword_create(keyword, __location__, name="INVARIANT", type_of_var=enum_t, &
3501 description="CHERN evaluates the 2D class A half-signature. Z2 evaluates the "// &
3502 "class AII Pfaffian sign (2D) or chiral-block determinant sign (3D); "// &
3503 "requires SOC and TIME_REVERSAL.", &
3504 enum_c_vals=s2a("CHERN", "Z2"), enum_i_vals=[0, 1], default_i_val=0)
3505 CALL section_add_keyword(section, keyword)
3506 CALL keyword_release(keyword)
3507 CALL keyword_create(keyword, __location__, name="DIMENSION", &
3508 description="Number of localizer position directions, 2 or 3. DIMENSION 3 uses "// &
3509 "all Cartesian moments (FINITE) or all three torus directions (PERIODIC). "// &
3510 "It requires Z2 and SOLVER DENSE; PERIODIC also requires CELL and POISSON PERIODIC XYZ. "// &
3511 "Its strong local Z2 index is not a tuple of weak indices or a 2D slice index.", default_i_val=2)
3512 CALL section_add_keyword(section, keyword)
3513 CALL keyword_release(keyword)
3514 CALL keyword_create(keyword, __location__, name="PLANE", type_of_var=enum_t, &
3515 description="Ordered Cartesian directions for FINITE; ordered lattice-vector "// &
3516 "directions for PERIODIC, which must match the two periodic CELL directions. "// &
3517 "Only valid for DIMENSION 2.", &
3518 enum_c_vals=s2a("XY", "XZ", "YZ"), enum_i_vals=[1, 2, 3], default_i_val=1)
3519 CALL section_add_keyword(section, keyword)
3520 CALL keyword_release(keyword)
3521 CALL keyword_create(keyword, __location__, name="POSITION", &
3522 description="Cartesian query position in the coordinate frame of SUBSYS/COORD. "// &
3523 "For FINITE with DIMENSION 2 the component perpendicular to PLANE is ignored. For PERIODIC "// &
3524 "the reciprocal-cell phase G.r0 is used, including for oblique cells. Repeat for scans.", &
3525 type_of_var=real_t, n_var=3, repeats=.true., unit_str="bohr", &
3526 default_r_vals=[0.0_dp, 0.0_dp, 0.0_dp])
3527 CALL section_add_keyword(section, keyword)
3528 CALL keyword_release(keyword)
3529 CALL keyword_create(keyword, __location__, name="ENERGY", &
3530 description="Absolute query energies, without a Fermi-level shift. All combinations "// &
3531 "of POSITION, ENERGY and KAPPA (FINITE) or ETA (PERIODIC) are evaluated.", &
3532 type_of_var=real_t, n_var=-1, unit_str="hartree", default_r_vals=[0.0_dp])
3533 CALL section_add_keyword(section, keyword)
3534 CALL keyword_release(keyword)
3535 CALL keyword_create(keyword, __location__, name="KAPPA", &
3536 description="Positive energy/length scales. The default is not a converged choice; "// &
3537 "check a plateau under changes of KAPPA and system size.", &
3538 type_of_var=real_t, n_var=-1, unit_str="hartree*bohr^-1", default_r_vals=[0.01_dp])
3539 CALL section_add_keyword(section, keyword)
3540 CALL keyword_release(keyword)
3541 CALL keyword_create(keyword, __location__, name="SPIN_CHANNEL", &
3542 description="Scalar collinear spin channel, as in WANNIER90. SOC requires restricted channel 1.", &
3543 default_i_val=1)
3544 CALL section_add_keyword(section, keyword)
3545 CALL keyword_release(keyword)
3546 CALL keyword_create(keyword, __location__, name="SOC", &
3547 description="Add the GTH pseudopotential SOC operator to the restricted SCF Hamiltonian "// &
3548 "in the complete AO spinor space. Requires SOC parameters in the potentials; "// &
3549 "does not perform a self-consistent noncollinear calculation.", default_l_val=.false.)
3550 CALL section_add_keyword(section, keyword)
3551 CALL keyword_release(keyword)
3552 CALL keyword_create(keyword, __location__, name="TIME_REVERSAL", &
3553 description="Assert physical spinful time reversal for Z2, as in WANNIER90. "// &
3554 "The Hamiltonian, metric and position operators are also checked numerically.", &
3555 default_l_val=.false.)
3556 CALL section_add_keyword(section, keyword)
3557 CALL keyword_release(keyword)
3558 CALL keyword_create(keyword, __location__, name="EPS_GAP", &
3559 description="Absolute localizer-gap threshold below which the index is unresolved. "// &
3560 "An additional roundoff threshold is always applied.", unit_str="hartree", &
3561 default_r_val=1.e-8_dp)
3562 CALL section_add_keyword(section, keyword)
3563 CALL keyword_release(keyword)
3564 CALL keyword_create(keyword, __location__, name="EPS_METRIC", &
3565 description="Minimum smallest/largest AO-overlap eigenvalue ratio. "// &
3566 "Ill-conditioned bases are rejected, not silently truncated.", default_r_val=1.e-10_dp)
3567 CALL section_add_keyword(section, keyword)
3568 CALL keyword_release(keyword)
3569 CALL keyword_create(keyword, __location__, name="SPECTRAL_FLATTENING", &
3570 description="Replace H-ENERGY*S by FLATTENING_SCALE*S*sign(S^-1*(H-ENERGY*S)). "// &
3571 "Retains the full occupied and empty AO subspaces and leaves position operators unchanged. "// &
3572 "Requires a positive metric and a resolved electronic gap, checked before flattening. "// &
3573 "The resulting finite localizer can have a different index and gap from the unflattened one. "// &
3574 "No bulk-index or convergence certificate is implied. Computed once per ENERGY, using "// &
3575 "complete Bloch blocks for periodic tori or DBCSR matrix iterations for finite systems. "// &
3576 "Both retain the original AO basis and can increase fill-in.", default_l_val=.false.)
3577 CALL section_add_keyword(section, keyword)
3578 CALL keyword_release(keyword)
3579 CALL keyword_create(keyword, __location__, name="FLATTENING_SCALE", &
3580 description="Positive energy assigned to the positive bands by SPECTRAL_FLATTENING; "// &
3581 "negative bands receive its negative. ETA or KAPPA and output gaps retain their normal "// &
3582 "units but refer to this flattened Hamiltonian, not to the original band dispersion.", &
3583 unit_str="hartree", default_r_val=1.0_dp)
3584 CALL section_add_keyword(section, keyword)
3585 CALL keyword_release(keyword)
3586 CALL keyword_create(keyword, __location__, name="EPS_ELECTRONIC_GAP", &
3587 description="Minimum resolved distance from ENERGY to the original generalized "// &
3588 "Hamiltonian spectrum before SPECTRAL_FLATTENING. Additional roundoff bounds apply. "// &
3589 "Separate from EPS_GAP, which applies to the final localizer.", &
3590 unit_str="hartree", default_r_val=1.e-8_dp)
3591 CALL section_add_keyword(section, keyword)
3592 CALL keyword_release(keyword)
3593 CALL keyword_create(keyword, __location__, name="EPS_FLATTENING", &
3594 description="Tolerance for the inverse and sign-square Frobenius residuals and "// &
3595 "relative complex-structure/Hermiticity residuals of the DBCSR matrix iterations. "// &
3596 "For the periodic Bloch path, checks translation covariance, metric orthonormality, "// &
3597 "eigenproblem residuals and final Hermiticity instead. "// &
3598 "An unconverged result is rejected, not used to report an index.", default_r_val=1.e-9_dp)
3599 CALL section_add_keyword(section, keyword)
3600 CALL keyword_release(keyword)
3601 CALL keyword_create(keyword, __location__, name="MATRIX_TOLERANCE", &
3602 description="Relative Hermiticity and time-reversal residual tolerance.", default_r_val=1.e-9_dp)
3603 CALL section_add_keyword(section, keyword)
3604 CALL keyword_release(keyword)
3605 CALL keyword_create(keyword, __location__, name="MAX_AO", &
3606 description="Safety limit on scalar AO dimension for the dense solver. "// &
3607 "DENSE uses replicated localizers and source-rank diagonalization, "// &
3608 "quadratic memory and cubic runtime; the SOC Hermitian localizer has dimension "// &
3609 "4*NAO (DIMENSION 2) or 8*NAO (DIMENSION 3).", default_i_val=512)
3610 CALL section_add_keyword(section, keyword)
3611 CALL keyword_release(keyword)
3612 END SUBROUTINE create_spectral_localizer_section
3613
3614! **************************************************************************************************
3615!> \brief Create the post-SCF analysis input.
3616!> \param section New properties section
3617! **************************************************************************************************
3618 SUBROUTINE create_quadratic_pseudospectrum_section(section)
3619 TYPE(section_type), POINTER :: section, print_key
3620 TYPE(keyword_type), POINTER :: keyword
3621 NULLIFY (keyword, print_key)
3622 CALL section_create(section, __location__, name="QUADRATIC_PSEUDOSPECTRUM", &
3623 description="Joint position/energy localization analysis for GPW/GAPW systems. "// &
3624 "Uses full AO H, S and analytic first moments or periodic trigonometric coordinates. "// &
3625 "No occupied-state projection and no topology index. "// &
3626 "Residuals concern finite-basis projected operators, not exact real-space variances.", &
3627 repeats=.false., citations=[cerjan2023])
3628 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
3629 description="Activate post-SCF quadratic pseudospectrum analysis.", &
3630 default_l_val=.false., lone_keyword_l_val=.true.)
3631 CALL section_add_keyword(section, keyword)
3632 CALL keyword_release(keyword)
3633 CALL keyword_create(keyword, __location__, name="FORMULATION", type_of_var=enum_t, &
3634 description="FINITE uses Cartesian first moments for isolated systems. PERIODIC uses "// &
3635 "cos(G.r)/sin(G.r) on a Born-von-Karman torus in the periodic CELL directions only. "// &
3636 "Open directions are not localized by PERIODIC. TRANSLATION uses analytic translated "// &
3637 "Gaussian overlaps, with continuum translation norms and explicit AO leakage. Periodic "// &
3638 "TRANSLATION uses periodized AOs on the full MP_GRID torus; finite translations need no KPOINTS. "// &
3639 "ENERGY still refers to the projected AO Hamiltonian; no boundary suppression is applied.", &
3640 enum_c_vals=s2a("FINITE", "PERIODIC", "TRANSLATION"), enum_i_vals=[0, 1, 2], default_i_val=0)
3641 CALL section_add_keyword(section, keyword)
3642 CALL keyword_release(keyword)
3643 CALL keyword_create(keyword, __location__, name="TRANSLATION_VECTOR", &
3644 description="Cartesian vector a in the input coordinate frame, for U(a) psi(r) = psi(r+a). "// &
3645 "Repeat for each equally weighted translation. Only with FORMULATION TRANSLATION. "// &
3646 "Choose directions and lengths deliberately; this defines a momentum-resolution metric.", &
3647 type_of_var=real_t, n_var=3, repeats=.true., unit_str="bohr")
3648 CALL section_add_keyword(section, keyword)
3649 CALL keyword_release(keyword)
3650 CALL keyword_create(keyword, __location__, name="WAVE_VECTOR", &
3651 description="Cartesian momentum query k in the input frame; phase is exp(i k.a), "// &
3652 "without an additional 2*pi. Repeat for scans. Only with FORMULATION TRANSLATION.", &
3653 type_of_var=real_t, n_var=3, repeats=.true., unit_str="bohr^-1", &
3654 default_r_vals=[0.0_dp, 0.0_dp, 0.0_dp])
3655 CALL section_add_keyword(section, keyword)
3656 CALL keyword_release(keyword)
3657 CALL keyword_create(keyword, __location__, name="TRANSLATION_SCALE", &
3658 description="Positive energy scales for dimensionless full translation residuals. "// &
3659 "Every WAVE_VECTOR/ENERGY/TRANSLATION_SCALE combination is evaluated. "// &
3660 "Only with FORMULATION TRANSLATION, replacing the energy/length-valued KAPPA.", &
3661 type_of_var=real_t, n_var=-1, unit_str="hartree", default_r_vals=[1.0_dp])
3662 CALL section_add_keyword(section, keyword)
3663 CALL keyword_release(keyword)
3664 CALL keyword_create(keyword, __location__, name="MP_GRID", &
3665 description="Full Gamma-centered mesh for PERIODIC or periodic TRANSLATION, independent "// &
3666 "of SCF symmetry reduction. Equivalent to a Gamma supercell at the frozen SCF potential. "// &
3667 "Nonperiodic directions must be one; MAX_AO bounds the entire torus.", &
3668 type_of_var=integer_t, n_var=3, default_i_vals=[1, 1, 1])
3669 CALL section_add_keyword(section, keyword)
3670 CALL keyword_release(keyword)
3671 CALL keyword_create(keyword, __location__, name="SOLVER", type_of_var=enum_t, &
3672 description="Dense LAPACK reference calculation in the AO overlap metric.", &
3673 enum_c_vals=s2a("DENSE"), enum_i_vals=[0], default_i_val=0)
3674 CALL section_add_keyword(section, keyword)
3675 CALL keyword_release(keyword)
3676 CALL keyword_create(keyword, __location__, name="POSITION", &
3677 description="Query position in the SUBSYS/COORD frame. Repeat for spatial scans.", &
3678 type_of_var=real_t, n_var=3, repeats=.true., unit_str="bohr", &
3679 default_r_vals=[0.0_dp, 0.0_dp, 0.0_dp])
3680 CALL section_add_keyword(section, keyword)
3681 CALL keyword_release(keyword)
3682 CALL keyword_create(keyword, __location__, name="ENERGY", &
3683 description="Absolute query energies; every POSITION/ENERGY/KAPPA combination is evaluated.", &
3684 type_of_var=real_t, n_var=-1, unit_str="hartree", default_r_vals=[0.0_dp])
3685 CALL section_add_keyword(section, keyword)
3686 CALL keyword_release(keyword)
3687 CALL keyword_create(keyword, __location__, name="KAPPA", &
3688 description="Positive energy/length scales for Cartesian residuals (FINITE) or "// &
3689 "periodic chord residuals divided by reciprocal-vector norms (PERIODIC). "// &
3690 "Check basis, system-size and KAPPA convergence.", &
3691 type_of_var=real_t, n_var=-1, unit_str="hartree*bohr^-1", default_r_vals=[0.01_dp])
3692 CALL section_add_keyword(section, keyword)
3693 CALL keyword_release(keyword)
3694 CALL keyword_create(keyword, __location__, name="NSTATES", default_i_val=1, &
3695 description="Number of lowest quadratic-operator eigenstates, S-normalized.")
3696 CALL section_add_keyword(section, keyword)
3697 CALL keyword_release(keyword)
3698 CALL keyword_create(keyword, __location__, name="EPS_EIGEN", default_r_val=1.e-8_dp, &
3699 description="Convergence criterion: S-inverse residual norm <= EPS_EIGEN times "// &
3700 "max(1,abs(eigenvalue)), with eigenvalues in atomic units of energy squared.")
3701 CALL section_add_keyword(section, keyword)
3702 CALL keyword_release(keyword)
3703 CALL keyword_create(keyword, __location__, name="EPS_METRIC", default_r_val=1.e-10_dp, &
3704 description="Minimum AO metric eigenvalue ratio. "// &
3705 "Ill-conditioned directions are rejected, not silently discarded.")
3706 CALL section_add_keyword(section, keyword)
3707 CALL keyword_release(keyword)
3708 CALL keyword_create(keyword, __location__, name="MAX_AO", default_i_val=512, &
3709 description="Scalar AO safety limit for the dense solver, including all periodic torus cells. "// &
3710 "Increase deliberately for large systems. "// &
3711 "SOC doubles the operator dimension; DENSE uses quadratic memory.")
3712 CALL section_add_keyword(section, keyword)
3713 CALL keyword_release(keyword)
3714 CALL keyword_create(keyword, __location__, name="SPIN_CHANNEL", default_i_val=1, &
3715 description="Collinear scalar spin channel. SOC requires a restricted SCF and channel 1.")
3716 CALL section_add_keyword(section, keyword)
3717 CALL keyword_release(keyword)
3718 CALL keyword_create(keyword, __location__, name="SOC", default_l_val=.false., &
3719 description="Add GTH SOC to the restricted converged AO Hamiltonian. Requires SOC "// &
3720 "pseudopotentials; not a self-consistent noncollinear calculation.")
3721 CALL section_add_keyword(section, keyword)
3722 CALL keyword_release(keyword)
3723 CALL cp_print_key_section_create(print_key, __location__, name="STATES", &
3724 description="S-normalized complex AO coefficients, scalar-AO order with "// &
3725 "spin-up followed by spin-down for SOC. These are quadratic-operator states, "// &
3726 "with cell-major AO ordering within each spin block for PERIODIC. "// &
3727 "not Hamiltonian eigenstates. Degenerate states are gauge dependent.", &
3728 print_level=low_print_level, filename="")
3729 CALL section_add_subsection(section, print_key)
3730 CALL section_release(print_key)
3731 END SUBROUTINE create_quadratic_pseudospectrum_section
3732
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public putrino2000
integer, save, public weber2009
integer, save, public kuhneheskeprodan2020
integer, save, public kondov2007
integer, save, public tyagi2024
integer, save, public ditler2021
integer, save, public luber2014
integer, save, public iannuzzi2005
integer, save, public duchemin2019
integer, save, public sebastiani2001
integer, save, public wong2026
integer, save, public dixon2023
integer, save, public hernandez2025
integer, save, public putrino2002
integer, save, public graml2024
integer, save, public hartwigsen1998
integer, save, public vazdacruz2021
integer, save, public hedin1965
integer, save, public hanasaki2025
integer, save, public duchemin2021
integer, save, public doll2025
integer, save, public futera2017
integer, save, public wilhelm2021
integer, save, public cerjan2023
integer, save, public hybertsen1986
integer, save, public tyagi2026
integer, save, public loring2015
integer, save, public ditler2022
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
subroutine, public cp_print_key_section_create(print_key_section, location, name, description, print_level, each_iter_names, each_iter_values, add_last, filename, common_iter_levels, citations, unit_str, do_backup)
creates a print_key section
integer, parameter, public debug_print_level
integer, parameter, public low_print_level
integer, parameter, public medium_print_level
integer, parameter, public high_print_level
integer, parameter, public add_last_numeric
integer, parameter, public silent_print_level
unit conversion facility
Definition cp_units.F:30
real(kind=dp) function, public cp_unit_to_cp2k(value, unit_str, defaults, power)
converts to the internal cp2k units to the given unit
Definition cp_units.F:1282
collects all constants needed in input so that they can be used without circular dependencies
integer, parameter, public int_ldos_y
integer, parameter, public use_mom_ref_coac
integer, parameter, public tddfpt_dipole_berry
integer, parameter, public oe_saop
integer, parameter, public do_no_et
integer, parameter, public current_orb_center_wannier
integer, parameter, public scan_x
integer, parameter, public scan_xyz
integer, parameter, public use_mom_ref_user
integer, parameter, public tddfpt_sf_col
integer, parameter, public tddfpt_kernel_none
integer, parameter, public use_mom_ref_com
integer, parameter, public cohsex_qp_update
integer, parameter, public gto_cartesian
integer, parameter, public tddfpt_dipole_scf_moment
integer, parameter, public gto_spherical
integer, parameter, public current_gauge_atom
integer, parameter, public current_gauge_r
integer, parameter, public oe_none
integer, parameter, public ot_precond_full_kinetic
integer, parameter, public current_gauge_r_and_step_func
integer, parameter, public oe_shift
integer, parameter, public int_ldos_x
integer, parameter, public current_orb_center_box
integer, parameter, public tddfpt_dipole_velocity
integer, parameter, public current_orb_center_common
integer, parameter, public ot_precond_full_single
integer, parameter, public cohsex_diagonal
integer, parameter, public scan_xy
integer, parameter, public scan_xz
integer, parameter, public tddfpt_kernel_full
integer, parameter, public ot_precond_none
integer, parameter, public g0w0
integer, parameter, public scan_y
integer, parameter, public int_ldos_z
integer, parameter, public ot_precond_full_single_inverse
integer, parameter, public current_orb_center_atom
integer, parameter, public scan_z
integer, parameter, public tddfpt_sf_noncol
integer, parameter, public do_spin_density
integer, parameter, public evgw0
integer, parameter, public tddfpt_dipole_length
integer, parameter, public use_mom_ref_zero
integer, parameter, public oe_lb
integer, parameter, public tddfpt_kernel_stda
integer, parameter, public cohsex_off
integer, parameter, public int_ldos_none
integer, parameter, public tddfpt_dipole_velocity_old
integer, parameter, public no_sf_tddfpt
integer, parameter, public do_et_ddapc
integer, parameter, public ot_precond_s_inverse
integer, parameter, public do_full_density
integer, parameter, public scan_yz
integer, parameter, public oe_gllb
integer, parameter, public ot_precond_full_all
input section for atomic properties
subroutine, public create_atprop_section(section)
Creates the ATOMIC section.
function that build the dft section of the input
subroutine, public create_mgrid_section(section, create_subsections)
creates the multigrid
subroutine, public create_interp_section(section)
creates the interpolation section
function that build the kpoints section of the input
subroutine, public create_kpoint_set_section(section, section_name)
...
integer, parameter, public use_spglib_kpoint_backend
integer, parameter, public use_k290_kpoint_backend
subroutine, public create_localize_section(section)
parameters fo the localization of wavefunctions
input section for MP2
subroutine, public create_bse_section(section, run_bse_from_band_structure_section)
The &BSE section, built once under RI_RPAGW and once under PROPERTIES.
function that build the dft section of the input
subroutine, public create_properties_section(section)
Create the PROPERTIES section.
function that build the QS section of the input
subroutine, public create_lrigpw_section(section)
input section for optional parameters for LRIGPW LRI: local resolution of identity
subroutine, public create_ddapc_restraint_section(section, section_name)
...
function that builds the resp section of the input
subroutine, public create_resp_section(section)
Creates the RESP section.
function that build the XAS section of the input
subroutine, public create_xas_tdp_section(section)
makes the input section for core-level spectroscopy simulations using linear response TDDFT
function that build the xc section of the input
subroutine, public create_xc_section(section)
creates the input section for the xc part
represents keywords in an input
subroutine, public keyword_release(keyword)
releases the given keyword (see doc/ReferenceCounting.html)
subroutine, public keyword_create(keyword, location, name, description, usage, type_of_var, n_var, repeats, variants, default_val, default_l_val, default_r_val, default_lc_val, default_c_val, default_i_val, default_l_vals, default_r_vals, default_c_vals, default_i_vals, lone_keyword_val, lone_keyword_l_val, lone_keyword_r_val, lone_keyword_c_val, lone_keyword_i_val, lone_keyword_l_vals, lone_keyword_r_vals, lone_keyword_c_vals, lone_keyword_i_vals, enum_c_vals, enum_i_vals, enum, enum_strict, enum_desc, unit_str, citations, deprecation_notice, removed)
creates a keyword object
objects that represent the structure of input sections and the data contained in an input section
subroutine, public section_create(section, location, name, description, n_keywords, n_subsections, repeats, citations, deprecation_notice)
creates a list of keywords
subroutine, public section_add_keyword(section, keyword)
adds a keyword to the given section
subroutine, public section_add_subsection(section, subsection)
adds a subsection to the given section
recursive subroutine, public section_release(section)
releases the given keyword list (see doc/ReferenceCounting.html)
a wrapper for basic fortran types.
integer, parameter, public real_t
integer, parameter, public lchar_t
integer, parameter, public logical_t
integer, parameter, public char_t
integer, parameter, public integer_t
integer, parameter, public enum_t
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
Definition nlo.F:10
Utilities for string manipulations.
represent a keyword in the input
represent a section of the input file