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