(git:97501a3)
Loading...
Searching...
No Matches
input_cp2k_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!> 10.2005 moved out of input_cp2k [fawzi]
12!> \author fawzi
13! **************************************************************************************************
17 USE bibliography, ONLY: &
27 USE cp_spline_utils, ONLY: pw_interp,&
30 USE cp_units, ONLY: cp_unit_to_cp2k
31 USE input_constants, ONLY: &
86 USE input_val_types, ONLY: char_t,&
87 integer_t,&
88 lchar_t,&
89 real_t
90 USE kinds, ONLY: dp
91 USE physcon, ONLY: evolt,&
93 USE pw_spline_utils, ONLY: no_precond,&
99 USE string_utilities, ONLY: s2a
100#include "./base/base_uses.f90"
101
102 IMPLICIT NONE
103 PRIVATE
104
105 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_dft'
106
107 PUBLIC :: create_dft_section
108 PUBLIC :: create_bsse_section
109 PUBLIC :: create_interp_section
110 PUBLIC :: create_mgrid_section
111
112CONTAINS
113
114! **************************************************************************************************
115!> \brief creates the dft section
116!> \param section the section to be created
117!> \author fawzi
118! **************************************************************************************************
119 SUBROUTINE create_dft_section(section)
120 TYPE(section_type), POINTER :: section
121
122 TYPE(keyword_type), POINTER :: keyword
123 TYPE(section_type), POINTER :: subsection
124
125 cpassert(.NOT. ASSOCIATED(section))
126 CALL section_create(section, __location__, name="DFT", &
127 description="Parameter needed by LCAO DFT programs", &
128 n_keywords=3, n_subsections=4, repeats=.false.)
129
130 NULLIFY (keyword)
131 CALL keyword_create(keyword, __location__, name="BASIS_SET_FILE_NAME", &
132 description="Name of the basis set file, may include a path", &
133 usage="BASIS_SET_FILE_NAME <FILENAME>", &
134 type_of_var=lchar_t, repeats=.true., &
135 default_lc_val="BASIS_SET", n_var=1)
136 CALL section_add_keyword(section, keyword)
137 CALL keyword_release(keyword)
138
139 CALL keyword_create(keyword, __location__, name="POTENTIAL_FILE_NAME", &
140 description="Name of the pseudo potential file, may include a path", &
141 usage="POTENTIAL_FILE_NAME <FILENAME>", &
142 default_lc_val="POTENTIAL")
143 CALL section_add_keyword(section, keyword)
144 CALL keyword_release(keyword)
145
146 CALL keyword_create(keyword, __location__, name="WFN_RESTART_FILE_NAME", &
147 variants=(/"RESTART_FILE_NAME"/), &
148 description="Name of the wavefunction restart file, may include a path."// &
149 " If no file is specified, the default is to open the file as generated by the wfn restart print key.", &
150 usage="WFN_RESTART_FILE_NAME <FILENAME>", &
151 type_of_var=lchar_t)
152 CALL section_add_keyword(section, keyword)
153 CALL keyword_release(keyword)
154
155 CALL keyword_create(keyword, __location__, &
156 name="UKS", &
157 variants=s2a("UNRESTRICTED_KOHN_SHAM", &
158 "LSD", &
159 "SPIN_POLARIZED"), &
160 description="Requests a spin-polarized calculation using alpha "// &
161 "and beta orbitals, i.e. no spin restriction is applied", &
162 usage="LSD", &
163 default_l_val=.false., &
164 lone_keyword_l_val=.true.)
165 CALL section_add_keyword(section, keyword)
166 CALL keyword_release(keyword)
167 CALL keyword_create(keyword, __location__, &
168 name="ROKS", &
169 variants=(/"RESTRICTED_OPEN_KOHN_SHAM"/), &
170 description="Requests a restricted open Kohn-Sham calculation", &
171 usage="ROKS", &
172 default_l_val=.false., &
173 lone_keyword_l_val=.true.)
174 CALL section_add_keyword(section, keyword)
175 CALL keyword_release(keyword)
176 CALL keyword_create(keyword, __location__, &
177 name="MULTIPLICITY", &
178 variants=(/"MULTIP"/), &
179 description="Two times the total spin plus one. "// &
180 "Specify 3 for a triplet, 4 for a quartet, "// &
181 "and so on. Default is 1 (singlet) for an "// &
182 "even number and 2 (doublet) for an odd number "// &
183 "of electrons.", &
184 usage="MULTIPLICITY 3", &
185 default_i_val=0) ! this default value is just a flag to get the above
186 CALL section_add_keyword(section, keyword)
187 CALL keyword_release(keyword)
188 CALL keyword_create(keyword, __location__, name="CHARGE", &
189 description="The total charge of the system", &
190 usage="CHARGE -1", &
191 default_i_val=0)
192 CALL section_add_keyword(section, keyword)
193 CALL keyword_release(keyword)
194
195 CALL keyword_create(keyword, __location__, &
196 name="PLUS_U_METHOD", &
197 description="Method employed for the calculation of the DFT+U contribution", &
198 repeats=.false., &
199 enum_c_vals=s2a("LOWDIN", "MULLIKEN", "MULLIKEN_CHARGES"), &
201 enum_desc=s2a("Method based on Lowdin population analysis "// &
202 "(computationally expensive, since the diagonalization of the "// &
203 "overlap matrix is required, but possibly more robust than Mulliken)", &
204 "Method based on Mulliken population analysis using the net AO and "// &
205 "overlap populations (computationally cheap method)", &
206 "Method based on Mulliken gross orbital populations (GOP)"), &
207 n_var=1, &
208 default_i_val=plus_u_mulliken, &
209 usage="PLUS_U_METHOD Lowdin")
210 CALL section_add_keyword(section, keyword)
211 CALL keyword_release(keyword)
212
213 CALL keyword_create(keyword, __location__, &
214 name="RELAX_MULTIPLICITY", &
215 variants=(/"RELAX_MULTIP"/), &
216 description="Tolerance in Hartrees. Do not enforce the occupation "// &
217 "of alpha and beta MOs due to the initially "// &
218 "defined multiplicity, but rather follow the Aufbau principle. "// &
219 "A value greater than zero activates this option. "// &
220 "If alpha/beta MOs differ in energy less than this tolerance, "// &
221 "then alpha-MO occupation is preferred even if it is higher "// &
222 "in energy (within the tolerance). "// &
223 "Such spin-symmetry broken (spin-polarized) occupation is used "// &
224 "as SCF input, which (is assumed to) bias the SCF "// &
225 "towards a spin-polarized solution. "// &
226 "Thus, larger tolerance increases chances of ending up "// &
227 "with spin-polarization. "// &
228 "This option is only valid for unrestricted (i.e. spin polarised) "// &
229 "Kohn-Sham (UKS) calculations. It also needs non-zero "// &
230 "[ADDED_MOS](#CP2K_INPUT.FORCE_EVAL.DFT.SCF.ADDED_MOS) to actually affect the calculations, "// &
231 "which is why it is not expected to work with [OT](#CP2K_INPUT.FORCE_EVAL.DFT.SCF.OT) "// &
232 "and may raise errors when used with OT. "// &
233 "For more details see [this discussion](https://github.com/cp2k/cp2k/issues/4389).", &
234 usage="RELAX_MULTIPLICITY 0.00001", &
235 repeats=.false., &
236 default_r_val=0.0_dp)
237 CALL section_add_keyword(section, keyword)
238 CALL keyword_release(keyword)
239
240 CALL keyword_create(keyword, __location__, name="SUBCELLS", &
241 description="Read the grid size for subcell generation in the construction of "// &
242 "neighbor lists.", usage="SUBCELLS 1.5", &
243 n_var=1, default_r_val=2.0_dp)
244 CALL section_add_keyword(section, keyword)
245 CALL keyword_release(keyword)
246
247 CALL keyword_create(keyword, __location__, name="AUTO_BASIS", &
248 description="Specify size of automatically generated auxiliary (RI) basis sets: "// &
249 "Options={small,medium,large,huge}", &
250 usage="AUTO_BASIS {basis_type} {basis_size}", &
251 type_of_var=char_t, repeats=.true., n_var=-1, default_c_vals=(/"X", "X"/))
252 CALL section_add_keyword(section, keyword)
253 CALL keyword_release(keyword)
254
255 CALL keyword_create(keyword, __location__, &
256 name="SURFACE_DIPOLE_CORRECTION", &
257 variants=s2a("SURFACE_DIPOLE", &
258 "SURF_DIP"), &
259 description="For slab calculations with asymmetric geometries, activate the correction of "// &
260 "the electrostatic potential with "// &
261 "by compensating for the surface dipole. Implemented only for slabs with normal "// &
262 "parallel to one Cartesian axis. The normal direction is given by the keyword SURF_DIP_DIR", &
263 usage="SURF_DIP", &
264 default_l_val=.false., &
265 lone_keyword_l_val=.true., &
266 citations=(/bengtsson1999/))
267 CALL section_add_keyword(section, keyword)
268 CALL keyword_release(keyword)
269
270 CALL keyword_create(keyword, __location__, &
271 name="SURF_DIP_DIR", &
272 description="Cartesian axis parallel to surface normal.", &
273 enum_c_vals=s2a("X", "Y", "Z"), &
274 enum_i_vals=(/1, 2, 3/), &
275 enum_desc=s2a("Along x", "Along y", "Along z"), &
276 n_var=1, &
277 default_i_val=3, &
278 usage="SURF_DIP_DIR Z")
279 CALL section_add_keyword(section, keyword)
280 CALL keyword_release(keyword)
281
282 CALL keyword_create(keyword, __location__, &
283 name="SURF_DIP_POS", &
284 description="This keyword assigns an user defined position in Angstroms "// &
285 "in the direction normal to the surface (given by SURF_DIP_DIR). "// &
286 "The default value is -1.0_dp which appplies the correction at a position "// &
287 "that has minimum electron density on the grid.", &
288 usage="SURF_DIP_POS -1.0_dp", &
289 default_r_val=-1.0_dp)
290 CALL section_add_keyword(section, keyword)
291 CALL keyword_release(keyword)
292
293 CALL keyword_create(keyword, __location__, &
294 name="SURF_DIP_SWITCH", &
295 description="WARNING: Experimental feature under development that will help the "// &
296 "user to switch parameters to facilitate SCF convergence. In its current form the "// &
297 "surface dipole correction is switched off if the calculation does not converge in "// &
298 "(0.5*MAX_SCF + 1) outer_scf steps. "// &
299 "The default value is .FALSE.", &
300 usage="SURF_DIP_SWITCH .TRUE.", &
301 default_l_val=.false., &
302 lone_keyword_l_val=.true.)
303 CALL section_add_keyword(section, keyword)
304 CALL keyword_release(keyword)
305
306 CALL keyword_create(keyword, __location__, &
307 name="CORE_CORR_DIP", &
308 description="If the total CORE_CORRECTION is non-zero and surface dipole "// &
309 "correction is switched on, presence of this keyword will adjust electron "// &
310 "density via MO occupation to reflect the total CORE_CORRECTION. "// &
311 "The default value is .FALSE.", &
312 usage="CORE_CORR_DIP .TRUE.", &
313 default_l_val=.false., &
314 lone_keyword_l_val=.true.)
315 CALL section_add_keyword(section, keyword)
316 CALL keyword_release(keyword)
317
318 CALL keyword_create(keyword, __location__, &
319 name="SORT_BASIS", &
320 description="Sort basis sets according to a certain criterion. ", &
321 enum_c_vals=s2a("DEFAULT", "EXP"), &
322 enum_i_vals=(/basis_sort_default, basis_sort_zet/), &
323 enum_desc=s2a("don't sort", "sort w.r.t. exponent"), &
324 default_i_val=basis_sort_default, &
325 usage="SORT_BASIS EXP")
326 CALL section_add_keyword(section, keyword)
327 CALL keyword_release(keyword)
328
329 NULLIFY (subsection)
330 CALL create_scf_section(subsection)
331 CALL section_add_subsection(section, subsection)
332 CALL section_release(subsection)
333
334 CALL create_ls_scf_section(subsection)
335 CALL section_add_subsection(section, subsection)
336 CALL section_release(subsection)
337
338 CALL create_almo_scf_section(subsection)
339 CALL section_add_subsection(section, subsection)
340 CALL section_release(subsection)
341
342 CALL create_kg_section(subsection)
343 CALL section_add_subsection(section, subsection)
344 CALL section_release(subsection)
345
346 CALL create_harris_section(subsection)
347 CALL section_add_subsection(section, subsection)
348 CALL section_release(subsection)
349
350 CALL create_ec_section(subsection)
351 CALL section_add_subsection(section, subsection)
352 CALL section_release(subsection)
353
354 CALL create_exstate_section(subsection)
355 CALL section_add_subsection(section, subsection)
356 CALL section_release(subsection)
357
358 CALL create_admm_section(subsection)
359 CALL section_add_subsection(section, subsection)
360 CALL section_release(subsection)
361
362 CALL create_qs_section(subsection)
363 CALL section_add_subsection(section, subsection)
364 CALL section_release(subsection)
365
366 CALL create_mgrid_section(subsection, create_subsections=.true.)
367 CALL section_add_subsection(section, subsection)
368 CALL section_release(subsection)
369
370 CALL create_xc_section(subsection)
371 CALL section_add_subsection(section, subsection)
372 CALL section_release(subsection)
373
374 CALL create_relativistic_section(subsection)
375 CALL section_add_subsection(section, subsection)
376 CALL section_release(subsection)
377
378 CALL create_sic_section(subsection)
379 CALL section_add_subsection(section, subsection)
380 CALL section_release(subsection)
381
382 CALL create_low_spin_roks_section(subsection)
383 CALL section_add_subsection(section, subsection)
384 CALL section_release(subsection)
385
386 CALL create_efield_section(subsection)
387 CALL section_add_subsection(section, subsection)
388 CALL section_release(subsection)
389
390 CALL create_per_efield_section(subsection)
391 CALL section_add_subsection(section, subsection)
392 CALL section_release(subsection)
393
394 CALL create_ext_pot_section(subsection)
395 CALL section_add_subsection(section, subsection)
396 CALL section_release(subsection)
397
398 CALL create_transport_section(subsection)
399 CALL section_add_subsection(section, subsection)
400 CALL section_release(subsection)
401
402 ! ZMP sections to include the external density or v_xc potential
403 CALL create_ext_den_section(subsection)
404 CALL section_add_subsection(section, subsection)
405 CALL section_release(subsection)
406
407 CALL create_ext_vxc_section(subsection)
408 CALL section_add_subsection(section, subsection)
409 CALL section_release(subsection)
410
411 CALL create_poisson_section(subsection)
412 CALL section_add_subsection(section, subsection)
413 CALL section_release(subsection)
414
415 CALL create_kpoints_section(subsection)
416 CALL section_add_subsection(section, subsection)
417 CALL section_release(subsection)
418
419 CALL create_implicit_solv_section(subsection)
420 CALL section_add_subsection(section, subsection)
421 CALL section_release(subsection)
422
423 CALL create_density_fitting_section(subsection)
424 CALL section_add_subsection(section, subsection)
425 CALL section_release(subsection)
426
427 CALL create_xas_section(subsection)
428 CALL section_add_subsection(section, subsection)
429 CALL section_release(subsection)
430
431 CALL create_xas_tdp_section(subsection)
432 CALL section_add_subsection(section, subsection)
433 CALL section_release(subsection)
434
435 CALL create_localize_section(subsection)
436 CALL section_add_subsection(section, subsection)
437 CALL section_release(subsection)
438
439 CALL create_rtp_section(subsection)
440 CALL section_add_subsection(section, subsection)
441 CALL section_release(subsection)
442
443 CALL create_print_dft_section(subsection)
444 CALL section_add_subsection(section, subsection)
445 CALL section_release(subsection)
446
447 CALL create_sccs_section(subsection)
448 CALL section_add_subsection(section, subsection)
449 CALL section_release(subsection)
450
451 CALL create_active_space_section(subsection)
452 CALL section_add_subsection(section, subsection)
453 CALL section_release(subsection)
454
455 CALL create_dft_smeagol_section(subsection)
456 CALL section_add_subsection(section, subsection)
457 CALL section_release(subsection)
458
459 CALL create_hairy_probes_section(subsection)
460 CALL section_add_subsection(section, subsection)
461 CALL section_release(subsection)
462
463 END SUBROUTINE create_dft_section
464
465! **************************************************************************************************
466!> \brief Hairy Probe DFT Model
467!> \param section ...
468!> \author Margherita Buraschi
469! **************************************************************************************************
470
471 SUBROUTINE create_hairy_probes_section(section)
472 TYPE(section_type), POINTER :: section
473
474 TYPE(keyword_type), POINTER :: keyword
475
476 NULLIFY (keyword)
477 cpassert(.NOT. ASSOCIATED(section))
478 CALL section_create(section, __location__, &
479 name="HAIRY_PROBES", &
480 description="Sets up a Hairy Probe calculation. ", &
481 n_keywords=0, n_subsections=0, repeats=.true.)
482
483 CALL keyword_create(keyword, __location__, &
484 name="_SECTION_PARAMETERS_", &
485 description="Controls the activation of hairy probe", &
486 usage="&HAIRY_PROBES ON", &
487 default_l_val=.false., &
488 lone_keyword_l_val=.true.)
489 CALL section_add_keyword(section, keyword)
490 CALL keyword_release(keyword)
491
492 CALL keyword_create(keyword, __location__, name="ATOM_IDS", &
493 description="Indexes of the atoms to which the probes are attached.", &
494 usage="ATOM_IDS <INTEGER> .. <INTEGER>", &
495 type_of_var=integer_t, n_var=-1)
496 CALL section_add_keyword(section, keyword)
497 CALL keyword_release(keyword)
498
499 CALL keyword_create(keyword, __location__, name="T", &
500 description="Electronic temperature [K]", &
501 usage="T <REAL>", &
502 default_r_val=cp_unit_to_cp2k(value=300.0_dp, unit_str="K"), &
503 unit_str="K")
504 CALL section_add_keyword(section, keyword)
505 CALL keyword_release(keyword)
506
507 CALL keyword_create(keyword, __location__, name="MU", &
508 description="Chemical potential of the electrons in the probes [eV] ", &
509 usage="MU <REAL>", &
510 default_r_val=cp_unit_to_cp2k(value=0.0_dp, unit_str="eV"), &
511 unit_str="eV")
512 CALL section_add_keyword(section, keyword)
513 CALL keyword_release(keyword)
514
515 CALL keyword_create(keyword, __location__, name="ALPHA", &
516 description="Parameter for solution probes ", &
517 usage="ALPHA <REAL>", &
518 default_r_val=1.0_dp)
519 CALL section_add_keyword(section, keyword)
520 CALL keyword_release(keyword)
521
522 CALL keyword_create(keyword, __location__, name="EPS_HP", &
523 description=" Tolerance for accuracy checks on occupation numbers "// &
524 "calculated using hair-probes. ", &
525 usage="EPS_HP <REAL>", &
526 default_r_val=1.0e-5_dp)
527 CALL section_add_keyword(section, keyword)
528 CALL keyword_release(keyword)
529 END SUBROUTINE create_hairy_probes_section
530!####################################################################################
531
532! **************************************************************************************************
533!> \brief Implicit Solvation Model
534!> \param section ...
535!> \author tlaino
536! **************************************************************************************************
537 SUBROUTINE create_implicit_solv_section(section)
538 TYPE(section_type), POINTER :: section
539
540 TYPE(keyword_type), POINTER :: keyword
541 TYPE(section_type), POINTER :: print_key, subsection
542
543 NULLIFY (keyword, subsection, print_key)
544 cpassert(.NOT. ASSOCIATED(section))
545 CALL section_create(section, __location__, name="SCRF", &
546 description="Adds an implicit solvation model to the DFT calculation."// &
547 " Know also as Self Consistent Reaction Field.", &
548 n_keywords=0, n_subsections=0, repeats=.false.)
549
550 CALL keyword_create(keyword, __location__, name="EPS_OUT", &
551 description="Value of the dielectric constant outside the sphere", &
552 usage="EPS_OUT <REAL>", &
553 default_r_val=1.0_dp)
554 CALL section_add_keyword(section, keyword)
555 CALL keyword_release(keyword)
556
557 CALL keyword_create(keyword, __location__, name="LMAX", &
558 description="Maximum value of L used in the multipole expansion", &
559 usage="LMAX <INTEGER>", &
560 default_i_val=3)
561 CALL section_add_keyword(section, keyword)
562 CALL keyword_release(keyword)
563
564 CALL create_sphere_section(subsection)
565 CALL section_add_subsection(section, subsection)
566 CALL section_release(subsection)
567
568 CALL cp_print_key_section_create(print_key, __location__, "program_run_info", &
569 description="Controls the printing basic info about the method", &
570 print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
571 CALL section_add_subsection(section, print_key)
572 CALL section_release(print_key)
573
574 END SUBROUTINE create_implicit_solv_section
575
576! **************************************************************************************************
577!> \brief Create Sphere cavity
578!> \param section ...
579!> \author tlaino
580! **************************************************************************************************
581 SUBROUTINE create_sphere_section(section)
582 TYPE(section_type), POINTER :: section
583
584 TYPE(keyword_type), POINTER :: keyword
585 TYPE(section_type), POINTER :: subsection
586
587 NULLIFY (keyword, subsection)
588 cpassert(.NOT. ASSOCIATED(section))
589 CALL section_create(section, __location__, name="SPHERE", &
590 description="Treats the implicit solvent environment like a sphere", &
591 n_keywords=0, n_subsections=0, repeats=.false.)
592
593 CALL keyword_create(keyword, __location__, name="RADIUS", &
594 description="Value of the spherical cavity in the dielectric medium", &
595 usage="RADIUS <REAL>", &
596 unit_str="angstrom", &
597 type_of_var=real_t)
598 CALL section_add_keyword(section, keyword)
599 CALL keyword_release(keyword)
600
601 CALL create_center_section(subsection)
602 CALL section_add_subsection(section, subsection)
603 CALL section_release(subsection)
604
605 END SUBROUTINE create_sphere_section
606
607! **************************************************************************************************
608!> \brief ...
609!> \param section ...
610!> \author tlaino
611! **************************************************************************************************
612 SUBROUTINE create_center_section(section)
613 TYPE(section_type), POINTER :: section
614
615 TYPE(keyword_type), POINTER :: keyword
616
617 NULLIFY (keyword)
618 cpassert(.NOT. ASSOCIATED(section))
619 CALL section_create(section, __location__, name="CENTER", &
620 description="Defines the center of the sphere.", &
621 n_keywords=0, n_subsections=0, repeats=.false.)
622 CALL keyword_create(keyword, __location__, name="XYZ", &
623 description="Coordinates of the center of the sphere", &
624 usage="XYZ <REAL> <REAL> <REAL>", &
625 unit_str="angstrom", &
626 type_of_var=real_t, n_var=3)
627 CALL section_add_keyword(section, keyword)
628 CALL keyword_release(keyword)
629
630 CALL keyword_create(keyword, __location__, name="ATOM_LIST", &
631 description="Defines a list of atoms to define the center of the sphere", &
632 usage="ATOM_LIST <INTEGER> .. <INTEGER>", &
633 type_of_var=integer_t, n_var=-1)
634 CALL section_add_keyword(section, keyword)
635 CALL keyword_release(keyword)
636
637 CALL keyword_create(keyword, __location__, name="WEIGHT_TYPE", &
638 description="Defines the weight used to define the center of the sphere"// &
639 " (if ATOM_LIST is provided)", &
640 usage="WEIGHT_TYPE (UNIT|MASS)", &
641 enum_c_vals=(/"UNIT", "MASS"/), &
642 enum_i_vals=(/weight_type_unit, weight_type_mass/), &
643 default_i_val=weight_type_unit)
644 CALL section_add_keyword(section, keyword)
645 CALL keyword_release(keyword)
646
647 CALL keyword_create(keyword, __location__, name="FIXED", &
648 description="Specify if the center of the sphere should be fixed or"// &
649 " allowed to move", &
650 usage="FIXED <LOGICAL>", &
651 default_l_val=.true.)
652 CALL section_add_keyword(section, keyword)
653 CALL keyword_release(keyword)
654
655 END SUBROUTINE create_center_section
656
657! **************************************************************************************************
658!> \brief ...
659!> \param section ...
660! **************************************************************************************************
661 SUBROUTINE create_admm_section(section)
662 TYPE(section_type), POINTER :: section
663
664 TYPE(keyword_type), POINTER :: keyword
665
666 NULLIFY (keyword)
667 cpassert(.NOT. ASSOCIATED(section))
668 CALL section_create(section, __location__, name="AUXILIARY_DENSITY_MATRIX_METHOD", &
669 description="Parameters needed for the ADMM method.", &
670 n_keywords=1, n_subsections=1, repeats=.false., &
671 citations=(/guidon2010/))
672
673 CALL keyword_create( &
674 keyword, __location__, &
675 name="ADMM_TYPE", &
676 description="Type of ADMM (sort name) as refered in literature. "// &
677 "This sets values for METHOD, ADMM_PURIFICATION_METHOD, and EXCH_SCALING_MODEL", &
678 enum_c_vals=s2a("NONE", "ADMM1", "ADMM2", "ADMMS", "ADMMP", "ADMMQ"), &
679 enum_desc=s2a("No short name is used, use specific definitions (default)", &
680 "ADMM1 method from Guidon2010", &
681 "ADMM2 method from Guidon2010", &
682 "ADMMS method from Merlot2014", &
683 "ADMMP method from Merlot2014", &
684 "ADMMQ method from Merlot2014"), &
686 default_i_val=no_admm_type, &
687 citations=(/guidon2010, merlot2014/))
688 CALL section_add_keyword(section, keyword)
689 CALL keyword_release(keyword)
690
691 CALL keyword_create( &
692 keyword, __location__, &
693 name="ADMM_PURIFICATION_METHOD", &
694 description="Method that shall be used for wavefunction fitting. Use MO_DIAG for MD.", &
695 enum_c_vals=s2a("NONE", "CAUCHY", "CAUCHY_SUBSPACE", "MO_DIAG", "MO_NO_DIAG", "MCWEENY", "NONE_DM"), &
699 enum_desc=s2a("Do not apply any purification", &
700 "Perform purification via general Cauchy representation", &
701 "Perform purification via Cauchy representation in occupied subspace", &
702 "Calculate MO derivatives via Cauchy representation by diagonalization", &
703 "Calculate MO derivatives via Cauchy representation by inversion", &
704 "Perform original McWeeny purification via matrix multiplications", &
705 "Do not apply any purification, works directly with density matrix"), &
706 default_i_val=do_admm_purify_mo_diag)
707 CALL section_add_keyword(section, keyword)
708 CALL keyword_release(keyword)
709
710 CALL keyword_create( &
711 keyword, __location__, &
712 name="METHOD", &
713 description="Method that shall be used for wavefunction fitting. Use BASIS_PROJECTION for MD.", &
714 enum_c_vals=s2a("BASIS_PROJECTION", "BLOCKED_PROJECTION_PURIFY_FULL", "BLOCKED_PROJECTION", &
715 "CHARGE_CONSTRAINED_PROJECTION"), &
718 enum_desc=s2a("Construct auxiliary density matrix from auxiliary basis.", &
719 "Construct auxiliary density from a blocked Fock matrix,"// &
720 " but use the original matrix for purification.", &
721 "Construct auxiliary density from a blocked Fock matrix.", &
722 "Construct auxiliary density from auxiliary basis enforcing charge constrain."), &
723 default_i_val=do_admm_basis_projection)
724 CALL section_add_keyword(section, keyword)
725 CALL keyword_release(keyword)
726
727 CALL keyword_create( &
728 keyword, __location__, &
729 name="EXCH_SCALING_MODEL", &
730 description="Scaling of the exchange correction calculated by the auxiliary density matrix.", &
731 enum_c_vals=s2a("NONE", "MERLOT"), &
733 enum_desc=s2a("No scaling is enabled, refers to methods ADMM1, ADMM2 or ADMMQ.", &
734 "Exchange scaling according to Merlot (2014)"), &
735 default_i_val=do_admm_exch_scaling_none)
736 CALL section_add_keyword(section, keyword)
737 CALL keyword_release(keyword)
738
739 CALL keyword_create( &
740 keyword, __location__, &
741 name="EXCH_CORRECTION_FUNC", &
742 description="Exchange functional which is used for the ADMM correction. "// &
743 "LibXC implementations require linking with LibXC", &
744 enum_c_vals=s2a("DEFAULT", "PBEX", "NONE", "OPTX", "BECKE88X", &
745 "PBEX_LIBXC", "BECKE88X_LIBXC", "OPTX_LIBXC", "DEFAULT_LIBXC", "LDA_X_LIBXC"), &
751 enum_desc=s2a("Use PBE-based corrections according to the chosen interaction operator.", &
752 "Use PBEX functional for exchange correction.", &
753 "No correction: X(D)-x(d)-> 0.", &
754 "Use OPTX functional for exchange correction.", &
755 "Use Becke88X functional for exchange correction.", &
756 "Use PBEX functional (LibXC implementation) for exchange correction.", &
757 "Use Becke88X functional (LibXC implementation) for exchange correction.", &
758 "Use OPTX functional (LibXC implementation) for exchange correction.", &
759 "Use PBE-based corrections (LibXC where possible) to the chosen interaction operator.", &
760 "Use Slater X functional (LibXC where possible) for exchange correction."), &
761 default_i_val=do_admm_aux_exch_func_default)
762 CALL section_add_keyword(section, keyword)
763 CALL keyword_release(keyword)
764
765 CALL keyword_create(keyword, __location__, name="optx_a1", &
766 description="OPTX a1 coefficient", &
767 default_r_val=1.05151_dp)
768 CALL section_add_keyword(section, keyword)
769 CALL keyword_release(keyword)
770 CALL keyword_create(keyword, __location__, name="optx_a2", &
771 description="OPTX a2 coefficient", &
772 default_r_val=1.43169_dp)
773 CALL section_add_keyword(section, keyword)
774 CALL keyword_release(keyword)
775 CALL keyword_create(keyword, __location__, name="optx_gamma", &
776 description="OPTX gamma coefficient", &
777 default_r_val=0.006_dp)
778 CALL section_add_keyword(section, keyword)
779 CALL keyword_release(keyword)
780
781 CALL keyword_create(keyword, __location__, name="BLOCK_LIST", &
782 description="Specifies a list of atoms.", &
783 usage="BLOCK_LIST {integer} {integer} .. {integer}", &
784 n_var=-1, type_of_var=integer_t, repeats=.true.)
785 CALL section_add_keyword(section, keyword)
786 CALL keyword_release(keyword)
787
788 CALL keyword_create(keyword, __location__, name="EPS_FILTER", &
789 description="Define accuracy of DBCSR operations", &
790 usage="EPS_FILTER", default_r_val=0.0_dp)
791 CALL section_add_keyword(section, keyword)
792 CALL keyword_release(keyword)
793
794 END SUBROUTINE create_admm_section
795
796! **************************************************************************************************
797!> \brief ...
798!> \param section ...
799! **************************************************************************************************
800 SUBROUTINE create_density_fitting_section(section)
801 TYPE(section_type), POINTER :: section
802
803 TYPE(keyword_type), POINTER :: keyword
804 TYPE(section_type), POINTER :: print_key
805
806 NULLIFY (keyword, print_key)
807 cpassert(.NOT. ASSOCIATED(section))
808 CALL section_create(section, __location__, name="DENSITY_FITTING", &
809 description="Setup parameters for density fitting (Bloechl charges or density derived "// &
810 "atomic point charges (DDAPC) charges)", &
811 n_keywords=7, n_subsections=0, repeats=.false., &
812 citations=(/blochl1995/))
813
814 CALL keyword_create(keyword, __location__, name="NUM_GAUSS", &
815 description="Specifies the numbers of gaussian used to fit the QM density for each atomic site.", &
816 usage="NUM_GAUSS {integer}", &
817 n_var=1, type_of_var=integer_t, default_i_val=3)
818 CALL section_add_keyword(section, keyword)
819 CALL keyword_release(keyword)
820
821 CALL keyword_create(keyword, __location__, name="PFACTOR", &
822 description="Specifies the progression factor for the gaussian exponent for each atomic site.", &
823 usage="PFACTOR {real}", &
824 n_var=1, type_of_var=real_t, default_r_val=1.5_dp)
825 CALL section_add_keyword(section, keyword)
826 CALL keyword_release(keyword)
827
828 CALL keyword_create(keyword, __location__, name="MIN_RADIUS", &
829 description="Specifies the smallest radius of the gaussian used in the fit. All other radius are"// &
830 " obtained with the progression factor.", &
831 usage="MIN_RADIUS {real}", &
832 unit_str="angstrom", n_var=1, type_of_var=real_t, default_r_val=0.5_dp)
833 CALL section_add_keyword(section, keyword)
834 CALL keyword_release(keyword)
835
836 CALL keyword_create(keyword, __location__, name="RADII", &
837 description="Specifies all the radius of the gaussian used in the fit for each atomic site. The use"// &
838 " of this keyword disables all other keywords of this section.", &
839 usage="RADII {real} {real} .. {real}", &
840 unit_str="angstrom", n_var=-1, type_of_var=real_t)
841 CALL section_add_keyword(section, keyword)
842 CALL keyword_release(keyword)
843
844 CALL keyword_create(keyword, __location__, name="GCUT", &
845 description="Cutoff for charge fit in G-space.", &
846 usage="GCUT {real}", &
847 n_var=1, type_of_var=real_t, default_r_val=sqrt(6.0_dp))
848 CALL section_add_keyword(section, keyword)
849 CALL keyword_release(keyword)
850
851 CALL cp_print_key_section_create(print_key, __location__, "program_run_info", &
852 description="Controls the printing of basic information during the run", &
853 print_level=high_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
854
855 CALL keyword_create(keyword, __location__, name="CONDITION_NUMBER", &
856 description="Prints information regarding the condition numbers of the A matrix (to be inverted)", &
857 usage="CONDITION_NUMBER <LOGICAL>", &
858 default_l_val=.false., lone_keyword_l_val=.true.)
859 CALL section_add_keyword(print_key, keyword)
860 CALL keyword_release(keyword)
861
862 CALL section_add_subsection(section, print_key)
863 CALL section_release(print_key)
864
865 END SUBROUTINE create_density_fitting_section
866
867! **************************************************************************************************
868!> \brief creates the input section for the relativistic part
869!> \param section the section to create
870!> \author jens
871! **************************************************************************************************
872 SUBROUTINE create_relativistic_section(section)
873 TYPE(section_type), POINTER :: section
874
875 TYPE(keyword_type), POINTER :: keyword
876
877 cpassert(.NOT. ASSOCIATED(section))
878 CALL section_create(section, __location__, name="relativistic", &
879 description="parameters needed and setup for relativistic calculations", &
880 n_keywords=5, n_subsections=0, repeats=.false.)
881
882 NULLIFY (keyword)
883
884 CALL keyword_create(keyword, __location__, name="method", &
885 description="type of relativistic correction used", &
886 usage="method (NONE|DKH|ZORA)", default_i_val=rel_none, &
887 enum_c_vals=s2a("NONE", "DKH", "ZORA"), &
888 enum_i_vals=(/rel_none, rel_dkh, rel_zora/), &
889 enum_desc=s2a("Use no relativistic correction", &
890 "Use Douglas-Kroll-Hess method", &
891 "Use ZORA method"))
892 CALL section_add_keyword(section, keyword)
893 CALL keyword_release(keyword)
894
895 CALL keyword_create(keyword, __location__, name="DKH_order", &
896 description="The order of the DKH transformation ", &
897 usage="DKH_order 2", default_i_val=2)
898 CALL section_add_keyword(section, keyword)
899 CALL keyword_release(keyword)
900
901 CALL keyword_create(keyword, __location__, name="ZORA_type", &
902 description="Type of ZORA method to be used", &
903 usage="ZORA_type scMP", default_i_val=rel_zora_full, &
904 enum_c_vals=s2a("FULL", "MP", "scMP"), &
905 enum_desc=s2a("Full ZORA method (not implemented)", &
906 "ZORA with atomic model potential", &
907 "Scaled ZORA with atomic model potential"), &
908 enum_i_vals=(/rel_zora_full, rel_zora_mp, rel_sczora_mp/))
909 CALL section_add_keyword(section, keyword)
910 CALL keyword_release(keyword)
911
912 CALL keyword_create(keyword, __location__, name="transformation", &
913 description="Type of DKH transformation", &
914 usage="transformation (FULL|MOLECULE|ATOM)", default_i_val=rel_trans_atom, &
915 enum_c_vals=s2a("FULL", "MOLECULE", "ATOM"), &
917 enum_desc=s2a("Use full matrix transformation", &
918 "Use transformation blocked by molecule", &
919 "Use atomic blocks"))
920 CALL section_add_keyword(section, keyword)
921 CALL keyword_release(keyword)
922
923 CALL keyword_create(keyword, __location__, name="z_cutoff", &
924 description="The minimal atomic number considered for atom transformation", &
925 usage="z_cutoff 50", default_i_val=1)
926 CALL section_add_keyword(section, keyword)
927 CALL keyword_release(keyword)
928
929 CALL keyword_create(keyword, __location__, name="potential", &
930 description="External potential used in DKH transformation, full 1/r or erfc(r)/r", &
931 usage="POTENTIAL {FULL,ERFC}", default_i_val=rel_pot_erfc, &
932 enum_c_vals=s2a("FULL", "ERFC"), &
933 enum_i_vals=(/rel_pot_full, rel_pot_erfc/))
934 CALL section_add_keyword(section, keyword)
935 CALL keyword_release(keyword)
936
937 END SUBROUTINE create_relativistic_section
938
939! **************************************************************************************************
940!> \brief creates the KG section
941!> \param section ...
942!> \author Martin Haeufel [2012.07]
943! **************************************************************************************************
944 SUBROUTINE create_kg_section(section)
945 TYPE(section_type), POINTER :: section
946
947 TYPE(keyword_type), POINTER :: keyword
948 TYPE(section_type), POINTER :: print_key, subsection
949
950 cpassert(.NOT. ASSOCIATED(section))
951 CALL section_create(section, __location__, name="KG_METHOD", &
952 description="Specifies the parameters for a Kim-Gordon-like partitioning"// &
953 " into molecular subunits", &
954 n_keywords=0, n_subsections=1, repeats=.false., &
955 citations=(/iannuzzi2006, brelaz1979, andermatt2016/))
956
957 NULLIFY (keyword, subsection, print_key)
958
959 ! add a XC section
960 CALL create_xc_section(subsection)
961 CALL section_add_subsection(section, subsection)
962 CALL section_release(subsection)
963
964 ! add LRI section
965 CALL create_lrigpw_section(subsection)
966 CALL section_add_subsection(section, subsection)
967 CALL section_release(subsection)
968
969 CALL keyword_create(keyword, __location__, name="COLORING_METHOD", &
970 description="Which algorithm to use for coloring.", &
971 usage="COLORING_METHOD GREEDY", &
972 default_i_val=kg_color_dsatur, &
973 enum_c_vals=s2a("DSATUR", "GREEDY"), &
974 enum_desc=s2a("Maximum degree of saturation, relatively accurate", &
975 "Greedy, fast coloring, less accurate"), &
976 enum_i_vals=(/kg_color_dsatur, kg_color_greedy/))
977 CALL section_add_keyword(section, keyword)
978 CALL keyword_release(keyword)
979
980 CALL keyword_create(keyword, __location__, name="TNADD_METHOD", &
981 description="Algorithm to use for the calculation of the nonadditive kinetic energy.", &
982 usage="TNADD_METHOD ATOMIC", &
983 default_i_val=kg_tnadd_embed, &
984 enum_c_vals=s2a("EMBEDDING", "RI_EMBEDDING", "ATOMIC", "NONE"), &
985 enum_desc=s2a("Use full embedding potential (see Iannuzzi et al)", &
986 "Use full embedding potential with RI density fitting", &
987 "Use sum of atomic model potentials", &
988 "Do not use kinetic energy embedding"), &
990 CALL section_add_keyword(section, keyword)
991 CALL keyword_release(keyword)
992
993 CALL keyword_create(keyword, __location__, name="INTEGRATION_GRID", &
994 description="Grid [small,medium,large,huge]to be used for the TNADD integration.", &
995 usage="INTEGRATION_GRID MEDIUM", &
996 default_c_val="MEDIUM")
997 CALL section_add_keyword(section, keyword)
998 CALL keyword_release(keyword)
999
1000 CALL section_create(subsection, __location__, name="PRINT", &
1001 description="Print section", &
1002 n_keywords=0, n_subsections=1, repeats=.false.)
1003
1004 CALL cp_print_key_section_create(print_key, __location__, "NEIGHBOR_LISTS", &
1005 description="Controls the printing of the neighbor lists.", &
1006 print_level=low_print_level, filename="__STD_OUT__", unit_str="angstrom")
1007
1008 CALL keyword_create(keyword, __location__, &
1009 name="SAB_ORB_FULL", &
1010 description="Activates the printing of the full orbital "// &
1011 "orbital neighbor lists.", &
1012 default_l_val=.false., &
1013 lone_keyword_l_val=.true.)
1014 CALL section_add_keyword(print_key, keyword)
1015 CALL keyword_release(keyword)
1016
1017 CALL keyword_create(keyword, __location__, &
1018 name="SAB_ORB_MOLECULAR", &
1019 description="Activates the printing of the orbital "// &
1020 "orbital neighbor lists for molecular subsets.", &
1021 default_l_val=.false., &
1022 lone_keyword_l_val=.true.)
1023 CALL section_add_keyword(print_key, keyword)
1024 CALL keyword_release(keyword)
1025
1026 CALL keyword_create(keyword, __location__, &
1027 name="SAC_KIN", &
1028 description="Activates the printing of the orbital "// &
1029 "atomic potential neighbor list.", &
1030 default_l_val=.false., &
1031 lone_keyword_l_val=.true.)
1032 CALL section_add_keyword(print_key, keyword)
1033 CALL keyword_release(keyword)
1034
1035 CALL section_add_subsection(subsection, print_key)
1036 CALL section_release(print_key)
1037
1038 CALL section_add_subsection(section, subsection)
1039 CALL section_release(subsection)
1040
1041 END SUBROUTINE create_kg_section
1042
1043! **************************************************************************************************
1044!> \brief Create the BSSE section for counterpoise correction
1045!> \param section the section to create
1046!> \author teo
1047! **************************************************************************************************
1048 SUBROUTINE create_bsse_section(section)
1049 TYPE(section_type), POINTER :: section
1050
1051 TYPE(keyword_type), POINTER :: keyword
1052 TYPE(section_type), POINTER :: subsection
1053
1054 cpassert(.NOT. ASSOCIATED(section))
1055 CALL section_create(section, __location__, name="BSSE", &
1056 description="This section is used to set up the BSSE calculation. "// &
1057 "It also requires that for each atomic kind X a kind X_ghost is present, "// &
1058 "with the GHOST keyword specified, in addition to the other required fields.", &
1059 n_keywords=3, n_subsections=1, repeats=.false.)
1060
1061 NULLIFY (keyword, subsection)
1062 ! FRAGMENT SECTION
1063 CALL section_create(subsection, __location__, name="FRAGMENT", &
1064 description="Specify the atom number belonging to this fragment.", &
1065 n_keywords=2, n_subsections=0, repeats=.true.)
1066
1067 CALL keyword_create(keyword, __location__, name="LIST", &
1068 description="Specifies a list of atoms.", &
1069 usage="LIST {integer} {integer} .. {integer}", &
1070 repeats=.true., n_var=-1, type_of_var=integer_t)
1071 CALL section_add_keyword(subsection, keyword)
1072 CALL keyword_release(keyword)
1073
1074 CALL section_add_subsection(section, subsection)
1075 CALL section_release(subsection)
1076
1077 ! CONFIGURATION SECTION
1078 CALL section_create(subsection, __location__, name="CONFIGURATION", &
1079 description="Specify additional parameters for the combinatorial configurations. "// &
1080 "Use this section to manually specify charge and multiplicity of the fragments "// &
1081 "and their combinations.", &
1082 n_keywords=2, n_subsections=0, repeats=.true.)
1083
1084 CALL keyword_create(keyword, __location__, name="GLB_CONF", &
1085 description="Specifies the global configuration using 1 or 0 for each fragment. "// &
1086 "1 specifies the respective fragment as used, 0 as unused.", &
1087 usage="GLB_CONF {integer} {integer} .. {integer}", &
1088 n_var=-1, type_of_var=integer_t)
1089 CALL section_add_keyword(subsection, keyword)
1090 CALL keyword_release(keyword)
1091
1092 CALL keyword_create(keyword, __location__, name="SUB_CONF", &
1093 description="Specifies the subconfiguration using 1 or 0 belonging to the global configuration. "// &
1094 "1 specifies the respective fragment as real, 0 as ghost.", &
1095 usage="SUB_CONF {integer} {integer} .. {integer}", &
1096 n_var=-1, type_of_var=integer_t)
1097 CALL section_add_keyword(subsection, keyword)
1098 CALL keyword_release(keyword)
1099
1100 CALL keyword_create(keyword, __location__, &
1101 name="MULTIPLICITY", &
1102 variants=(/"MULTIP"/), &
1103 description="Specify for each fragment the multiplicity. Two times the total spin plus one. "// &
1104 "Specify 3 for a triplet, 4 for a quartet,and so on. Default is 1 (singlet) for an "// &
1105 "even number and 2 (doublet) for an odd number of electrons.", &
1106 usage="MULTIPLICITY 3", &
1107 default_i_val=0) ! this default value is just a flag to get the above
1108 CALL section_add_keyword(subsection, keyword)
1109 CALL keyword_release(keyword)
1110
1111 CALL keyword_create(keyword, __location__, name="CHARGE", &
1112 description="The total charge for each fragment.", &
1113 usage="CHARGE -1", &
1114 default_i_val=0)
1115 CALL section_add_keyword(subsection, keyword)
1116 CALL keyword_release(keyword)
1117 CALL section_add_subsection(section, subsection)
1118 CALL section_release(subsection)
1119
1120 CALL section_create(subsection, __location__, name="FRAGMENT_ENERGIES", &
1121 description="This section contains the energies of the fragments already"// &
1122 " computed. It is useful as a summary and specifically for restarting BSSE runs.", &
1123 n_keywords=2, n_subsections=0, repeats=.true.)
1124 CALL keyword_create(keyword, __location__, name="_DEFAULT_KEYWORD_", &
1125 description="The energy computed for each fragment", repeats=.true., &
1126 usage="{REAL}", type_of_var=real_t)
1127 CALL section_add_keyword(subsection, keyword)
1128 CALL keyword_release(keyword)
1129 CALL section_add_subsection(section, subsection)
1130 CALL section_release(subsection)
1131
1132 CALL create_print_bsse_section(subsection)
1133 CALL section_add_subsection(section, subsection)
1134 CALL section_release(subsection)
1135
1136 END SUBROUTINE create_bsse_section
1137
1138! **************************************************************************************************
1139!> \brief Create the print bsse section
1140!> \param section the section to create
1141!> \author teo
1142! **************************************************************************************************
1143 SUBROUTINE create_print_bsse_section(section)
1144 TYPE(section_type), POINTER :: section
1145
1146 TYPE(section_type), POINTER :: print_key
1147
1148 cpassert(.NOT. ASSOCIATED(section))
1149 CALL section_create(section, __location__, name="print", &
1150 description="Section of possible print options in BSSE code.", &
1151 n_keywords=0, n_subsections=1, repeats=.false.)
1152
1153 NULLIFY (print_key)
1154 CALL cp_print_key_section_create(print_key, __location__, "PROGRAM_RUN_INFO", &
1155 description="Controls the printing of information regarding the run.", &
1156 print_level=low_print_level, filename="__STD_OUT__")
1157 CALL section_add_subsection(section, print_key)
1158 CALL section_release(print_key)
1159
1160 CALL cp_print_key_section_create(print_key, __location__, "RESTART", &
1161 description="Controls the dumping of the restart file during BSSE runs. "// &
1162 "By default the restart is updated after each configuration calculation is "// &
1163 "completed.", &
1164 print_level=silent_print_level, common_iter_levels=0, &
1165 add_last=add_last_numeric, filename="")
1166 CALL section_add_subsection(section, print_key)
1167 CALL section_release(print_key)
1168
1169 END SUBROUTINE create_print_bsse_section
1170
1171! **************************************************************************************************
1172!> \brief input section for optional parameters for RIGPW
1173!> \param section the section to create
1174!> \author JGH [06.2017]
1175! **************************************************************************************************
1176 SUBROUTINE create_rigpw_section(section)
1177 TYPE(section_type), POINTER :: section
1178
1179 cpassert(.NOT. ASSOCIATED(section))
1180 CALL section_create(section, __location__, name="RIGPW", &
1181 description="This section specifies optional parameters for RIGPW.", &
1182 n_keywords=1, n_subsections=0, repeats=.false.)
1183
1184! CALL keyword_create(keyword, __LOCATION__, name="RI_OVERLAP_MATRIX", &
1185! description="Specifies whether to calculate the inverse or the "// &
1186! "pseudoinverse of the overlap matrix of the auxiliary "// &
1187! "basis set. Calculating the pseudoinverse is necessary "// &
1188! "for very large auxiliary basis sets, but more expensive. "// &
1189! "Using the pseudoinverse, consistent forces are not "// &
1190! "guaranteed yet.", &
1191! usage="RI_OVERLAP_MATRIX INVERSE", &
1192! enum_c_vals=s2a("INVERSE", "PSEUDO_INVERSE_SVD", "PSEUDO_INVERSE_DIAG", &
1193! "AUTOSELECT"), &
1194! enum_desc=s2a("Calculate inverse of the overlap matrix.", &
1195! "Calculate the pseuodinverse of the overlap matrix "// &
1196! "using singular value decomposition.", &
1197! "Calculate the pseudoinverse of the overlap matrix "// &
1198! "by prior diagonalization.", &
1199! "Choose automatically for each pair whether to "// &
1200! "calculate the inverse or pseudoinverse based on the "// &
1201! "condition number of the overlap matrix for each pair. "// &
1202! "Calculating the pseudoinverse is much more expensive."), &
1203! enum_i_vals=(/do_lri_inv, do_lri_pseudoinv_svd, &
1204! do_lri_pseudoinv_diag, do_lri_inv_auto/), &
1205! default_i_val=do_lri_inv)
1206! CALL section_add_keyword(section, keyword)
1207! CALL keyword_release(keyword)
1208
1209 END SUBROUTINE create_rigpw_section
1210
1211! **************************************************************************************************
1212!> \brief creates the multigrid
1213!> \param section input section to create
1214!> \param create_subsections indicates whether or not subsections INTERPOLATOR and RS_GRID
1215!> should be created
1216!> \author fawzi
1217! **************************************************************************************************
1218 SUBROUTINE create_mgrid_section(section, create_subsections)
1219 TYPE(section_type), POINTER :: section
1220 LOGICAL, INTENT(in) :: create_subsections
1221
1222 TYPE(keyword_type), POINTER :: keyword
1223 TYPE(section_type), POINTER :: subsection
1224
1225 cpassert(.NOT. ASSOCIATED(section))
1226 CALL section_create(section, __location__, name="mgrid", &
1227 description="multigrid information", &
1228 n_keywords=5, n_subsections=1, repeats=.false.)
1229 NULLIFY (keyword)
1230 CALL keyword_create(keyword, __location__, name="NGRIDS", &
1231 description="The number of multigrids to use", &
1232 usage="ngrids 1", default_i_val=4)
1233 CALL section_add_keyword(section, keyword)
1234 CALL keyword_release(keyword)
1235
1236 CALL keyword_create(keyword, __location__, name="cutoff", &
1237 description="The cutoff of the finest grid level. Default value for "// &
1238 "SE or DFTB calculation is 1.0 [Ry].", &
1239 usage="cutoff 300", default_r_val=cp_unit_to_cp2k(value=280.0_dp, &
1240 unit_str="Ry"), n_var=1, unit_str="Ry")
1241 CALL section_add_keyword(section, keyword)
1242 CALL keyword_release(keyword)
1243
1244 CALL keyword_create(keyword, __location__, name="progression_factor", &
1245 description="Factor used to find the cutoff of the multigrids that"// &
1246 " where not given explicitly", &
1247 usage="progression_factor <integer>", default_r_val=3._dp)
1248 CALL section_add_keyword(section, keyword)
1249 CALL keyword_release(keyword)
1250
1251 CALL keyword_create(keyword, __location__, name="commensurate", &
1252 description="If the grids should be commensurate. If true overrides "// &
1253 "the progression factor and the cutoffs of the sub grids", &
1254 usage="commensurate", default_l_val=.false., &
1255 lone_keyword_l_val=.true.)
1256 CALL section_add_keyword(section, keyword)
1257 CALL keyword_release(keyword)
1258
1259 CALL keyword_create(keyword, __location__, name="realspace", &
1260 description="If both rho and rho_gspace are needed ", &
1261 usage="realspace", default_l_val=.false., &
1262 lone_keyword_l_val=.true.)
1263 CALL section_add_keyword(section, keyword)
1264 CALL keyword_release(keyword)
1265
1266 CALL keyword_create(keyword, __location__, name="REL_CUTOFF", &
1267 variants=(/"RELATIVE_CUTOFF"/), &
1268 description="Determines the grid at which a Gaussian is mapped,"// &
1269 " giving the cutoff used for a gaussian with alpha=1."// &
1270 " A value 50+-10Ry might be required for highly accurate results,"// &
1271 " Or for simulations with a variable cell."// &
1272 " Versions prior to 2.3 used a default of 30Ry.", &
1273 usage="RELATIVE_CUTOFF real", default_r_val=20.0_dp, &
1274 unit_str="Ry")
1275 CALL section_add_keyword(section, keyword)
1276 CALL keyword_release(keyword)
1277
1278 CALL keyword_create(keyword, __location__, name="MULTIGRID_SET", &
1279 description="Activate a manual setting of the multigrids", &
1280 usage="MULTIGRID_SET", default_l_val=.false.)
1281 CALL section_add_keyword(section, keyword)
1282 CALL keyword_release(keyword)
1283
1284 CALL keyword_create(keyword, __location__, &
1285 name="SKIP_LOAD_BALANCE_DISTRIBUTED", &
1286 description="Skips load balancing on distributed multigrids. "// &
1287 "Memory usage is O(p) so may be used "// &
1288 "for all but the very largest runs.", &
1289 usage="SKIP_LOAD_BALANCE_DISTRIBUTED", &
1290 default_l_val=.false., &
1291 lone_keyword_l_val=.true.)
1292! CALL keyword_create(keyword, __LOCATION__, name="SKIP_LOAD_BALANCE_DISTRIBUTED",&
1293! description="Skip load balancing on distributed multigrids, which might be memory intensive."//&
1294! "If not explicitly specified, runs using more than 1024 MPI tasks will default to .TRUE.",&
1295! usage="SKIP_LOAD_BALANCE_DISTRIBUTED", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1296
1297 CALL section_add_keyword(section, keyword)
1298 CALL keyword_release(keyword)
1299
1300 CALL keyword_create(keyword, __location__, name="MULTIGRID_CUTOFF", &
1301 variants=(/"CUTOFF_LIST"/), &
1302 description="List of cutoff values to set up multigrids manually", &
1303 usage="MULTIGRID_CUTOFF 200.0 100.0 ", &
1304 n_var=-1, &
1305 type_of_var=real_t, &
1306 unit_str="Ry")
1307 CALL section_add_keyword(section, keyword)
1308 CALL keyword_release(keyword)
1309
1310 IF (create_subsections) THEN
1311 NULLIFY (subsection)
1312 CALL create_rsgrid_section(subsection)
1313 CALL section_add_subsection(section, subsection)
1314 CALL section_release(subsection)
1315
1316 NULLIFY (subsection)
1317 CALL create_interp_section(subsection)
1318 CALL section_add_subsection(section, subsection)
1319 CALL section_release(subsection)
1320 END IF
1321 END SUBROUTINE create_mgrid_section
1322
1323! **************************************************************************************************
1324!> \brief creates the interpolation section
1325!> \param section ...
1326!> \author tlaino
1327! **************************************************************************************************
1328 SUBROUTINE create_interp_section(section)
1329 TYPE(section_type), POINTER :: section
1330
1331 TYPE(keyword_type), POINTER :: keyword
1332 TYPE(section_type), POINTER :: print_key
1333
1334 cpassert(.NOT. ASSOCIATED(section))
1335 CALL section_create(section, __location__, name="interpolator", &
1336 description="kind of interpolation used between the multigrids", &
1337 n_keywords=5, n_subsections=0, repeats=.false.)
1338
1339 NULLIFY (keyword, print_key)
1340
1341 CALL keyword_create(keyword, __location__, name="kind", &
1342 description="the interpolator to use", &
1343 usage="kind spline3", &
1344 default_i_val=pw_interp, &
1345 enum_c_vals=s2a("pw", "spline3_nopbc", "spline3"), &
1346 enum_i_vals=(/pw_interp, &
1348 CALL section_add_keyword(section, keyword)
1349 CALL keyword_release(keyword)
1350
1351 CALL keyword_create(keyword, __location__, name="safe_computation", &
1352 description="if a non unrolled calculation is to be performed in parallel", &
1353 usage="safe_computation OFF", &
1354 default_l_val=.false., &
1355 lone_keyword_l_val=.true.)
1356 CALL section_add_keyword(section, keyword)
1357 CALL keyword_release(keyword)
1358
1359 CALL keyword_create(keyword, __location__, name="aint_precond", &
1360 description="the approximate inverse to use to get the starting point"// &
1361 " for the linear solver of the spline3 methods", &
1362 usage="aint_precond copy", &
1363 default_i_val=precond_spl3_aint, &
1364 enum_c_vals=s2a("copy", "spl3_nopbc_aint1", "spl3_nopbc_aint2", &
1365 "spl3_nopbc_precond1", "spl3_nopbc_precond2", "spl3_nopbc_precond3"), &
1368 CALL section_add_keyword(section, keyword)
1369 CALL keyword_release(keyword)
1370
1371 CALL keyword_create(keyword, __location__, name="precond", &
1372 description="The preconditioner used"// &
1373 " for the linear solver of the spline3 methods", &
1374 usage="PRECOND copy", &
1375 default_i_val=precond_spl3_3, &
1376 enum_c_vals=s2a("copy", "spl3_nopbc_aint1", "spl3_nopbc_aint2", &
1377 "spl3_nopbc_precond1", "spl3_nopbc_precond2", "spl3_nopbc_precond3"), &
1380 CALL section_add_keyword(section, keyword)
1381 CALL keyword_release(keyword)
1382
1383 CALL keyword_create(keyword, __location__, name="eps_x", &
1384 description="accuracy on the solution for spline3 the interpolators", &
1385 usage="eps_x 1.e-15", default_r_val=1.e-10_dp)
1386 CALL section_add_keyword(section, keyword)
1387 CALL keyword_release(keyword)
1388
1389 CALL keyword_create(keyword, __location__, name="eps_r", &
1390 description="accuracy on the residual for spline3 the interpolators", &
1391 usage="eps_r 1.e-15", default_r_val=1.e-10_dp)
1392 CALL section_add_keyword(section, keyword)
1393 CALL keyword_release(keyword)
1394
1395 CALL keyword_create(keyword, __location__, name="max_iter", &
1396 variants=(/'maxiter'/), &
1397 description="the maximum number of iterations", &
1398 usage="max_iter 200", default_i_val=100)
1399 CALL section_add_keyword(section, keyword)
1400 CALL keyword_release(keyword)
1401
1402 NULLIFY (print_key)
1403 CALL cp_print_key_section_create(print_key, __location__, "conv_info", &
1404 description="if convergence information about the linear solver"// &
1405 " of the spline methods should be printed", &
1406 print_level=medium_print_level, each_iter_names=s2a("SPLINE_FIND_COEFFS"), &
1407 each_iter_values=(/10/), filename="__STD_OUT__", &
1408 add_last=add_last_numeric)
1409 CALL section_add_subsection(section, print_key)
1410 CALL section_release(print_key)
1411
1412 END SUBROUTINE create_interp_section
1413
1414! **************************************************************************************************
1415!> \brief creates the sic (self interaction correction) section
1416!> \param section ...
1417!> \author fawzi
1418! **************************************************************************************************
1419 SUBROUTINE create_sic_section(section)
1420 TYPE(section_type), POINTER :: section
1421
1422 TYPE(keyword_type), POINTER :: keyword
1423
1424 cpassert(.NOT. ASSOCIATED(section))
1425 CALL section_create(section, __location__, name="sic", &
1426 description="parameters for the self interaction correction", &
1427 n_keywords=6, n_subsections=0, repeats=.false., &
1428 citations=(/vandevondele2005b, perdew1981, avezac2005/))
1429
1430 NULLIFY (keyword)
1431
1432 CALL keyword_create(keyword, __location__, name="SIC_SCALING_A", &
1433 description="Scaling of the coulomb term in sic [experimental]", &
1434 usage="SIC_SCALING_A 0.5", &
1435 citations=(/vandevondele2005b/), &
1436 default_r_val=1.0_dp)
1437 CALL section_add_keyword(section, keyword)
1438 CALL keyword_release(keyword)
1439
1440 CALL keyword_create(keyword, __location__, name="SIC_SCALING_B", &
1441 description="Scaling of the xc term in sic [experimental]", &
1442 usage="SIC_SCALING_B 0.5", &
1443 citations=(/vandevondele2005b/), &
1444 default_r_val=1.0_dp)
1445 CALL section_add_keyword(section, keyword)
1446 CALL keyword_release(keyword)
1447
1448 CALL keyword_create(keyword, __location__, name="SIC_METHOD", &
1449 description="Method used to remove the self interaction", &
1450 usage="SIC_METHOD MAURI_US", &
1451 default_i_val=sic_none, &
1452 enum_c_vals=s2a("NONE", "MAURI_US", "MAURI_SPZ", "AD", "EXPLICIT_ORBITALS"), &
1453 enum_i_vals=(/sic_none, sic_mauri_us, sic_mauri_spz, sic_ad, sic_eo/), &
1454 enum_desc=s2a("Do not apply a sic correction", &
1455 "Employ a (scaled) correction proposed by Mauri and co-workers"// &
1456 " on the spin density / doublet unpaired orbital", &
1457 "Employ a (scaled) Perdew-Zunger expression"// &
1458 " on the spin density / doublet unpaired orbital", &
1459 "The average density correction", &
1460 "(scaled) Perdew-Zunger correction explicitly on a set of orbitals."), &
1461 citations=(/vandevondele2005b, perdew1981, avezac2005/))
1462 CALL section_add_keyword(section, keyword)
1463 CALL keyword_release(keyword)
1464
1465 CALL keyword_create(keyword, __location__, name="ORBITAL_SET", &
1466 description="Type of orbitals treated with the SIC", &
1467 usage="ORBITAL_SET ALL", &
1468 default_i_val=sic_list_unpaired, &
1469 enum_c_vals=s2a("UNPAIRED", "ALL"), &
1470 enum_desc=s2a("correction for the unpaired orbitals only, requires a restricted open shell calculation", &
1471 "correction for all orbitals, requires a LSD or ROKS calculation"), &
1472 enum_i_vals=(/sic_list_unpaired, sic_list_all/))
1473 CALL section_add_keyword(section, keyword)
1474 CALL keyword_release(keyword)
1475
1476 END SUBROUTINE create_sic_section
1477
1478! **************************************************************************************************
1479!> \brief creates the low spin roks section
1480!> \param section ...
1481!> \author Joost VandeVondele
1482! **************************************************************************************************
1483 SUBROUTINE create_low_spin_roks_section(section)
1484 TYPE(section_type), POINTER :: section
1485
1486 TYPE(keyword_type), POINTER :: keyword
1487
1488 cpassert(.NOT. ASSOCIATED(section))
1489 CALL section_create(section, __location__, name="LOW_SPIN_ROKS", &
1490 description="Specify the details of the low spin ROKS method. "// &
1491 "In particular, one can specify various terms added to the energy of the high spin roks configuration"// &
1492 " with a energy scaling factor, and a prescription of the spin state.", &
1493 n_keywords=6, n_subsections=0, repeats=.false.)
1494
1495 NULLIFY (keyword)
1496 CALL keyword_create(keyword, __location__, name="ENERGY_SCALING", &
1497 description="The scaling factors for each term added to the total energy. "// &
1498 "This list should contain one number for each term added to the total energy.", &
1499 usage="ENERGY_SCALING 1.0 -1.0 ", &
1500 n_var=-1, type_of_var=real_t, repeats=.false.)
1501 CALL section_add_keyword(section, keyword)
1502 CALL keyword_release(keyword)
1503 CALL keyword_create( &
1504 keyword, __location__, name="SPIN_CONFIGURATION", &
1505 description="For each singly occupied orbital, specify if this should be an alpha (=1) or a beta (=2) orbital. "// &
1506 "This keyword should be repeated, each repetition corresponding to an additional term.", &
1507 usage="SPIN_CONFIGURATION 1 2", &
1508 n_var=-1, type_of_var=integer_t, repeats=.true.)
1509 CALL section_add_keyword(section, keyword)
1510 CALL keyword_release(keyword)
1511
1512 END SUBROUTINE create_low_spin_roks_section
1513
1514! **************************************************************************************************
1515!> \brief ...
1516!> \param section ...
1517! **************************************************************************************************
1518 SUBROUTINE create_rtp_section(section)
1519 TYPE(section_type), POINTER :: section
1520
1521 TYPE(keyword_type), POINTER :: keyword
1522 TYPE(section_type), POINTER :: print_key, print_section, subsection
1523
1524 NULLIFY (keyword)
1525 cpassert(.NOT. ASSOCIATED(section))
1526 CALL section_create(section, __location__, name="REAL_TIME_PROPAGATION", &
1527 description="Parameters needed to set up the real time propagation"// &
1528 " for the electron dynamics. This currently works only in the NVE ensemble.", &
1529 n_keywords=4, n_subsections=4, repeats=.false., &
1530 citations=(/kunert2003, andermatt2016/))
1531
1532 CALL keyword_create(keyword, __location__, name="MAX_ITER", &
1533 description="Maximal number of iterations for the self consistent propagator loop.", &
1534 usage="MAX_ITER 10", &
1535 default_i_val=10)
1536 CALL section_add_keyword(section, keyword)
1537 CALL keyword_release(keyword)
1538
1539 CALL keyword_create(keyword, __location__, name="EPS_ITER", &
1540 description="Convergence criterion for the self consistent propagator loop.", &
1541 usage="EPS_ITER 1.0E-5", &
1542 default_r_val=1.0e-7_dp)
1543 CALL section_add_keyword(section, keyword)
1544 CALL keyword_release(keyword)
1545
1546 CALL keyword_create(keyword, __location__, name="ASPC_ORDER", &
1547 description="Speciefies how many steps will be used for extrapolation. "// &
1548 "One will be always used which is means X(t+dt)=X(t)", &
1549 usage="ASPC_ORDER 3", &
1550 default_i_val=3)
1551 CALL section_add_keyword(section, keyword)
1552 CALL keyword_release(keyword)
1553
1554 CALL keyword_create(keyword, __location__, name="MAT_EXP", &
1555 description="Which method should be used to calculate the exponential"// &
1556 " in the propagator. It is recommended to use BCH when employing density_propagation "// &
1557 "and ARNOLDI otherwise.", &
1558 usage="MAT_EXP TAYLOR", default_i_val=do_arnoldi, &
1559 enum_c_vals=s2a("TAYLOR", "PADE", "ARNOLDI", "BCH", "EXACT"), &
1560 enum_i_vals=(/do_taylor, do_pade, do_arnoldi, do_bch, do_exact/), &
1561 enum_desc=s2a("exponential is evaluated using scaling and squaring in combination"// &
1562 " with a taylor expansion of the exponential.", &
1563 "uses scaling and squaring together with the pade approximation", &
1564 "uses arnoldi subspace algorithm to compute exp(H)*MO directly, can't be used in "// &
1565 "combination with Crank Nicholson or density propagation", &
1566 "Uses a Baker-Campbell-Hausdorff expansion to propagate the density matrix,"// &
1567 " only works for density propagation", &
1568 "Uses diagonalisation of the exponent matrices to determine the "// &
1569 "matrix exponential exactly. Only implemented for GWBSE."))
1570 CALL section_add_keyword(section, keyword)
1571 CALL keyword_release(keyword)
1572
1573 CALL keyword_create(keyword, __location__, name="DENSITY_PROPAGATION", &
1574 description="The density matrix is propagated instead of the molecular orbitals. "// &
1575 "This can allow a linear scaling simulation. The density matrix is filtered with "// &
1576 "the threshold based on the EPS_FILTER keyword from the LS_SCF section", &
1577 usage="DENSITY_PROPAGATION .TRUE.", &
1578 default_l_val=.false., lone_keyword_l_val=.true.)
1579 CALL section_add_keyword(section, keyword)
1580 CALL keyword_release(keyword)
1581
1582 CALL keyword_create(keyword, __location__, name="SC_CHECK_START", &
1583 description="Speciefies how many iteration steps will be done without "// &
1584 "a check for self consistency. Can save some time in big calculations.", &
1585 usage="SC_CHECK_START 3", &
1586 default_i_val=0)
1587 CALL section_add_keyword(section, keyword)
1588 CALL keyword_release(keyword)
1589
1590 CALL keyword_create(keyword, __location__, name="EXP_ACCURACY", &
1591 description="Accuracy for the taylor and pade approximation. "// &
1592 "This is only an upper bound bound since the norm used for the guess "// &
1593 "is an upper bound for the needed one.", &
1594 usage="EXP_ACCURACY 1.0E-6", &
1595 default_r_val=1.0e-9_dp)
1596 CALL section_add_keyword(section, keyword)
1597 CALL keyword_release(keyword)
1598
1599 CALL keyword_create(keyword, __location__, name="PROPAGATOR", &
1600 description="Which propagator should be used for the orbitals", &
1601 usage="PROPAGATOR ETRS", default_i_val=do_etrs, &
1602 enum_c_vals=s2a("ETRS", "CN", "EM"), &
1603 enum_i_vals=(/do_etrs, do_cn, do_em/), &
1604 enum_desc=s2a("enforced time reversible symmetry", &
1605 "Crank Nicholson propagator", &
1606 "Exponential midpoint propagator"))
1607 CALL section_add_keyword(section, keyword)
1608 CALL keyword_release(keyword)
1609
1610 CALL keyword_create(keyword, __location__, name="INITIAL_WFN", &
1611 description="Controls the initial WFN used for propagation. "// &
1612 "Note that some energy contributions may not be "// &
1613 "initialized in the restart cases, for instance "// &
1614 "electronic entropy energy in the case of smearing.", &
1615 usage="INITIAL_WFN SCF_WFN", default_i_val=use_scf_wfn, &
1616 enum_c_vals=s2a("SCF_WFN", "RESTART_WFN", "RT_RESTART"), &
1617 enum_i_vals=(/use_scf_wfn, use_restart_wfn, use_rt_restart/), &
1618 enum_desc=s2a("An SCF run is performed to get the initial state.", &
1619 "A wavefunction from a previous SCF is propagated. Especially useful,"// &
1620 " if electronic constraints or restraints are used in the previous calculation, "// &
1621 "since these do not work in the rtp scheme.", &
1622 "use the wavefunction of a real time propagation/ehrenfest run"))
1623 CALL section_add_keyword(section, keyword)
1624 CALL keyword_release(keyword)
1625
1626 CALL keyword_create(keyword, __location__, name="APPLY_WFN_MIX_INIT_RESTART", &
1627 description="If set to True and in the case of INITIAL_WFN=RESTART_WFN, call the "// &
1628 "DFT%PRINT%WFN_MIX section to mix the read initial wfn. The starting wave-function of the "// &
1629 "RTP will be the mixed one. Setting this to True without a defined WFN_MIX section will "// &
1630 "not do anything as defining a WFN_MIX section without this keyword for RTP run with "// &
1631 "INITIAL_WFN=RESTART_WFN. Note that if INITIAL_WFN=SCF_WFN, this keyword is not needed to "// &
1632 "apply the mixing defined in the WFN_MIX section. Default is False.", &
1633 usage="APPLY_WFN_MIX_INIT_RESTART", &
1634 default_l_val=.false., lone_keyword_l_val=.true.)
1635 CALL section_add_keyword(section, keyword)
1636 CALL keyword_release(keyword)
1637
1638 CALL keyword_create(keyword, __location__, name="APPLY_DELTA_PULSE", &
1639 description="Applies a delta kick to the initial wfn (only RTP for now - the EMD"// &
1640 " case is not yet implemented). Only work for INITIAL_WFN=SCF_WFN", &
1641 usage="APPLY_DELTA_PULSE", &
1642 default_l_val=.false., lone_keyword_l_val=.true.)
1643 CALL section_add_keyword(section, keyword)
1644 CALL keyword_release(keyword)
1645
1646 CALL keyword_create(keyword, __location__, name="APPLY_DELTA_PULSE_MAG", &
1647 description="Applies a magnetic delta kick to the initial wfn (only RTP for now - the EMD"// &
1648 " case is not yet implemented). Only work for INITIAL_WFN=SCF_WFN", &
1649 usage="APPLY_DELTA_PULSE_MAG", &
1650 default_l_val=.false., lone_keyword_l_val=.true.)
1651 CALL section_add_keyword(section, keyword)
1652 CALL keyword_release(keyword)
1653
1654 CALL keyword_create(keyword, __location__, name="VELOCITY_GAUGE", &
1655 description="Perform propagation in the velocity gauge using the explicit vector potential"// &
1656 " only a constant vector potential as of now (corresonding to a delta-pulse)."// &
1657 " uses DELTA_PULSE_SCALE and DELTA_PULSE_DIRECTION to define the vector potential", &
1658 usage="VELOCITY_GAUGE T", &
1659 default_l_val=.false., lone_keyword_l_val=.true.)
1660 CALL section_add_keyword(section, keyword)
1661 CALL keyword_release(keyword)
1662
1663 CALL keyword_create(keyword, __location__, name="GAUGE_ORIG", &
1664 description="Define gauge origin for magnetic perturbation", &
1665 usage="GAUGE_ORIG COM", &
1666 enum_c_vals=s2a("COM", "COAC", "USER_DEFINED", "ZERO"), &
1667 enum_desc=s2a("Use Center of Mass", &
1668 "Use Center of Atomic Charges", &
1669 "Use User Defined Point (Keyword:REF_POINT)", &
1670 "Use Origin of Coordinate System"), &
1671 enum_i_vals=(/use_mom_ref_com, &
1674 use_mom_ref_zero/), &
1675 default_i_val=use_mom_ref_com)
1676 CALL section_add_keyword(section, keyword)
1677 CALL keyword_release(keyword)
1678
1679 CALL keyword_create(keyword, __location__, name="GAUGE_ORIG_MANUAL", &
1680 description="Manually defined gauge origin for magnetic perturbation [in Bohr!]", &
1681 usage="GAUGE_ORIG_MANUAL x y z", &
1682 repeats=.false., &
1683 n_var=3, default_r_vals=(/0._dp, 0._dp, 0._dp/), &
1684 type_of_var=real_t, &
1685 unit_str='bohr')
1686 CALL section_add_keyword(section, keyword)
1687 CALL keyword_release(keyword)
1688
1689 CALL keyword_create(keyword, __location__, name="VG_COM_NL", &
1690 description="apply gauge transformed non-local potential term"// &
1691 " only affects VELOCITY_GAUGE=.TRUE.", &
1692 usage="VG_COM_NL T", &
1693 default_l_val=.true., lone_keyword_l_val=.true.)
1694 CALL section_add_keyword(section, keyword)
1695 CALL keyword_release(keyword)
1696
1697 CALL keyword_create(keyword, __location__, name="COM_NL", &
1698 description="Include non-local commutator for periodic delta pulse."// &
1699 " only affects PERIODIC=.TRUE.", &
1700 usage="COM_NL", &
1701 default_l_val=.true., lone_keyword_l_val=.true.)
1702 CALL section_add_keyword(section, keyword)
1703 CALL keyword_release(keyword)
1704
1705 CALL keyword_create(keyword, __location__, name="LEN_REP", &
1706 description="Use length representation delta pulse (in conjunction with PERIODIC T)."// &
1707 " This corresponds to a 1st order perturbation in the length gauge."// &
1708 " Note that this is NOT compatible with a periodic calculation!"// &
1709 " Uses the reference point defined in DFT%PRINT%MOMENTS ", &
1710 usage="LEN_REP T", &
1711 default_l_val=.false., lone_keyword_l_val=.true.)
1712 CALL section_add_keyword(section, keyword)
1713 CALL keyword_release(keyword)
1714
1715 CALL keyword_create(keyword, __location__, name="PERIODIC", &
1716 description="Apply a delta-kick that is compatible with periodic boundary conditions"// &
1717 " for any value of DELTA_PULSE_SCALE. Uses perturbation theory for the preparation of"// &
1718 " the initial wfn with the velocity operator as perturbation."// &
1719 " If LEN_REP is .FALSE. this corresponds to a first order velocity gauge."// &
1720 " Note that the pulse is only applied when INITIAL_WFN is set to SCF_WFN,"// &
1721 " and not for restarts (RT_RESTART).", &
1722 usage="PERIODIC", &
1723 default_l_val=.true., lone_keyword_l_val=.true.)
1724 CALL section_add_keyword(section, keyword)
1725 CALL keyword_release(keyword)
1726
1727 CALL keyword_create(keyword, __location__, name="DELTA_PULSE_DIRECTION", &
1728 description="Direction of the applied electric field. The k vector is given as"// &
1729 " 2*Pi*[i,j,k]*inv(h_mat), which for PERIODIC .FALSE. yields exp(ikr) periodic with"// &
1730 " the unit cell, only if DELTA_PULSE_SCALE is set to unity. For an orthorhombic cell"// &
1731 " [1,0,0] yields [2*Pi/L_x,0,0]. For small cells, this results in a very large kick.", &
1732 usage="DELTA_PULSE_DIRECTION 1 1 1", n_var=3, default_i_vals=(/1, 0, 0/), &
1733 type_of_var=integer_t)
1734 CALL section_add_keyword(section, keyword)
1735 CALL keyword_release(keyword)
1736
1737 CALL keyword_create(keyword, __location__, name="DELTA_PULSE_SCALE", &
1738 description="Scale the k vector, which for PERIODIC .FALSE. results in exp(ikr) no"// &
1739 " longer being periodic with the unit cell. The norm of k is the strength of the"// &
1740 " applied electric field in atomic units.", &
1741 usage="DELTA_PULSE_SCALE 0.01 ", n_var=1, default_r_val=0.001_dp)
1742 CALL section_add_keyword(section, keyword)
1743 CALL keyword_release(keyword)
1744
1745 CALL keyword_create(keyword, __location__, name="HFX_BALANCE_IN_CORE", &
1746 description="If HFX is used, this keyword forces a redistribution/recalculation"// &
1747 " of the integrals, balanced with respect to the in core steps.", &
1748 usage="HFX_BALANCE_IN_CORE", &
1749 default_l_val=.false., lone_keyword_l_val=.true.)
1750 CALL section_add_keyword(section, keyword)
1751 CALL keyword_release(keyword)
1752
1753 CALL keyword_create(keyword, __location__, name="MCWEENY_MAX_ITER", &
1754 description="Determines the maximum amount of McWeeny steps used after each converged"// &
1755 " step in density propagation", &
1756 usage="MCWEENY_MAX_ITER 2", default_i_val=1)
1757 CALL section_add_keyword(section, keyword)
1758 CALL keyword_release(keyword)
1759
1760 CALL keyword_create( &
1761 keyword, __location__, name="ACCURACY_REFINEMENT", &
1762 description="If using density propagation some parts should be calculated with a higher accuracy than the rest"// &
1763 " to reduce numerical noise. This factor determines by how much the filtering threshold is"// &
1764 " reduced for these calculations.", &
1765 usage="ACCURACY_REFINEMENT", default_i_val=100)
1766 CALL section_add_keyword(section, keyword)
1767 CALL keyword_release(keyword)
1768
1769 CALL keyword_create(keyword, __location__, name="MCWEENY_EPS", &
1770 description="Threshold after which McWeeny is terminated", &
1771 usage="MCWEENY_EPS 0.00001", &
1772 default_r_val=0.0_dp)
1773 CALL section_add_keyword(section, keyword)
1774 CALL keyword_release(keyword)
1775
1776 NULLIFY (print_section)
1777 CALL section_create(print_section, __location__, name="PRINT", &
1778 description="Section of possible print options for an RTP runs", &
1779 repeats=.false.)
1780
1781 NULLIFY (print_key)
1782 CALL cp_print_key_section_create(print_key, __location__, "PROGRAM_RUN_INFO", &
1783 description="Controls the printing within real time propagation and Eherenfest dynamics", &
1784 print_level=low_print_level, filename="__STD_OUT__")
1785 CALL section_add_subsection(print_section, print_key)
1786 CALL section_release(print_key)
1787
1788 CALL cp_print_key_section_create(print_key, __location__, "RESTART", &
1789 description="Controls the dumping of the MO restart file during rtp. "// &
1790 "By default keeps a short history of three restarts. "// &
1791 "See also RESTART_HISTORY. In density propagation this controls the printing of "// &
1792 "density matrix.", &
1793 print_level=low_print_level, common_iter_levels=3, &
1794 each_iter_names=s2a("MD"), each_iter_values=(/20/), &
1795 add_last=add_last_numeric, filename="RESTART")
1796 CALL keyword_create(keyword, __location__, name="BACKUP_COPIES", &
1797 description="Specifies the maximum number of backup copies.", &
1798 usage="BACKUP_COPIES {int}", &
1799 default_i_val=1)
1800 CALL section_add_keyword(print_key, keyword)
1801 CALL keyword_release(keyword)
1802 CALL section_add_subsection(print_section, print_key)
1803 CALL section_release(print_key)
1804
1805 CALL cp_print_key_section_create(print_key, __location__, "RESTART_HISTORY", &
1806 description="Dumps unique MO restart files during the run keeping all of them. "// &
1807 "In density propagation it dumps the density matrix instead", &
1808 print_level=low_print_level, common_iter_levels=0, &
1809 each_iter_names=s2a("MD"), &
1810 each_iter_values=(/500/), &
1811 filename="RESTART")
1812 CALL keyword_create(keyword, __location__, name="BACKUP_COPIES", &
1813 description="Specifies the maximum number of backup copies.", &
1814 usage="BACKUP_COPIES {int}", &
1815 default_i_val=1)
1816 CALL section_add_keyword(print_key, keyword)
1817 CALL keyword_release(keyword)
1818 CALL section_add_subsection(print_section, print_key)
1819 CALL section_release(print_key)
1820
1821 CALL cp_print_key_section_create(print_key, __location__, "FIELD", &
1822 description="Print the time-dependent field applied during an EMD simulation in "// &
1823 "atomic unit.", &
1824 print_level=high_print_level, common_iter_levels=-1, &
1825 each_iter_names=s2a("MD"), &
1826 each_iter_values=(/1/), &
1827 filename="applied_field")
1828 CALL section_add_subsection(print_section, print_key)
1829 CALL section_release(print_key)
1830
1831 CALL create_projection_rtp_section(print_key)
1832 CALL section_add_subsection(print_section, print_key)
1833 CALL section_release(print_key)
1834
1835 CALL cp_print_key_section_create(print_key, __location__, "CURRENT_INT", &
1836 description="Print the integral of the current density (only if the"// &
1837 " imaginary part of the density is NOT zero.", &
1838 print_level=high_print_level, common_iter_levels=1, &
1839 each_iter_names=s2a("MD"), &
1840 each_iter_values=(/1/), &
1841 filename="rtp_j_int")
1842 CALL section_add_subsection(print_section, print_key)
1843 CALL section_release(print_key)
1844
1845 CALL cp_print_key_section_create(print_key, __location__, "CURRENT", &
1846 description="Print the current during an EMD simulation to cube files.", &
1847 print_level=high_print_level, common_iter_levels=0, &
1848 each_iter_names=s2a("MD"), &
1849 each_iter_values=(/20/), &
1850 filename="current")
1851 CALL keyword_create(keyword, __location__, name="BACKUP_COPIES", &
1852 description="Specifies the maximum number of backup copies.", &
1853 usage="BACKUP_COPIES {int}", &
1854 default_i_val=1)
1855 CALL section_add_keyword(print_key, keyword)
1856 CALL keyword_release(keyword)
1857 CALL keyword_create(keyword, __location__, name="STRIDE", &
1858 description="The stride (X,Y,Z) used to write the cube file "// &
1859 "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
1860 " 1 number valid for all components.", &
1861 usage="STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=integer_t)
1862 CALL section_add_keyword(print_key, keyword)
1863 CALL keyword_release(keyword)
1864
1865 CALL section_add_subsection(print_section, print_key)
1866 CALL section_release(print_key)
1867
1868 ! Marek : Add print option for ASCII density files - DEVELPMENT ONLY?
1869 CALL cp_print_key_section_create(print_key, __location__, "DENSITY_MATRIX", &
1870 description="Prints the density matrix at iterations in clear text to a file", &
1871 print_level=high_print_level, common_iter_levels=0, &
1872 each_iter_names=s2a("MD"), &
1873 each_iter_values=(/1/), &
1874 filename="rho")
1875 CALL section_add_subsection(print_section, print_key)
1876 CALL section_release(print_key)
1877 ! Marek : Moments ASCII print
1878 CALL cp_print_key_section_create(print_key, __location__, "MOMENTS", &
1879 description="Prints the time-dependent electronic moments at "// &
1880 "iterations in clear text to a file.", &
1881 print_level=high_print_level, common_iter_levels=0, &
1882 each_iter_names=s2a("MD"), &
1883 each_iter_values=(/1/), &
1884 filename="__STD_OUT__")
1885 CALL section_add_subsection(print_section, print_key)
1886 CALL section_release(print_key)
1887 ! Marek : Fourier transform of MOMENTS ASCII print
1888 CALL cp_print_key_section_create(print_key, __location__, "MOMENTS_FT", &
1889 description="Prints the calculated Fourier transform of "// &
1890 "time-dependent moments. For calculations with real time pulse (not delta kick) "// &
1891 "can be supplied with starting time.", &
1892 print_level=medium_print_level, common_iter_levels=0, &
1893 each_iter_names=s2a("MD"), &
1894 each_iter_values=(/1/), &
1895 filename="MOMENTS_FT")
1896 CALL section_add_subsection(print_section, print_key)
1897 CALL section_release(print_key)
1898 ! Marek : Chosen element of (Fourier transformed) polarizability tensor (energy dependent) - text format
1899 CALL cp_print_key_section_create(print_key, __location__, "POLARIZABILITY", &
1900 description="Prints the chosen element of the energy dependent polarizability tensor "// &
1901 "to a specified file. The tensor is calculated as ratio of "// &
1902 "Fourier transform of the dipole "// &
1903 "moment trace and Fourier transform of the applied field "// &
1904 "(for delta kick, constant real field is applied.", &
1905 print_level=medium_print_level, common_iter_levels=0, &
1906 each_iter_names=s2a("MD"), &
1907 each_iter_values=(/1/), &
1908 filename="POLARIZABILITY")
1909 CALL keyword_create(keyword, __location__, "ELEMENT", &
1910 description="Specifies the element of polarizability which is to be printed out "// &
1911 "(indexing starts at 1). If not explicitly provided, RTBSE code tries to guess "// &
1912 "the optimal values - for applied electric field (both delta pulse and RT field) "// &
1913 "with only a single non-zero cartesian component, prints the 3 trivially available elements.", &
1914 type_of_var=integer_t, default_i_vals=(/1, 1/), n_var=2, usage="ELEMENT 1 1", repeats=.true.)
1915 CALL section_add_keyword(print_key, keyword)
1916 CALL keyword_release(keyword)
1917 CALL section_add_subsection(print_section, print_key)
1918 CALL section_release(print_key)
1919
1920 CALL cp_print_key_section_create(print_key, __location__, "E_CONSTITUENTS", &
1921 description="Print the energy constituents (relevant to RTP) which make up "// &
1922 "the Total Energy", &
1923 print_level=high_print_level, common_iter_levels=1, &
1924 each_iter_names=s2a("MD"), &
1925 each_iter_values=(/1/), &
1926 filename="rtp")
1927 CALL section_add_subsection(print_section, print_key)
1928 CALL section_release(print_key)
1929
1930 CALL section_add_subsection(section, print_section)
1931 CALL section_release(print_section)
1932
1933 NULLIFY (subsection)
1934 CALL create_rtbse_section(subsection)
1935 CALL section_add_subsection(section, subsection)
1936 CALL section_release(subsection)
1937
1938 END SUBROUTINE create_rtp_section
1939! **************************************************************************************************
1940!> \brief Creates the subsection for specialized options of RTBSE code
1941!> \param section The created RTBSE section
1942!> \author Stepan Marek
1943! **************************************************************************************************
1944 SUBROUTINE create_rtbse_section(section)
1945 TYPE(section_type), POINTER :: section
1946
1947 TYPE(keyword_type), POINTER :: keyword
1948 TYPE(section_type), POINTER :: subsection
1949
1950 NULLIFY (keyword)
1951 NULLIFY (subsection)
1952 cpassert(.NOT. ASSOCIATED(section))
1953
1954 CALL section_create(section, __location__, name="RTBSE", &
1955 description="Controls options for the real-time Bethe-Salpeter (RTBSE) propagation. "// &
1956 "Note that running RTBSE requires previous low-scaling "// &
1957 "[GW](#CP2K_INPUT.FORCE_EVAL.PROPERTIES.BANDSTRUCTURE.GW) calculation. Also note that "// &
1958 "designating this section as RTBSE run but choosing run type ENERGY leads to potential "// &
1959 "deallocation errors.", &
1960 repeats=.false.)
1961
1962 ! Marek : Controlling flow to RTBSE
1963 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
1964 description="Which method is used for the time propagation of electronic structure. "// &
1965 "By default, use the TDDFT method. Can also choose RT-BSE method, which propagates the lesser "// &
1966 "Green's function instead of density matrix/molecular orbitals.", &
1967 usage="&RTBSE TDDFT", &
1968 default_i_val=rtp_method_tddft, &
1969 lone_keyword_i_val=rtp_method_bse, &
1970 enum_c_vals=s2a("TDDFT", "RTBSE"), &
1971 enum_i_vals=(/rtp_method_tddft, rtp_method_bse/), &
1972 enum_desc=s2a("Use TDDFT for density matrix/MO propagation.", &
1973 "Use RT-BSE for Green's function propagation"))
1974 CALL section_add_keyword(section, keyword)
1975 CALL keyword_release(keyword)
1976
1977 ! Marek : Development option - run GWBSE starting from the KS Hamiltonian
1978 CALL keyword_create(keyword, __location__, name="RTBSE_HAMILTONIAN", &
1979 description="Which Hamiltonian to use as the single-particle Hamiltonian"// &
1980 " in the Green's propagator.", &
1981 usage="RTBSE_HAMILTONIAN G0W0", &
1982 default_i_val=rtp_bse_ham_g0w0, &
1983 enum_c_vals=s2a("KS", "G0W0"), &
1984 enum_i_vals=(/rtp_bse_ham_ks, rtp_bse_ham_g0w0/), &
1985 enum_desc=s2a("Use Kohn-Sham Hamiltonian for Green's propagation.", &
1986 "Use G0W0 Hamiltonian for Green's function propagation"))
1987 CALL section_add_keyword(section, keyword)
1988 CALL keyword_release(keyword)
1989 ! Marek : Options for the Fourier transform
1990 CALL keyword_create(keyword, __location__, "FT_DAMPING", &
1991 description="Numerical Fourier transform (required for calculation of "// &
1992 "MOMENTS_FT and POLARIZABILITY) can oscillate "// &
1993 "when the final values are far away from zero. "// &
1994 "This keyword controls the exponential damping in the Fourier transform "// &
1995 "(Fourier transform is used for calculation of MOMENTS_FT and POLARIZABILITY). "// &
1996 "For negative values (the default), calculates the damping at the run time so that the last point "// &
1997 "in the time trace is reduced by factor e^(-4). When set manually, determines the time in which "// &
1998 "the moments trace is reduced by factor of e^(-1), except when set to zero, in which case "// &
1999 "the damping is not applied.", &
2000 type_of_var=real_t, &
2001 unit_str="fs", &
2002 default_r_val=-1.0_dp/femtoseconds)
2003 CALL section_add_keyword(section, keyword)
2004 CALL keyword_release(keyword)
2005 CALL keyword_create(keyword, __location__, "FT_START_TIME", &
2006 description="The starting time from which damping is applied and from which on the trace is "// &
2007 "considered for the Fourier transform (Fourier transform is used for the calculation of "// &
2008 "MOMENTS_FT and POLARIZABILITY). Useful for real-time pulse - "// &
2009 "one can specify the center of the pulse as the starting point.", &
2010 type_of_var=real_t, &
2011 unit_str="fs", &
2012 default_r_val=0.0_dp)
2013 CALL section_add_keyword(section, keyword)
2014 CALL keyword_release(keyword)
2015
2016 ! Padé FT refinement
2017 ! TODO : Link MOMENTS_FT in documentation.
2018 CALL section_create(subsection, __location__, name="PADE_FT", &
2019 description=é"Options for the Pad approximant refinement of the Fourier transform. Uses GreenX "// &
2020 "library to perform the analytic continuation and interpolation of the Fourier transform of "// &
2021 "dipole moments. The resulting moments are printed into the MOMENTS_FT file.", &
2022 repeats=.false.)
2023
2024 CALL keyword_create(keyword, __location__, name="E_MIN", &
2025 description="Minimal energy of the interpolated values.", &
2026 unit_str="eV", &
2027 type_of_var=real_t, &
2028 default_r_val=0.0_dp)
2029 CALL section_add_keyword(subsection, keyword)
2030 CALL keyword_release(keyword)
2031
2032 CALL keyword_create(keyword, __location__, name="E_MAX", &
2033 description="Maximal energy of the interpolated values.", &
2034 unit_str="eV", &
2035 type_of_var=real_t, &
2036 default_r_val=100.0_dp/evolt)
2037 CALL section_add_keyword(subsection, keyword)
2038 CALL keyword_release(keyword)
2039
2040 CALL keyword_create(keyword, __location__, name="E_STEP", &
2041 description="Energy resolution of the interpolated values.", &
2042 unit_str="eV", &
2043 type_of_var=real_t, &
2044 default_r_val=0.02_dp/evolt)
2045 CALL section_add_keyword(subsection, keyword)
2046 CALL keyword_release(keyword)
2047
2048 CALL keyword_create(keyword, __location__, name="FIT_E_MIN", &
2049 description=é"Minimum energy to be used in the fitting of Pad approximants. "// &
2050 é"Can be used to restrict the number of Pad parameters. "// &
2051 "When not present, takes the value of E_MIN.", &
2052 unit_str="eV", &
2053 type_of_var=real_t, &
2054 default_r_val=0.0_dp)
2055 CALL section_add_keyword(subsection, keyword)
2056 CALL keyword_release(keyword)
2057
2058 CALL keyword_create(keyword, __location__, name="FIT_E_MAX", &
2059 description=é"Maximum energy to be used in the fitting of Pad approximants. "// &
2060 é"Can be used to restrict the number of Pad parameters. Negative energy is interpreted "// &
2061 "as maximum available energy from the original Fourier transform. "// &
2062 "When not present, takes the value of E_MAX.", &
2063 unit_str="eV", &
2064 type_of_var=real_t, &
2065 default_r_val=-1.0_dp/evolt)
2066 CALL section_add_keyword(subsection, keyword)
2067 CALL keyword_release(keyword)
2068
2069 CALL section_add_subsection(section, subsection)
2070 CALL section_release(subsection)
2071
2072 END SUBROUTINE create_rtbse_section
2073
2074! **************************************************************************************************
2075!> \brief Create CP2K input section for the SCCS model
2076!> \param section ...
2077!> \par History:
2078!> - Creation (10.10.2013,MK)
2079!> \author Matthias Krack (MK)
2080!> \version 1.0
2081! **************************************************************************************************
2082 SUBROUTINE create_sccs_section(section)
2083
2084 TYPE(section_type), POINTER :: section
2085
2086 TYPE(keyword_type), POINTER :: keyword
2087 TYPE(section_type), POINTER :: subsection
2088
2089 cpassert(.NOT. ASSOCIATED(section))
2090
2091 CALL section_create(section, __location__, &
2092 name="SCCS", &
2093 description="Define the parameters for self-consistent continuum solvation (SCCS) model", &
2094 citations=(/fattebert2002, andreussi2012, yin2017/), &
2095 n_keywords=8, &
2096 n_subsections=2, &
2097 repeats=.false.)
2098
2099 NULLIFY (keyword)
2100
2101 CALL keyword_create(keyword, __location__, &
2102 name="_SECTION_PARAMETERS_", &
2103 description="Controls the activation of the SCCS section", &
2104 usage="&SCCS ON", &
2105 default_l_val=.false., &
2106 lone_keyword_l_val=.true.)
2107 CALL section_add_keyword(section, keyword)
2108 CALL keyword_release(keyword)
2109
2110 CALL keyword_create(keyword, __location__, &
2111 name="ALPHA", &
2112 description="Solvent specific tunable parameter for the calculation of "// &
2113 "the repulsion term $G^\text{rep} = \alpha S$ "// &
2114 "where $S$ is the (quantum) surface of the cavity", &
2115 repeats=.false., &
2116 n_var=1, &
2117 type_of_var=real_t, &
2118 default_r_val=0.0_dp, &
2119 unit_str="mN/m")
2120 CALL section_add_keyword(section, keyword)
2121 CALL keyword_release(keyword)
2122
2123 CALL keyword_create(keyword, __location__, &
2124 name="BETA", &
2125 description="Solvent specific tunable parameter for the calculation of "// &
2126 "the dispersion term $G^\text{dis} = \beta V$ "// &
2127 "where $V$ is the (quantum) volume of the cavity", &
2128 repeats=.false., &
2129 n_var=1, &
2130 type_of_var=real_t, &
2131 default_r_val=0.0_dp, &
2132 unit_str="GPa")
2133 CALL section_add_keyword(section, keyword)
2134 CALL keyword_release(keyword)
2135
2136 CALL keyword_create(keyword, __location__, &
2137 name="DELTA_RHO", &
2138 description="Numerical increment for the calculation of the (quantum) "// &
2139 "surface of the solute cavity", &
2140 repeats=.false., &
2141 n_var=1, &
2142 type_of_var=real_t, &
2143 default_r_val=2.0e-5_dp)
2144 CALL section_add_keyword(section, keyword)
2145 CALL keyword_release(keyword)
2146
2147 CALL keyword_create(keyword, __location__, &
2148 name="DERIVATIVE_METHOD", &
2149 description="Method for the calculation of the numerical derivatives on the real-space grids", &
2150 usage="DERIVATIVE_METHOD cd5", &
2151 repeats=.false., &
2152 n_var=1, &
2153 default_i_val=sccs_derivative_fft, &
2154 enum_c_vals=s2a("FFT", "CD3", "CD5", "CD7"), &
2155 enum_i_vals=(/sccs_derivative_fft, &
2159 enum_desc=s2a("Fast Fourier transformation", &
2160 "3-point stencil central differences", &
2161 "5-point stencil central differences", &
2162 "7-point stencil central differences"))
2163 CALL section_add_keyword(section, keyword)
2164 CALL keyword_release(keyword)
2165
2166 CALL keyword_create(keyword, __location__, &
2167 name="RELATIVE_PERMITTIVITY", &
2168 variants=s2a("DIELECTRIC_CONSTANT", "EPSILON_RELATIVE", "EPSILON_SOLVENT"), &
2169 description="Relative permittivity (dielectric constant) of the solvent (medium)", &
2170 repeats=.false., &
2171 n_var=1, &
2172 type_of_var=real_t, &
2173 default_r_val=80.0_dp, &
2174 usage="RELATIVE_PERMITTIVITY 78.36")
2175 CALL section_add_keyword(section, keyword)
2176 CALL keyword_release(keyword)
2177
2178 CALL keyword_create(keyword, __location__, &
2179 name="EPS_SCCS", &
2180 variants=s2a("EPS_ITER", "TAU_POL"), &
2181 description="Tolerance for the convergence of the polarisation density, "// &
2182 "i.e. requested accuracy for the SCCS iteration cycle", &
2183 repeats=.false., &
2184 n_var=1, &
2185 type_of_var=real_t, &
2186 default_r_val=1.0e-6_dp, &
2187 usage="EPS_ITER 1.0E-7")
2188 CALL section_add_keyword(section, keyword)
2189 CALL keyword_release(keyword)
2190
2191 CALL keyword_create(keyword, __location__, &
2192 name="EPS_SCF", &
2193 description="The SCCS iteration cycle is activated only if the SCF iteration cycle "// &
2194 "is converged to this threshold value", &
2195 repeats=.false., &
2196 n_var=1, &
2197 type_of_var=real_t, &
2198 default_r_val=0.5_dp, &
2199 usage="EPS_SCF 1.0E-2")
2200 CALL section_add_keyword(section, keyword)
2201 CALL keyword_release(keyword)
2202
2203 CALL keyword_create(keyword, __location__, &
2204 name="GAMMA", &
2205 variants=s2a("SURFACE_TENSION"), &
2206 description="Surface tension of the solvent used for the calculation of "// &
2207 "the cavitation term $G^\text{cav} = \gamma S$ "// &
2208 "where $S$ is the (quantum) surface of the cavity", &
2209 repeats=.false., &
2210 n_var=1, &
2211 type_of_var=real_t, &
2212 default_r_val=0.0_dp, &
2213 unit_str="mN/m")
2214 CALL section_add_keyword(section, keyword)
2215 CALL keyword_release(keyword)
2216
2217 CALL keyword_create(keyword, __location__, &
2218 name="MAX_ITER", &
2219 description="Maximum number of SCCS iteration steps performed to converge "// &
2220 "within the given tolerance", &
2221 repeats=.false., &
2222 n_var=1, &
2223 type_of_var=integer_t, &
2224 default_i_val=100, &
2225 usage="MAX_ITER 50")
2226 CALL section_add_keyword(section, keyword)
2227 CALL keyword_release(keyword)
2228
2229 CALL keyword_create(keyword, __location__, &
2230 name="METHOD", &
2231 description="Method used for the smoothing of the dielectric function", &
2232 usage="METHOD Fattebert-Gygi", &
2233 default_i_val=sccs_andreussi, &
2234 enum_c_vals=s2a("ANDREUSSI", "FATTEBERT-GYGI"), &
2235 enum_i_vals=(/sccs_andreussi, sccs_fattebert_gygi/), &
2236 enum_desc=s2a("Smoothing function proposed by Andreussi et al.", &
2237 "Smoothing function proposed by Fattebert and Gygi"))
2238 CALL section_add_keyword(section, keyword)
2239 CALL keyword_release(keyword)
2240
2241 CALL keyword_create(keyword, __location__, &
2242 name="MIXING", &
2243 variants=(/"ETA"/), &
2244 description="Mixing parameter (Hartree damping) employed during the iteration procedure", &
2245 repeats=.false., &
2246 n_var=1, &
2247 type_of_var=real_t, &
2248 default_r_val=0.6_dp, &
2249 usage="MIXING 0.2")
2250 CALL section_add_keyword(section, keyword)
2251 CALL keyword_release(keyword)
2252
2253 NULLIFY (subsection)
2254
2255 CALL section_create(subsection, __location__, &
2256 name="ANDREUSSI", &
2257 description="Define the parameters of the dielectric smoothing function proposed by "// &
2258 "Andreussi et al.", &
2259 citations=(/andreussi2012/), &
2260 n_keywords=2, &
2261 n_subsections=0, &
2262 repeats=.false.)
2263
2264 CALL keyword_create(keyword, __location__, &
2265 name="RHO_MAX", &
2266 description="Maximum density value used for the smoothing of the dielectric function", &
2267 repeats=.false., &
2268 n_var=1, &
2269 type_of_var=real_t, &
2270 default_r_val=0.0035_dp, &
2271 usage="RHO_MAX 0.01")
2272 CALL section_add_keyword(subsection, keyword)
2273 CALL keyword_release(keyword)
2274
2275 CALL keyword_create(keyword, __location__, &
2276 name="RHO_MIN", &
2277 description="Minimum density value used for the smoothing of the dielectric function", &
2278 repeats=.false., &
2279 n_var=1, &
2280 type_of_var=real_t, &
2281 default_r_val=0.0001_dp, &
2282 usage="RHO_MIN 0.0003")
2283 CALL section_add_keyword(subsection, keyword)
2284 CALL keyword_release(keyword)
2285
2286 CALL section_add_subsection(section, subsection)
2287 CALL section_release(subsection)
2288
2289 CALL section_create(subsection, __location__, &
2290 name="FATTEBERT-GYGI", &
2291 description="Define the parameters of the dielectric smoothing function proposed by "// &
2292 "Fattebert and Gygi", &
2293 citations=(/fattebert2002/), &
2294 n_keywords=2, &
2295 n_subsections=0, &
2296 repeats=.false.)
2297
2298 CALL keyword_create(keyword, __location__, &
2299 name="BETA", &
2300 description="Parameter &beta; changes the width of the interface solute-solvent", &
2301 repeats=.false., &
2302 n_var=1, &
2303 type_of_var=real_t, &
2304 default_r_val=1.7_dp, &
2305 usage="BETA 1.3")
2306 CALL section_add_keyword(subsection, keyword)
2307 CALL keyword_release(keyword)
2308
2309 CALL keyword_create(keyword, __location__, &
2310 name="RHO_ZERO", &
2311 variants=(/"RHO0"/), &
2312 description="Parameter $\rho_0$ defines the critical density in the middle "// &
2313 "of the interface solute-solvent", &
2314 repeats=.false., &
2315 n_var=1, &
2316 type_of_var=real_t, &
2317 default_r_val=0.0006_dp, &
2318 usage="RHO_ZERO 0.0004")
2319 CALL section_add_keyword(subsection, keyword)
2320 CALL keyword_release(keyword)
2321
2322 CALL section_add_subsection(section, subsection)
2323 CALL section_release(subsection)
2324
2325 END SUBROUTINE create_sccs_section
2326
2327END MODULE input_cp2k_dft
integer, parameter, public basis_sort_zet
integer, parameter, public basis_sort_default
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public vandevondele2005b
integer, save, public blochl1995
integer, save, public guidon2010
integer, save, public bengtsson1999
integer, save, public kunert2003
integer, save, public yin2017
integer, save, public avezac2005
integer, save, public andreussi2012
integer, save, public iannuzzi2006
integer, save, public fattebert2002
integer, save, public andermatt2016
integer, save, public merlot2014
integer, save, public perdew1981
integer, save, public brelaz1979
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
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
utils to manipulate splines on the regular grid of a pw
integer, parameter, public pw_interp
integer, parameter, public spline3_nopbc_interp
integer, parameter, public spline3_pbc_interp
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 use_mom_ref_coac
integer, parameter, public sic_list_unpaired
integer, parameter, public sic_mauri_spz
integer, parameter, public do_bch
integer, parameter, public do_admm_purify_mo_no_diag
integer, parameter, public do_etrs
integer, parameter, public do_admm_aux_exch_func_opt_libxc
integer, parameter, public rel_zora_full
integer, parameter, public do_pade
integer, parameter, public do_admm_purify_none
integer, parameter, public use_mom_ref_user
integer, parameter, public rel_pot_full
integer, parameter, public do_admm_purify_none_dm
integer, parameter, public use_mom_ref_com
integer, parameter, public ehrenfest
integer, parameter, public use_restart_wfn
integer, parameter, public do_admm_purify_mcweeny
integer, parameter, public do_admm_blocking_purify_full
integer, parameter, public plus_u_lowdin
integer, parameter, public kg_tnadd_none
integer, parameter, public do_admm_aux_exch_func_sx_libxc
integer, parameter, public admm2_type
integer, parameter, public sic_list_all
integer, parameter, public do_cn
integer, parameter, public kg_tnadd_embed_ri
integer, parameter, public kg_tnadd_embed
integer, parameter, public sic_eo
integer, parameter, public sccs_derivative_cd5
integer, parameter, public do_admm_aux_exch_func_bee
integer, parameter, public rel_zora_mp
integer, parameter, public plus_u_mulliken_charges
integer, parameter, public use_scf_wfn
integer, parameter, public no_admm_type
integer, parameter, public rel_zora
integer, parameter, public do_admm_blocked_projection
integer, parameter, public kg_tnadd_atomic
integer, parameter, public do_admm_basis_projection
integer, parameter, public do_admm_aux_exch_func_default_libxc
integer, parameter, public do_admm_aux_exch_func_opt
integer, parameter, public do_admm_aux_exch_func_none
integer, parameter, public do_admm_purify_cauchy_subspace
integer, parameter, public plus_u_mulliken
integer, parameter, public kg_color_greedy
integer, parameter, public do_admm_aux_exch_func_bee_libxc
integer, parameter, public admm1_type
integer, parameter, public do_admm_aux_exch_func_pbex_libxc
integer, parameter, public kg_color_dsatur
integer, parameter, public do_admm_aux_exch_func_default
integer, parameter, public weight_type_unit
integer, parameter, public rtp_method_bse
integer, parameter, public admms_type
integer, parameter, public do_admm_charge_constrained_projection
integer, parameter, public rel_dkh
integer, parameter, public do_admm_purify_cauchy
integer, parameter, public sccs_fattebert_gygi
integer, parameter, public rel_trans_full
integer, parameter, public sccs_derivative_cd7
integer, parameter, public rel_trans_molecule
integer, parameter, public rel_trans_atom
integer, parameter, public weight_type_mass
integer, parameter, public use_rt_restart
integer, parameter, public do_exact
integer, parameter, public sccs_derivative_fft
integer, parameter, public use_mom_ref_zero
integer, parameter, public gaussian
integer, parameter, public rel_pot_erfc
integer, parameter, public rtp_method_tddft
integer, parameter, public rel_none
integer, parameter, public rtp_bse_ham_g0w0
integer, parameter, public do_taylor
integer, parameter, public do_admm_purify_mo_diag
integer, parameter, public do_em
integer, parameter, public sic_mauri_us
integer, parameter, public sic_none
integer, parameter, public rtp_bse_ham_ks
integer, parameter, public sccs_derivative_cd3
integer, parameter, public rel_sczora_mp
integer, parameter, public admmq_type
integer, parameter, public sccs_andreussi
integer, parameter, public sic_ad
integer, parameter, public do_admm_exch_scaling_none
integer, parameter, public do_arnoldi
integer, parameter, public admmp_type
integer, parameter, public do_admm_exch_scaling_merlot
integer, parameter, public real_time_propagation
integer, parameter, public numerical
integer, parameter, public do_admm_aux_exch_func_pbex
integer, parameter, public slater
input for the ALMO SCF section
subroutine, public create_almo_scf_section(section)
create the almo scf section
function that build the active space section of the input
subroutine, public create_active_space_section(section)
Create CP2K input section for the calculation of an active space Hamiltonian.
function that build the dft section of the input
subroutine, public create_bsse_section(section)
Create the BSSE section for counterpoise correction.
subroutine, public create_mgrid_section(section, create_subsections)
creates the multigrid
subroutine, public create_dft_section(section)
creates the dft section
subroutine, public create_interp_section(section)
creates the interpolation section
function that build the dft section of the input
subroutine, public create_ec_section(section)
creates the ENERGY CORRECTION section
Excited state input section.
subroutine, public create_exstate_section(section)
creates the EXCITED ENERGY section
function that build the input sections for external [potential, density VXC]
subroutine, public create_ext_pot_section(section)
Creates the section for applying an electrostatic external potential.
subroutine, public create_ext_vxc_section(section)
ZMP Creates the section for creating the external v_xc.
subroutine, public create_ext_den_section(section)
ZMP Creates the section for reading user supplied external density.
function that build the field section of the input
subroutine, public create_efield_section(section)
creates the section for time dependent nonperiodic fields
subroutine, public create_per_efield_section(section)
creates the section for static periodic fields
Harris input section.
subroutine, public create_harris_section(section)
creates the HARRIS_METHOD section
function that build the kpoints section of the input
subroutine, public create_kpoints_section(section)
Creates the Kpoints section SECTION: &kpoint... &end SCHEME [None, Gamma, Monkhorst-Pack,...
subroutine, public create_localize_section(section)
parameters fo the localization of wavefunctions
input for the linear scaling (LS) section
subroutine, public create_ls_scf_section(section)
creates the linear scaling scf section
function that build the poisson section of the input
subroutine, public create_poisson_section(section)
Creates the Poisson section.
function that build the print section of the dft input
subroutine, public create_print_dft_section(section)
Create the print dft section.
function that builds the projection of MO in RTP section of the input
subroutine, public create_projection_rtp_section(section)
creates the section for time dependent projection of the MOs
function that build the QS section of the input
subroutine, public create_qs_section(section)
creates the input section for the qs part
subroutine, public create_lrigpw_section(section)
input section for optional parameters for LRIGPW LRI: local resolution of identity
subroutine, public create_rsgrid_section(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
Functions that build SMEAGOL input section.
subroutine, public create_dft_smeagol_section(section)
Create SMEAGOL input section.
input section for NEGF based quantum transport calculations (integration with the quantum transport c...
subroutine, public create_transport_section(section)
creates the TRANSPORT section
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_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 char_t
integer, parameter, public integer_t
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
Definition of physical constants:
Definition physcon.F:68
real(kind=dp), parameter, public femtoseconds
Definition physcon.F:153
real(kind=dp), parameter, public evolt
Definition physcon.F:183
different utils that are useful to manipulate splines on the regular grid of a pw
integer, parameter, public precond_spl3_3
integer, parameter, public precond_spl3_aint
integer, parameter, public no_precond
integer, parameter, public precond_spl3_2
integer, parameter, public precond_spl3_aint2
integer, parameter, public precond_spl3_1
Utilities for string manipulations.
represent a keyword in the input
represent a section of the input file