(git:295f299)
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! **************************************************************************************************
15 USE bibliography, ONLY: futera2017, &
19 kondov2007, &
21 luber2014, &
25 weber2009, &
34 USE cp_units, ONLY: cp_unit_to_cp2k
35 USE input_constants, ONLY: &
64 USE input_val_types, ONLY: char_t, &
65 integer_t, &
66 lchar_t, &
67 logical_t, &
68 real_t
70 USE kinds, ONLY: dp
71 USE string_utilities, ONLY: s2a
72#include "./base/base_uses.f90"
73
74 IMPLICIT NONE
75 PRIVATE
76
77 LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .true.
78 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_properties_dft'
79
81
82CONTAINS
83
84! **************************************************************************************************
85!> \brief Create the PROPERTIES section
86!> \param section the section to create
87!> \author teo
88! **************************************************************************************************
89 SUBROUTINE create_properties_section(section)
90 TYPE(section_type), POINTER :: section
91
92 TYPE(keyword_type), POINTER :: keyword
93 TYPE(section_type), POINTER :: subsection
94
95 cpassert(.NOT. ASSOCIATED(section))
96 CALL section_create(section, __location__, name="PROPERTIES", &
97 description="This section is used to set up the PROPERTIES calculation.", &
98 n_keywords=0, n_subsections=6, repeats=.false.)
99
100 NULLIFY (subsection, keyword)
101
102 CALL create_linres_section(subsection, create_subsections=.true.)
103 CALL section_add_subsection(section, subsection)
104 CALL section_release(subsection)
105
106 CALL create_et_coupling_section(subsection)
107 CALL section_add_subsection(section, subsection)
108 CALL section_release(subsection)
109
110 CALL create_resp_section(subsection)
111 CALL section_add_subsection(section, subsection)
112 CALL section_release(subsection)
113
114 CALL create_atprop_section(subsection)
115 CALL section_add_subsection(section, subsection)
116 CALL section_release(subsection)
117
118 CALL cp_print_key_section_create(subsection, __location__, name="FIT_CHARGE", &
119 description="This section is used to print the density derived atomic point charges. "// &
120 "The fit of the charges is controlled through the DENSITY_FITTING section", &
121 print_level=high_print_level, filename="__STD_OUT__")
122 CALL keyword_create(keyword, __location__, name="TYPE_OF_DENSITY", &
123 description="Specifies the type of density used for the fitting", &
124 usage="TYPE_OF_DENSITY (FULL|SPIN)", &
125 enum_c_vals=s2a("FULL", "SPIN"), &
126 enum_i_vals=[do_full_density, do_spin_density], &
127 enum_desc=s2a("Full density", "Spin density"), &
128 default_i_val=do_full_density)
129 CALL section_add_keyword(subsection, keyword)
130 CALL keyword_release(keyword)
131 CALL section_add_subsection(section, subsection)
132 CALL section_release(subsection)
133
134 CALL create_tddfpt2_section(subsection)
135 CALL section_add_subsection(section, subsection)
136 CALL section_release(subsection)
137
138 CALL create_rixs_section(subsection)
139 CALL section_add_subsection(section, subsection)
140 CALL section_release(subsection)
141
142 CALL create_kubo_transport_section(subsection)
143 CALL section_add_subsection(section, subsection)
144 CALL section_release(subsection)
145
146 CALL create_bandstructure_section(subsection)
147 CALL section_add_subsection(section, subsection)
148 CALL section_release(subsection)
149
150 CALL create_tipscan_section(subsection)
151 CALL section_add_subsection(section, subsection)
152 CALL section_release(subsection)
153
154 END SUBROUTINE create_properties_section
155
156! **************************************************************************************************
157!> \brief creates the input structure used to activate finite-volume Kubo transport
158! **************************************************************************************************
159
160 SUBROUTINE create_kubo_transport_section(section)
161 TYPE(section_type), POINTER :: section
162 TYPE(keyword_type), POINTER :: keyword
163
164 cpassert(.NOT. ASSOCIATED(section))
165
166 NULLIFY (keyword)
167
168 CALL section_create(section, __location__, name="KUBO_TRANSPORT", &
169 description="Finite-volume Kubo-Greenwood transport coefficients from the "// &
170 "converged Quickstep Hamiltonian, overlap matrix, and atomic geometry. "// &
171 "For one- and two-dimensional cells, transport is projected onto the "// &
172 "periodic subspace and normalized by the periodic length or area.", &
173 n_keywords=8, n_subsections=0, repeats=.false., &
174 citations=[kuhneheskeprodan2020])
175
176 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
177 description="Controls the activation of the Kubo transport calculation.", &
178 default_l_val=.false., &
179 lone_keyword_l_val=.true.)
180 CALL section_add_keyword(section, keyword)
181 CALL keyword_release(keyword)
182
183 CALL keyword_create(keyword, __location__, name="METHOD", &
184 description="Transport algorithm. DIAGONALIZATION evaluates the finite-volume "// &
185 "Kubo-Greenwood expression from the explicit spectrum. TD and CHEBYSHEV are "// &
186 "reserved for future diagonalization-free implementations.", &
187 usage="METHOD DIAGONALIZATION", &
188 n_var=1, type_of_var=char_t, default_c_val="DIAGONALIZATION")
189 CALL section_add_keyword(section, keyword)
190 CALL keyword_release(keyword)
191
192 CALL keyword_create(keyword, __location__, name="TEMPERATURE", &
193 description="Electronic temperature used in the Fermi operator.", &
194 usage="TEMPERATURE 1.0", &
195 default_r_val=cp_unit_to_cp2k(value=1.0_dp, unit_str="K"), &
196 n_var=1, type_of_var=real_t, unit_str="K")
197 CALL section_add_keyword(section, keyword)
198 CALL keyword_release(keyword)
199
200 CALL keyword_create(keyword, __location__, name="DISSIPATION", &
201 description="Dissipation/broadening parameter in the finite-temperature "// &
202 "Kubo formula.", &
203 usage="DISSIPATION 300.0", &
204 default_r_val=cp_unit_to_cp2k(value=300.0_dp, unit_str="K"), &
205 n_var=1, type_of_var=real_t, unit_str="K")
206 CALL section_add_keyword(section, keyword)
207 CALL keyword_release(keyword)
208
209 CALL keyword_create(keyword, __location__, name="ENERGY_RANGE", &
210 description="Absolute chemical-potential range. The default 0 0 uses the "// &
211 "full eigenvalue range of the finite-volume Hamiltonian.", &
212 usage="ENERGY_RANGE -0.5 0.5", &
213 default_r_vals=[0.0_dp, 0.0_dp], n_var=2, type_of_var=real_t, &
214 unit_str="hartree")
215 CALL section_add_keyword(section, keyword)
216 CALL keyword_release(keyword)
217
218 CALL keyword_create(keyword, __location__, name="NEUTRAL_MU", &
219 description="Optional fixed neutral chemical potential. If omitted, the "// &
220 "neutral point is found from the eigenvalue spectrum and total electron count.", &
221 usage="NEUTRAL_MU 0.245467619658419", &
222 n_var=1, type_of_var=real_t, unit_str="hartree")
223 CALL section_add_keyword(section, keyword)
224 CALL keyword_release(keyword)
225
226 CALL keyword_create(keyword, __location__, name="N_MU", &
227 description="Number of chemical-potential grid points.", &
228 usage="N_MU 200", &
229 default_i_val=200, n_var=1, type_of_var=integer_t)
230 CALL section_add_keyword(section, keyword)
231 CALL keyword_release(keyword)
232
233 CALL keyword_create(keyword, __location__, name="NEUTRAL_GRID", &
234 description="Number of grid points used to locate the neutral chemical potential.", &
235 usage="NEUTRAL_GRID 10000", &
236 default_i_val=10000, n_var=1, type_of_var=integer_t)
237 CALL section_add_keyword(section, keyword)
238 CALL keyword_release(keyword)
239
240 END SUBROUTINE create_kubo_transport_section
241
242! **************************************************************************************************
243!> \brief creates the input structure used to activate
244!> a resonant inelastic xray scattering (RIXS) calculation
245! **************************************************************************************************
246
247 SUBROUTINE create_rixs_section(section)
248 TYPE(section_type), POINTER :: section
249 TYPE(section_type), POINTER :: subsection, print_key
250 TYPE(keyword_type), POINTER :: keyword
251
252 cpassert(.NOT. ASSOCIATED(section))
253
254 NULLIFY (keyword, subsection, print_key)
255
256 CALL section_create(section, __location__, name="RIXS", &
257 description="Resonant Inelastic Xray Scattering using XAS_TDP and TDDFPT.", &
258 n_keywords=1, n_subsections=3, repeats=.false., &
259 citations=[vazdacruz2021])
260
261 CALL keyword_create(keyword, __location__, &
262 name="_SECTION_PARAMETERS_", &
263 description="Controls the activation of the RIXS procedure", &
264 default_l_val=.false., &
265 lone_keyword_l_val=.true.)
266 CALL section_add_keyword(section, keyword)
267 CALL keyword_release(keyword)
268
269 CALL keyword_create(keyword, __location__, name="CORE_STATES", &
270 description="Number of core excited states to be used in the RIXS "// &
271 "calculation. Restricting this number reduces computational cost. "// &
272 "-1 means all available core states will be used.", &
273 n_var=1, type_of_var=integer_t, default_i_val=-1)
274 CALL section_add_keyword(section, keyword)
275 CALL keyword_release(keyword)
276
277 CALL keyword_create(keyword, __location__, name="VALENCE_STATES", &
278 description="Number of valence excited states to be used in the RIXS "// &
279 "calculation. Restricting this number reduces computational cost, but "// &
280 "removes spectral features corresponding to higher excitations. Should be "// &
281 "used with care. -1 means all available valence states will be used.", &
282 n_var=1, type_of_var=integer_t, default_i_val=-1)
283 CALL section_add_keyword(section, keyword)
284 CALL keyword_release(keyword)
285
286 CALL create_tddfpt2_section(subsection)
287 CALL section_add_subsection(section, subsection)
288 CALL section_release(subsection)
289
290 CALL create_xas_tdp_section(subsection)
291 CALL section_add_subsection(section, subsection)
292 CALL section_release(subsection)
293
294 CALL section_create(subsection, __location__, "PRINT", "Controls the printing of information "// &
295 "during RIXS calculations", repeats=.false.)
296
297 CALL cp_print_key_section_create(print_key, __location__, name="SPECTRUM", &
298 description="Controles the printing of the RIXS spectrum "// &
299 "in output files", &
300 print_level=low_print_level, filename="", &
301 common_iter_levels=3)
302 CALL section_add_subsection(subsection, print_key)
303 CALL section_release(print_key)
304
305 CALL section_add_subsection(section, subsection)
306 CALL section_release(subsection)
307
308 END SUBROUTINE create_rixs_section
309
310! **************************************************************************************************
311!> \brief creates the input structure used to activate
312!> a linear response calculation
313!> Available properties : none
314!> \param section the section to create
315!> \param create_subsections indicates whether or not subsections should be created
316!> \param default_set_tdlr default parameters to be used if called from TDDFPT
317!> \author MI
318! **************************************************************************************************
319 SUBROUTINE create_linres_section(section, create_subsections, default_set_tdlr)
320 TYPE(section_type), POINTER :: section
321 LOGICAL, INTENT(in) :: create_subsections
322 LOGICAL, INTENT(IN), OPTIONAL :: default_set_tdlr
323
324 INTEGER :: def_max_iter, def_precond
325 REAL(kind=dp) :: def_egap, def_eps, def_eps_filter
326 TYPE(keyword_type), POINTER :: keyword
327 TYPE(section_type), POINTER :: print_key, subsection
328
329 CHARACTER(len=256) :: desc
330
331 NULLIFY (keyword, print_key)
332
333 IF (PRESENT(default_set_tdlr)) THEN
334 def_egap = 0.02_dp
335 def_eps = 1.0e-10_dp
336 def_eps_filter = 1.0e-15_dp
337 def_max_iter = 100
339 desc = "Controls the parameters of the LINRES force calculations for excited states."
340 ELSE
341 def_egap = 0.2_dp
342 def_eps = 1.e-6_dp
343 def_eps_filter = 0.0_dp
344 def_max_iter = 50
345 def_precond = ot_precond_none
346 desc = "The linear response is used to calculate one of the following properties: nmr, epr, raman, ..."
347 END IF
348
349 cpassert(.NOT. ASSOCIATED(section))
350 CALL section_create(section, __location__, name="linres", &
351 description=desc, n_keywords=5, n_subsections=2, repeats=.false., &
352 citations=[putrino2000])
353
354 CALL keyword_create(keyword, __location__, name="EPS", &
355 description="target accuracy for the convergence of the conjugate gradient.", &
356 usage="EPS 1.e-6", default_r_val=def_eps)
357 CALL section_add_keyword(section, keyword)
358 CALL keyword_release(keyword)
359
360 CALL keyword_create(keyword, __location__, name="EPS_FILTER", &
361 description="Filter threshold for response density matrix.", &
362 usage="EPS_FILTER 1.e-8", default_r_val=def_eps_filter)
363 CALL section_add_keyword(section, keyword)
364 CALL keyword_release(keyword)
365
366 CALL keyword_create(keyword, __location__, name="MAX_ITER", &
367 description="Maximum number of conjugate gradient iteration to be performed for one optimization.", &
368 usage="MAX_ITER 200", default_i_val=def_max_iter)
369 CALL section_add_keyword(section, keyword)
370 CALL keyword_release(keyword)
371
372 CALL keyword_create(keyword, __location__, name="RESTART_EVERY", &
373 description="Restart the conjugate gradient after the specified number of iterations.", &
374 usage="RESTART_EVERY 200", default_i_val=50)
375 CALL section_add_keyword(section, keyword)
376 CALL keyword_release(keyword)
377
378 CALL keyword_create( &
379 keyword, __location__, name="PRECONDITIONER", &
380 description="Type of preconditioner to be used with all minimization schemes. "// &
381 "They differ in effectiveness, cost of construction, cost of application. "// &
382 "Properly preconditioned minimization can be orders of magnitude faster than doing nothing.", &
383 usage="PRECONDITIONER FULL_ALL", &
384 default_i_val=def_precond, &
385 enum_c_vals=s2a("FULL_ALL", "FULL_SINGLE_INVERSE", "FULL_SINGLE", "FULL_KINETIC", "FULL_S_INVERSE", &
386 "NONE"), &
387 enum_desc=s2a("Most effective state selective preconditioner based on diagonalization, "// &
388 "requires the ENERGY_GAP parameter to be an underestimate of the HOMO-LUMO gap. "// &
389 "This preconditioner is recommended for almost all systems, except very large systems where "// &
390 "make_preconditioner would dominate the total computational cost.", &
391 "Based on H-eS cholesky inversion, similar to FULL_SINGLE in preconditioning efficiency "// &
392 "but cheaper to construct, "// &
393 "might be somewhat less robust. Recommended for large systems.", &
394 "Based on H-eS diagonalisation, not as good as FULL_ALL, but somewhat cheaper to apply. ", &
395 "Cholesky inversion of S and T, fast construction, robust, and relatively good, "// &
396 "use for very large systems.", &
397 "Cholesky inversion of S, not as good as FULL_KINETIC, yet equally expensive.", &
398 "skip preconditioning"), &
401 CALL section_add_keyword(section, keyword)
402 CALL keyword_release(keyword)
403
404 CALL keyword_create(keyword, __location__, name="ENERGY_GAP", &
405 description="Energy gap estimate [a.u.] for preconditioning", &
406 usage="ENERGY_GAP 0.1", &
407 default_r_val=def_egap)
408 CALL section_add_keyword(section, keyword)
409 CALL keyword_release(keyword)
410
411 CALL keyword_create(keyword, __location__, name="EVERY_N_STEP", &
412 description="Perform a linear response calculation every N-th step for MD run", &
413 usage="EVERY_N_STEP 50", default_i_val=1)
414 CALL section_add_keyword(section, keyword)
415 CALL keyword_release(keyword)
416
417 CALL keyword_create(keyword, __location__, name="RESTART", &
418 description="Restart the response calculation if the restart file exists", &
419 usage="RESTART", &
420 default_l_val=.false., lone_keyword_l_val=.true.)
421 CALL section_add_keyword(section, keyword)
422 CALL keyword_release(keyword)
423
424 CALL keyword_create(keyword, __location__, name="WFN_RESTART_FILE_NAME", &
425 variants=["RESTART_FILE_NAME"], &
426 description="Root of the file names where to read the response functions from "// &
427 "which to restart the calculation of the linear response", &
428 usage="WFN_RESTART_FILE_NAME <FILENAME>", &
429 type_of_var=lchar_t)
430 CALL section_add_keyword(section, keyword)
431 CALL keyword_release(keyword)
432
433 IF (create_subsections) THEN
434 NULLIFY (subsection)
435
436 CALL create_localize_section(subsection)
437 CALL section_add_subsection(section, subsection)
438 CALL section_release(subsection)
439
440 CALL create_current_section(subsection)
441 CALL section_add_subsection(section, subsection)
442 CALL section_release(subsection)
443
444 CALL create_nmr_section(subsection)
445 CALL section_add_subsection(section, subsection)
446 CALL section_release(subsection)
447
448 CALL create_spin_spin_section(subsection)
449 CALL section_add_subsection(section, subsection)
450 CALL section_release(subsection)
451
452 CALL create_epr_section(subsection)
453 CALL section_add_subsection(section, subsection)
454 CALL section_release(subsection)
455
456 CALL create_polarizability_section(subsection)
457 CALL section_add_subsection(section, subsection)
458 CALL section_release(subsection)
459
460 CALL create_dcdr_section(subsection)
461 CALL section_add_subsection(section, subsection)
462 CALL section_release(subsection)
463
464 CALL create_vcd_section(subsection)
465 CALL section_add_subsection(section, subsection)
466 CALL section_release(subsection)
467
468 CALL section_create(subsection, __location__, name="PRINT", &
469 description="printing of information during the linear response calculation", &
470 repeats=.false.)
471
473 print_key, __location__, "program_run_info", &
474 description="Controls the printing of basic iteration information during the LINRES calculation", &
475 print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
476 CALL section_add_subsection(subsection, print_key)
477 CALL section_release(print_key)
478
479 CALL cp_print_key_section_create(print_key, __location__, "RESTART", &
480 description="Controls the dumping of restart file of the response wavefunction. "// &
481 "For each set of response functions, i.e. for each perturbation, "// &
482 "one different restart file is dumped. These restart files should be "// &
483 "employed only to restart the same type of LINRES calculation, "// &
484 "i.e. with the same perturbation.", &
485 print_level=low_print_level, common_iter_levels=3, each_iter_names=s2a("ITER"), &
486 add_last=add_last_numeric, each_iter_values=[3], filename="")
487 CALL section_add_subsection(subsection, print_key)
488 CALL section_release(print_key)
489
490 CALL section_add_subsection(section, subsection)
491 CALL section_release(subsection)
492
493 END IF
494
495 END SUBROUTINE create_linres_section
496
497! **************************************************************************************************
498!> \brief creates the input structure used to activate
499!> calculation of position perturbation DFPT
500!> \param section ...
501!> \author Sandra Luber, Edward Ditler
502! **************************************************************************************************
503 SUBROUTINE create_dcdr_section(section)
504
505 TYPE(section_type), POINTER :: section
506
507 LOGICAL :: failure
508 TYPE(keyword_type), POINTER :: keyword
509 TYPE(section_type), POINTER :: print_key, subsection
510
511 failure = .false.
512 NULLIFY (keyword, print_key, subsection)
513
514 cpassert(.NOT. ASSOCIATED(section))
515
516 IF (.NOT. failure) THEN
517 CALL section_create(section, __location__, name="DCDR", &
518 description="Compute analytical gradients the dipole moments.", &
519 n_keywords=50, n_subsections=1, repeats=.false.)
520
521 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
522 description="controls the activation of the APT calculation", &
523 usage="&DCDR T", &
524 default_l_val=.false., &
525 lone_keyword_l_val=.true.)
526 CALL section_add_keyword(section, keyword)
527 CALL keyword_release(keyword)
528
529 CALL keyword_create(keyword, __location__, name="LIST_OF_ATOMS", &
530 description="Specifies a list of atoms.", &
531 usage="LIST_OF_ATOMS {integer} {integer} .. {integer}", repeats=.true., &
532 n_var=-1, type_of_var=integer_t)
533 CALL section_add_keyword(section, keyword)
534 CALL keyword_release(keyword)
535
536 CALL keyword_create(keyword, __location__, name="DISTRIBUTED_ORIGIN", &
537 variants=["DO_GAUGE"], &
538 description="Use the distributed origin (DO) gauge?", &
539 usage="DISTRIBUTED_ORIGIN T", &
540 default_l_val=.false., lone_keyword_l_val=.true.)
541 CALL section_add_keyword(section, keyword)
542 CALL keyword_release(keyword)
543
544 CALL keyword_create(keyword, __location__, name="ORBITAL_CENTER", &
545 description="The orbital center.", &
546 usage="ORBITAL_CENTER WANNIER", &
547 default_i_val=current_orb_center_wannier, &
548 enum_c_vals=s2a("WANNIER", "COMMON", "ATOM", "BOX"), &
549 enum_desc=s2a("Use the Wannier centers.", &
550 "Use a common center (works only for an isolate molecule).", &
551 "Use the atoms as center.", &
552 "Boxing."), &
555 CALL section_add_keyword(section, keyword)
556 CALL keyword_release(keyword)
557
558 CALL keyword_create(keyword, __location__, name="REFERENCE", &
559 description="Gauge origin of the velocity gauge factor.", &
560 enum_c_vals=s2a("COM", "COAC", "USER_DEFINED", "ZERO"), &
561 enum_desc=s2a("Use Center of Mass", &
562 "Use Center of Atomic Charges", &
563 "Use User-defined Point", &
564 "Use Origin of Coordinate System"), &
565 enum_i_vals=[use_mom_ref_com, &
569 default_i_val=use_mom_ref_zero)
570 CALL section_add_keyword(section, keyword)
571 CALL keyword_release(keyword)
572
573 CALL keyword_create(keyword, __location__, name="REFERENCE_POINT", &
574 description="User-defined reference point of the velocity gauge factor.", &
575 usage="REFERENCE_POINT x y z", &
576 repeats=.false., n_var=3, type_of_var=real_t, unit_str='bohr')
577 CALL section_add_keyword(section, keyword)
578 CALL keyword_release(keyword)
579
580 CALL keyword_create(keyword, __location__, name="Z_MATRIX_METHOD", &
581 description="Use Z_matrix method to solve the response equation", &
582 usage="Z_MATRIX_METHOD T", &
583 default_l_val=.false., lone_keyword_l_val=.true.)
584 CALL section_add_keyword(section, keyword)
585 CALL keyword_release(keyword)
586
587 CALL keyword_create(keyword, __location__, name="APT_FD", &
588 description="Use numerical differentiation to compute the APT, "// &
589 "switches off the calculation of dcdr analytical derivatives. "// &
590 "Requires RUN_TYPE = ENERGY_FORCE or MD.", &
591 usage="APT_FD T", &
592 default_l_val=.false., lone_keyword_l_val=.true.)
593 CALL section_add_keyword(section, keyword)
594 CALL keyword_release(keyword)
595
596 CALL keyword_create(keyword, __location__, name="APT_FD_DE", &
597 description="Electric field strength (atomic units) to use for finite differences", &
598 repeats=.false., &
599 n_var=1, &
600 type_of_var=real_t, &
601 default_r_val=0.0003_dp, &
602 usage="APT_FD_DE 1.0E-4")
603 CALL section_add_keyword(section, keyword)
604 CALL keyword_release(keyword)
605
606 CALL keyword_create(keyword, __location__, name="APT_FD_METHOD", &
607 description="Numerical differentiation method", &
608 usage="APT_FD_METHOD FD", &
609 default_i_val=1, &
610 !enum_c_vals=s2a("FD", "2PNT"), &
611 enum_c_vals=s2a("2PNT"), &
612 !enum_desc=s2a("Forward differences.", &
613 ! "Symmetric two-point differences."), &
614 enum_desc=s2a("Symmetric two-point differences."), &
615 !enum_i_vals=(/0, 1/))
616 enum_i_vals=[1])
617 CALL section_add_keyword(section, keyword)
618 CALL keyword_release(keyword)
619
620 NULLIFY (subsection)
621 CALL section_create(subsection, __location__, name="PRINT", &
622 description="print results of the magnetic dipole moment calculation", &
623 repeats=.false.)
624
625 CALL cp_print_key_section_create(print_key, __location__, "APT", &
626 description="Controls the printing of the electric dipole gradient", &
627 print_level=low_print_level, add_last=add_last_numeric, filename="")
628 CALL section_add_subsection(subsection, print_key)
629 CALL section_release(print_key)
630
631 CALL section_add_subsection(section, subsection)
632 CALL section_release(subsection)
633
634 NULLIFY (subsection)
635 CALL create_interp_section(subsection)
636 CALL section_add_subsection(section, subsection)
637 CALL section_release(subsection)
638
639 END IF
640
641 END SUBROUTINE create_dcdr_section
642
643! **************************************************************************************************
644!> \brief creates the input structure used to activate
645!> calculation of VCD spectra using DFPT
646!> \param section ...
647!> \author Sandra Luber, Tomas Zimmermann, Edward Ditler
648! **************************************************************************************************
649 SUBROUTINE create_vcd_section(section)
650
651 TYPE(section_type), POINTER :: section
652
653 TYPE(keyword_type), POINTER :: keyword
654 TYPE(section_type), POINTER :: print_key, subsection
655
656 NULLIFY (keyword, print_key, subsection)
657
658 cpassert(.NOT. ASSOCIATED(section))
659
660 CALL section_create(section, __location__, name="VCD", &
661 description="Carry out a VCD calculation.", &
662 n_keywords=50, n_subsections=1, repeats=.false.)
663
664 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
665 description="controls the activation of the APT/AAT calculation", &
666 usage="&VCD T", &
667 default_l_val=.false., &
668 lone_keyword_l_val=.true.)
669 CALL section_add_keyword(section, keyword)
670 CALL keyword_release(keyword)
671
672 CALL keyword_create(keyword, __location__, name="LIST_OF_ATOMS", &
673 description="Specifies a list of atoms.", &
674 usage="LIST_OF_ATOMS {integer} {integer} .. {integer}", repeats=.true., &
675 n_var=-1, type_of_var=integer_t)
676 CALL section_add_keyword(section, keyword)
677 CALL keyword_release(keyword)
678
679 CALL keyword_create(keyword, __location__, name="DISTRIBUTED_ORIGIN", &
680 variants=["DO_GAUGE"], &
681 description="Use the distributed origin (DO) gauge?", &
682 usage="DISTRIBUTED_ORIGIN T", &
683 default_l_val=.false., lone_keyword_l_val=.true.)
684 CALL section_add_keyword(section, keyword)
685 CALL keyword_release(keyword)
686
687 CALL keyword_create(keyword, __location__, name="ORIGIN_DEPENDENT_MFP", &
688 description="Use the origin dependent MFP operator.", &
689 usage="ORIGIN_DEPENDENT_MFP T", &
690 default_l_val=.false., lone_keyword_l_val=.true.)
691 CALL section_add_keyword(section, keyword)
692 CALL keyword_release(keyword)
693
694 CALL keyword_create(keyword, __location__, name="ORBITAL_CENTER", &
695 description="The orbital center.", &
696 usage="ORBITAL_CENTER WANNIER", &
697 default_i_val=current_orb_center_wannier, &
698 enum_c_vals=s2a("WANNIER", "COMMON", "ATOM", "BOX"), &
699 enum_desc=s2a("Use the Wannier centers.", &
700 "Use a common center (works only for an isolate molecule).", &
701 "Use the atoms as center.", &
702 "Boxing."), &
705 CALL section_add_keyword(section, keyword)
706 CALL keyword_release(keyword)
707
708 ! The origin of the magnetic dipole operator (r - MAGNETIC_ORIGIN) x momentum
709 CALL keyword_create(keyword, __location__, name="MAGNETIC_ORIGIN", &
710 description="Gauge origin of the magnetic dipole operator.", &
711 enum_c_vals=s2a("COM", "COAC", "USER_DEFINED", "ZERO"), &
712 enum_desc=s2a("Use Center of Mass", &
713 "Use Center of Atomic Charges", &
714 "Use User-defined Point", &
715 "Use Origin of Coordinate System"), &
716 enum_i_vals=[use_mom_ref_com, &
720 default_i_val=use_mom_ref_zero)
721 CALL section_add_keyword(section, keyword)
722 CALL keyword_release(keyword)
723
724 CALL keyword_create(keyword, __location__, name="MAGNETIC_ORIGIN_REFERENCE", &
725 description="User-defined reference point of the magnetic dipole operator.", &
726 usage="MAGNETIC_ORIGIN_REFERENCE x y z", &
727 repeats=.false., n_var=3, type_of_var=real_t, unit_str='bohr')
728 CALL section_add_keyword(section, keyword)
729 CALL keyword_release(keyword)
730
731 ! The origin of the coordinate system
732 CALL keyword_create(keyword, __location__, name="SPATIAL_ORIGIN", &
733 description="Gauge origin of the velocity gauge factor/spatial origin.", &
734 enum_c_vals=s2a("COM", "COAC", "USER_DEFINED", "ZERO"), &
735 enum_desc=s2a("Use Center of Mass", &
736 "Use Center of Atomic Charges", &
737 "Use User-defined Point", &
738 "Use Origin of Coordinate System"), &
739 enum_i_vals=[use_mom_ref_com, &
743 default_i_val=use_mom_ref_zero)
744 CALL section_add_keyword(section, keyword)
745 CALL keyword_release(keyword)
746
747 CALL keyword_create(keyword, __location__, name="SPATIAL_ORIGIN_REFERENCE", &
748 description="User-defined reference point of the velocity gauge factor/spatial origin.", &
749 usage="SPATIAL_ORIGIN_REFERENCE x y z", &
750 repeats=.false., n_var=3, type_of_var=real_t, unit_str='bohr')
751 CALL section_add_keyword(section, keyword)
752 CALL keyword_release(keyword)
753
754 NULLIFY (subsection)
755 CALL section_create(subsection, __location__, name="PRINT", &
756 description="print results of the magnetic dipole moment calculation", &
757 repeats=.false.)
758
759 CALL cp_print_key_section_create(print_key, __location__, "VCD", &
760 description="Controls the printing of the APTs and AATs", &
761 print_level=low_print_level, add_last=add_last_numeric, filename="")
762 CALL section_add_subsection(subsection, print_key)
763 CALL section_release(print_key)
764
765 CALL section_add_subsection(section, subsection)
766 CALL section_release(subsection)
767
768 NULLIFY (subsection)
769 CALL create_interp_section(subsection)
770 CALL section_add_subsection(section, subsection)
771 CALL section_release(subsection)
772
773 END SUBROUTINE create_vcd_section
774
775! **************************************************************************************************
776!> \brief creates the input structure used to activate
777!> calculation of induced current DFPT
778!> Available properties : none
779!> \param section the section to create
780!> \author MI/VW
781! **************************************************************************************************
782 SUBROUTINE create_current_section(section)
783 TYPE(section_type), POINTER :: section
784
785 TYPE(keyword_type), POINTER :: keyword
786 TYPE(section_type), POINTER :: print_key, subsection
787
788 NULLIFY (keyword, print_key, subsection)
789
790 cpassert(.NOT. ASSOCIATED(section))
791 CALL section_create(section, __location__, name="current", &
792 description="The induced current density is calculated by DFPT.", &
793 n_keywords=4, n_subsections=1, repeats=.false., &
794 citations=[sebastiani2001, weber2009])
795
796 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
797 description="controls the activation of the induced current calculation", &
798 usage="&CURRENT T", &
799 default_l_val=.false., &
800 lone_keyword_l_val=.true.)
801 CALL section_add_keyword(section, keyword)
802 CALL keyword_release(keyword)
803
804 CALL keyword_create(keyword, __location__, name="GAUGE", &
805 description="The gauge used to compute the induced current within GAPW.", &
806 usage="GAUGE R", &
807 default_i_val=current_gauge_r_and_step_func, &
808 enum_c_vals=s2a("R", "R_AND_STEP_FUNCTION", "ATOM"), &
809 enum_desc=s2a("Position gauge (doesnt work well).", &
810 "Position and step function for the soft and the local parts, respectively.", &
811 "Atoms."), &
813 CALL section_add_keyword(section, keyword)
814 CALL keyword_release(keyword)
815
816 CALL keyword_create(keyword, __location__, name="GAUGE_ATOM_RADIUS", &
817 description="Build the gauge=atom using only the atoms within this radius.", &
818 usage="GAUGE_ATOM_RADIUS 10.0", &
819 type_of_var=real_t, &
820 default_r_val=cp_unit_to_cp2k(value=4.0_dp, unit_str="angstrom"), &
821 unit_str="angstrom")
822 CALL section_add_keyword(section, keyword)
823 CALL keyword_release(keyword)
824
825 CALL keyword_create(keyword, __location__, name="USE_OLD_GAUGE_ATOM", &
826 description="Use the old way to compute the gauge.", &
827 usage="USE_OLD_GAUGE_ATOM T", &
828 default_l_val=.true., lone_keyword_l_val=.true.)
829 CALL section_add_keyword(section, keyword)
830 CALL keyword_release(keyword)
831
832 CALL keyword_create(keyword, __location__, name="ORBITAL_CENTER", &
833 description="The orbital center.", &
834 usage="ORBITAL_CENTER WANNIER", &
835 default_i_val=current_orb_center_wannier, &
836 enum_c_vals=s2a("WANNIER", "COMMON", "ATOM", "BOX"), &
837 enum_desc=s2a("Use the Wannier centers.", &
838 "Use a common center (works only for an isolate molecule).", &
839 "Use the atoms as center.", &
840 "Boxing."), &
843 CALL section_add_keyword(section, keyword)
844 CALL keyword_release(keyword)
845
846 CALL keyword_create(keyword, __location__, name="COMMON_CENTER", &
847 description="The common center ", usage="COMMON_CENTER 0.0 1.0 0.0", &
848 n_var=3, default_r_vals=[0.0_dp, 0.0_dp, 0.0_dp], type_of_var=real_t, &
849 unit_str="angstrom")
850 CALL section_add_keyword(section, keyword)
851 CALL keyword_release(keyword)
852
853 CALL keyword_create(keyword, __location__, name="NBOX", &
854 description="How many boxes along each directions ", usage="NBOX 6 6 5", &
855 n_var=3, default_i_vals=[4, 4, 4], type_of_var=integer_t)
856 CALL section_add_keyword(section, keyword)
857 CALL keyword_release(keyword)
858
859 CALL keyword_create(keyword, __location__, name="CHI_PBC", &
860 description="Calculate the succeptibility correction to the shift with PBC", &
861 usage="CHI_PBC T", &
862 default_l_val=.false., lone_keyword_l_val=.true.)
863 CALL section_add_keyword(section, keyword)
864 CALL keyword_release(keyword)
865
866 CALL keyword_create(keyword, __location__, name="FORCE_NO_FULL", &
867 description="Avoid the calculation of the state dependent perturbation term, "// &
868 "even if the orbital centers are set at Wannier centers or at Atom centers", &
869 usage="FORCE_NO_FULL T", &
870 default_l_val=.false., lone_keyword_l_val=.true.)
871 CALL section_add_keyword(section, keyword)
872 CALL keyword_release(keyword)
873
874 CALL keyword_create(keyword, __location__, name="SELECTED_STATES_ON_ATOM_LIST", &
875 description="Indexes of the atoms for selecting"// &
876 " the states to be used for the response calculations.", &
877 usage="SELECTED_STATES_ON_ATOM_LIST 1 2 10", &
878 n_var=-1, type_of_var=integer_t, repeats=.true.)
879 CALL section_add_keyword(section, keyword)
880 CALL keyword_release(keyword)
881
882 CALL keyword_create(keyword, __location__, name="SELECTED_STATES_ATOM_RADIUS", &
883 description="Select all the states included in the given radius around each atoms "// &
884 "in SELECTED_STATES_ON_ATOM_LIST.", &
885 usage="SELECTED_STATES_ATOM_RADIUS 2.0", &
886 type_of_var=real_t, &
887 default_r_val=cp_unit_to_cp2k(value=4.0_dp, unit_str="angstrom"), &
888 unit_str="angstrom")
889 CALL section_add_keyword(section, keyword)
890 CALL keyword_release(keyword)
891
892 CALL keyword_create(keyword, __location__, name="RESTART_CURRENT", &
893 description="Restart the induced current density calculation"// &
894 " from a previous run (not working yet).", &
895 usage="RESTART_CURRENT", default_l_val=.false., &
896 lone_keyword_l_val=.true.)
897 CALL section_add_keyword(section, keyword)
898 CALL keyword_release(keyword)
899
900 NULLIFY (subsection)
901 CALL section_create(subsection, __location__, name="PRINT", &
902 description="print results of induced current density calculation", &
903 repeats=.false.)
904
905 CALL cp_print_key_section_create(print_key, __location__, "CURRENT_CUBES", &
906 description="Controls the printing of the induced current density (not working yet).", &
907 print_level=high_print_level, add_last=add_last_numeric, filename="")
908 CALL keyword_create(keyword, __location__, name="stride", &
909 description="The stride (X,Y,Z) used to write the cube file "// &
910 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
911 " 1 number valid for all components (not working yet).", &
912 usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
913 CALL section_add_keyword(print_key, keyword)
914 CALL keyword_release(keyword)
915 CALL keyword_create(keyword, __location__, name="APPEND", &
916 description="append the cube files when they already exist", &
917 default_l_val=.false., lone_keyword_l_val=.true.)
918 CALL section_add_keyword(print_key, keyword)
919 CALL keyword_release(keyword)
920
921 CALL section_add_subsection(subsection, print_key)
922 CALL section_release(print_key)
923
924 CALL cp_print_key_section_create(print_key, __location__, "RESPONSE_FUNCTION_CUBES", &
925 description="Controls the printing of the response functions (not working yet).", &
926 print_level=high_print_level, add_last=add_last_numeric, filename="")
927 CALL keyword_create(keyword, __location__, name="stride", &
928 description="The stride (X,Y,Z) used to write the cube file "// &
929 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
930 " 1 number valid for all components (not working yet).", &
931 usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
932 CALL section_add_keyword(print_key, keyword)
933 CALL keyword_release(keyword)
934
935 CALL keyword_create(keyword, __location__, name="CUBES_LU_BOUNDS", &
936 variants=["CUBES_LU"], &
937 description="The lower and upper index of the states to be printed as cube (not working yet).", &
938 usage="CUBES_LU_BOUNDS integer integer", &
939 n_var=2, default_i_vals=[0, -2], type_of_var=integer_t)
940 CALL section_add_keyword(print_key, keyword)
941 CALL keyword_release(keyword)
942
943 CALL keyword_create(keyword, __location__, name="CUBES_LIST", &
944 description="Indexes of the states to be printed as cube files "// &
945 "This keyword can be repeated several times "// &
946 "(useful if you have to specify many indexes) (not working yet).", &
947 usage="CUBES_LIST 1 2", &
948 n_var=-1, type_of_var=integer_t, repeats=.true.)
949 CALL section_add_keyword(print_key, keyword)
950 CALL keyword_release(keyword)
951 CALL keyword_create(keyword, __location__, name="APPEND", &
952 description="append the cube files when they already exist", &
953 default_l_val=.false., lone_keyword_l_val=.true.)
954 CALL section_add_keyword(print_key, keyword)
955 CALL keyword_release(keyword)
956
957 CALL section_add_subsection(subsection, print_key)
958 CALL section_release(print_key)
959
960 CALL section_add_subsection(section, subsection)
961 CALL section_release(subsection)
962
963 NULLIFY (subsection)
964 CALL create_interp_section(subsection)
965 CALL section_add_subsection(section, subsection)
966 CALL section_release(subsection)
967
968 END SUBROUTINE create_current_section
969
970! **************************************************************************************************
971!> \brief creates the input structure used to activate
972!> calculation of NMR chemical shift using
973!> the induced current obtained from DFPT
974!> Available properties : none
975!> \param section the section to create
976!> \author MI/VW
977! **************************************************************************************************
978 SUBROUTINE create_nmr_section(section)
979 TYPE(section_type), POINTER :: section
980
981 TYPE(keyword_type), POINTER :: keyword
982 TYPE(section_type), POINTER :: print_key, subsection
983
984 NULLIFY (keyword, print_key, subsection)
985
986 cpassert(.NOT. ASSOCIATED(section))
987 CALL section_create(section, __location__, name="nmr", &
988 description="The chemical shift is calculated by DFPT.", &
989 n_keywords=5, n_subsections=1, repeats=.false., &
990 citations=[weber2009])
991
992 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
993 description="controls the activation of the nmr calculation", &
994 usage="&NMR T", &
995 default_l_val=.false., &
996 lone_keyword_l_val=.true.)
997 CALL section_add_keyword(section, keyword)
998 CALL keyword_release(keyword)
999
1000 CALL keyword_create(keyword, __location__, name="INTERPOLATE_SHIFT", &
1001 description="Calculate the soft part of the chemical shift by interpolation ", &
1002 usage="INTERPOLATE_SHIFT T", &
1003 default_l_val=.false., lone_keyword_l_val=.true.)
1004 CALL section_add_keyword(section, keyword)
1005 CALL keyword_release(keyword)
1006
1007 CALL keyword_create(keyword, __location__, name="NICS", &
1008 description="Calculate the chemical shift in a set of points"// &
1009 " given from an external file", usage="NICS", &
1010 default_l_val=.false., lone_keyword_l_val=.true.)
1011 CALL section_add_keyword(section, keyword)
1012 CALL keyword_release(keyword)
1013
1014 CALL keyword_create(keyword, __location__, name="NICS_FILE_NAME", &
1015 description="Name of the file with the NICS points coordinates", &
1016 usage="NICS_FILE_NAME nics_file", &
1017 default_lc_val="nics_file")
1018 CALL section_add_keyword(section, keyword)
1019 CALL keyword_release(keyword)
1020
1021 CALL keyword_create(keyword, __location__, name="RESTART_NMR", &
1022 description="Restart the NMR calculation from a previous run (NOT WORKING YET)", &
1023 usage="RESTART_NMR", default_l_val=.false., &
1024 lone_keyword_l_val=.true.)
1025 CALL section_add_keyword(section, keyword)
1026 CALL keyword_release(keyword)
1027
1028 CALL keyword_create(keyword, __location__, name="SHIFT_GAPW_RADIUS", &
1029 description="While computing the local part of the shift (GAPW), "// &
1030 "the integration is restricted to nuclei that are within this radius.", &
1031 usage="SHIFT_GAPW_RADIUS 20.0", &
1032 type_of_var=real_t, &
1033 default_r_val=cp_unit_to_cp2k(value=60.0_dp, unit_str="angstrom"), &
1034 unit_str="angstrom")
1035 CALL section_add_keyword(section, keyword)
1036 CALL keyword_release(keyword)
1037
1038 NULLIFY (subsection)
1039 CALL section_create(subsection, __location__, name="PRINT", &
1040 description="print results of nmr calculation", &
1041 repeats=.false.)
1042
1043 CALL cp_print_key_section_create(print_key, __location__, "RESPONSE_FUNCTION_CUBES", &
1044 description="Controls the printing of the response functions ", &
1045 print_level=high_print_level, add_last=add_last_numeric, filename="")
1046 CALL keyword_create(keyword, __location__, name="stride", &
1047 description="The stride (X,Y,Z) used to write the cube file "// &
1048 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1049 " 1 number valid for all components.", &
1050 usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
1051 CALL section_add_keyword(print_key, keyword)
1052 CALL keyword_release(keyword)
1053
1054 CALL keyword_create(keyword, __location__, name="CUBES_LU_BOUNDS", &
1055 variants=["CUBES_LU"], &
1056 description="The lower and upper index of the states to be printed as cube", &
1057 usage="CUBES_LU_BOUNDS integer integer", &
1058 n_var=2, default_i_vals=[0, -2], type_of_var=integer_t)
1059 CALL section_add_keyword(print_key, keyword)
1060 CALL keyword_release(keyword)
1061
1062 CALL keyword_create(keyword, __location__, name="CUBES_LIST", &
1063 description="Indexes of the states to be printed as cube files "// &
1064 "This keyword can be repeated several times "// &
1065 "(useful if you have to specify many indexes).", &
1066 usage="CUBES_LIST 1 2", &
1067 n_var=-1, type_of_var=integer_t, repeats=.true.)
1068 CALL section_add_keyword(print_key, keyword)
1069 CALL keyword_release(keyword)
1070 CALL keyword_create(keyword, __location__, name="APPEND", &
1071 description="append the cube files when they already exist", &
1072 default_l_val=.false., lone_keyword_l_val=.true.)
1073 CALL section_add_keyword(print_key, keyword)
1074 CALL keyword_release(keyword)
1075
1076 CALL section_add_subsection(subsection, print_key)
1077 CALL section_release(print_key)
1078
1079 CALL cp_print_key_section_create(print_key, __location__, "CHI_TENSOR", &
1080 description="Controls the printing of susceptibility", &
1081 print_level=high_print_level, add_last=add_last_numeric, filename="")
1082 CALL section_add_subsection(subsection, print_key)
1083 CALL section_release(print_key)
1084
1085 CALL cp_print_key_section_create(print_key, __location__, "SHIELDING_TENSOR", &
1086 description="Controls the printing of the chemical shift", &
1087 print_level=low_print_level, add_last=add_last_numeric, filename="")
1088
1089 CALL keyword_create(keyword, __location__, name="ATOMS_LU_BOUNDS", &
1090 variants=["ATOMS_LU"], &
1091 description="The lower and upper atomic index for which the tensor is printed", &
1092 usage="ATOMS_LU_BOUNDS integer integer", &
1093 n_var=2, default_i_vals=[0, -2], type_of_var=integer_t)
1094 CALL section_add_keyword(print_key, keyword)
1095 CALL keyword_release(keyword)
1096
1097 CALL keyword_create(keyword, __location__, name="ATOMS_LIST", &
1098 description="list of atoms for which the shift is printed into a file ", &
1099 usage="ATOMS_LIST 1 2", n_var=-1, &
1100 type_of_var=integer_t, repeats=.true.)
1101 CALL section_add_keyword(print_key, keyword)
1102 CALL keyword_release(keyword)
1103
1104 CALL section_add_subsection(subsection, print_key)
1105 CALL section_release(print_key)
1106
1107 CALL section_add_subsection(section, subsection)
1108 CALL section_release(subsection)
1109
1110 NULLIFY (subsection)
1111 CALL create_interp_section(subsection)
1112 CALL section_add_subsection(section, subsection)
1113 CALL section_release(subsection)
1114
1115 END SUBROUTINE create_nmr_section
1116
1117! **************************************************************************************************
1118!> \brief creates the input structure used to activate
1119!> calculation of NMR spin-spin coupling (implementation not operating)
1120!> Available properties : none
1121!> \param section the section to create
1122!> \author VW
1123! **************************************************************************************************
1124 SUBROUTINE create_spin_spin_section(section)
1125 TYPE(section_type), POINTER :: section
1126
1127 TYPE(keyword_type), POINTER :: keyword
1128 TYPE(section_type), POINTER :: print_key, subsection
1129
1130 NULLIFY (keyword, print_key, subsection)
1131
1132 cpassert(.NOT. ASSOCIATED(section))
1133 CALL section_create(section, __location__, name="spinspin", &
1134 description="Compute indirect spin-spin coupling constants.", &
1135 n_keywords=5, n_subsections=1, repeats=.false.)
1136
1137 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
1138 description="controls the activation of the nmr calculation", &
1139 usage="&SPINSPIN T", &
1140 default_l_val=.false., &
1141 lone_keyword_l_val=.true.)
1142 CALL section_add_keyword(section, keyword)
1143 CALL keyword_release(keyword)
1144
1145 CALL keyword_create(keyword, __location__, name="RESTART_SPINSPIN", &
1146 description="Restart the spin-spin calculation from a previous run (NOT WORKING YET)", &
1147 usage="RESTART_SPINSPIN", default_l_val=.false., &
1148 lone_keyword_l_val=.true.)
1149 CALL section_add_keyword(section, keyword)
1150 CALL keyword_release(keyword)
1151
1152 CALL keyword_create(keyword, __location__, name="ISSC_ON_ATOM_LIST", &
1153 description="Atoms for which the issc is computed.", &
1154 usage="ISSC_ON_ATOM_LIST 1 2 10", &
1155 n_var=-1, type_of_var=integer_t, repeats=.true.)
1156 CALL section_add_keyword(section, keyword)
1157 CALL keyword_release(keyword)
1158
1159 CALL keyword_create(keyword, __location__, name="DO_FC", &
1160 description="Compute the Fermi contact contribution", &
1161 usage="DO_FC F", &
1162 default_l_val=.true., lone_keyword_l_val=.true.)
1163 CALL section_add_keyword(section, keyword)
1164 CALL keyword_release(keyword)
1165
1166 CALL keyword_create(keyword, __location__, name="DO_SD", &
1167 description="Compute the spin-dipolar contribution", &
1168 usage="DO_SD F", &
1169 default_l_val=.true., lone_keyword_l_val=.true.)
1170 CALL section_add_keyword(section, keyword)
1171 CALL keyword_release(keyword)
1172
1173 CALL keyword_create(keyword, __location__, name="DO_PSO", &
1174 description="Compute the paramagnetic spin-orbit contribution", &
1175 usage="DO_PSO F", &
1176 default_l_val=.true., lone_keyword_l_val=.true.)
1177 CALL section_add_keyword(section, keyword)
1178 CALL keyword_release(keyword)
1179
1180 CALL keyword_create(keyword, __location__, name="DO_DSO", &
1181 description="Compute the diamagnetic spin-orbit contribution (NOT YET IMPLEMENTED)", &
1182 usage="DO_DSO F", &
1183 default_l_val=.true., lone_keyword_l_val=.true.)
1184 CALL section_add_keyword(section, keyword)
1185 CALL keyword_release(keyword)
1186
1187 NULLIFY (subsection)
1188 CALL section_create(subsection, __location__, name="PRINT", &
1189 description="print results of the indirect spin-spin calculation", &
1190 repeats=.false.)
1191
1192 CALL cp_print_key_section_create(print_key, __location__, "K_MATRIX", &
1193 description="Controls the printing of the indirect spin-spin matrix", &
1194 print_level=low_print_level, add_last=add_last_numeric, filename="")
1195
1196 CALL keyword_create(keyword, __location__, name="ATOMS_LIST", &
1197 description="list of atoms for which the indirect spin-spin is printed into a file ", &
1198 usage="ATOMS_LIST 1 2", n_var=-1, &
1199 type_of_var=integer_t, repeats=.true.)
1200 CALL section_add_keyword(print_key, keyword)
1201 CALL keyword_release(keyword)
1202
1203 CALL section_add_subsection(subsection, print_key)
1204 CALL section_release(print_key)
1205
1206 CALL section_add_subsection(section, subsection)
1207 CALL section_release(subsection)
1208
1209 NULLIFY (subsection)
1210 CALL create_interp_section(subsection)
1211 CALL section_add_subsection(section, subsection)
1212 CALL section_release(subsection)
1213
1214 END SUBROUTINE create_spin_spin_section
1215
1216! **************************************************************************************************
1217!> \brief creates the input structure used to activate
1218!> calculation of EPR using
1219!> the induced current obtained from DFPT
1220!> Available properties : none
1221!> \param section the section to create
1222!> \author VW
1223! **************************************************************************************************
1224 SUBROUTINE create_epr_section(section)
1225 TYPE(section_type), POINTER :: section
1226
1227 TYPE(keyword_type), POINTER :: keyword
1228 TYPE(section_type), POINTER :: print_key, subsection, subsubsection
1229
1230 NULLIFY (keyword, print_key, subsection, subsubsection)
1231
1232 cpassert(.NOT. ASSOCIATED(section))
1233 CALL section_create(section, __location__, name="EPR", &
1234 description="The g tensor is calculated by DFPT ", &
1235 n_keywords=5, n_subsections=1, repeats=.false., &
1236 citations=[weber2009])
1237
1238 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
1239 description="controls the activation of the epr calculation", &
1240 usage="&EPR T", &
1241 default_l_val=.false., &
1242 lone_keyword_l_val=.true.)
1243 CALL section_add_keyword(section, keyword)
1244 CALL keyword_release(keyword)
1245
1246 CALL keyword_create(keyword, __location__, name="RESTART_EPR", &
1247 description="Restart the EPR calculation from a previous run (NOT WORKING)", &
1248 usage="RESTART_EPR", default_l_val=.false., &
1249 lone_keyword_l_val=.true.)
1250 CALL section_add_keyword(section, keyword)
1251 CALL keyword_release(keyword)
1252
1253 NULLIFY (subsection)
1254 CALL section_create(subsection, __location__, name="PRINT", &
1255 description="print results of epr calculation", &
1256 repeats=.false.)
1257
1258 CALL cp_print_key_section_create(print_key, __location__, "NABLAVKS_CUBES", &
1259 description="Controls the printing of the components of nabla v_ks ", &
1260 print_level=high_print_level, add_last=add_last_numeric, filename="")
1261 CALL keyword_create(keyword, __location__, name="stride", &
1262 description="The stride (X,Y,Z) used to write the cube file "// &
1263 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1264 " 1 number valid for all components.", &
1265 usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
1266 CALL section_add_keyword(print_key, keyword)
1267 CALL keyword_release(keyword)
1268 CALL keyword_create(keyword, __location__, name="APPEND", &
1269 description="append the cube files when they already exist", &
1270 default_l_val=.false., lone_keyword_l_val=.true.)
1271 CALL section_add_keyword(print_key, keyword)
1272 CALL keyword_release(keyword)
1273
1274 CALL section_add_subsection(subsection, print_key)
1275 CALL section_release(print_key)
1276
1277 CALL cp_print_key_section_create(print_key, __location__, "G_TENSOR", &
1278 description="Controls the printing of the g tensor", &
1279 print_level=high_print_level, add_last=add_last_numeric, filename="")
1280 CALL create_xc_section(subsubsection)
1281 CALL section_add_subsection(print_key, subsubsection)
1282 CALL section_release(subsubsection)
1283
1284 CALL keyword_create(keyword, __location__, name="GAPW_MAX_ALPHA", &
1285 description="Maximum alpha of GTH potentials allowed on the soft grids ", &
1286 usage="GAPW_MAX_ALPHA real", default_r_val=5.0_dp)
1287 CALL section_add_keyword(print_key, keyword)
1288 CALL keyword_release(keyword)
1289
1290 CALL keyword_create(keyword, __location__, name="SOO_RHO_HARD", &
1291 description="Whether or not to include the atomic parts of the density "// &
1292 "in the SOO part of the g tensor", usage="SOO_RHO_HARD", &
1293 default_l_val=.false., lone_keyword_l_val=.true.)
1294 CALL section_add_keyword(print_key, keyword)
1295 CALL keyword_release(keyword)
1296
1297 CALL section_add_subsection(subsection, print_key)
1298 CALL section_release(print_key)
1299
1300 CALL cp_print_key_section_create(print_key, __location__, "RESPONSE_FUNCTION_CUBES", &
1301 description="Controls the printing of the response functions ", &
1302 print_level=high_print_level, add_last=add_last_numeric, filename="")
1303 CALL keyword_create(keyword, __location__, name="stride", &
1304 description="The stride (X,Y,Z) used to write the cube file "// &
1305 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1306 " 1 number valid for all components.", &
1307 usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
1308 CALL section_add_keyword(print_key, keyword)
1309 CALL keyword_release(keyword)
1310
1311 CALL keyword_create(keyword, __location__, name="CUBES_LU_BOUNDS", &
1312 variants=["CUBES_LU"], &
1313 description="The lower and upper index of the states to be printed as cube", &
1314 usage="CUBES_LU_BOUNDS integer integer", &
1315 n_var=2, default_i_vals=[0, -2], type_of_var=integer_t)
1316 CALL section_add_keyword(print_key, keyword)
1317 CALL keyword_release(keyword)
1318
1319 CALL keyword_create(keyword, __location__, name="CUBES_LIST", &
1320 description="Indexes of the states to be printed as cube files "// &
1321 "This keyword can be repeated several times "// &
1322 "(useful if you have to specify many indexes).", &
1323 usage="CUBES_LIST 1 2", &
1324 n_var=-1, type_of_var=integer_t, repeats=.true.)
1325 CALL section_add_keyword(print_key, keyword)
1326 CALL keyword_release(keyword)
1327 CALL keyword_create(keyword, __location__, name="APPEND", &
1328 description="append the cube files when they already exist", &
1329 default_l_val=.false., lone_keyword_l_val=.true.)
1330 CALL section_add_keyword(print_key, keyword)
1331 CALL keyword_release(keyword)
1332
1333 CALL section_add_subsection(subsection, print_key)
1334 CALL section_release(print_key)
1335
1336 CALL section_add_subsection(section, subsection)
1337 CALL section_release(subsection)
1338
1339 NULLIFY (subsection)
1340 CALL create_interp_section(subsection)
1341 CALL section_add_subsection(section, subsection)
1342 CALL section_release(subsection)
1343
1344 END SUBROUTINE create_epr_section
1345
1346! **************************************************************************************************
1347!> \brief creates the input structure used to activate
1348!> calculation of polarizability tensor DFPT
1349!> Available properties : none
1350!> \param section the section to create
1351!> \author SL
1352! **************************************************************************************************
1353 SUBROUTINE create_polarizability_section(section)
1354
1355 TYPE(section_type), POINTER :: section
1356
1357 TYPE(keyword_type), POINTER :: keyword
1358 TYPE(section_type), POINTER :: print_key, subsection
1359
1360 NULLIFY (keyword, print_key, subsection)
1361
1362 cpassert(.NOT. ASSOCIATED(section))
1363 CALL section_create(section, __location__, name="POLAR", &
1364 description="Compute polarizabilities.", &
1365 n_keywords=5, n_subsections=1, repeats=.false., &
1366 citations=[putrino2002])
1367
1368 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
1369 description="controls the activation of the polarizability calculation", &
1370 usage="&POLAR T", &
1371 default_l_val=.false., &
1372 lone_keyword_l_val=.true.)
1373 CALL section_add_keyword(section, keyword)
1374 CALL keyword_release(keyword)
1375
1376 CALL keyword_create(keyword, __location__, name="DO_RAMAN", &
1377 description="Compute the electric-dipole--electric-dipole polarizability", &
1378 usage="DO_RAMAN F", &
1379 citations=[luber2014], &
1380 default_l_val=.true., lone_keyword_l_val=.true.)
1381 CALL section_add_keyword(section, keyword)
1382 CALL keyword_release(keyword)
1383
1384 CALL keyword_create(keyword, __location__, name="PERIODIC_DIPOLE_OPERATOR", &
1385 description="Type of dipole operator: Berry phase(T) or Local(F)", &
1386 usage="PERIODIC_DIPOLE_OPERATOR T", &
1387 default_l_val=.true., lone_keyword_l_val=.true.)
1388 CALL section_add_keyword(section, keyword)
1389 CALL keyword_release(keyword)
1390
1391 NULLIFY (subsection)
1392 CALL section_create(subsection, __location__, name="PRINT", &
1393 description="print results of the polarizability calculation", &
1394 repeats=.false.)
1395
1396 CALL cp_print_key_section_create(print_key, __location__, "POLAR_MATRIX", &
1397 description="Controls the printing of the polarizabilities", &
1398 print_level=low_print_level, add_last=add_last_numeric, filename="")
1399
1400 CALL section_add_subsection(subsection, print_key)
1401 CALL section_release(print_key)
1402 CALL section_add_subsection(section, subsection)
1403 CALL section_release(subsection)
1404
1405 NULLIFY (subsection)
1406 CALL create_interp_section(subsection)
1407 CALL section_add_subsection(section, subsection)
1408 CALL section_release(subsection)
1409
1410 END SUBROUTINE create_polarizability_section
1411
1412! **************************************************************************************************
1413!> \brief creates the section for electron transfer coupling
1414!> \param section ...
1415!> \author fschiff
1416! **************************************************************************************************
1417 SUBROUTINE create_et_coupling_section(section)
1418 TYPE(section_type), POINTER :: section
1419
1420 TYPE(keyword_type), POINTER :: keyword
1421 TYPE(section_type), POINTER :: print_key, subsection
1422
1423 NULLIFY (keyword)
1424 cpassert(.NOT. ASSOCIATED(section))
1425 CALL section_create(section, __location__, name="ET_COUPLING", &
1426 description="specifies the two constraints/restraints for extracting ET coupling elements", &
1427 n_keywords=1, n_subsections=4, repeats=.false., citations=[kondov2007, futera2017])
1428
1429 NULLIFY (subsection)
1430 CALL create_ddapc_restraint_section(subsection, "DDAPC_RESTRAINT_A")
1431 CALL section_add_subsection(section, subsection)
1432 CALL section_release(subsection)
1433
1434 NULLIFY (subsection)
1435 CALL create_ddapc_restraint_section(subsection, "DDAPC_RESTRAINT_B")
1436 CALL section_add_subsection(section, subsection)
1437 CALL section_release(subsection)
1438
1439 NULLIFY (subsection)
1440 CALL create_projection(subsection, "PROJECTION")
1441 CALL section_add_subsection(section, subsection)
1442 CALL section_release(subsection)
1443
1444 CALL keyword_create(keyword, __location__, name="TYPE_OF_CONSTRAINT", &
1445 description="Specifies the type of constraint", &
1446 usage="TYPE_OF_CONSTRAINT DDAPC", &
1447 enum_c_vals=s2a("NONE", "DDAPC"), &
1448 enum_i_vals=[do_no_et, do_et_ddapc], &
1449 enum_desc=s2a("NONE", "DDAPC Constraint"), &
1450 default_i_val=do_no_et)
1451 CALL section_add_keyword(section, keyword)
1452 CALL keyword_release(keyword)
1453
1454 NULLIFY (print_key)
1455 CALL cp_print_key_section_create(print_key, __location__, "PROGRAM_RUN_INFO", &
1456 description="Controls the printing basic info about the method", &
1457 print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
1458 CALL section_add_subsection(section, print_key)
1459 CALL section_release(print_key)
1460
1461 END SUBROUTINE create_et_coupling_section
1462
1463! **************************************************************************************************
1464!> \brief defines input sections for specification of Hilbert space partitioning
1465!> in projection-operator approach of electronic coupling calulation
1466!> \param section pointer to the section data structure
1467!> \param section_name name of the projection section
1468!> \author Z. Futera (02.2017)
1469! **************************************************************************************************
1470 SUBROUTINE create_projection(section, section_name)
1471
1472 ! Routine arguments
1473 TYPE(section_type), POINTER :: section
1474 CHARACTER(len=*), INTENT(in) :: section_name
1475
1476 TYPE(keyword_type), POINTER :: keyword
1477 TYPE(section_type), POINTER :: print_key, section_block, section_print
1478
1479! Routine name for dubug purposes
1480
1481 ! Sanity check
1482 cpassert(.NOT. ASSOCIATED(section))
1483
1484 ! Initialization
1485 NULLIFY (keyword)
1486 NULLIFY (print_key)
1487 NULLIFY (section_block)
1488 NULLIFY (section_print)
1489
1490 ! Input-file section definition
1491 CALL section_create(section, __location__, name=trim(adjustl(section_name)), &
1492 description="Projection-operator approach fo ET coupling calculation", &
1493 n_keywords=0, n_subsections=2, repeats=.false.)
1494
1495 ! Subsection #0: Log printing
1496 CALL cp_print_key_section_create(print_key, __location__, 'PROGRAM_RUN_INFO', &
1497 description="Controls printing of data and informations to log file", &
1498 print_level=low_print_level, filename="__STD_OUT__")
1499 CALL section_add_subsection(section, print_key)
1500 CALL section_release(print_key)
1501
1502 ! Subsection #1: Atomic blocks
1503 CALL section_create(section_block, __location__, name='BLOCK', &
1504 description="Part of the system (donor, acceptor, bridge,...)", &
1505 n_keywords=2, n_subsections=1, repeats=.true.)
1506 CALL section_add_subsection(section, section_block)
1507
1508 ! S#1 - Keyword #1: Atom IDs defining a Hilbert space block
1509 CALL keyword_create(keyword, __location__, name='ATOMS', &
1510 description="Array of atom IDs in the system part", &
1511 usage="ATOMS {integer} {integer} .. {integer}", &
1512 n_var=-1, type_of_var=integer_t, repeats=.false.)
1513 CALL section_add_keyword(section_block, keyword)
1514 CALL keyword_release(keyword)
1515
1516 ! S#1 - Keyword #1: Atom IDs defining a Hilbert space block
1517 CALL keyword_create(keyword, __location__, name='NELECTRON', &
1518 description="Number of electrons expected in the system part", &
1519 usage="NELECTRON {integer}", default_i_val=0)
1520 CALL section_add_keyword(section_block, keyword)
1521 CALL keyword_release(keyword)
1522
1523 ! S#1 - Subsection #1: Printing setting
1524 CALL section_create(section_print, __location__, name='PRINT', &
1525 description="Possible printing options in ET system part", &
1526 n_keywords=0, n_subsections=0, repeats=.false.)
1527 CALL section_add_subsection(section_block, section_print)
1528
1529 ! S#1 - S#1 - Keyword #1: MO coefficient on specific atom
1530 CALL keyword_create(keyword, __location__, name='MO_COEFF_ATOM', &
1531 description="Print out MO coeffiecients on given atom", &
1532 usage="MO_COEFF_ATOM {integer} {integer} .. {integer}", &
1533 type_of_var=integer_t, n_var=-1, repeats=.true.)
1534 CALL section_add_keyword(section_print, keyword)
1535 CALL keyword_release(keyword)
1536
1537 ! S#1 - S#1 - Keyword #1: MO coefficient of specific state
1538 CALL keyword_create(keyword, __location__, name='MO_COEFF_ATOM_STATE', &
1539 description="Print out MO coeffiecients of specific state", &
1540 usage="MO_COEFF_ATOM_STATE {integer} {integer} .. {integer}", &
1541 type_of_var=integer_t, n_var=-1, repeats=.true.)
1542 CALL section_add_keyword(section_print, keyword)
1543 CALL keyword_release(keyword)
1544
1545 ! S#1 - S#1 - Subsection #1: Saving MOs to CUBE files
1546 CALL cp_print_key_section_create(print_key, __location__, 'MO_CUBES', &
1547 description="Controls saving of MO cube files", &
1548 print_level=high_print_level, filename="")
1549
1550 ! S#1 - S#1 - S#1 - Keyword #1: Stride
1551 CALL keyword_create(keyword, __location__, name='STRIDE', &
1552 description="The stride (X,Y,Z) used to write the cube file", &
1553 usage="STRIDE {integer} {integer} {integer}", n_var=-1, &
1554 default_i_vals=[2, 2, 2], type_of_var=integer_t)
1555 CALL section_add_keyword(print_key, keyword)
1556 CALL keyword_release(keyword)
1557
1558 ! S#1 - S#1 - S#1 - Keyword #2: List of MO IDs
1559 CALL keyword_create(keyword, __location__, name='MO_LIST', &
1560 description="Indices of molecular orbitals to save", &
1561 usage="MO_LIST {integer} {integer} .. {integer}", &
1562 type_of_var=integer_t, n_var=-1, repeats=.true.)
1563 CALL section_add_keyword(print_key, keyword)
1564 CALL keyword_release(keyword)
1565
1566 ! S#1 - S#1 - S#1 - Keyword #2: Number of unoccupied states
1567 CALL keyword_create(keyword, __location__, name='NLUMO', &
1568 description="Number of unoccupied molecular orbitals to save", &
1569 usage="NLUMO {integer}", default_i_val=1)
1570 CALL section_add_keyword(print_key, keyword)
1571 CALL keyword_release(keyword)
1572
1573 ! S#1 - S#1 - S#1 - Keyword #3: Number of occupied states
1574 CALL keyword_create(keyword, __location__, name='NHOMO', &
1575 description="Number of occupied molecular orbitals to save", &
1576 usage="NHOMO {integer}", default_i_val=1)
1577 CALL section_add_keyword(print_key, keyword)
1578 CALL keyword_release(keyword)
1579
1580 CALL section_add_subsection(section_print, print_key)
1581 CALL section_release(print_key)
1582
1583 ! S#1 - S#1 - Clean
1584 CALL section_release(section_print)
1585
1586 ! S#1 - Clean
1587 CALL section_release(section_block)
1588
1589 ! S#1 - Subsection #1: Printing setting
1590 CALL section_create(section_print, __location__, name='PRINT', &
1591 description="Possible printing options in ET", &
1592 n_keywords=0, n_subsections=0, repeats=.false.)
1593 CALL section_add_subsection(section, section_print)
1594
1595 ! Print couplings
1596 CALL cp_print_key_section_create(print_key, __location__, 'COUPLINGS', &
1597 description="Controls printing couplings onto file", &
1598 print_level=low_print_level, filename="")
1599
1600 CALL keyword_create(keyword, __location__, name="APPEND", &
1601 description="append the files when they already exist", &
1602 default_l_val=.false., lone_keyword_l_val=.true.)
1603 CALL section_add_keyword(print_key, keyword)
1604 CALL keyword_release(keyword)
1605
1606 CALL section_add_subsection(section_print, print_key)
1607 CALL section_release(print_key)
1608
1609 CALL section_release(section_print)
1610
1611 END SUBROUTINE create_projection
1612
1613! **************************************************************************************************
1614!> \brief creates an input section for tddfpt calculation
1615!> \param section section to create
1616!> \par History
1617!> * 05.2016 forked from create_tddfpt_section [Sergey Chulkov]
1618!> * 08.2016 moved from module input_cp2k_dft [Sergey Chulkov]
1619! **************************************************************************************************
1620 SUBROUTINE create_tddfpt2_section(section)
1621 TYPE(section_type), POINTER :: section
1622
1623 TYPE(keyword_type), POINTER :: keyword
1624 TYPE(section_type), POINTER :: print_key, subsection
1625
1626 cpassert(.NOT. ASSOCIATED(section))
1627 CALL section_create(section, __location__, name="TDDFPT", &
1628 description="Controls time-dependent density functional perturbation theory "// &
1629 "(TDDFPT) calculations for electronic excitations and related properties.", &
1630 n_keywords=14, n_subsections=4, repeats=.false., &
1632
1633 NULLIFY (keyword, print_key, subsection)
1634
1635 CALL keyword_create(keyword, __location__, &
1636 name="_SECTION_PARAMETERS_", &
1637 description="Activates the TDDFPT procedure.", &
1638 default_l_val=.false., &
1639 lone_keyword_l_val=.true.)
1640 CALL section_add_keyword(section, keyword)
1641 CALL keyword_release(keyword)
1642
1643 ! Integer
1644 CALL keyword_create(keyword, __location__, name="NSTATES", &
1645 description="Number of excited states to converge.", &
1646 n_var=1, type_of_var=integer_t, &
1647 default_i_val=1)
1648 CALL section_add_keyword(section, keyword)
1649 CALL keyword_release(keyword)
1650
1651 CALL keyword_create(keyword, __location__, name="MAX_ITER", &
1652 description="Maximal number of iterations to be performed.", &
1653 n_var=1, type_of_var=integer_t, &
1654 default_i_val=50)
1655 CALL section_add_keyword(section, keyword)
1656 CALL keyword_release(keyword)
1657
1658 CALL keyword_create(keyword, __location__, name="MAX_KV", &
1659 description="Maximal number of Krylov space vectors. "// &
1660 "Davidson iterations will be restarted upon reaching this limit.", &
1661 n_var=1, type_of_var=integer_t, &
1662 default_i_val=5000)
1663 CALL section_add_keyword(section, keyword)
1664 CALL keyword_release(keyword)
1665
1666 CALL keyword_create(keyword, __location__, name="NLUMO", &
1667 description="Number of unoccupied orbitals to consider. "// &
1668 "Default is to use all unoccupied orbitals (-1).", &
1669 n_var=1, type_of_var=integer_t, &
1670 default_i_val=-1)
1671 CALL section_add_keyword(section, keyword)
1672 CALL keyword_release(keyword)
1673
1674 CALL keyword_create(keyword, __location__, name="NPROC_STATE", &
1675 description="Number of MPI processes to be used per excited state. "// &
1676 "Default is to use all MPI processes (0).", &
1677 n_var=1, type_of_var=integer_t, &
1678 default_i_val=0)
1679 CALL section_add_keyword(section, keyword)
1680 CALL keyword_release(keyword)
1681
1682 ! kernel type
1683 CALL keyword_create(keyword, __location__, name="KERNEL", &
1684 description="Options to compute the kernel", &
1685 usage="KERNEL FULL", &
1686 enum_c_vals=s2a("FULL", "sTDA", "NONE"), &
1688 default_i_val=tddfpt_kernel_full)
1689 CALL section_add_keyword(section, keyword)
1690 CALL keyword_release(keyword)
1691
1692 ! spin-flip TDDFPT options
1693 CALL keyword_create(keyword, __location__, name="SPINFLIP", &
1694 description="Selects the type of spin-flip TDDFPT kernel", &
1695 usage="SPINFLIP NONCOLLINEAR", &
1696 enum_c_vals=s2a("NONE", "COLLINEAR", "NONCOLLINEAR"), &
1698 enum_desc=s2a("Only molecular orbital energy differences are considered", &
1699 "MO energy diferences and Fock exchange contributions are "// &
1700 "considered", &
1701 "MO energy differences, Fock exchange and "// &
1702 "Noncollinear local exchange-correlation "// &
1703 "kernel are considered"), &
1704 default_i_val=no_sf_tddfpt, citations=[hernandez2025])
1705 CALL section_add_keyword(section, keyword)
1706 CALL keyword_release(keyword)
1707
1708 CALL keyword_create(keyword, __location__, name="OE_CORR", &
1709 description="Orbital energy correction potential.", &
1710 enum_c_vals=s2a("NONE", "LB94", "GLLB", "SAOP", "SHIFT"), &
1711 enum_i_vals=[oe_none, oe_lb, oe_gllb, oe_saop, oe_shift], &
1712 enum_desc=s2a("No orbital correction scheme is used", &
1713 "van Leeuwen and Baerends. PRA, 49:2421, 1994", &
1714 "Gritsenko, van Leeuwen, van Lenthe, Baerends. PRA, 51:1944, 1995", &
1715 "Gritsenko, Schipper, Baerends. Chem. Phys. Lett., 302:199, 1999", &
1716 "Constant shift of virtual and/or open-shell orbitals"), &
1717 default_i_val=oe_none)
1718 CALL section_add_keyword(section, keyword)
1719 CALL keyword_release(keyword)
1720
1721 ! SHIFTS
1722 CALL keyword_create(keyword, __location__, name="EV_SHIFT", &
1723 variants=s2a("VIRTUAL_SHIFT"), &
1724 description="Constant shift of virtual state eigenvalues.", &
1725 usage="EV_SHIFT 0.500", &
1726 n_var=1, type_of_var=real_t, &
1727 unit_str="eV", &
1728 default_r_val=0.0_dp)
1729 CALL section_add_keyword(section, keyword)
1730 CALL keyword_release(keyword)
1731 !
1732 CALL keyword_create(keyword, __location__, name="EOS_SHIFT", &
1733 variants=s2a("OPEN_SHELL_SHIFT"), &
1734 description="Constant shift of open shell eigenvalues.", &
1735 usage="EOS_SHIFT 0.200", &
1736 n_var=1, type_of_var=real_t, &
1737 unit_str="eV", &
1738 default_r_val=0.0_dp)
1739 CALL section_add_keyword(section, keyword)
1740 CALL keyword_release(keyword)
1741
1742 ! Real
1743 CALL keyword_create(keyword, __location__, name="CONVERGENCE", &
1744 description="Target accuracy for excited state energies.", &
1745 n_var=1, type_of_var=real_t, unit_str="hartree", &
1746 default_r_val=1.0e-5_dp)
1747 CALL section_add_keyword(section, keyword)
1748 CALL keyword_release(keyword)
1749
1750 CALL keyword_create(keyword, __location__, name="MIN_AMPLITUDE", &
1751 description="The smallest excitation amplitude to print.", &
1752 n_var=1, type_of_var=real_t, &
1753 default_r_val=5.0e-2_dp)
1754 CALL section_add_keyword(section, keyword)
1755 CALL keyword_release(keyword)
1756
1757 CALL keyword_create(keyword, __location__, name="ORTHOGONAL_EPS", &
1758 description="The largest possible overlap between the ground state and "// &
1759 "orthogonalised excited state wave-functions. Davidson iterations "// &
1760 "will be restarted when the overlap goes beyond this threshold in "// &
1761 "order to prevent numerical instability.", &
1762 n_var=1, type_of_var=real_t, &
1763 default_r_val=1.0e-4_dp)
1764 CALL section_add_keyword(section, keyword)
1765 CALL keyword_release(keyword)
1766
1767 ! Logical
1768 CALL keyword_create(keyword, __location__, name="RESTART", &
1769 description="Restart the TDDFPT calculation if a restart file exists", &
1770 n_var=1, type_of_var=logical_t, &
1771 default_l_val=.false., lone_keyword_l_val=.true.)
1772 CALL section_add_keyword(section, keyword)
1773 CALL keyword_release(keyword)
1774
1775 CALL keyword_create(keyword, __location__, name="RKS_TRIPLETS", &
1776 description="Compute triplet excited states using spin-unpolarised molecular orbitals.", &
1777 n_var=1, type_of_var=logical_t, &
1778 default_l_val=.false.)
1779 CALL section_add_keyword(section, keyword)
1780 CALL keyword_release(keyword)
1781
1782 CALL keyword_create(keyword, __location__, name="ADMM_KERNEL_XC_CORRECTION", &
1783 description="Use/Ignore ADMM correction xc functional for TD kernel. "// &
1784 "XC correction functional is defined in ground state XC section.", &
1785 n_var=1, type_of_var=logical_t, &
1786 default_l_val=.true., lone_keyword_l_val=.true.)
1787 CALL section_add_keyword(section, keyword)
1788 CALL keyword_release(keyword)
1789
1790 CALL keyword_create(keyword, __location__, name="ADMM_KERNEL_CORRECTION_SYMMETRIC", &
1791 description="ADMM correction functional in kernel is applied symmetrically. "// &
1792 "Original implementation is using a non-symmetric formula.", &
1793 n_var=1, type_of_var=logical_t, &
1794 default_l_val=.true., lone_keyword_l_val=.true.)
1795 CALL section_add_keyword(section, keyword)
1796 CALL keyword_release(keyword)
1797
1798 CALL keyword_create(keyword, __location__, name="DO_LRIGPW", &
1799 description="Local resolution of identity for Coulomb contribution.", &
1800 n_var=1, type_of_var=logical_t, &
1801 default_l_val=.false.)
1802 CALL section_add_keyword(section, keyword)
1803 CALL keyword_release(keyword)
1804
1805 CALL keyword_create(keyword, __location__, name="AUTO_BASIS", &
1806 description="Specify type and size of automatically generated auxiliary "// &
1807 "(RI) basis sets. Exactly two arguments are required for this option. "// &
1808 "The first argument of basis type should be one of the following: "// &
1809 "`P_LRI_AUX`. The second argument of basis size should be one of the "// &
1810 "following: `SMALL`, `MEDIUM`, `LARGE`, or `HUGE`. The default is not "// &
1811 "using any of these basis sets, requested by `AUTO_BASIS X X` (exactly "// &
1812 "as written here).", &
1813 usage="AUTO_BASIS {basis_type} {basis_size}", &
1814 type_of_var=char_t, repeats=.true., n_var=-1, default_c_vals=["X", "X"])
1815 CALL section_add_keyword(section, keyword)
1816 CALL keyword_release(keyword)
1817
1818 CALL keyword_create(keyword, __location__, name="DO_SMEARING", &
1819 description="Implying smeared occupation. ", &
1820 n_var=1, type_of_var=logical_t, &
1821 default_l_val=.false., lone_keyword_l_val=.true.)
1822 CALL section_add_keyword(section, keyword)
1823 CALL keyword_release(keyword)
1824
1825 CALL keyword_create(keyword, __location__, name="EXCITON_DESCRIPTORS", &
1826 description="Compute exciton descriptors. "// &
1827 "Details given in Manual section about Bethe Salpeter equation.", &
1828 n_var=1, type_of_var=logical_t, &
1829 default_l_val=.false.)
1830 CALL section_add_keyword(section, keyword)
1831 CALL keyword_release(keyword)
1832
1833 CALL keyword_create(keyword, __location__, name="DIRECTIONAL_EXCITON_DESCRIPTORS", &
1834 description="Print cartesian components of exciton descriptors.", &
1835 n_var=1, type_of_var=logical_t, &
1836 default_l_val=.false.)
1837 CALL section_add_keyword(section, keyword)
1838 CALL keyword_release(keyword)
1839
1840 ! Strings
1841 CALL keyword_create(keyword, __location__, name="WFN_RESTART_FILE_NAME", &
1842 variants=["RESTART_FILE_NAME"], &
1843 description="Name of the wave function restart file, may include a path."// &
1844 " If no file is specified, the default is to open the file as generated by"// &
1845 " the wave function restart print key.", &
1846 usage="WFN_RESTART_FILE_NAME <FILENAME>", &
1847 type_of_var=lchar_t)
1848 CALL section_add_keyword(section, keyword)
1849 CALL keyword_release(keyword)
1850
1851 ! DIPOLE subsection
1852 CALL section_create(subsection, __location__, name="DIPOLE_MOMENTS", &
1853 description="Parameters to compute oscillator strengths in the dipole approximation.", &
1854 n_keywords=3, n_subsections=0, repeats=.false.)
1855
1856 CALL keyword_create(keyword, __location__, name="DIPOLE_FORM", &
1857 description="Form of dipole transition integrals.", &
1858 enum_c_vals=s2a("BERRY", "LENGTH", "VELOCITY", "VELOCITY_OLD", &
1859 "SCF_MOMENT"), &
1860 enum_desc=s2a("Based on Berry phase formula (valid for fully periodic molecular systems only)", &
1861 "Length form &lang; i | r | j &rang; (valid for non-periodic molecular systems only)", &
1862 "Velocity form &lang; i | d/dr | j &rang;", &
1863 "Old velocity form &lang; i | d/dr | j &rang;", &
1864 "SCF molecular-orbital moment form for k-point TDDFPT"), &
1868 default_i_val=tddfpt_dipole_velocity)
1869 CALL section_add_keyword(subsection, keyword)
1870 CALL keyword_release(keyword)
1871
1872 CALL keyword_create(keyword, __location__, name="REFERENCE", &
1873 description="Reference point to calculate electric "// &
1874 "dipole moments using the dipole integrals in the length form.", &
1875 enum_c_vals=s2a("COM", "COAC", "USER_DEFINED", "ZERO"), &
1876 enum_desc=s2a("Use Center of Mass", &
1877 "Use Center of Atomic Charges", &
1878 "Use User-defined Point", &
1879 "Use Origin of Coordinate System"), &
1880 enum_i_vals=[use_mom_ref_com, &
1884 default_i_val=use_mom_ref_com)
1885 CALL section_add_keyword(subsection, keyword)
1886 CALL keyword_release(keyword)
1887
1888 CALL keyword_create(keyword, __location__, name="REFERENCE_POINT", &
1889 description="User-defined reference point.", &
1890 usage="REFERENCE_POINT x y z", &
1891 repeats=.false., n_var=3, type_of_var=real_t, unit_str='bohr')
1892 CALL section_add_keyword(subsection, keyword)
1893 CALL keyword_release(keyword)
1894
1895 CALL section_add_subsection(section, subsection)
1896 CALL section_release(subsection)
1897
1898 ! SOC functional
1899
1900 CALL section_create(subsection, __location__, name="SOC", &
1901 description="Is jet to be implemented", &
1902 n_keywords=2, n_subsections=0, repeats=.false.)
1903
1904 CALL keyword_create(keyword, __location__, name="EPS_FILTER", &
1905 variants=s2a("EPS_FILTER_MATRIX"), &
1906 description="The threshold used for sparse matrix operations", &
1907 usage="EPS_FILTER {real}", &
1908 type_of_var=real_t, &
1909 default_r_val=1.0e-10_dp)
1910 CALL section_add_keyword(subsection, keyword)
1911 CALL keyword_release(keyword)
1912
1913 CALL keyword_create(keyword, __location__, name="GRID", &
1914 variants=["ATOMIC_GRID"], &
1915 description="Specification of the atomic angular and radial grids for "// &
1916 "a atomic kind. This keyword must be repeated for all kinds! "// &
1917 "Usage: GRID < LEBEDEV_GRID > < RADIAL_GRID >", &
1918 usage="GRID {string} {integer} {integer}", &
1919 n_var=3, type_of_var=char_t, repeats=.true.)
1920 CALL section_add_keyword(subsection, keyword)
1921 CALL keyword_release(keyword)
1922
1923 CALL section_add_subsection(section, subsection)
1924 CALL section_release(subsection)
1925
1926 ! kernel XC functional
1927 CALL create_xc_section(subsection)
1928 CALL section_add_subsection(section, subsection)
1929 CALL section_release(subsection)
1930
1931 ! MGRID subsection
1932 CALL create_mgrid_section(subsection, create_subsections=.false.)
1933 CALL section_add_subsection(section, subsection)
1934 CALL section_release(subsection)
1935
1936 ! sTDA subsection
1937 CALL create_stda_section(subsection)
1938 CALL section_add_subsection(section, subsection)
1939 CALL section_release(subsection)
1940
1941 ! RSE subsection
1942 CALL create_res_section(subsection)
1943 CALL section_add_subsection(section, subsection)
1944 CALL section_release(subsection)
1945
1946 CALL keyword_create(keyword, __location__, name="DO_BSE", &
1947 description="Choosing BSE kernel.", &
1948 usage="DO_BSE", default_l_val=.false., lone_keyword_l_val=.true.)
1949 CALL section_add_keyword(section, keyword)
1950 CALL keyword_release(keyword)
1951
1952 CALL keyword_create(keyword, __location__, name="DO_BSE_W_ONLY", &
1953 description="Debug option for BSE kernel.", &
1954 usage="DO_BSE_W_ONLY", default_l_val=.false., lone_keyword_l_val=.true.)
1955 CALL section_add_keyword(section, keyword)
1956 CALL keyword_release(keyword)
1957
1958 CALL keyword_create(keyword, __location__, name="DO_BSE_GW_ONLY", &
1959 description="Debug option for BSE kernel.", &
1960 usage="DO_BSE_GW_ONLY", default_l_val=.false., lone_keyword_l_val=.true.)
1961 CALL section_add_keyword(section, keyword)
1962 CALL keyword_release(keyword)
1963
1964 ! LRI subsection
1965 CALL create_lrigpw_section(subsection)
1966 CALL section_add_subsection(section, subsection)
1967 CALL section_release(subsection)
1968
1969 ! LINRES section
1970 CALL create_linres_section(subsection, create_subsections=.false., default_set_tdlr=.true.)
1971 CALL section_add_subsection(section, subsection)
1972 CALL section_release(subsection)
1973
1974 ! PRINT subsection
1975 CALL section_create(subsection, __location__, name="PRINT", &
1976 description="Printing of information during the TDDFT run.", repeats=.false.)
1977
1978 CALL cp_print_key_section_create(print_key, __location__, name="PROGRAM_BANNER", &
1979 description="Controls the printing of the banner for TDDFPT program", &
1980 print_level=silent_print_level, filename="__STD_OUT__")
1981 CALL section_add_subsection(subsection, print_key)
1982 CALL section_release(print_key)
1983
1984 CALL cp_print_key_section_create(print_key, __location__, name="GUESS_VECTORS", &
1985 description="Controls the printing of initial guess vectors.", &
1986 print_level=low_print_level, filename="__STD_OUT__")
1987 CALL section_add_subsection(subsection, print_key)
1988 CALL section_release(print_key)
1989
1990 CALL cp_print_key_section_create(print_key, __location__, name="ITERATION_INFO", &
1991 description="Controls the printing of basic iteration information "// &
1992 "during the TDDFT run.", &
1993 print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
1994 CALL section_add_subsection(subsection, print_key)
1995 CALL section_release(print_key)
1996
1997 CALL cp_print_key_section_create(print_key, __location__, name="DETAILED_ENERGY", &
1998 description="Controls the printing of detailed energy information "// &
1999 "during the TDDFT run.", &
2000 print_level=medium_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
2001 CALL section_add_subsection(subsection, print_key)
2002 CALL section_release(print_key)
2003
2004 CALL cp_print_key_section_create(print_key, __location__, name="BASIS_SET_FILE", &
2005 description="Controls the printing of a file with all basis sets used.", &
2006 print_level=debug_print_level, filename="BASIS_SETS")
2007 CALL section_add_subsection(subsection, print_key)
2008 CALL section_release(print_key)
2009
2010 CALL cp_print_key_section_create(print_key, __location__, name="RESTART", &
2011 description="Controls the dumping of the MO restart file during TDDFPT. "// &
2012 "By default keeps a short history of three restarts.", &
2013 print_level=low_print_level, common_iter_levels=3, &
2014 each_iter_names=s2a("TDDFT_SCF"), each_iter_values=[10], &
2015 add_last=add_last_numeric, filename="RESTART")
2016 CALL keyword_create(keyword, __location__, name="BACKUP_COPIES", &
2017 description="Specifies the maximum number of backup copies.", &
2018 usage="BACKUP_COPIES {int}", &
2019 default_i_val=1)
2020 CALL section_add_keyword(print_key, keyword)
2021 CALL keyword_release(keyword)
2022 CALL section_add_subsection(subsection, print_key)
2023 CALL section_release(print_key)
2024
2025 CALL cp_print_key_section_create(print_key, __location__, name="NTO_ANALYSIS", &
2026 description="Perform a natural transition orbital analysis.", &
2027 print_level=medium_print_level)
2028 CALL keyword_create(keyword, __location__, name="THRESHOLD", &
2029 description="Threshold for sum of NTO eigenvalues considered", &
2030 usage="Threshold 0.95", &
2031 n_var=1, &
2032 type_of_var=real_t, &
2033 default_r_val=0.975_dp)
2034 CALL section_add_keyword(print_key, keyword)
2035 CALL keyword_release(keyword)
2036 CALL keyword_create(keyword, __location__, name="INTENSITY_THRESHOLD", &
2037 description="Threshold for oscillator strength to screen states.", &
2038 usage="Intensity_threshold 0.01", &
2039 n_var=1, &
2040 type_of_var=real_t, &
2041 default_r_val=0.0_dp)
2042 CALL section_add_keyword(print_key, keyword)
2043 CALL keyword_release(keyword)
2044 CALL keyword_create(keyword, __location__, name="STATE_LIST", &
2045 description="Specifies a list of states for the NTO calculations.", &
2046 usage="STATE_LIST {integer} {integer} .. {integer}", &
2047 n_var=-1, type_of_var=integer_t)
2048 CALL section_add_keyword(print_key, keyword)
2049 CALL keyword_release(keyword)
2050 CALL keyword_create(keyword, __location__, name="CUBE_FILES", &
2051 description="Print NTOs on Cube Files", &
2052 usage="CUBE_FILES {logical}", repeats=.false., n_var=1, &
2053 default_l_val=.false., lone_keyword_l_val=.true., type_of_var=logical_t)
2054 CALL section_add_keyword(print_key, keyword)
2055 CALL keyword_release(keyword)
2056 CALL keyword_create(keyword, __location__, name="STRIDE", &
2057 description="The stride (X,Y,Z) used to write the cube file "// &
2058 "(larger values result in smaller cube files). Provide 3 numbers (for X,Y,Z) or"// &
2059 " 1 number valid for all components.", &
2060 usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
2061 CALL section_add_keyword(print_key, keyword)
2062 CALL keyword_release(keyword)
2063 CALL keyword_create(keyword, __location__, name="APPEND", &
2064 description="append the cube files when they already exist", &
2065 default_l_val=.false., lone_keyword_l_val=.true.)
2066 CALL section_add_keyword(print_key, keyword)
2067 CALL keyword_release(keyword)
2068 CALL section_add_subsection(subsection, print_key)
2069 CALL section_release(print_key)
2070
2071 CALL cp_print_key_section_create(print_key, __location__, "MOS_MOLDEN", &
2072 description="Write the NTO in Molden file format, for visualisation.", &
2073 print_level=debug_print_level + 1, add_last=add_last_numeric, filename="MOS")
2074 CALL keyword_create(keyword, __location__, name="UNIT", &
2075 description="Unit for coordinates and cell in the MOLDEN file.", &
2076 usage="UNIT ANGSTROM", &
2077 enum_c_vals=s2a("BOHR", "ANGSTROM"), &
2078 enum_desc=s2a("Write in Bohr (AU)", "Write in Angstrom"), &
2079 enum_i_vals=[1, 2], &
2080 default_i_val=1)
2081 CALL section_add_keyword(print_key, keyword)
2082 CALL keyword_release(keyword)
2083 CALL keyword_create(keyword, __location__, name="WRITE_CELL", &
2084 description="Controls whether the [Cell] block is written to the MOLDEN file.", &
2085 usage="WRITE_CELL TRUE", &
2086 default_l_val=.false., lone_keyword_l_val=.true.)
2087 CALL section_add_keyword(print_key, keyword)
2088 CALL keyword_release(keyword)
2089 CALL keyword_create(keyword, __location__, name="WRITE_PSEUDO", &
2090 description="Controls whether the [Pseudo] block is written to the MOLDEN file.", &
2091 usage="WRITE_PSEUDO TRUE", &
2092 default_l_val=.false., lone_keyword_l_val=.true.)
2093 CALL section_add_keyword(print_key, keyword)
2094 CALL keyword_release(keyword)
2095 CALL keyword_create(keyword, __location__, name="MARK_GHOST", &
2096 description="Controls whether ghost atoms are marked in the [Atoms] block by "// &
2097 "setting their atomic number to zero.", &
2098 usage="MARK_GHOST T", &
2099 default_l_val=.false., lone_keyword_l_val=.true.)
2100 CALL section_add_keyword(print_key, keyword)
2101 CALL keyword_release(keyword)
2102 CALL keyword_create(keyword, __location__, name="NDIGITS", &
2103 description="Specifies the number of significant digits retained. 3 is OK for visualization.", &
2104 usage="NDIGITS {int}", &
2105 default_i_val=3)
2106 CALL section_add_keyword(print_key, keyword)
2107 CALL keyword_release(keyword)
2108 CALL keyword_create(keyword, __location__, name="GTO_KIND", &
2109 description="Representation of Gaussian-type orbitals", &
2110 default_i_val=gto_spherical, &
2111 enum_c_vals=s2a("CARTESIAN", "SPHERICAL"), &
2112 enum_desc=s2a( &
2113 "Cartesian Gaussian orbitals. Use with caution", &
2114 "Spherical Gaussian orbitals. Incompatible with VMD"), &
2115 enum_i_vals=[gto_cartesian, gto_spherical])
2116 CALL section_add_keyword(print_key, keyword)
2117 CALL keyword_release(keyword)
2118 CALL section_add_subsection(subsection, print_key)
2119 CALL section_release(print_key)
2120
2121 CALL cp_print_key_section_create(print_key, __location__, name="NAMD_PRINT", &
2122 description="Controls the printout required for NAMD with NEWTONX.", &
2123 print_level=debug_print_level + 1, filename="CP2K_NEWTONX")
2124 CALL keyword_create(keyword, __location__, name="PRINT_VIRTUALS", &
2125 description="Print occupied AND virtual molecular orbital coefficients", &
2126 default_l_val=.false., lone_keyword_l_val=.true.)
2127 CALL section_add_keyword(print_key, keyword)
2128 CALL keyword_release(keyword)
2129 CALL keyword_create(keyword, __location__, name="PRINT_PHASES", &
2130 description="Print phases of occupied and virtuals MOs.", &
2131 default_l_val=.false., lone_keyword_l_val=.true.)
2132 CALL section_add_keyword(print_key, keyword)
2133 CALL keyword_release(keyword)
2134 CALL keyword_create(keyword, __location__, name="SCALE_WITH_PHASES", &
2135 description="Scale ES eigenvectors with phases of occupied and virtuals MOs.", &
2136 default_l_val=.false., lone_keyword_l_val=.true.)
2137 CALL section_add_keyword(print_key, keyword)
2138 CALL keyword_release(keyword)
2139 CALL section_add_subsection(subsection, print_key)
2140 CALL section_release(print_key)
2141
2142 !! SOC PRINT SECTION
2143 CALL cp_print_key_section_create(print_key, __location__, name="SOC_PRINT", &
2144 description="Controls the printout of the tddfpt2_soc modul", &
2145 print_level=debug_print_level + 1, filename="SOC")
2146 CALL keyword_create(keyword, __location__, name="UNIT_eV", &
2147 description="Will detrement if output in eVolt will be printef.", &
2148 default_l_val=.true., lone_keyword_l_val=.true.)
2149 CALL section_add_keyword(print_key, keyword)
2150 CALL keyword_release(keyword)
2151 CALL keyword_create(keyword, __location__, name="UNIT_wn", &
2152 description="Will detrement if output in wavenumbers will be printed.", &
2153 default_l_val=.false., lone_keyword_l_val=.true.)
2154 CALL section_add_keyword(print_key, keyword)
2155 CALL keyword_release(keyword)
2156 CALL keyword_create(keyword, __location__, name="SPLITTING", &
2157 description="Will add the SOC-Splitting as additional output", &
2158 default_l_val=.false., lone_keyword_l_val=.true.)
2159 CALL section_add_keyword(print_key, keyword)
2160 CALL keyword_release(keyword)
2161 CALL keyword_create(keyword, __location__, name="SOME", &
2162 description="Will add the SOC-Matrix as additional output in a different file", &
2163 default_l_val=.false., lone_keyword_l_val=.true.)
2164 CALL section_add_keyword(print_key, keyword)
2165 CALL keyword_release(keyword)
2166 CALL section_add_subsection(subsection, print_key)
2167 CALL section_release(print_key)
2168
2169 CALL cp_print_key_section_create(print_key, __location__, name="FORCES", &
2170 description="Controls the calculation and printing of excited state forces. "// &
2171 "This needs a RUN_TYPE that includes force evaluation, e.g. ENERGY_FORCE", &
2172 print_level=debug_print_level, filename="TDFORCE")
2173 CALL keyword_create(keyword, __location__, name="LIST", &
2174 description="Specifies a list of states for the force calculations.", &
2175 usage="LIST {integer} {integer} .. {integer}", repeats=.true., &
2176 n_var=-1, type_of_var=integer_t)
2177 CALL section_add_keyword(print_key, keyword)
2178 CALL keyword_release(keyword)
2179 CALL keyword_create(keyword, __location__, name="THRESHOLD", &
2180 description="Threshold for oszillator strength to screen states.", &
2181 usage="Threshold 0.01", &
2182 n_var=1, &
2183 type_of_var=real_t, &
2184 default_r_val=0.0_dp)
2185 CALL section_add_keyword(print_key, keyword)
2186 CALL keyword_release(keyword)
2187 CALL section_add_subsection(subsection, print_key)
2188 CALL section_release(print_key)
2189
2190 CALL section_add_subsection(section, subsection)
2191 CALL section_release(subsection)
2192
2193 END SUBROUTINE create_tddfpt2_section
2194
2195! **************************************************************************************************
2196!> \brief creates the stda input section (simplified Tamm Dancoff Approximation)
2197!> \param section the section to create
2198! **************************************************************************************************
2199 SUBROUTINE create_stda_section(section)
2200 TYPE(section_type), POINTER :: section
2201
2202 TYPE(keyword_type), POINTER :: keyword
2203
2204 cpassert(.NOT. ASSOCIATED(section))
2205 CALL section_create(section, __location__, name="sTDA", &
2206 description="parameters needed and setup for sTDA calculations", &
2207 n_keywords=3, n_subsections=0, repeats=.false.)
2208 NULLIFY (keyword)
2209
2210 CALL keyword_create(keyword, __location__, name="FRACTION", &
2211 variants=["HFX_FRACTION"], &
2212 description="The fraction of TB Hartree-Fock exchange to use in the Kernel. "// &
2213 "0.0 implies no HFX part is used in the kernel. ", &
2214 usage="FRACTION 0.0", default_r_val=0.0_dp)
2215 CALL section_add_keyword(section, keyword)
2216 CALL keyword_release(keyword)
2217
2218 ! even if scaling parameter for exchange FRACTION (see above) is zero, the semi-empirical electron repulsion
2219 ! operator for exchange is not, so that a keyword is required to switch off sTDA exchange (if wanted)
2220 CALL keyword_create(keyword, __location__, name="DO_EXCHANGE", &
2221 description="Explicitly including or switching off sTDA exchange", &
2222 usage="DO_EXCHANGE", default_l_val=.true., lone_keyword_l_val=.true.)
2223 CALL section_add_keyword(section, keyword)
2224 CALL keyword_release(keyword)
2225
2226 CALL keyword_create(keyword, __location__, name="DO_EWALD", &
2227 description="Use Ewald type method for Coulomb interaction", &
2228 usage="DO_EWALD", default_l_val=.false., lone_keyword_l_val=.true.)
2229 CALL section_add_keyword(section, keyword)
2230 CALL keyword_release(keyword)
2231
2232 CALL keyword_create(keyword, __location__, name="EPS_TD_FILTER", &
2233 description="Threshold for filtering the transition density matrix", &
2234 usage="EPS_TD_FILTER epsf", default_r_val=1.e-10_dp)
2235 CALL section_add_keyword(section, keyword)
2236 CALL keyword_release(keyword)
2237
2238 CALL keyword_create(keyword, __location__, name="MATAGA_NISHIMOTO_CEXP", &
2239 description="Exponent used in Mataga-Nishimoto formula for Coulomb (alpha). "// &
2240 "Default value is method dependent!", &
2241 usage="MATAGA_NISHIMOTO_CEXP cexp", default_r_val=-99.0_dp)
2242 CALL section_add_keyword(section, keyword)
2243 CALL keyword_release(keyword)
2244
2245 CALL keyword_create(keyword, __location__, name="MATAGA_NISHIMOTO_XEXP", &
2246 description="Exponent used in Mataga-Nishimoto formula for Exchange (beta). "// &
2247 "Default value is method dependent!", &
2248 usage="MATAGA_NISHIMOTO_XEXP xexp", default_r_val=-99.0_dp)
2249 CALL section_add_keyword(section, keyword)
2250 CALL keyword_release(keyword)
2251
2252 CALL keyword_create(keyword, __location__, name="COULOMB_SR_CUT", &
2253 description="Maximum range of short range part of Coulomb interaction.", &
2254 usage="COULOMB_SR_CUT rcut", default_r_val=20.0_dp)
2255 CALL section_add_keyword(section, keyword)
2256 CALL keyword_release(keyword)
2257
2258 CALL keyword_create(keyword, __location__, name="COULOMB_SR_EPS", &
2259 description="Threshold for short range part of Coulomb interaction.", &
2260 usage="COULOMB_SR_EPS sreps", default_r_val=1.e-03_dp)
2261 CALL section_add_keyword(section, keyword)
2262 CALL keyword_release(keyword)
2263
2264 END SUBROUTINE create_stda_section
2265
2266! **************************************************************************************************
2267!> \brief creates the RES input section (Reduced Excitation Space)
2268!> \param section the section to create
2269! **************************************************************************************************
2270 SUBROUTINE create_res_section(section)
2271 TYPE(section_type), POINTER :: section
2272
2273 TYPE(keyword_type), POINTER :: keyword
2274
2275 cpassert(.NOT. ASSOCIATED(section))
2276 CALL section_create(section, __location__, name="REDUCED_EXCITATION_SPACE", &
2277 description="Sets up a restricted (reduced) excitation space for TDDFT", &
2278 n_keywords=3, n_subsections=0, repeats=.false.)
2279
2280 NULLIFY (keyword)
2281 CALL keyword_create(keyword, __location__, &
2282 name="_SECTION_PARAMETERS_", &
2283 description="Controls the activation of RES calculation.", &
2284 default_l_val=.false., &
2285 lone_keyword_l_val=.true.)
2286 CALL section_add_keyword(section, keyword)
2287 CALL keyword_release(keyword)
2288
2289 CALL keyword_create(keyword, __location__, name="ENERGY_WINDOW", &
2290 description="Upper and lower cutoffs [eV] for orbitals to be included for excitations. ", &
2291 usage="ENERGY_WINDOW -5.0 0.0", default_r_vals=[-1.0e10_dp, 1.0e10_dp], &
2292 type_of_var=real_t, unit_str="eV")
2293 CALL section_add_keyword(section, keyword)
2294 CALL keyword_release(keyword)
2295
2296 CALL keyword_create(keyword, __location__, name="UPPER_ENERGY_CUTOFF", &
2297 description="Upper energy cutoff [eV] for orbitals to be included in excitations.", &
2298 usage="UPPER_ENERGY_CUTOFF -5.0", default_r_val=1.0e10_dp, &
2299 type_of_var=real_t, unit_str="eV")
2300 CALL section_add_keyword(section, keyword)
2301 CALL keyword_release(keyword)
2302
2303 CALL keyword_create(keyword, __location__, name="LOWER_ENERGY_CUTOFF", &
2304 description="Lower energy cutoff [eV] for orbitals to be included in excitations.", &
2305 usage="LOWER_ENERGY_CUTOFF -5.0", default_r_val=-1.0e10_dp, &
2306 type_of_var=real_t, unit_str="eV")
2307 CALL section_add_keyword(section, keyword)
2308 CALL keyword_release(keyword)
2309
2310 CALL keyword_create(keyword, __location__, name="MOLECULE_LIST", &
2311 description="Indices of molecules to be excited. "// &
2312 "This implies the calculation of molecular states through orbital location "// &
2313 "and subspace diagonalization.", &
2314 usage="MOLECULE_LIST {integer} {integer} .. {integer} ", &
2315 n_var=-1, type_of_var=integer_t, repeats=.false.)
2316 CALL section_add_keyword(section, keyword)
2317 CALL keyword_release(keyword)
2318
2319 END SUBROUTINE create_res_section
2320
2321! **************************************************************************************************
2322!> \brief creates an input section for electronic band structure calculations
2323!> \param section section to create
2324!> \par History
2325!> * 07.2023 created [Jan Wilhelm]
2326! **************************************************************************************************
2327 SUBROUTINE create_bandstructure_section(section)
2328 TYPE(section_type), POINTER :: section
2329
2330 TYPE(keyword_type), POINTER :: keyword
2331 TYPE(section_type), POINTER :: subsection
2332
2333 cpassert(.NOT. ASSOCIATED(section))
2334 CALL section_create(section, __location__, name="BANDSTRUCTURE", &
2335 description="Parameters needed to set up a calculation for "// &
2336 "electronic level energies of molecules and the electronic band "// &
2337 "structure of materials from post-SCF schemes (GW, perturbative "// &
2338 "spin-orbit coupling). Also, the density of states (DOS), "// &
2339 "projected density of states (PDOS), local density of states (LDOS), "// &
2340 "local valence band maximum (LVBM), local conduction band minimum "// &
2341 "(LCBM) and local band gap can be calculated. Please note that "// &
2342 "all methods in this section start from a Gamma-only DFT SCF. "// &
2343 "You need to make sure that the cell chosen in the DFT SCF is "// &
2344 "converged in the cell size. Band structures are computed "// &
2345 "for the primitive cell (i.e. the smallest possible unit cell of "// &
2346 "the input structure which is detected automatically). Moreover, "// &
2347 "spin-orbit coupling (SOC) on eigenvalues and band structures is "// &
2348 "available using Hartwigsen-Goedecker-Hutter "// &
2349 "pseudopotentials.", &
2350 n_keywords=1, n_subsections=1, repeats=.false.)
2351
2352 NULLIFY (keyword, subsection)
2353 CALL keyword_create(keyword, __location__, &
2354 name="_SECTION_PARAMETERS_", &
2355 description="Controls the activation of the band structure calculation.", &
2356 default_l_val=.false., &
2357 lone_keyword_l_val=.true.)
2358 CALL section_add_keyword(section, keyword)
2359 CALL keyword_release(keyword)
2360
2361 ! here we generate a subsection for getting a k-point path for the bandstructure
2362 CALL create_kpoint_set_section(subsection, "BANDSTRUCTURE_PATH")
2363 CALL section_add_subsection(section, subsection)
2364 CALL section_release(subsection)
2365
2366 CALL create_gw_section(subsection)
2367 CALL section_add_subsection(section, subsection)
2368 CALL section_release(subsection)
2369
2370 CALL create_soc_section(subsection)
2371 CALL section_add_subsection(section, subsection)
2372 CALL section_release(subsection)
2373
2374 CALL create_dos_section(subsection)
2375 CALL section_add_subsection(section, subsection)
2376 CALL section_release(subsection)
2377
2378 CALL create_floquet_section(subsection)
2379 CALL section_add_subsection(section, subsection)
2380 CALL section_release(subsection)
2381
2382 END SUBROUTINE create_bandstructure_section
2383
2384! **************************************************************************************************
2385!> \brief creates an input section for a GW calculation for the electronic band structure
2386!> \param section section to create
2387!> \par History
2388!> * 07.2023 created [Jan Wilhelm]
2389! **************************************************************************************************
2390 SUBROUTINE create_gw_section(section)
2391 TYPE(section_type), POINTER :: section
2392
2393 TYPE(keyword_type), POINTER :: keyword
2394 TYPE(section_type), POINTER :: print_key, subsection
2395
2396 cpassert(.NOT. ASSOCIATED(section))
2397 CALL section_create(section, __location__, name="GW", &
2398 description="Parameters needed to set up a GW calculation for "// &
2399 "electronic level energies $\varepsilon_{n\mathbf{k}}^{G_0W_0}$ "// &
2400 "of molecules and the band structure of materials: "// &
2401 "$\varepsilon_{n\mathbf{k}}^{G_0W_0}= "// &
2402 "\varepsilon_{n\mathbf{k}}^\text{DFT}+\Sigma_{n\mathbf{k}} "// &
2403 "-v^\text{xc}_{n\mathbf{k}}$. "// &
2404 "For the GW algorithm for molecules, see "// &
2405 "<https://doi.org/10.1021/acs.jctc.0c01282>. "// &
2406 "For 2D materials, see <https://doi.org/10.1021/acs.jctc.3c01230>.", &
2407 n_keywords=1, n_subsections=1, repeats=.false.)
2408
2409 NULLIFY (keyword)
2410 CALL keyword_create(keyword, __location__, &
2411 name="_SECTION_PARAMETERS_", &
2412 description="Controls the activation of the GW calculation.", &
2413 default_l_val=.false., &
2414 lone_keyword_l_val=.true.)
2415 CALL section_add_keyword(section, keyword)
2416 CALL keyword_release(keyword)
2417
2418 CALL keyword_create(keyword, __location__, name="NUM_TIME_FREQ_POINTS", &
2419 description="Number of discrete points for the imaginary-time "// &
2420 "grid and the imaginary-frequency grid. The more points, the more "// &
2421 "precise is the calculation. Typically, 10 points are good "// &
2422 "for 0.1 eV precision of band structures and molecular energy "// &
2423 "levels, 20 points for 0.03 eV precision, "// &
2424 "and 30 points for 0.01 eV precision, see Table I in "// &
2425 "<https://doi.org/10.1021/acs.jctc.0c01282>. GW computation time "// &
2426 "increases linearly with `NUM_TIME_FREQ_POINTS`.", &
2427 usage="NUM_TIME_FREQ_POINTS 30", &
2428 default_i_val=30)
2429 CALL section_add_keyword(section, keyword)
2430 CALL keyword_release(keyword)
2431
2432 CALL keyword_create(keyword, __location__, name="EPS_FILTER", &
2433 description="Determines a threshold for the DBCSR based sparse "// &
2434 "multiplications. Normally, `EPS_FILTER` determines accuracy "// &
2435 "and timing of low-scaling GW calculations. (Lower filter means "// &
2436 "higher numerical precision, but higher computational cost.)", &
2437 usage="EPS_FILTER 1.0E-6", &
2438 default_r_val=1.0e-8_dp)
2439 CALL section_add_keyword(section, keyword)
2440 CALL keyword_release(keyword)
2441
2442 CALL keyword_create(keyword, __location__, name="REGULARIZATION_MINIMAX", &
2443 description="Parameter to regularize the Fourier transformation with minimax grids. "// &
2444 "In case the parameter 0.0 is chosen, no regularization is performed.", &
2445 usage="REGULARIZATION_MINIMAX 1.0E-4", &
2446 default_r_val=-1.0_dp)
2447 CALL section_add_keyword(section, keyword)
2448 CALL keyword_release(keyword)
2449
2450 CALL keyword_create(keyword, __location__, name="REGULARIZATION_RI", &
2451 description="Parameter for RI regularization, setting a negative "// &
2452 "value triggers the default value. Affects RI basis set convergence "// &
2453 "but in any case large RI basis will give RI basis set convergence.", &
2454 usage="REGULARIZATION_RI 1.0E-4", &
2455 default_r_val=-1.0_dp)
2456 CALL section_add_keyword(section, keyword)
2457 CALL keyword_release(keyword)
2458
2459 CALL keyword_create(keyword, __location__, name="CUTOFF_RADIUS_RI", &
2460 description="The cutoff radius (in Angstrom) for the truncated "// &
2461 "Coulomb operator. The larger the cutoff radius, the faster "// &
2462 "converges the resolution of the identity (RI) with respect to the "// &
2463 "RI basis set size. Larger cutoff radius means higher computational "// &
2464 "cost.", &
2465 usage="CUTOFF_RADIUS_RI 3.0", &
2466 default_r_val=cp_unit_to_cp2k(value=3.0_dp, unit_str="angstrom"), &
2467 type_of_var=real_t, unit_str="angstrom")
2468 CALL section_add_keyword(section, keyword)
2469 CALL keyword_release(keyword)
2470
2471 CALL keyword_create(keyword, __location__, name="MEMORY_PER_PROC", &
2472 description="Specify the available memory per MPI process. Set "// &
2473 "`MEMORY_PER_PROC` as accurately as possible for good performance. If "// &
2474 "`MEMORY_PER_PROC` is set lower as the actually available "// &
2475 "memory per MPI process, the performance will be "// &
2476 "bad; if `MEMORY_PER_PROC` is set higher as the actually "// &
2477 "available memory per MPI process, the program might run out of "// &
2478 "memory. You can calculate `MEMORY_PER_PROC` as follows: "// &
2479 "Get the memory per node on your machine, mem_per_node "// &
2480 "(for example, from a supercomputer website, typically between "// &
2481 "100 GB and 2 TB), get the number of "// &
2482 "MPI processes per node, n_MPI_proc_per_node"// &
2483 " (for example from your run-script; if you "// &
2484 "use slurm, the number behind '--ntasks-per-node' is the number "// &
2485 "of MPI processes per node). Then calculate "// &
2486 "`MEMORY_PER_PROC` = mem_per_node / n_MPI_proc_per_node "// &
2487 "(typically between 2 GB and 50 GB). Unit of keyword: Gigabyte (GB). "// &
2488 "Note: This keyword is not used for GW calculations with RI-RS, "// &
2489 "where the available memory is detected automatically.", &
2490 usage="MEMORY_PER_PROC 16", &
2491 default_r_val=2.0_dp)
2492 CALL section_add_keyword(section, keyword)
2493 CALL keyword_release(keyword)
2494
2495 CALL keyword_create(keyword, __location__, name="APPROX_KP_EXTRAPOL", &
2496 description="If true, use only a 4x4 kpoint mesh for frequency "// &
2497 "points $\omega_j, j \ge 2$ (instead of a 4x4 and 6x6 k-point mesh). "// &
2498 "The k-point extrapolation of $W_{PQ}(i\omega_j,\mathbf{q})$ "// &
2499 "is done approximately from $W_{PQ}(i\omega_1,\mathbf{q})$.", &
2500 usage="APPROX_KP_EXTRAPOL", &
2501 default_l_val=.false., lone_keyword_l_val=.true.)
2502 CALL section_add_keyword(section, keyword)
2503 CALL keyword_release(keyword)
2504
2505 CALL keyword_create(keyword, __location__, name="SIZE_LATTICE_SUM", &
2506 description="Parameter determines how many neighbor cells $\mathbf{R}$ "// &
2507 "are used for computing "// &
2508 "$V_{PQ}(\mathbf{k}) = "// &
2509 "\sum_{\mathbf{R}} e^{i\mathbf{k}\cdot\mathbf{R}}\,\langle P, "// &
2510 "\text{cell}{=}\mathbf{0}|1/r|Q,\text{cell}{=}\mathbf{R}\rangle$. "// &
2511 "Normally, parameter does not need to be touched.", &
2512 usage="SIZE_LATTICE_SUM 4", &
2513 default_i_val=3)
2514 CALL section_add_keyword(section, keyword)
2515 CALL keyword_release(keyword)
2516
2517 CALL keyword_create( &
2518 keyword, __location__, name="KPOINTS_W", &
2519 description="Monkhorst-Pack k-point mesh of size N_x, N_y, N_z for calculating "// &
2520 "$W_{PQ}^\mathbf{R}=\int_\text{BZ}\frac{d\mathbf{k}}{\Omega_\text{BZ}}\, "// &
2521 "e^{-i\mathbf{k}\cdot\mathbf{R}}\,W_{PQ}(\mathbf{k})$. "// &
2522 αα"For non-periodic directions , choose N_ = 1. "// &
2523 "Automatic choice of the k-point mesh for negative "// &
2524 "values, i.e. KPOINTS_W -1 -1 -1. "// &
2525 "K-point extrapolation of W is automatically switched on.", &
2526 usage="KPOINTS_W N_x N_y N_z", &
2527 n_var=3, type_of_var=integer_t, default_i_vals=[-1, -1, -1])
2528 CALL section_add_keyword(section, keyword)
2529 CALL keyword_release(keyword)
2530
2531 CALL keyword_create(keyword, __location__, name="HEDIN_SHIFT", &
2532 description="If true, use Hedin's shift in G0W0, evGW and evGW0. "// &
2533 "Details see in Li et al. JCTC 18, 7570 "// &
2534 "(2022), Figure 1. G0W0 with Hedin's shift should give "// &
2535 "similar GW eigenvalues as evGW0; at a lower "// &
2536 "computational cost.", &
2537 usage="HEDIN_SHIFT", &
2538 default_l_val=.false., &
2539 lone_keyword_l_val=.true.)
2540 CALL section_add_keyword(section, keyword)
2541 CALL keyword_release(keyword)
2542
2543 CALL keyword_create(keyword, __location__, name="FREQ_MAX_FIT", &
2544 description=Σω"For analytic continuation, a fit on (i) is performed. "// &
2545 Σω"This fit is then evaluated at a real frequency, (), which is used "// &
2546 "in the quasiparticle equation "// &
2547 "$\varepsilon_{n\mathbf{k}}^{G_0W_0}= "// &
2548 "\varepsilon_{n\mathbf{k}}^\text{DFT}+\Sigma_{n\mathbf{k}} "// &
2549 "-v^\text{xc}_{n\mathbf{k}}$. The keyword FREQ_MAX_FIT "// &
2550 Σω"determines fitting range for the self-energy (i) on "// &
2551 ωω"imaginary axis: i*[0, _max] for empty orbitals/bands, i*[-_max,0] "// &
2552 ω"for occ orbitals. A smaller _max might lead to better numerical "// &
2553 "stability (i.e., if you observe clearly wrong GW eigenvalues/bands "// &
2554 ω"around HOMO/LUMO, decreasing _max might fix this issue). "// &
2555 ω"A small benchmark of _max is contained in Fig. 5 of "// &
2556 "J. Wilhelm et al., JCTC 12, 3623-3635 (2016). "// &
2557 ω"Note that we used _max = 1 Ha = 27.211 eV in the benchmark "// &
2558 "M. Azizi et al., PRB 109, 245101 (2024).", &
2559 unit_str="eV", &
2560 usage="FREQ_MAX_FIT 20.0", &
2561 default_r_val=cp_unit_to_cp2k(value=10.0_dp, unit_str="eV"))
2562 CALL section_add_keyword(section, keyword)
2563 CALL keyword_release(keyword)
2564
2565 NULLIFY (subsection, print_key)
2566 CALL section_create(subsection, __location__, name="PRINT", &
2567 description="Printing of GW restarts.", &
2568 n_keywords=2, n_subsections=1, repeats=.false.)
2569 CALL cp_print_key_section_create(print_key, __location__, "RESTART", &
2570 description="Controls the printing of restart files "// &
2571 χΣ"for , W, .", &
2572 filename="", print_level=low_print_level, &
2573 common_iter_levels=3)
2574 CALL section_add_subsection(subsection, print_key)
2575 CALL section_release(print_key)
2576
2577 CALL keyword_create(keyword, __location__, name="PRINT_DBT_CONTRACT", &
2578 description="Prints information of contraction routines.", &
2579 usage="PRINT_DBT_CONTRACT", &
2580 default_l_val=.false., &
2581 lone_keyword_l_val=.true.)
2582 CALL section_add_keyword(subsection, keyword)
2583 CALL keyword_release(keyword)
2584
2585 CALL keyword_create(keyword, __location__, name="PRINT_DBT_CONTRACT_VERBOSE", &
2586 description="Prints verbose information of contraction routines.", &
2587 usage="PRINT_DBT_CONTRACT_VERBOSE", &
2588 default_l_val=.false., &
2589 lone_keyword_l_val=.true.)
2590 CALL section_add_keyword(subsection, keyword)
2591 CALL keyword_release(keyword)
2592
2593 CALL keyword_create(keyword, __location__, name="RI_RS", &
2594 description="Real-Space Resolution of Identity (RI-RS) method. This "// &
2595 "approximation replaces the conventional 3-center RI integrals "// &
2596 "$(\mu\nu|P)$ by a factorized representation on an atom-centered "// &
2597 "real-space grid ${\mathbf{r}_\ell\}$: "// &
2598 "$(\mu\nu|P) \approx \sum_\ell \varphi_\mu(\mathbf{r}_\ell) "// &
2599 "\varphi_\nu(\mathbf{r}_\ell) Z_{\ell P}$. "// &
2600 "The coefficients $Z_{\ell P}$ combine the numerical integration "// &
2601 "weights and the Coulomb potential of the auxiliary basis function "// &
2602 "$P$ evaluated at grid point $\mathbf{r}_\ell$. To reduce the "// &
2603 "computational cost, only grid points within the sphere $B^P$ are "// &
2604 "included, where "// &
2605 "$B^P = \{\mathbf{r} : |\mathbf{r} - \mathbf{R}_P| < R_c + r_P\}$. "// &
2606 "Here, $r_P$ is the effective radius of the most diffuse RI "// &
2607 "auxiliary Gaussian on atom $P$, at which the basis function "// &
2608 "magnitude falls below a threshold $\delta$ "// &
2609 "(currently controlled through EPS_FILTER). "// &
2610 "This locality approximation yields a sparse representation of the "// &
2611 "3-center integrals and enables reduced computational cost. "// &
2612 "See details in https://doi.org/10.1063/1.5090605.", &
2613 usage="RI_RS", &
2614 default_l_val=.false., &
2615 lone_keyword_l_val=.true.)
2616 CALL section_add_keyword(section, keyword)
2617 CALL keyword_release(keyword)
2618
2619 CALL keyword_create(keyword, __location__, name="TIKHONOV", &
2620 description="Regularization parameter $\alpha$ used to stabilize "// &
2621 "the inversion of the grid-overlap matrix "// &
2622 "$D$ in the RI-RS method. "// &
2623 "See Equation (9) in https://doi.org/10.1063/1.5090605.", &
2624 usage="TIKHONOV 1.0E-8", &
2625 default_r_val=1.0e-08_dp)
2626 CALL section_add_keyword(section, keyword)
2627 CALL keyword_release(keyword)
2628
2629 CALL keyword_create(keyword, __location__, name="GRID_SELECT", &
2630 description="Selection of the atom-centered grid type used "// &
2631 "in RI-RS optimized by Duchemin and Blase. "// &
2632 "(1) def2-TZVPP: Available for elements up to the fourth row "// &
2633 "of the periodic table (see https://doi.org/10.1021/acs.jctc.1c00101). "// &
2634 "(2) cc-pVTZ: Available for H, C, N, and O atoms "// &
2635 "(see https://doi.org/10.1063/1.5090605). "// &
2636 "(3) User-provided grids: per-element grid files supplied by the "// &
2637 "user, read as ri_rs_grid/<Element><suffix> in the same format as "// &
2638 "the built-in sets; the suffix is _rirs.ion by default and can be "// &
2639 "changed with GRID_FILE_SUFFIX.", &
2640 usage="GRID_SELECT 1", &
2641 default_i_val=1)
2642 CALL section_add_keyword(section, keyword)
2643 CALL keyword_release(keyword)
2644
2645 CALL keyword_create(keyword, __location__, name="GRID_FILE_SUFFIX", &
2646 description="Overrides the per-element grid file suffix used by "// &
2647 "GRID_SELECT 3; grid files are read as ri_rs_grid/<Element><suffix>.", &
2648 usage="GRID_FILE_SUFFIX _my-grids.ion", &
2649 default_lc_val="")
2650 CALL section_add_keyword(section, keyword)
2651 CALL keyword_release(keyword)
2652
2653 CALL keyword_create(keyword, __location__, name="CUTOFF_RADIUS_RL_RI", &
2654 description="Real-space cutoff radius (in Angstrom) for evaluating "// &
2655 "the RI-RS integration domain $B^P$. Overrides the default "// &
2656 "$R_c + r_P$, where $R_c$ is the truncated-Coulomb cutoff of the "// &
2657 "RI metric and $r_P$ the radius of the most diffuse RI auxiliary "// &
2658 "Gaussian on atom $P$.", &
2659 usage="CUTOFF_RADIUS_RL_RI 15.0", &
2660 default_r_val=cp_unit_to_cp2k(value=-1.0_dp, unit_str="angstrom"), &
2661 type_of_var=real_t, unit_str="angstrom")
2662 CALL section_add_keyword(section, keyword)
2663 CALL keyword_release(keyword)
2664
2665 CALL keyword_create(keyword, __location__, name="CUTOFF_RADIUS_RL_AO", &
2666 description="Real-space cutoff radius (in Angstrom) for evaluating "// &
2667 "the AO basis functions on the RI-RS grid. Override the default radius "// &
2668 "derived automatically from the most diffuse AO Gaussian on each atom. ", &
2669 usage="CUTOFF_RADIUS_RL_AO 8.0", &
2670 default_r_val=cp_unit_to_cp2k(value=-1.0_dp, unit_str="angstrom"), &
2671 type_of_var=real_t, unit_str="angstrom")
2672 CALL section_add_keyword(section, keyword)
2673 CALL keyword_release(keyword)
2674
2675 CALL keyword_create(keyword, __location__, name="N_PROCS_PER_ATOM_Z_LP", &
2676 description="Number of MPI ranks that cooperate on one atom's "// &
2677 "Cholesky factorisation in computation of $Z_{\ell P}$ in RI-RS. "// &
2678 "Default -1 = AUTO: "// &
2679 "each atom is solved single-rank (fast BLAS) unless its dense "// &
2680 "grid-overlap matrix would exceed the available memory per process, "// &
2681 "in which case it is distributed across a rank subgroup sized "// &
2682 "automatically (ScaLAPACK). Set to 1 to force single-rank for all "// &
2683 "atoms, or > 1 to force that fixed subgroup size for all atoms.", &
2684 usage="N_PROCS_PER_ATOM_Z_LP 2", &
2685 default_i_val=-1)
2686 CALL section_add_keyword(section, keyword)
2687 CALL keyword_release(keyword)
2688
2689 CALL keyword_create(keyword, __location__, name="N_PANELS", &
2690 description="Number of grid panels (batches) the real-space grid is "// &
2691 "split into for the streaming chi/W/Sigma contractions in RI-RS. More "// &
2692 "panels means lower peak memory per step but more overhead. Default 1 = a "// &
2693 "single whole-grid panel. On large cells the number of panels is "// &
2694 "automatically increased beyond the request to keep per-rank DBCSR "// &
2695 "messages under the 32-bit length limit.", &
2696 usage="N_PANELS 4", &
2697 default_i_val=1)
2698 CALL section_add_keyword(section, keyword)
2699 CALL keyword_release(keyword)
2700
2701 CALL keyword_create(keyword, __location__, name="KEEP_SPARSITY_RL", &
2702 description="If `.TRUE.` (default), the W/V matrices in the "// &
2703 "grid-basis contractions of RI-RSwill used the sparsity pattern of the "// &
2704 "corresponding G/D matrices. "// &
2705 "Set `.FALSE.` to build W/V fully dense.", &
2706 usage="KEEP_SPARSITY_RL .FALSE.", &
2707 default_l_val=.true.)
2708 CALL section_add_keyword(section, keyword)
2709 CALL keyword_release(keyword)
2710
2711 CALL keyword_create(keyword, __location__, name="CUTOFF_RADIUS_RL_W", &
2712 description="Real-space truncation radius (Angstrom) for the grid-basis "// &
2713 "G operators in the RI-RS GW self-energy. "// &
2714 "Default -1.0 disables the truncation (exact grid-basis operators).", &
2715 usage="CUTOFF_RADIUS_RL_W 20.0", &
2716 default_r_val=cp_unit_to_cp2k(value=-1.0_dp, unit_str="angstrom"), &
2717 type_of_var=real_t, unit_str="angstrom")
2718 CALL section_add_keyword(section, keyword)
2719 CALL keyword_release(keyword)
2720
2721 CALL keyword_create(keyword, __location__, name="CUTOFF_RADIUS_G_W", &
2722 description="Atom-pair distance truncation radius (Angstrom) applied to "// &
2723 "the AO/RI-space operator matrices G, D, V and W themselves in the RI-RS "// &
2724 "GW contractions: matrix blocks between atoms further apart than this "// &
2725 "radius are dropped. Physically consistent with CUTOFF_RADIUS_RL_W, "// &
2726 "which truncates the grid-basis products at the same kind of range. "// &
2727 "Default -1.0 disables the truncation (exact operators).", &
2728 usage="CUTOFF_RADIUS_G_W 20.0", &
2729 default_r_val=cp_unit_to_cp2k(value=-1.0_dp, unit_str="angstrom"), &
2730 type_of_var=real_t, unit_str="angstrom")
2731 CALL section_add_keyword(section, keyword)
2732 CALL keyword_release(keyword)
2733
2734 CALL section_add_subsection(section, subsection)
2735 CALL section_release(subsection)
2736
2737 END SUBROUTINE create_gw_section
2738
2739! **************************************************************************************************
2740!> \brief creates an input section for calculation SOC for the electronic band structure
2741!> \param section section to create
2742!> \par History
2743!> * 09.2023 created [Jan Wilhelm]
2744! **************************************************************************************************
2745 SUBROUTINE create_soc_section(section)
2746 TYPE(section_type), POINTER :: section
2747
2748 TYPE(keyword_type), POINTER :: keyword
2749
2750 cpassert(.NOT. ASSOCIATED(section))
2751 CALL section_create(section, __location__, name="SOC", &
2752 description="Switch on or off spin-orbit coupling. Use SOC "// &
2753 "parameters from non-local pseudopotentials as given in "// &
2754 "Hartwigsen, Goedecker, Hutter, Eq.(18), (19), "// &
2755 "<https://doi.org/10.1103/PhysRevB.58.3641>, "// &
2756 "$V_{\mu\nu}^{\mathrm{SOC}, (\alpha)} = "// &
2757 "(\hbar/2) \langle \phi_\mu | \sum_l \Delta "// &
2758 "V_l^\mathrm{SO}(\mathbf{r},\mathbf{r}') "// &
2759 "L^{(\alpha)} | \phi_\nu \rangle, "// &
2760 "\alpha = x, y, z$.", &
2761 n_keywords=1, n_subsections=1, repeats=.false.)
2762
2763 NULLIFY (keyword)
2764 CALL keyword_create(keyword, __location__, &
2765 name="_SECTION_PARAMETERS_", &
2766 description="Controls the activation of the SOC calculation.", &
2767 default_l_val=.false., &
2768 lone_keyword_l_val=.true.)
2769 CALL section_add_keyword(section, keyword)
2770 CALL keyword_release(keyword)
2771
2772 CALL keyword_create(keyword, __location__, name="SOC_WINDOW_OCC", &
2773 description="Apply SOC only for states with eigenvalues below VBM "// &
2774 "in the interval $[\varepsilon_\mathrm{VBM}-E_\mathrm{window\_occ}, \ "// &
2775 "\varepsilon_\mathrm{VBM}]$. "// &
2776 "to use for large systems to prevent numerical instabilities.", &
2777 usage="SOC_WINDOW_OCC 5.0", &
2778 default_r_val=-1.0_dp, &
2779 unit_str="eV")
2780 CALL section_add_keyword(section, keyword)
2781 CALL keyword_release(keyword)
2782
2783 CALL keyword_create(keyword, __location__, name="SOC_WINDOW_VIRT", &
2784 description="Apply SOC only for states with eigenvalues above CBM "// &
2785 "in the interval $[\varepsilon_\mathrm{CBM},\ "// &
2786 "\varepsilon_\mathrm{CBM}+E_\mathrm{window\_virt}]$, "// &
2787 "to use for large systems to prevent numerical instabilities.", &
2788 usage="SOC_WINDOW_VIRT 5.0", &
2789 default_r_val=-1.0_dp, &
2790 unit_str="eV")
2791 CALL section_add_keyword(section, keyword)
2792 CALL keyword_release(keyword)
2793
2794 CALL keyword_create(keyword, __location__, name="SOC_WINDOW_SMEARING", &
2795 description="Width of the Fermi-like smoothing at the SOC energy-window edge. "// &
2796 "Default reproduces the value of 1 eV. "// &
2797 "only effective when at least one SOC window is active.", &
2798 usage="SOC_WINDOW_SMEARING 1.0", &
2799 default_r_val=cp_unit_to_cp2k(value=1.0_dp, unit_str="eV"), &
2800 unit_str="eV")
2801 CALL section_add_keyword(section, keyword)
2802 CALL keyword_release(keyword)
2803
2804 END SUBROUTINE create_soc_section
2805
2806! **************************************************************************************************
2807!> \brief input section for computing the density of states and the projected density of states
2808!> \param section section to create
2809!> \par History
2810!> * 09.2023 created [Jan Wilhelm]
2811! **************************************************************************************************
2812 SUBROUTINE create_dos_section(section)
2813 TYPE(section_type), POINTER :: section
2814
2815 TYPE(keyword_type), POINTER :: keyword
2816 TYPE(section_type), POINTER :: subsection
2817
2818 cpassert(.NOT. ASSOCIATED(section))
2819 CALL section_create(section, __location__, name="DOS", &
2820 description="Parameters needed to calculate the density of states "// &
2821 "(DOS) and the projected density of states (PDOS).", &
2822 n_keywords=1, n_subsections=1, repeats=.false.)
2823
2824 NULLIFY (keyword)
2825 CALL keyword_create(keyword, __location__, &
2826 name="_SECTION_PARAMETERS_", &
2827 description="Controls the activation of the DOS calculation.", &
2828 default_l_val=.false., &
2829 lone_keyword_l_val=.true.)
2830 CALL section_add_keyword(section, keyword)
2831 CALL keyword_release(keyword)
2832
2833 CALL keyword_create(keyword, __location__, name="ENERGY_WINDOW", &
2834 description="Print DOS and PDOS in the energy window "// &
2835 "$[\varepsilon_\mathrm{VBM}-E_\mathrm{window}/2, "// &
2836 "\varepsilon_\mathrm{CBM}+E_\mathrm{window}/2]$,"// &
2837 " where VBM is the valence "// &
2838 "band maximum (or highest occupied molecular orbital, HOMO, for "// &
2839 "molecules) and CBM the conduction band minimum (or lowest "// &
2840 "unoccupied molecular orbital, LUMO, for molecules).", &
2841 usage="ENERGY_WINDOW 5.0", &
2842 default_r_val=cp_unit_to_cp2k(value=10.0_dp, unit_str="eV"), &
2843 unit_str="eV")
2844 CALL section_add_keyword(section, keyword)
2845 CALL keyword_release(keyword)
2846
2847 CALL keyword_create(keyword, __location__, name="ENERGY_STEP", &
2848 description="Resolution of the energy E when computing the $\rho(E)$.", &
2849 usage="ENERGY_STEP 0.01", &
2850 default_r_val=cp_unit_to_cp2k(value=0.01_dp, unit_str="eV"), &
2851 unit_str="eV")
2852 CALL section_add_keyword(section, keyword)
2853 CALL keyword_release(keyword)
2854
2855 CALL keyword_create(keyword, __location__, name="BROADENING", &
2856 description=α"Broadening in Gaussians used in the DOS; "// &
2857 "$\rho(E) = \sum_n \exp(((E-\varepsilon_n)/\alpha)^2)/("// &
2858 " \sqrt{2\pi} \alpha)$.", &
2859 usage="BROADENING 0.01", &
2860 default_r_val=cp_unit_to_cp2k(value=0.01_dp, unit_str="eV"), &
2861 unit_str="eV")
2862 CALL section_add_keyword(section, keyword)
2863 CALL keyword_release(keyword)
2864
2865 CALL keyword_create( &
2866 keyword, __location__, name="KPOINTS", &
2867 description="Monkhorst-Pack k-point mesh of size N_x, N_y, N_z for calculating "// &
2868 "the density of states (DOS). In GW, the KPOINT_DOS mesh is thus used as k-point "// &
2869 αα"mesh for the self-energy. For non-periodic directions , choose N_ = 1. "// &
2870 "Automatic choice of the k-point mesh for negative "// &
2871 α"values, i.e. KPOINTS_DOS -1 -1 -1 (automatic choice: N_ = 1 in non-periodic "// &
2872 "direction, 8 k-points in periodic direction). If you like to compute a "// &
2873 "band structure along a k-path, you can specify the k-path in "// &
2874 "&KPOINT_SET.", &
2875 usage="KPOINTS N_x N_y N_z", &
2876 n_var=3, type_of_var=integer_t, default_i_vals=[-1, -1, -1])
2877 CALL section_add_keyword(section, keyword)
2878 CALL keyword_release(keyword)
2879
2880 NULLIFY (subsection)
2881 CALL create_ldos_section(subsection)
2882 CALL section_add_subsection(section, subsection)
2883 CALL section_release(subsection)
2884
2885 END SUBROUTINE create_dos_section
2886
2887! **************************************************************************************************
2888!> \brief ...
2889!> \param section ...
2890! **************************************************************************************************
2891 SUBROUTINE create_ldos_section(section)
2892 TYPE(section_type), POINTER :: section
2893
2894 TYPE(keyword_type), POINTER :: keyword
2895
2896 cpassert(.NOT. ASSOCIATED(section))
2897 CALL section_create(section, __location__, name="LDOS", &
2898 description="Parameters needed to calculate the local density "// &
2899 "of states (LDOS). "// &
2900 "The LDOS is computed as $\rho(\mathbf{r},E) = "// &
2901 "\sum\limits_{n,\mathbf{k}}"// &
2902 " |\psi_{n\mathbf{k}}(r)|^2\, w_\mathbf{k}\, g(E-\varepsilon_{n\mathbf{k}})$ "// &
2903 "using the Gaussian weight function "// &
2904 "$g(x) = \exp(x^2/\alpha^2)/(\sqrt{2\pi}\alpha)$, $\alpha$ is the broadening "// &
2905 "from the &DOS section, and the k-point weight "// &
2906 "$w_\mathbf{k}$. The k-mesh is taken from the &DOS section.", &
2907 n_keywords=2, repeats=.false.)
2908
2909 NULLIFY (keyword)
2910 CALL keyword_create(keyword, __location__, &
2911 name="_SECTION_PARAMETERS_", &
2912 description="Activates the local VBM CBM gap calculation.", &
2913 default_l_val=.false., &
2914 lone_keyword_l_val=.true.)
2915 CALL section_add_keyword(section, keyword)
2916 CALL keyword_release(keyword)
2917
2918 CALL keyword_create(keyword, __location__, name="INTEGRATION", &
2919 description="Defines whether the LDOS is integrated along a "// &
2920 "coordinate. As an example, for INTEGRATION Z, the LDOS "// &
2921 "$\rho(x,y,E) = \int dz\, \rho(x,y,z,E)$ is computed.", &
2922 usage="INTEGRATION Z", &
2923 enum_c_vals=s2a("X", "Y", "Z", "NONE"), &
2924 enum_i_vals=[int_ldos_x, int_ldos_y, int_ldos_z, int_ldos_none], &
2925 enum_desc=s2a("Integrate over x coordinate (not yet implemented).", &
2926 "Integrate over y coordinate (not yet implemented).", &
2927 "Integrate over z coordinate.", &
2928 "No integration, print cube file as function "// &
2929 "of x,y,z (not yet implemented)."), &
2930 default_i_val=int_ldos_z)
2931 CALL section_add_keyword(section, keyword)
2932 CALL keyword_release(keyword)
2933
2934 CALL keyword_create( &
2935 keyword, __location__, name="BIN_MESH", &
2936 description="Mesh of size n x m for binning the space coordinates x and y of "// &
2937 "the LDOS $\rho(x,y,E)$. If -1, no binning is performed and the "// &
2938 "fine x, y resolution of the electron density from SCF is used.", &
2939 usage="BIN_MESH n m", &
2940 n_var=2, type_of_var=integer_t, default_i_vals=[10, 10])
2941 CALL section_add_keyword(section, keyword)
2942 CALL keyword_release(keyword)
2943
2944 END SUBROUTINE create_ldos_section
2945
2946! **************************************************************************************************
2947!> \brief creates an input section for a tip scan calculation
2948!> \param section section to create
2949!> \par History
2950!> * 04.2021 created [JGH]
2951! **************************************************************************************************
2952 SUBROUTINE create_tipscan_section(section)
2953 TYPE(section_type), POINTER :: section
2954
2955 TYPE(keyword_type), POINTER :: keyword
2956
2957 cpassert(.NOT. ASSOCIATED(section))
2958 CALL section_create(section, __location__, name="TIP_SCAN", &
2959 description="Parameters needed to set up a Tip Scan. "// &
2960 "Needs external definition of tip induced field.", &
2961 n_keywords=1, n_subsections=1, repeats=.false.)
2962
2963 NULLIFY (keyword)
2964
2965 CALL keyword_create(keyword, __location__, &
2966 name="_SECTION_PARAMETERS_", &
2967 description="Controls the activation of the Tip Scan procedure", &
2968 default_l_val=.false., &
2969 lone_keyword_l_val=.true.)
2970 CALL section_add_keyword(section, keyword)
2971 CALL keyword_release(keyword)
2972
2973 CALL keyword_create(keyword, __location__, name="SCAN_DIRECTION", &
2974 description="Defines scan direction and scan type(line, plane).", &
2975 usage="SCAN_DIRECTION XY", &
2976 enum_c_vals=s2a("X", "Y", "Z", "XY", "XZ", "YZ", "XYZ"), &
2977 enum_i_vals=[scan_x, scan_y, scan_z, scan_xy, scan_xz, scan_yz, scan_xyz], &
2978 default_i_val=scan_xy)
2979 CALL section_add_keyword(section, keyword)
2980 CALL keyword_release(keyword)
2981
2982 CALL keyword_create(keyword, __location__, name="REFERENCE_POINT", &
2983 description="The reference point to define the absolute position of the scan. ", &
2984 usage="REFERENCE_POINT 0.0 0.0 1.0", &
2985 n_var=3, default_r_vals=[0.0_dp, 0.0_dp, 0.0_dp], type_of_var=real_t, &
2986 unit_str="angstrom")
2987 CALL section_add_keyword(section, keyword)
2988 CALL keyword_release(keyword)
2989
2990 CALL keyword_create(keyword, __location__, name="SCAN_POINTS", &
2991 description="Number of points calculated for each scan direction.", &
2992 usage="SCAN_POINTS 20 20", &
2993 n_var=-1, type_of_var=integer_t)
2994 CALL section_add_keyword(section, keyword)
2995 CALL keyword_release(keyword)
2996
2997 CALL keyword_create(keyword, __location__, name="SCAN_STEP", &
2998 description="Step size for each scan direction.", &
2999 usage="SCAN_STEP 0.01 0.01", &
3000 n_var=-1, type_of_var=real_t, unit_str="angstrom")
3001 CALL section_add_keyword(section, keyword)
3002 CALL keyword_release(keyword)
3003
3004 CALL keyword_create(keyword, __location__, name="TIP_FILENAME", &
3005 description="Filename of tip potential defined in cube file format.", &
3006 usage="TIP_FILENAME <filename>", &
3007 type_of_var=lchar_t)
3008 CALL section_add_keyword(section, keyword)
3009 CALL keyword_release(keyword)
3010
3011 END SUBROUTINE create_tipscan_section
3012
3013! **************************************************************************************************
3014!> \brief ...
3015!> \param section ...
3016!> \param section_name ...
3017!> \author Shridhar Shanbhag
3018! **************************************************************************************************
3019 SUBROUTINE create_floquet_section(section)
3020 TYPE(section_type), POINTER :: section
3021
3022 TYPE(keyword_type), POINTER :: keyword
3023
3024 CALL section_create(section, __location__, name="FLOQUET", &
3025 description="Parameters controlling the calculation of the "// &
3026 "Floquet band structure and Quasi-energies of a system driven "// &
3027 "by a periodic monochromatic electric field with any arbitrary "// &
3028 "polarisation state.", &
3029 n_keywords=1, n_subsections=0, repeats=.false.)
3030 NULLIFY (keyword)
3031
3032 CALL keyword_create(keyword, __location__, name="AMPLITUDE", &
3033 description="Electric field amplitude of the monochromatic light.", &
3034 usage="AMPLITUDE [Vm-1] 1.0E9", n_var=1, type_of_var=real_t, &
3035 unit_str="Vm-1", default_r_val=0.0_dp)
3036 CALL section_add_keyword(section, keyword)
3037 CALL keyword_release(keyword)
3038
3039 CALL keyword_create(keyword, __location__, name="FREQUENCY", &
3040 description="Frequency of the electric field for Floquet calculations "// &
3041 "expressed in terms of the energy of a photon in eV.", &
3042 usage="FREQUENCY 1.5", unit_str="eV", n_var=1, type_of_var=real_t, &
3043 default_r_val=cp_unit_to_cp2k(value=1.0_dp, unit_str="eV"))
3044 CALL section_add_keyword(section, keyword)
3045 CALL keyword_release(keyword)
3046
3047 CALL keyword_create(keyword, __location__, name="POLARISATION", &
3048 description="Polarisation vector of the input light. The "// &
3049 "amplitude in each direction is the product of the AMPLITUDE "// &
3050 "and the POLARISATION vector component. Eg. for light polarized "// &
3051 "in the x direction, use 1 0 0. For left-circularly polarized "// &
3052 "light travelling in the +z direction use 1 1 0 and set "// &
3053 π"PHASE_OFFSET 0 0.5 0 for a +/2 offset", &
3054 usage="POLARISATION 0.0 0.0 1.0", &
3055 default_r_vals=[0.0_dp, 0.0_dp, 1.0_dp])
3056 CALL section_add_keyword(section, keyword)
3057 CALL keyword_release(keyword)
3058
3059 CALL keyword_create(keyword, __location__, name="PHASE_OFFSETS", &
3060 description="Phase offset of the electric field in the "// &
3061 π"x, y, and z directions given in multiples of . For "// &
3062 "linearly polarized light, use 0 0 0 and for left-circularly "// &
3063 "polarized light travelling in the +z direction use "// &
3064 "PHASE_OFFSET 0.0 0.5 0 ", &
3065 usage="PHASE_OFFSETS 0.5 0 0", &
3066 default_r_vals=[0.0_dp, 0.0_dp, 0.0_dp])
3067 CALL section_add_keyword(section, keyword)
3068 CALL keyword_release(keyword)
3069
3070 CALL keyword_create(keyword, __location__, name="MAX_FLOQUET_INDEX", &
3071 description="Largest absolute Floquet index up to which "// &
3072 "Floquet Hamiltonian is truncated. Use a larger value to "// &
3073 "ensure convergence at higher computational cost and a "// &
3074 "smaller value for faster computation. EPS_FLOQUET checks "// &
3075 "to ensure that the error due to truncation is small.", &
3076 usage="MAX_FLOQUET_INDEX 50", &
3077 default_i_val=50)
3078 CALL section_add_keyword(section, keyword)
3079 CALL keyword_release(keyword)
3080
3081 CALL keyword_create(keyword, __location__, name="EPS_FLOQUET", &
3082 description="Threshold on the error due to truncation of "// &
3083 "the Floquet Hamiltonian. Used to verify that MAX_FLOQUET_INDEX "// &
3084 "is large enough that truncation errors are small. "// &
3085 "If negative, the check is removed (not recommended).", &
3086 usage="EPS_FLOQUET 1.e-10", default_r_val=1.0e-10_dp)
3087 CALL section_add_keyword(section, keyword)
3088 CALL keyword_release(keyword)
3089
3090 CALL keyword_create(keyword, __location__, name="ENERGY_WINDOW", &
3091 description="Half-width of the energy range, in eV, centred "// &
3092 "on the Fermi level, over which the Floquet spectral "// &
3093 "function is evaluated.", &
3094 usage="ENERGY_WINDOW 5.0", &
3095 default_r_val=cp_unit_to_cp2k(value=10.0_dp, unit_str="eV"), &
3096 unit_str="eV")
3097 CALL section_add_keyword(section, keyword)
3098 CALL keyword_release(keyword)
3099
3100 CALL keyword_create(keyword, __location__, name="ENERGY_STEP", &
3101 description="Resolution of the energy E used to compute the "// &
3102 "spectral function within the energy window.", &
3103 usage="ENERGY_STEP 0.01", &
3104 default_r_val=cp_unit_to_cp2k(value=0.01_dp, unit_str="eV"), &
3105 unit_str="eV")
3106 CALL section_add_keyword(section, keyword)
3107 CALL keyword_release(keyword)
3108
3109 CALL keyword_create(keyword, __location__, name="BROADENING", &
3110 description="Lorentzian broadening applied to the peaks of the "// &
3111 "Floquet spectral function.", &
3112 usage="BROADENING 0.02", &
3113 default_r_val=cp_unit_to_cp2k(value=0.02_dp, unit_str="eV"), &
3114 unit_str="eV")
3115 CALL section_add_keyword(section, keyword)
3116 CALL keyword_release(keyword)
3117
3118 CALL keyword_create(keyword, __location__, name="FLOQUET_DOS_FILE_NAME", &
3119 description="File name used for the Floquet spectral function.", &
3120 usage="FLOQUET_DOS_FILE_NAME FLOQUET_DOS", &
3121 default_lc_val="FLOQUET_DOS")
3122 CALL section_add_keyword(section, keyword)
3123 CALL keyword_release(keyword)
3124
3125 CALL keyword_create(keyword, __location__, name="QUASI_ENERGIES_FILE_NAME", &
3126 description="File name used for the Floquet quasi-energies.", &
3127 usage="QUASI_ENERGIES_FILE_NAME QUASI_ENERGIES", &
3128 default_lc_val="QUASI_ENERGIES")
3129 CALL section_add_keyword(section, keyword)
3130 CALL keyword_release(keyword)
3131
3132 END SUBROUTINE create_floquet_section
3133
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 luber2014
integer, save, public iannuzzi2005
integer, save, public sebastiani2001
integer, save, public hernandez2025
integer, save, public putrino2002
integer, save, public vazdacruz2021
integer, save, public hanasaki2025
integer, save, public futera2017
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
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
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)
creates a print_key section
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:1222
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 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 scan_xy
integer, parameter, public scan_xz
integer, parameter, public tddfpt_kernel_full
integer, parameter, public ot_precond_none
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 tddfpt_dipole_length
integer, parameter, public use_mom_ref_zero
integer, parameter, public oe_lb
integer, parameter, public tddfpt_kernel_stda
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)
...
subroutine, public create_localize_section(section)
parameters fo the localization of wavefunctions
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
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
Utilities for string manipulations.
represent a keyword in the input
represent a section of the input file