(git:e8f5963)
Loading...
Searching...
No Matches
input_cp2k_xas.F
Go to the documentation of this file.
1!--------------------------------------------------------------------------------------------------!
2! CP2K: A general program to perform molecular dynamics simulations !
3! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
4! !
5! SPDX-License-Identifier: GPL-2.0-or-later !
6!--------------------------------------------------------------------------------------------------!
7
8! **************************************************************************************************
9!> \brief function that build the XAS section of the input
10!> \par History
11!> 10.2005 moved out of input_cp2k [fawzi]
12!> 07.2024 moved out of input_cp2k_dft [JGH]
13!> \author fawzi
14! **************************************************************************************************
16 USE bibliography, ONLY: iannuzzi2007,&
23 USE input_constants, ONLY: &
43 USE input_val_types, ONLY: char_t,&
44 integer_t,&
45 lchar_t,&
46 real_t
47 USE kinds, ONLY: dp
48 USE string_utilities, ONLY: s2a
49#include "./base/base_uses.f90"
50
51 IMPLICIT NONE
52 PRIVATE
53
54 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_xas'
55
57
58CONTAINS
59
60! **************************************************************************************************
61!> \brief Create the XAS-specific PDOS print section.
62!> \param print_key the PDOS print section
63! **************************************************************************************************
64 SUBROUTINE create_xas_pdos_section(print_key)
65
66 TYPE(section_type), POINTER :: print_key
67
68 CALL cp_print_key_section_create(print_key, __location__, "PDOS", &
69 description="Print out the XAS PDOS projected per kind and angular momentum", &
70 print_level=debug_print_level, common_iter_levels=1, filename="")
71 CALL add_dos_keywords(print_key, xas_mode=.true.)
72
73 END SUBROUTINE create_xas_pdos_section
74
75! **************************************************************************************************
76!> \brief makes the input section for core-level spectroscopy simulations
77!> \param section ...
78!> \par History
79!> 03.2005 created [MI]
80! **************************************************************************************************
81 SUBROUTINE create_xas_section(section)
82 TYPE(section_type), POINTER :: section
83
84 TYPE(keyword_type), POINTER :: keyword
85 TYPE(section_type), POINTER :: print_key, subsection
86
87 cpassert(.NOT. ASSOCIATED(section))
88 CALL section_create(section, __location__, name="xas", &
89 description="Controls transition-potential and delta-SCF calculations of core-level excitation spectra. "// &
90 "The occupied states from which the excitations are calculated should be specified. "// &
91 "Localization of the orbitals may be useful.", &
92 n_keywords=10, n_subsections=1, repeats=.false., &
93 citations=[iannuzzi2007])
94
95 NULLIFY (keyword, subsection, print_key)
96
97 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
98 description="controls the activation of core-level spectroscopy simulations", &
99 usage="&XAS T", &
100 default_l_val=.false., &
101 lone_keyword_l_val=.true.)
102 CALL section_add_keyword(section, keyword)
103 CALL keyword_release(keyword)
104
105 CALL keyword_create(keyword, __location__, name="METHOD", &
106 variants=["XAS_METHOD"], &
107 description="Method to be used to calculate core-level excitation spectra", &
108 usage="METHOD TP_HH", &
109 default_i_val=xas_none, &
110 enum_c_vals=s2a("NONE", "TP_HH", "TP_FH", "TP_VAL", "TP_XHH", "TP_XFH", "DSCF", "TP_FLEX"), &
111 enum_desc=s2a( &
112 "No core electron spectroscopy", "Transition potential half-hole", &
113 "Transition potential full-hole", "Hole in homo for X-ray emission only ", &
114 "Transition potential excited half-hole", &
115 "Transition potential excited full-hole ", &
116 "DSCF calculations to compute the first (core)excited state", &
117 "Transition potential with generalized core occupation and total number of electrons"), &
120 CALL section_add_keyword(section, keyword)
121 CALL keyword_release(keyword)
122
123 CALL keyword_create(keyword, __location__, name="XAS_CORE", &
124 description="Occupation of the core state in XAS calculation by TP_FLEX.", &
125 usage="XAS_CORE 0.5", &
126 default_r_val=0.5_dp)
127 CALL section_add_keyword(section, keyword)
128 CALL keyword_release(keyword)
129
130 CALL keyword_create(keyword, __location__, name="XAS_TOT_EL", &
131 description="Total number of electrons for spin channel alpha, in XAS calculation by TP_FLEX. "// &
132 "If it is a negative value, the number of electrons is set to GS number of electrons "// &
133 "minus the amount subtracted from the core state", &
134 usage="XAS_TOT_EL 10", &
135 default_r_val=-1._dp)
136 CALL section_add_keyword(section, keyword)
137 CALL keyword_release(keyword)
138
139 CALL keyword_create(keyword, __location__, name="XES_CORE", &
140 description="Occupation of the core state in XES calculation by TP_VAL. "// &
141 "The HOMO is emptied by the same amount.", &
142 usage="XES_CORE 0.5", &
143 default_r_val=1._dp)
144 CALL section_add_keyword(section, keyword)
145 CALL keyword_release(keyword)
146
147 CALL keyword_create(keyword, __location__, name="XES_EMPTY_HOMO", &
148 description="Set the occupation of the HOMO in XES calculation by TP_VAL. "// &
149 "The HOMO can be emptied or not, if the core is still full.", &
150 usage="XES_EMPTY_HOMO", &
151 default_l_val=.false., &
152 lone_keyword_l_val=.true.)
153 CALL section_add_keyword(section, keyword)
154 CALL keyword_release(keyword)
155
156 CALL keyword_create(keyword, __location__, name="DIPOLE_FORM", &
157 variants=["DIP_FORM"], &
158 description="Type of integral to get the oscillator strengths "// &
159 "in the diipole approximation", &
160 usage="DIPOLE_FORM string", &
161 default_i_val=xas_dip_vel, &
162 enum_c_vals=s2a("LENGTH", "VELOCITY"), &
163 enum_desc=s2a("Length form &lang; i | e r | j &rang;", &
164 "Velocity form &lang; i | d/dr | j &rang;"), &
165 enum_i_vals=[xas_dip_len, xas_dip_vel])
166 CALL section_add_keyword(section, keyword)
167 CALL keyword_release(keyword)
168
169! replace the specialized keyword with standard scf section
170! scf_env is added to xas_env
171
172 NULLIFY (subsection)
173 CALL create_scf_section(subsection)
174 CALL section_add_subsection(section, subsection)
175 CALL section_release(subsection)
176
177 CALL keyword_create(keyword, __location__, name="STATE_TYPE", &
178 variants=["TYPE"], &
179 description="Type of the orbitals that are excited for the xas spectra calculation", &
180 usage="STATE_TYPE 1S", &
181 default_i_val=xas_1s_type, &
182 enum_c_vals=s2a("1S", "2S", "2P", "3S", "3P", "3D", "4S", "4P", "4D", "4F"), &
183 enum_desc=s2a("1s orbitals", "2s orbitals", "2p orbitals", "3s orbitals", "3p orbitals", &
184 "3d orbitals", "4s orbitals", "4p orbitals", "4d orbitals", "4f orbitals"), &
187 CALL section_add_keyword(section, keyword)
188 CALL keyword_release(keyword)
189
190 CALL keyword_create(keyword, __location__, name="STATE_SEARCH", &
191 description="# of states where to look for the one to be excited", &
192 usage="STATE_SEARCH 1", &
193 default_i_val=-1)
194 CALL section_add_keyword(section, keyword)
195 CALL keyword_release(keyword)
196
197 CALL keyword_create(keyword, __location__, name="SPIN_CHANNEL", &
198 description="# Spin channel of the excited orbital", &
199 usage="SPIN_CHANNEL 1", &
200 default_i_val=1)
201 CALL section_add_keyword(section, keyword)
202 CALL keyword_release(keyword)
203
204 CALL keyword_create(keyword, __location__, name="ATOMS_LIST", &
205 variants=["AT_LIST"], &
206 description="Indexes of the atoms to be excited. "// &
207 "This keyword can be repeated several times "// &
208 "(useful if you have to specify many indexes).", &
209 usage="ATOMS_LIST {integer} {integer} .. {integer} ", &
210 n_var=-1, type_of_var=integer_t, repeats=.true.)
211 CALL section_add_keyword(section, keyword)
212 CALL keyword_release(keyword)
213
214 CALL keyword_create(keyword, __location__, name="OVERLAP_THRESHOLD", &
215 description="Threshold for including more than one initial core excited state "// &
216 "per atom. The threshold is taken relative to the maximum overlap.", &
217 usage="OVERLAP_THRESHOLD 8.e-1", default_r_val=1.0_dp)
218 CALL section_add_keyword(section, keyword)
219 CALL keyword_release(keyword)
220
221 CALL keyword_create(keyword, __location__, name="ORBITAL_LIST", &
222 variants=["ORBITAL_LIST"], &
223 description="Indices of the localized orbitals to be excited. "// &
224 "This keyword can be repeated several times "// &
225 "(useful if you have to specify many indexes).", &
226 usage="ORBITAL_LIST {integer} {integer} .. {integer} ", &
227 n_var=-1, type_of_var=integer_t, repeats=.true.)
228 CALL section_add_keyword(section, keyword)
229 CALL keyword_release(keyword)
230
231 CALL keyword_create(keyword, __location__, name="ADDED_MOS", &
232 description="Number of additional MOS added spin up only", &
233 usage="ADDED_MOS {integer}", default_i_val=-1)
234 CALL section_add_keyword(section, keyword)
235 CALL keyword_release(keyword)
236
237 CALL keyword_create(keyword, __location__, name="MAX_ITER_ADDED", &
238 description="maximum number of iteration in calculation of added orbitals", &
239 usage="MAX_ITER_ADDED 100", default_i_val=2999)
240 CALL section_add_keyword(section, keyword)
241 CALL keyword_release(keyword)
242
243 CALL keyword_create(keyword, __location__, name="EPS_ADDED", &
244 description="target accuracy incalculation of the added orbitals", &
245 usage="EPS_ADDED 1.e-6", default_r_val=1.0e-5_dp)
246 CALL section_add_keyword(section, keyword)
247 CALL keyword_release(keyword)
248
249 CALL keyword_create(keyword, __location__, name="NGAUSS", &
250 description="Number of gto's for the expansion of the STO "// &
251 "of the type given by STATE_TYPE", &
252 usage="NGAUSS {integer}", default_i_val=3)
253 CALL section_add_keyword(section, keyword)
254 CALL keyword_release(keyword)
255
256 CALL keyword_create(keyword, __location__, name="RESTART", &
257 description="Restart the excited state if the restart file exists", &
258 usage="RESTART", &
259 default_l_val=.false., lone_keyword_l_val=.true.)
260 CALL section_add_keyword(section, keyword)
261 CALL keyword_release(keyword)
262
263 CALL keyword_create(keyword, __location__, name="WFN_RESTART_FILE_NAME", &
264 variants=["RESTART_FILE_NAME"], &
265 description="Root of the file names where to read the MOS from "// &
266 "which to restart the calculation of the core level excited states", &
267 usage="WFN_RESTART_FILE_NAME <FILENAME>", &
268 type_of_var=lchar_t)
269 CALL section_add_keyword(section, keyword)
270 CALL keyword_release(keyword)
271
272 CALL create_localize_section(subsection)
273 CALL section_add_subsection(section, subsection)
274 CALL section_release(subsection)
275
276 CALL section_create(subsection, __location__, name="PRINT", &
277 description="printing of information during the core-level spectroscopy simulation", &
278 repeats=.false.)
279
280 ! Add printing of wannier infos
281 CALL print_wanniers(subsection)
282
283 CALL cp_print_key_section_create(print_key, __location__, "iteration_info", &
284 description="Controls the printing of basic iteration information during the XAS SCF.", &
285 print_level=low_print_level, filename="__STD_OUT__")
286 CALL keyword_create(keyword, __location__, name="time_cumul", &
287 description="If the printkey is activated switches the printing of timings"// &
288 " to cumulative (over the SCF).", &
289 default_l_val=.false., lone_keyword_l_val=.true.)
290 CALL section_add_keyword(print_key, keyword)
291 CALL keyword_release(keyword)
292 CALL section_add_subsection(subsection, print_key)
293 CALL section_release(print_key)
294
295 CALL cp_print_key_section_create(print_key, __location__, "program_run_info", &
296 description="Controls the printing of basic iteration information in CLS", &
297 print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
298 CALL section_add_subsection(subsection, print_key)
299 CALL section_release(print_key)
300
301 CALL cp_print_key_section_create(print_key, __location__, "XES_SPECTRUM", &
302 description="Controls the dumping of the CLS output files containing the emission spectra", &
303 print_level=low_print_level, common_iter_levels=3, filename="")
304 CALL section_add_subsection(subsection, print_key)
305 CALL section_release(print_key)
306
308 print_key, __location__, "XAS_SPECTRUM", &
309 description="Controls the dumping of the CLS output files containing the absorption spectra", &
310 print_level=low_print_level, common_iter_levels=3, filename="")
311 CALL section_add_subsection(subsection, print_key)
312 CALL section_release(print_key)
313
314 CALL create_xas_pdos_section(print_key)
315 CALL section_add_subsection(subsection, print_key)
316 CALL section_release(print_key)
317
318 CALL cp_print_key_section_create(print_key, __location__, "RESTART", &
319 description="Controls the dumping of MO restart file during the SCF. "// &
320 "of a Core-Level-Spectroscopy calculation. For each new excited atom, "// &
321 "one different restart file is dumped. These restart files should be "// &
322 "employed only to restart the same type of CLS calculation, "// &
323 "i.e. with the same core potential.", &
324 print_level=low_print_level, common_iter_levels=3, each_iter_names=s2a("XAS_SCF"), &
325 add_last=add_last_numeric, each_iter_values=[3], filename="")
326 CALL section_add_subsection(subsection, print_key)
327 CALL section_release(print_key)
328
329 CALL cp_print_key_section_create(print_key, __location__, "FULL_RESTART", &
330 description="Controls the dumping of a standard MO restart file "// &
331 "where coefficients and occupation numbers are those of the TP scheme, "// &
332 "i.e. with emptied core state.", &
333 print_level=high_print_level, common_iter_levels=3, each_iter_names=s2a("XAS_SCF"), &
334 add_last=add_last_numeric, each_iter_values=[3], filename="")
335 CALL section_add_subsection(subsection, print_key)
336 CALL section_release(print_key)
337
338 CALL cp_print_key_section_create(print_key, __location__, "CLS_FUNCTION_CUBES", &
339 description="Controls the printing of the relaxed orbitals ", &
340 print_level=high_print_level, common_iter_levels=3, add_last=add_last_numeric, filename="")
341 CALL keyword_create(keyword, __location__, name="stride", &
342 description="The stride (X,Y,Z) used to write the cube file "// &
343 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
344 " 1 number valid for all components.", &
345 usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
346 CALL section_add_keyword(print_key, keyword)
347 CALL keyword_release(keyword)
348
349 CALL keyword_create(keyword, __location__, name="CUBES_LU_BOUNDS", &
350 variants=["CUBES_LU"], &
351 description="The lower and upper index of the states to be printed as cube", &
352 usage="CUBES_LU_BOUNDS integer integer", &
353 n_var=2, default_i_vals=[0, -2], type_of_var=integer_t)
354 CALL section_add_keyword(print_key, keyword)
355 CALL keyword_release(keyword)
356
357 CALL keyword_create(keyword, __location__, name="CUBES_LIST", &
358 description="Indexes of the states to be printed as cube files "// &
359 "This keyword can be repeated several times "// &
360 "(useful if you have to specify many indexes).", &
361 usage="CUBES_LIST 1 2", &
362 n_var=-1, type_of_var=integer_t, repeats=.true.)
363 CALL section_add_keyword(print_key, keyword)
364 CALL keyword_release(keyword)
365 CALL keyword_create(keyword, __location__, name="APPEND", &
366 description="append the cube files when they already exist", &
367 default_l_val=.false., lone_keyword_l_val=.true.)
368 CALL section_add_keyword(print_key, keyword)
369 CALL keyword_release(keyword)
370
371 CALL section_add_subsection(subsection, print_key)
372 CALL section_release(print_key)
373
374 CALL section_add_subsection(section, subsection)
375 CALL section_release(subsection)
376
377 END SUBROUTINE create_xas_section
378
379! **************************************************************************************************
380!> \brief makes the input section for core-level spectroscopy simulations using
381!> linear response TDDFT
382!> \param section ...
383!> \par History
384!> 11.2017 created [AB]
385! **************************************************************************************************
386 SUBROUTINE create_xas_tdp_section(section)
387 TYPE(section_type), POINTER :: section
388
389 TYPE(keyword_type), POINTER :: keyword
390 TYPE(section_type), POINTER :: print_key, subsection, subsubsection, &
391 subsubsubsection
392
393 NULLIFY (keyword, print_key, subsection, subsubsection, subsubsubsection)
394
395 cpassert(.NOT. ASSOCIATED(section))
396 CALL section_create(section, __location__, name="XAS_TDP", &
397 description="XAS simulations using linear-response TDDFT. Excitation from "// &
398 "specified core orbitals is considered one at a time. In case of high "// &
399 "symmetry structures, donor core orbitals should be localized.", &
400 n_keywords=19, n_subsections=4, repeats=.false.)
401
402 NULLIFY (keyword, subsection, print_key)
403
404 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
405 description="controls the activation of XAS simulations with linear "// &
406 "response TDDFT.", &
407 usage="&TDP_XAS {logical}", &
408 default_l_val=.false., &
409 lone_keyword_l_val=.true.)
410 CALL section_add_keyword(section, keyword)
411 CALL keyword_release(keyword)
412
413 CALL keyword_create(keyword, __location__, name="CHECK_ONLY", &
414 description="This keyword defines whether the full calculation should "// &
415 "be done or not. If set to .TRUE., only the determination "// &
416 "of donor MOs is conducted. This run option allows for "// &
417 "cheap verification of the input parameters", &
418 usage="CHECK_ONLY {logical}", &
419 default_l_val=.false., &
420 lone_keyword_l_val=.true., &
421 repeats=.false.)
422 CALL section_add_keyword(section, keyword)
423 CALL keyword_release(keyword)
424
425 CALL keyword_create(keyword, __location__, name="RESTART_FROM_FILE", &
426 variants=s2a("RESTART_FILENAME", "RST_FILENAME", "RESTART_FILE", "RST_FILE"), &
427 description="By providing a RESTART file containing the linear-response "// &
428 "orbitals and excitations energies from a previous calculation, "// &
429 "all computations are skipped except for the corresponding "// &
430 "PDOS and/or CUBE file printing as defined in the PRINT "// &
431 "subsection. Basis sets and geometry need to be consistent.", &
432 usage="RESTART_FROM_FILE <FILENAME>", &
433 type_of_var=char_t, n_var=-1)
434 CALL section_add_keyword(section, keyword)
435 CALL keyword_release(keyword)
436
437 CALL keyword_create(keyword, __location__, name="EXCITATIONS", &
438 variants=["EXCITATION"], &
439 description="Specify the type of excitation to consider. In case of a "// &
440 "restricted closed-shell ground state calculation, "// &
441 "RCS_SINGLET or/and RCS_TRIPLET can be chosen. In case of a "// &
442 "open-shell ground state calculation (either UKS or ROKS), "// &
443 "standard spin conserving excitation (OS_SPIN_CONS) or/and "// &
444 "spin-flip excitation (OS_SPIN_FLIP) can be chosen.", &
445 usage="EXCITATIONS {string}", &
446 repeats=.true., &
447 default_i_val=tddfpt_singlet, &
448 enum_c_vals=s2a("RCS_SINGLET", "RCS_TRIPLET", "OS_SPIN_CONS", "OS_SPIN_FLIP"), &
449 enum_desc=s2a("Singlet excitation on top of restricted closed-shell ground state", &
450 "Triplet excitation on top of restricted closed-shell ground state", &
451 "Spin-conserving excitations on top of open-shell ground state", &
452 "Spin-flip excitation on top of open-shell ground state"), &
454 CALL section_add_keyword(section, keyword)
455 CALL keyword_release(keyword)
456
457 CALL keyword_create(keyword, __location__, name="EPS_PGF_XAS", &
458 variants=s2a("EPS_PGF", "EPS_PGF_XAS_TDP"), &
459 description="The threshold used to determine the spatial extent of all "// &
460 "primitive Gaussian functions used for the construction "// &
461 "of neighbor lists in the XAS_TDP method. "// &
462 "By default, takes the value of QS%EPS_PGF_ORB. Useful if "// &
463 "the former value is tiny due to possible ground state HFX "// &
464 "contributions.", &
465 usage="EPS_PGF_XAS {real}", &
466 type_of_var=real_t)
467 CALL section_add_keyword(section, keyword)
468 CALL keyword_release(keyword)
469
470 CALL keyword_create(keyword, __location__, name="EPS_FILTER", &
471 variants=s2a("EPS_FILTER_MATRIX"), &
472 description="The threshold used for sparse matrix operations", &
473 usage="EPS_FILTER {real}", &
474 type_of_var=real_t, &
475 default_r_val=1.0e-10_dp)
476 CALL section_add_keyword(section, keyword)
477 CALL keyword_release(keyword)
478
479 CALL keyword_create(keyword, __location__, name="DIPOLE_FORM", &
480 variants=["DIP_FORM"], &
481 description="Type of integral to get the oscillator strengths "// &
482 "in the dipole approximation", &
483 usage="DIPOLE_FORM {string}", &
484 default_i_val=xas_dip_vel, &
485 enum_c_vals=s2a("LENGTH", "VELOCITY"), &
486 enum_desc=s2a("Length form &lang; 0 | e r | n &rang;", &
487 "Velocity form &lang; 0 | d/dr | n &rang;"), &
488 enum_i_vals=[xas_dip_len, xas_dip_vel])
489 CALL section_add_keyword(section, keyword)
490 CALL keyword_release(keyword)
491
492 CALL keyword_create(keyword, __location__, name="QUADRUPOLE", &
493 variants=s2a("DO_QUADRUPOLE", "DO_QUAD", "QUAD"), &
494 description="Compute the electric quadrupole contribution to the "// &
495 "oscillator strenghts (in the length representation with "// &
496 "the origin set on the relevant excited atom)", &
497 usage="QUADRUPOLE {logical}", &
498 default_l_val=.false., &
499 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="XYZ_DIPOLE", &
504 variants=s2a("DIPOLE_XYZ"), &
505 description="Whether the detailed contributions of the dipole oscillator "// &
506 "strengths along the X,Y,Z directions should be printed.", &
507 usage="XYZ_DIPOLE {logical}", &
508 default_l_val=.false., &
509 lone_keyword_l_val=.true.)
510 CALL section_add_keyword(section, keyword)
511 CALL keyword_release(keyword)
512
513 CALL keyword_create(keyword, __location__, name="SPIN_DIPOLE", &
514 variants=s2a("DIPOLE_SPIN"), &
515 description="Whether the detailed contributions of the dipole oscillator "// &
516 "strengths for alpha and beta spins should be printed.", &
517 usage="SPIN_DIPOLE {logical}", &
518 default_l_val=.false., &
519 lone_keyword_l_val=.true.)
520 CALL section_add_keyword(section, keyword)
521 CALL keyword_release(keyword)
522
523! the GW2X correction subsection
524 CALL section_create(subsection, __location__, name="GW2X", &
525 description="Specifications for the GW2X calculation of core "// &
526 "ionization potentials. Note that donor states need to be actively "// &
527 "localized using the LOCALIZE keyword in DONOR_STATES. N_SEARCH "// &
528 "should be kept to the minimum, such that only core states are localized.", &
529 citations=[shigeta2001], &
530 n_keywords=8, &
531 n_subsections=0, &
532 repeats=.false.)
533
534 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
535 description="Enables the GW2X correction of the core ionization potentials", &
536 usage="&GW2X {logical}", &
537 default_l_val=.false., &
538 lone_keyword_l_val=.true.)
539 CALL section_add_keyword(subsection, keyword)
540 CALL keyword_release(keyword)
541
542 CALL keyword_create(keyword, __location__, name="XPS_ONLY", &
543 description="If set to .TRUE., only run GW2X calculations for XPS "// &
544 "spectroscopy and ignore all XAS calculations. It is still "// &
545 "required to define the DONOR_STATES and KERNEL%EXACT_EXCHANGE "// &
546 "subsections.", &
547 default_l_val=.false., &
548 lone_keyword_l_val=.true.)
549 CALL section_add_keyword(subsection, keyword)
550 CALL keyword_release(keyword)
551
552 CALL keyword_create(keyword, __location__, name="BATCH_SIZE", &
553 description="MOs batch size for batched tensor contraction. Larger "// &
554 "size is faster, but uses more memory. Default should be safe "// &
555 "in most cases.", &
556 default_i_val=64)
557 CALL section_add_keyword(subsection, keyword)
558 CALL keyword_release(keyword)
559
560 CALL keyword_create(keyword, __location__, name="EPS_GW2X", &
561 description="Convergence threshold for GW2X iterations (in eV)", &
562 default_r_val=1.e-2_dp)
563 CALL section_add_keyword(subsection, keyword)
564 CALL keyword_release(keyword)
565
566 CALL keyword_create(keyword, __location__, name="C_OS", &
567 description="Opposite-spin scling factor. SCS => 6/5, SOS => 1.3", &
568 default_r_val=1.0_dp)
569 CALL section_add_keyword(subsection, keyword)
570 CALL keyword_release(keyword)
571
572 CALL keyword_create(keyword, __location__, name="C_SS", &
573 description="Same-spin scling factor. SCS => 1/3, SOS => 0.0", &
574 default_r_val=1.0_dp)
575 CALL section_add_keyword(subsection, keyword)
576 CALL keyword_release(keyword)
577
578 CALL keyword_create(keyword, __location__, name="MAX_GW2X_ITER", &
579 description="Maximum number of iterations for GW2X", &
580 default_i_val=10)
581 CALL section_add_keyword(subsection, keyword)
582 CALL keyword_release(keyword)
583
584 CALL keyword_create(keyword, __location__, name="PSEUDO_CANONICAL", &
585 variants=["PSEUDO_CANO"], &
586 description="Whether the pseudo-canonical version of GW2X should be used "// &
587 "(versus only using the diagonal of the generalized Fock matrix)", &
588 default_l_val=.true.)
589 CALL section_add_keyword(subsection, keyword)
590 CALL keyword_release(keyword)
591
592 CALL section_add_subsection(section, subsection)
593 CALL section_release(subsection)
594
595! The donor state subsection
596
597 CALL section_create(subsection, __location__, name="DONOR_STATES", &
598 description="Specifications for the donor states from which core "// &
599 "electrons are excited", &
600 n_keywords=6, &
601 n_subsections=0, &
602 repeats=.false.)
603
604 CALL keyword_create(keyword, __location__, name="DEFINE_EXCITED", &
605 description="Whether the atoms to be excited should be defined by "// &
606 "a list of atom indices or by a list of atom kinds.", &
607 usage="DEFINE_EXCITED {string}", &
608 default_i_val=xas_tdp_by_index, &
609 enum_c_vals=s2a("BY_INDEX", "BY_KIND"), &
610 enum_i_vals=[xas_tdp_by_index, xas_tdp_by_kind], &
611 enum_desc=s2a("Excited atoms are defined by a list of indices", &
612 "Excited atoms are defined by a list of atomic kinds"))
613 CALL section_add_keyword(subsection, keyword)
614 CALL keyword_release(keyword)
615
616 CALL keyword_create(keyword, __location__, name="ATOM_LIST", &
617 variants=["AT_LIST"], &
618 description="Indices of the atoms to be excited. "// &
619 "Keyword only taken into account if DEFINE_EXCITED = BY_INDEX", &
620 usage="ATOM_LIST {integer} {integer} .. {integer} ", &
621 n_var=-1, type_of_var=integer_t, repeats=.false.)
622 CALL section_add_keyword(subsection, keyword)
623 CALL keyword_release(keyword)
624
625 CALL keyword_create(keyword, __location__, name="KIND_LIST", &
626 description="Kind of atoms to be excited. "// &
627 "All atoms of the specified kinds are considered. "// &
628 "Keyword only taken into account if DEFINE_EXCITED = BY_KIND", &
629 usage="KIND_LIST {string} {string} .. {string} ", &
630 n_var=-1, type_of_var=char_t, repeats=.false.)
631 CALL section_add_keyword(subsection, keyword)
632 CALL keyword_release(keyword)
633
634 CALL keyword_create(keyword, __location__, name="STATE_TYPES", &
635 variants=["TYPES"], &
636 description="Types of orbitals that are excited, for each atom/kind, "// &
637 "in order to do LR-TDDFT driven xas spectra calculation. "// &
638 "This keyword MUST have the same number of entries as the relevant "// &
639 "KIND_LIST or ATOM_LIST. The order of the specified state types must "// &
640 "correspond to the order of the relevant kinds/indices. "// &
641 "This keyword can be repeated, useful when multiple orbital types "// &
642 "should be excited for specific kinds/atoms.", &
643 n_var=-1, default_i_val=xas_not_excited, repeats=.true., &
644 usage="STATE_TYPES {string} {string} .. {string}", &
645 enum_c_vals=s2a("1S", "2S", "2P", "NE"), &
646 enum_desc=s2a("1s orbital", "2s orbital", "2p orbitals", "not excited"), &
648 CALL section_add_keyword(subsection, keyword)
649 CALL keyword_release(keyword)
650
651 CALL keyword_create(keyword, __location__, name="N_SEARCH", &
652 description="Number of MOs (per spin) to search to find specified donor core "// &
653 "orbitals, starting from the lowest in energy and upward. By default, "// &
654 "all HOMOs are searched. If the LOCALIZE keyword is used, "// &
655 "then all searched states are first localized.", &
656 usage="N_SEARCH {integer}", &
657 default_i_val=-1)
658 CALL section_add_keyword(subsection, keyword)
659 CALL keyword_release(keyword)
660
661 CALL keyword_create(keyword, __location__, name="LOCALIZE", &
662 variants=s2a("LOC", "DO_LOC"), &
663 description="Whether the N_SEARCH potential donor states should be "// &
664 "actively localized. Necessary in case of excited atoms "// &
665 "equivalent under symmetry or GW2X correction.", &
666 usage="LOCALIZE {logical}", &
667 default_l_val=.false., &
668 lone_keyword_l_val=.true.)
669 CALL section_add_keyword(subsection, keyword)
670 CALL keyword_release(keyword)
671
672 CALL section_add_subsection(section, subsection)
673 CALL section_release(subsection)
674! End of the donor states subsection
675
676! The OT solver subsection
677 CALL section_create(subsection, __location__, name="OT_SOLVER", &
678 description="Specifications for the iterative OT solver. Note: only "// &
679 "available within the Tamm-Dancoff approximation. Recommanded if excitations "// &
680 "from multiple donor states take place.", &
681 n_keywords=4, &
682 n_subsections=0, &
683 repeats=.false.)
684
685 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
686 description="Enables the usage of the OT iterator solver", &
687 usage="&OT_SOLVER {logical}", &
688 default_l_val=.false., &
689 lone_keyword_l_val=.true.)
690 CALL section_add_keyword(subsection, keyword)
691 CALL keyword_release(keyword)
692
693 CALL keyword_create(keyword, __location__, name="MAX_ITER", &
694 description="Maximum number of iterations allowed for the OT solver", &
695 usage="MAX_ITER {integer}", &
696 default_i_val=50)
697 CALL section_add_keyword(subsection, keyword)
698 CALL keyword_release(keyword)
699
700 CALL keyword_create(keyword, __location__, name="EPS_ITER", &
701 description="Convergence threshold for the OT solver", &
702 usage="EPS_ITER {double}", &
703 default_r_val=1.0e-4_dp)
704 CALL section_add_keyword(subsection, keyword)
705 CALL keyword_release(keyword)
706
707 CALL keyword_create(keyword, __location__, name="MINIMIZER", &
708 description="Minimizer to be used with the OT solver", &
709 usage="MINIMIZER DIIS", &
710 default_i_val=ot_mini_diis, &
711 enum_c_vals=s2a("CG", "DIIS"), &
712 enum_desc=s2a("Conjugated gradient: safer", &
713 "Direct inversion of the iterative subspace: faster"), &
714 enum_i_vals=[ot_mini_cg, ot_mini_diis])
715 CALL section_add_keyword(subsection, keyword)
716 CALL keyword_release(keyword)
717
718 CALL section_add_subsection(section, subsection)
719 CALL section_release(subsection)
720! End of the OT solver subsection
721
722 CALL keyword_create(keyword, __location__, name="SPIN_ORBIT_COUPLING", &
723 variants=["SOC"], &
724 description="Whether spin-orbit coupling should be added. "// &
725 "Note: only applies for spin-restricted calculations with "// &
726 "singlet and triplet excitations OR spin-unrestricted "// &
727 "calculations with both spin-conserving and spin-flip.", &
728 usage="SOC {logical}", &
729 default_l_val=.false., &
730 lone_keyword_l_val=.true.)
731 CALL section_add_keyword(section, keyword)
732 CALL keyword_release(keyword)
733
734 CALL keyword_create(keyword, __location__, name="TAMM_DANCOFF", &
735 variants=["TDA"], &
736 description="Whether the Tamm-Dancoff approximation should be used.", &
737 usage="TAMM_DANCOFF {logical}", &
738 default_l_val=.true., &
739 lone_keyword_l_val=.true.)
740 CALL section_add_keyword(section, keyword)
741 CALL keyword_release(keyword)
742
743 CALL keyword_create(keyword, __location__, name="GRID", &
744 variants=["ATOMIC_GRID"], &
745 description="Specification of the atomic angular and radial grids for "// &
746 "a given atomic kind. This keyword can/should be repeated "// &
747 "for each excited kind. The default grid dimensions are "// &
748 "those set for the GAPW ground state calculation. These "// &
749 "grids are used for the xc-kernel integration. "// &
750 "Usage: GRID < KIND > < LEBEDEV_GRID > < RADIAL_GRID >", &
751 usage="GRID {string} {integer} {integer}", &
752 n_var=3, type_of_var=char_t, repeats=.true.)
753 CALL section_add_keyword(section, keyword)
754 CALL keyword_release(keyword)
755
756 CALL keyword_create(keyword, __location__, name="N_EXCITED", &
757 variants=["N_ROOTS"], &
758 description="The number of excited states to compute per donor "// &
759 "molecular orbital. (e.g. if 2p excitations, "// &
760 "3*N_EXCITED excited states are considered). "// &
761 "If N_EXCITED is set to -1, all excitations are considered", &
762 usage="N_EXCITED {integer}", &
763 default_i_val=-1)
764 CALL section_add_keyword(section, keyword)
765 CALL keyword_release(keyword)
766
767 CALL keyword_create(keyword, __location__, name="ENERGY_RANGE", &
768 variants=s2a("E_RANGE"), &
769 description="The energy range in eV for which excitations are considered. "// &
770 "Only excitated states within the range of: first excitation "// &
771 "energy + ENERGY_RANGE are kept. If ENERGY_RANGE "// &
772 "and N_EXCITED are specified, the former has priority. "// &
773 "Negative values are ignored and N_EXCITED takes over.", &
774 usage="ENERGY_RANGE {real}", &
775 default_r_val=-1.0_dp)
776 CALL section_add_keyword(section, keyword)
777 CALL keyword_release(keyword)
778
779! The KERNEL subsection
780 CALL section_create(subsection, __location__, name="KERNEL", &
781 description="Defines how the kernel is built in terms of functionals.", &
782 n_keywords=1, &
783 n_subsections=1, &
784 repeats=.false.)
785
786 CALL keyword_create(keyword, __location__, name="RI_REGION", &
787 variants=["RI_RADIUS"], &
788 description="The region defined by a sphere of the given radius around "// &
789 "the excited atom defining which RI_XAS basis elements are "// &
790 "considered for the RI projection of the density. Each basis "// &
791 "element which center is in this region is taken. The density "// &
792 "for a given excited atom is expressed as : "// &
793 "sum_ijkl P_ij (ijk) S_kl^-1 xi_l, where P_ij is the density "// &
794 "matrix, i,j span the orbital basis and k,l the RI_XAS basis "// &
795 "in the region. The larger the radius, the more basis "// &
796 "functions to expand the density. However, it is assumed "// &
797 "that it is a small number and the code does not scale well "// &
798 "as the number of RI basis elements gets too large. "// &
799 "Expressed in Angstrom. If the radius is set to 0.0, only "// &
800 "the RI basis elements centered on the excited atom are used.", &
801 usage="RI_REGION {real}", &
802 default_r_val=0.0_dp)
803 CALL section_add_keyword(subsection, keyword)
804 CALL keyword_release(keyword)
805
806! The XC_FUNCTIONAL subsubsection
807 CALL create_xc_fun_section(subsubsection)
808 CALL section_add_subsection(subsection, subsubsection)
809 CALL section_release(subsubsection)
810
811! The EXACT_EXCHANGE subsubsection
812 CALL section_create(subsubsection, __location__, name="EXACT_EXCHANGE", &
813 description="Whether exact-exchange should be added to the kernel and "// &
814 "if so, with which fraction and operator.", &
815 n_keywords=7, &
816 n_subsections=1, &
817 repeats=.false.)
818
819 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
820 description="Enables the addition of exact exchange to the kernel.", &
821 usage="&EXACT_EXCHANGE {logical}", &
822 default_l_val=.false., &
823 lone_keyword_l_val=.true.)
824 CALL section_add_keyword(subsubsection, keyword)
825 CALL keyword_release(keyword)
826
827 CALL keyword_create(keyword, __location__, name="POTENTIAL_TYPE", &
828 variants=s2a("OP", "OPERATOR", "POTENTIAL"), &
829 description="The type of operator used for exact exchange. The standard "// &
830 "Coulomb operator cannot be used in periodic systems.", &
831 usage="OPERATOR {string}", &
832 repeats=.false., &
833 default_i_val=do_potential_coulomb, &
834 enum_c_vals=s2a("COULOMB", "TRUNCATED", "SHORTRANGE"), &
835 enum_desc=s2a("Standard Coulomb operator: 1/r", &
836 "Truncated Coulomb operator: 1/r if r < R_c, 0 otherwise ", &
837 "Short range: erfc(omega*r)/r"), &
840 CALL section_add_keyword(subsubsection, keyword)
841 CALL keyword_release(keyword)
842
843 CALL keyword_create(keyword, __location__, name="CUTOFF_RADIUS", &
844 variants=s2a("R_C", "RC", "RANGE"), &
845 description="The cutoff radius (in Angstrom) for the truncated Coulomb operator.", &
846 usage="CUTOFF_RADIUS {double}", &
847 default_r_val=0.0_dp, &
848 repeats=.false.)
849 CALL section_add_keyword(subsubsection, keyword)
850 CALL keyword_release(keyword)
851
852 CALL keyword_create(keyword, __location__, name="T_C_G_DATA", &
853 description="Location of the file t_c_g.dat that contains the data for the "// &
854 "evaluation of the truncated gamma function ", &
855 usage="T_C_G_DATA {string}", &
856 default_c_val="t_c_g.dat")
857 CALL section_add_keyword(subsubsection, keyword)
858 CALL keyword_release(keyword)
859
860 CALL keyword_create(keyword, __location__, name="OMEGA", &
861 description="The range parameter for the short range operator (in 1/a0).", &
862 usage="OMEGA {double}", &
863 default_r_val=0.0_dp, &
864 repeats=.false.)
865 CALL section_add_keyword(subsubsection, keyword)
866 CALL keyword_release(keyword)
867
868 CALL keyword_create(keyword, __location__, name="EPS_RANGE", &
869 description="The threshold to determine the effective range of the short range "// &
870 "operator: erfc(omega*eff_range)/eff_range = EPS_RANGE", &
871 usage="EPS_RANGE = {double}", &
872 default_r_val=1.0e-6_dp, &
873 repeats=.false.)
874 CALL section_add_keyword(subsubsection, keyword)
875 CALL keyword_release(keyword)
876
877 CALL keyword_create(keyword, __location__, name="EPS_SCREENING", &
878 variants=s2a("EPS_SCREEN"), &
879 description="A threshold to determine which primitive 3-center integrals "// &
880 "are kept for contraction, as the latter operation can be "// &
881 "expensive (especially for large basis sets ). "// &
882 "If |(ab|c)| < EPS_SCREENING, it is discarded.", &
883 default_r_val=1.0e-8_dp, &
884 repeats=.false.)
885 CALL section_add_keyword(subsubsection, keyword)
886 CALL keyword_release(keyword)
887
888 CALL keyword_create(keyword, __location__, name="SCALE", &
889 variants=s2a("FRACTION"), &
890 description="Scaling of the exact exchange contribution.", &
891 default_r_val=1.0_dp)
892 CALL section_add_keyword(subsubsection, keyword)
893 CALL keyword_release(keyword)
894
895 !The RI metric subsection
896 CALL section_create(subsubsubsection, __location__, name="RI_METRIC", &
897 description="This subsection allows for the definition of an exchange "// &
898 "RI metric that is different from the main exchange potential. "// &
899 "By default (i.e. if this subsection is ignored), the "// &
900 "exchange kernel is computed in the V approximation: "// &
901 "(ab|ij) = (ab|P) V^-1 (Q|ij), where V = (P|Q). With a RI "// &
902 "metric, we have a 2 step RI involving the metric potential "// &
903 "for the 3-center integrals: "// &
904 "(ab|ij) = (ab!P) (P!Q)^-1 (Q|R) (R!S)^-1 (S!ij), where | "// &
905 "stands for the exchange potential and ! for the metric "// &
906 "potential. This allows for drastic screening of the "// &
907 "3-center integrals by selecting shorter range metric.", &
908 n_keywords=5, &
909 n_subsections=0, &
910 repeats=.false.)
911
912 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
913 description="Enables the use of a RI metric.", &
914 usage="&EXACT_EXCHANGE {logical}", &
915 default_l_val=.false., &
916 lone_keyword_l_val=.true.)
917 CALL section_add_keyword(subsubsubsection, keyword)
918 CALL keyword_release(keyword)
919
920 CALL keyword_create(keyword, __location__, name="POTENTIAL_TYPE", &
921 variants=s2a("OP", "OPERATOR", "POTENTIAL"), &
922 description="The type of operator used for the metric.", &
923 usage="OPERATOR {string}", &
924 repeats=.false., &
925 default_i_val=do_potential_id, &
926 enum_c_vals=s2a("OVERLAP", "TRUNCATED", "SHORTRANGE"), &
927 enum_desc=s2a("Overlap operator (=identity)", &
928 "Truncated Coulomb operator: 1/r if r < R_c, 0 otherwise ", &
929 "Short range: erfc(omega*r)/r"), &
932 CALL section_add_keyword(subsubsubsection, keyword)
933 CALL keyword_release(keyword)
934
935 CALL keyword_create(keyword, __location__, name="CUTOFF_RADIUS", &
936 variants=s2a("R_C", "RC", "RANGE"), &
937 description="The cutoff radius (in Angstrom) for the truncated Coulomb operator.", &
938 usage="CUTOFF_RADIUS {double}", &
939 default_r_val=0.0_dp, &
940 repeats=.false.)
941 CALL section_add_keyword(subsubsubsection, keyword)
942 CALL keyword_release(keyword)
943
944 CALL keyword_create(keyword, __location__, name="T_C_G_DATA", &
945 description="Location of the file t_c_g.dat that contains the data for the "// &
946 "evaluation of the truncated gamma function ", &
947 usage="T_C_G_DATA {string}", &
948 default_c_val="t_c_g.dat")
949 CALL section_add_keyword(subsubsubsection, keyword)
950 CALL keyword_release(keyword)
951
952 CALL keyword_create(keyword, __location__, name="OMEGA", &
953 description="The range parameter for the short range operator (in 1/a0).", &
954 usage="OMEGA {double}", &
955 default_r_val=0.0_dp, &
956 repeats=.false.)
957 CALL section_add_keyword(subsubsubsection, keyword)
958 CALL keyword_release(keyword)
959
960 CALL section_add_subsection(subsubsection, subsubsubsection)
961 CALL section_release(subsubsubsection)
962
963 CALL section_add_subsection(subsection, subsubsection)
964 CALL section_release(subsubsection)
965
966 CALL section_add_subsection(section, subsection)
967 CALL section_release(subsection)
968! End of Kernel subsection
969
970 CALL section_create(subsection, __location__, "PRINT", "Controls the printing of information during "// &
971 "XAS TDP calculations", repeats=.false.)
972
973 CALL cp_print_key_section_create(print_key, __location__, name="SPECTRUM", &
974 description="Controls the dumping of the XAS TDP spectrum in output files", &
975 print_level=low_print_level, filename="", common_iter_levels=3)
976 CALL section_add_subsection(subsection, print_key)
977 CALL section_release(print_key)
978
979 CALL cp_print_key_section_create(print_key, __location__, name="RESTART_WFN", &
980 description="Controles the dumping of a MO restart file for a given "// &
981 "excited state index. Only for K-edge RKS calculations. "// &
982 "Can be repeated to get multiple *.wfn files at once.", &
983 print_level=debug_print_level, filename="", common_iter_levels=1)
984 CALL keyword_create(keyword, __location__, name="EXCITED_STATE_INDEX", variants=["INDEX"], &
985 description="The index of the excited state that should be dumped", &
986 usage="INDEX {int}", default_i_val=1, repeats=.true.)
987 CALL section_add_keyword(print_key, keyword)
988 CALL keyword_release(keyword)
989
990 CALL section_add_subsection(subsection, print_key)
991 CALL section_release(print_key)
992
993 CALL create_xas_pdos_section(print_key)
994 CALL section_add_subsection(subsection, print_key)
995 CALL section_release(print_key)
996
997 CALL cp_print_key_section_create(print_key, __location__, "CUBES", &
998 description="Controls the printing of the linear-response orbitals "// &
999 "as *.cube files.", &
1000 print_level=high_print_level, common_iter_levels=1, &
1001 add_last=add_last_numeric, filename="")
1002
1003 CALL keyword_create(keyword, __location__, name="STRIDE", &
1004 description="The stride (X,Y,Z) used to write the cube file "// &
1005 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1006 " 1 number valid for all components.", &
1007 usage="STRIDE 2 2 2", n_var=-1, default_i_vals=[2, 2, 2], type_of_var=integer_t)
1008 CALL section_add_keyword(print_key, keyword)
1009 CALL keyword_release(keyword)
1010
1011 CALL keyword_create(keyword, __location__, name="CUBES_LU_BOUNDS", &
1012 variants=["CUBES_LU"], &
1013 description="The lower and upper index of the excited states to be printed as cube", &
1014 usage="CUBES_LU_BOUNDS integer integer", &
1015 n_var=2, default_i_vals=[1, 0], type_of_var=integer_t)
1016 CALL section_add_keyword(print_key, keyword)
1017 CALL keyword_release(keyword)
1018
1019 CALL keyword_create(keyword, __location__, name="CUBES_LIST", &
1020 description="Indexes of the excited states to be printed as cube files "// &
1021 "This keyword can be repeated several times "// &
1022 "(useful if you have to specify many indexes).", &
1023 usage="CUBES_LIST 1 2", &
1024 n_var=-1, type_of_var=integer_t, repeats=.true.)
1025 CALL section_add_keyword(print_key, keyword)
1026 CALL keyword_release(keyword)
1027
1028 CALL keyword_create(keyword, __location__, name="APPEND", &
1029 description="append the cube files when they already exist", &
1030 default_l_val=.false., lone_keyword_l_val=.true.)
1031 CALL section_add_keyword(print_key, keyword)
1032 CALL keyword_release(keyword)
1033
1034 CALL section_add_subsection(subsection, print_key)
1035 CALL section_release(print_key)
1036
1037 CALL cp_print_key_section_create(print_key, __location__, "RESTART", &
1038 description="Controls the dumping of LR-orbitals coefficients "// &
1039 "and corresponding excitation energies such that "// &
1040 "the program can be restarted for PDOS or CUBE "// &
1041 "printing without the heavy computing.", &
1042 print_level=high_print_level, filename="", common_iter_levels=3)
1043 CALL section_add_subsection(subsection, print_key)
1044 CALL section_release(print_key)
1045
1046 CALL section_add_subsection(section, subsection)
1047 CALL section_release(subsection)
1048
1049 END SUBROUTINE create_xas_tdp_section
1050
1051END MODULE input_cp2k_xas
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public iannuzzi2007
integer, save, public shigeta2001
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 high_print_level
integer, parameter, public add_last_numeric
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
collects all constants needed in input so that they can be used without circular dependencies
integer, parameter, public xas_1s_type
integer, parameter, public xas_4p_type
integer, parameter, public xas_3s_type
integer, parameter, public xas_3d_type
integer, parameter, public xas_not_excited
integer, parameter, public xas_dscf
integer, parameter, public tddfpt_singlet
integer, parameter, public xas_none
integer, parameter, public xas_4s_type
integer, parameter, public xas_tp_xhh
integer, parameter, public xas_2p_type
integer, parameter, public ot_mini_cg
integer, parameter, public xas_dip_len
integer, parameter, public xas_dip_vel
integer, parameter, public tddfpt_triplet
integer, parameter, public ot_mini_diis
integer, parameter, public xas_2s_type
integer, parameter, public xas_tp_xfh
integer, parameter, public tddfpt_spin_flip
integer, parameter, public xas_tdp_by_kind
integer, parameter, public xas_3p_type
integer, parameter, public xas_tp_fh
integer, parameter, public xas_tp_flex
integer, parameter, public xas_4f_type
integer, parameter, public do_potential_truncated
integer, parameter, public do_potential_id
integer, parameter, public xas_4d_type
integer, parameter, public xas_tdp_by_index
integer, parameter, public do_potential_coulomb
integer, parameter, public gaussian
integer, parameter, public xas_tp_hh
integer, parameter, public do_potential_short
integer, parameter, public tddfpt_spin_cons
integer, parameter, public xes_tp_val
subroutine, public create_localize_section(section)
parameters fo the localization of wavefunctions
subroutine, public print_wanniers(section)
Controls the printing of the basic info coming from the LOCALIZE section.
function that build the print section of the dft input
subroutine, public add_dos_keywords(print_key, xas_mode)
Add projected-DOS related keywords to a DOS or XAS PDOS print section.
function that build the scf section of the input
subroutine, public create_scf_section(section)
creates the structure of the section with the DFT SCF parameters
function that build the XAS section of the input
subroutine, public create_xas_section(section)
makes the input section for core-level spectroscopy simulations
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_fun_section(section)
creates the structure of the section needed to select the xc functional
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 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