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