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