47 c_pw92,
c_pw92dmc,
c_pw92vmc,
c_pz,
c_pzdmc,
c_pzvmc,
do_vwn3,
do_vwn5,
ke_lc,
ke_llp, &
56#include "./base/base_uses.f90"
61 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .true.
62 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_xc'
79 cpassert(.NOT.
ASSOCIATED(section))
81 description=
"The eXchange-Correlation functional to use. In case of hybrid functionals, all scaling "// &
82 "parameters and potential types have to be specified in the HF section except from a few "// &
83 "predefined combinations (see _SECTION_PARAMETERS_ below). CP2K does NOT set it up "// &
84 "automatically not even for LibXC functionals.", &
85 n_keywords=0, n_subsections=4, repeats=.false., &
90 NULLIFY (subsection, keyword)
92 keyword, __location__, name=
"_SECTION_PARAMETERS_", &
93 description=
"Shortcut for the most common functional combinations. These make use of the implementations provided by "// &
94 "native CP2K (without LibXC). In case of hybrid functionals (B3LYP, PBE0), set the "// &
95 "accuracy-related and system-dependent parameters in the HF section (especially MAX_MEMORY, EPS_SCHWARZ, "// &
96 "CUTOFF_RADIUS, POTENTIAL_TYPE) as these are not set automatically.", &
97 usage=
"&xc_functional BLYP", &
98 enum_c_vals=
s2a(
"B3LYP",
"PBE0",
"BLYP",
"BP",
"PADE",
"LDA",
"PBE", &
99 "TPSS",
"HCTH120",
"OLYP",
"BEEFVDW",
"NO_SHORTCUT",
"NONE"), &
102 enum_desc=
s2a(
"B3LYP", &
103 "PBE0 (see note in section XC/XC_FUNCTIONAL/PBE)", &
104 "BLYP",
"BP",
"PADE",
"Alias for PADE", &
105 "PBE (see note in section XC/XC_FUNCTIONAL/PBE)", &
106 "TPSS (not available with LSD, use LIBXC version instead)",
"HCTH120",
"OLYP", &
107 "BEEFVDW",
"NO_SHORTCUT",
"NONE"), &
114 description=
"Uses the Becke 88 exchange functional", &
115 n_keywords=0, n_subsections=0, repeats=.false., &
117 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
118 description=
"activates the functional", &
119 lone_keyword_l_val=.true., default_l_val=.false.)
123 keyword, __location__, name=
"scale_x", &
124 description=
"scales the exchange part of the functional", &
132 CALL section_create(subsection, __location__, name=
"LYP_ADIABATIC", &
133 description=
"Uses the LYP correlation functional in an adiabatic fashion", &
134 n_keywords=0, n_subsections=0, repeats=.false., &
136 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
137 description=
"activates the functional", &
138 lone_keyword_l_val=.true., default_l_val=.false.)
142 description=
"Defines the parameter of the adiabatic curve.", &
150 CALL section_create(subsection, __location__, name=
"BECKE88_LR_ADIABATIC", &
151 description=
"Uses the Becke 88 longrange exchange functional in an adiabatic fashion", &
152 n_keywords=0, n_subsections=0, repeats=.false., &
154 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
155 description=
"activates the functional", &
156 lone_keyword_l_val=.true., default_l_val=.false.)
160 description=
"scales the exchange part of the functional", &
165 description=
"Potential parameter in erf(omega*r)/r", &
170 description=
"Defines the parameter of the adiabatic curve", &
178 CALL section_create(subsection, __location__, name=
"BECKE88_LR", &
179 description=
"Uses the Becke 88 longrange exchange functional", &
180 n_keywords=0, n_subsections=0, repeats=.false., &
182 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
183 description=
"activates the functional", &
184 lone_keyword_l_val=.true., default_l_val=.false.)
188 description=
"scales the exchange part of the functional", &
193 description=
"Potential parameter in erf(omega*r)/r", &
202 description=
"Uses the LYP functional", &
203 n_keywords=0, n_subsections=0, repeats=.false., &
205 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
206 description=
"activates the functional", &
207 lone_keyword_l_val=.true., default_l_val=.false.)
211 description=
"scales the correlation part of the functional", &
219 description=
"Uses the PADE functional", &
220 n_keywords=0, n_subsections=0, repeats=.false., &
222 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
223 description=
"activates the functional", &
224 lone_keyword_l_val=.true., default_l_val=.false.)
231 description=
"Uses the HCTH class of functionals", &
232 n_keywords=0, n_subsections=0, repeats=.false.)
233 CALL keyword_create(keyword, __location__, name=
"PARAMETER_SET", &
234 description=
"Which version of the parameters should be used", &
235 usage=
"PARAMETER_SET 407", &
236 enum_c_vals=(/
"93 ",
"120",
"147",
"407",
"HLE"/), &
237 enum_i_vals=(/93, 120, 147, 407, 408/), &
241 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
242 description=
"activates the functional", &
243 lone_keyword_l_val=.true., default_l_val=.false.)
250 description=
"Uses the OPTX functional", &
251 n_keywords=0, n_subsections=0, repeats=.false.)
252 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
253 description=
"activates the functional", &
254 lone_keyword_l_val=.true., default_l_val=.false.)
258 description=
"scales the exchange part of the functional", &
263 description=
"OPTX a1 coefficient", &
264 default_r_val=1.05151_dp)
268 description=
"OPTX a2 coefficient", &
269 default_r_val=1.43169_dp)
273 description=
"OPTX gamma coefficient", &
274 default_r_val=0.006_dp)
283 description=
"Uses the CS1 functional", &
284 n_keywords=0, n_subsections=0, repeats=.false.)
285 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
286 description=
"activates the functional", &
287 lone_keyword_l_val=.true., default_l_val=.false.)
294 description=
"Uses one of the XGGA functionals (optimized versions of "// &
295 "some of these functionals might be available outside this section).", &
296 n_keywords=1, n_subsections=0, repeats=.false.)
297 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
298 description=
"activates the functional", &
299 lone_keyword_l_val=.true., default_l_val=.false.)
303 description=
"Which one of the XGGA functionals should be used", &
304 usage=
"FUNCTIONAL PW86X", &
321 description=
"Uses one of the KE_GGA functionals (optimized versions of "// &
322 "some of these functionals might be available outside this section). "// &
323 "These functionals are needed for the computation of the kinetic "// &
324 "energy in the Kim-Gordon method.", &
325 n_keywords=1, n_subsections=0, repeats=.false.)
326 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
327 description=
"activates the functional", &
328 lone_keyword_l_val=.true., default_l_val=.false.)
332 description=
"Which one of the KE_GGA functionals should be used", &
333 usage=
"FUNCTIONAL (OL1|OL2|LLP|PW86|PW91|LC|T92|PBE)", &
334 enum_c_vals=(/
"OL1 ",
"OL2 ",
"LLP ",
"PW86",
"PW91",
"LC ",
"T92 ",
"PBE "/), &
336 enum_desc=
s2a(
"Uses first Ou-Yang and Levy functional, currently not producing correct results", &
337 "Uses second Ou-Yang and Levy functional, currently not producing correct results", &
338 "Uses Lee, Lee, and Parr functional", &
339 "Uses Perdew and Wang's 1986 functional", &
340 "Uses Perdew and Wang's 1991 functional", &
341 "Uses Lembarki and Chermette functional", &
342 "Uses Thakkar functional", &
343 "Uses the 1996 functional of Perdew, Burke and Ernzerhof"), &
351 description=
"Uses the P86C functional", &
352 n_keywords=0, n_subsections=0, repeats=.false.)
353 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
354 description=
"activates the functional", &
355 lone_keyword_l_val=.true., default_l_val=.false.)
359 description=
"scales the correlation part of the functional", &
367 description=
"Uses the PerdewWang correlation functional.", &
368 n_keywords=1, n_subsections=0, repeats=.false.)
369 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
370 description=
"activates the functional", &
371 lone_keyword_l_val=.true., default_l_val=.false.)
375 description=
"Scaling of the energy functional", &
376 default_r_val=1.0_dp)
379 CALL keyword_create(keyword, __location__, name=
"PARAMETRIZATION", &
380 description=
"Which one of parametrizations should be used", &
381 usage=
"PARAMETRIZATION DMC", &
394 description=
"Uses the PZ functional.", &
395 n_keywords=1, n_subsections=0, repeats=.false., &
397 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
398 description=
"activates the functional", &
399 lone_keyword_l_val=.true., default_l_val=.false.)
402 CALL keyword_create(keyword, __location__, name=
"PARAMETRIZATION", &
403 description=
"Which one of parametrizations should be used", &
404 usage=
"PARAMETRIZATION DMC", &
414 description=
"scales the correlation part of the functional", &
422 description=
"Uses the TFW functional", &
423 n_keywords=0, n_subsections=0, repeats=.false.)
424 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
425 description=
"activates the functional", &
426 lone_keyword_l_val=.true., default_l_val=.false.)
433 description=
"Uses the TF functional", &
434 n_keywords=0, n_subsections=0, repeats=.false.)
435 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
436 description=
"activates the functional", &
437 lone_keyword_l_val=.true., default_l_val=.false.)
444 description=
"Uses the VWN functional", &
445 n_keywords=0, n_subsections=0, repeats=.false., &
447 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
448 description=
"activates the functional", &
449 lone_keyword_l_val=.true., default_l_val=.false.)
453 description=
"scales the correlation part of the functional", &
458 CALL keyword_create(keyword, __location__, name=
"FUNCTIONAL_TYPE", &
459 description=
"Which version of the VWN functional should be used", &
460 usage=
"FUNCTIONAL_TYPE VWN5", &
461 enum_c_vals=
s2a(
"VWN5",
"VWN3"), &
463 enum_desc=
s2a(
"This is the recommended (correct) version of the VWN functional", &
464 "This version is the default in Gaussian, but not recommended. "// &
465 "Notice that it is also employed in Gaussian's default version of B3LYP"), &
474 description=
"Uses the XALPHA (SLATER) functional.", &
475 n_keywords=1, n_subsections=0, repeats=.false.)
476 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
477 description=
"activates the functional", &
478 lone_keyword_l_val=.true., default_l_val=.false.)
482 description=
"Value of the xa parameter (this does not change the exponent, "// &
483 "just the mixing)", &
484 usage=
"XA 0.7", default_r_val=2._dp/3._dp)
488 description=
"scales the exchange part of the functional", &
496 description=
"Uses the TPSS functional. Note, that there is no LSD version available. "// &
497 "In such cases, use the LIBXC version instead.", &
498 n_keywords=0, n_subsections=0, repeats=.false., &
500 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
501 description=
"Activates the functional", &
502 lone_keyword_l_val=.true., default_l_val=.false.)
506 description=
"scales the exchange part of the functional", &
511 description=
"scales the correlation part of the functional", &
519 description=
"Uses the PBE functional", &
520 n_keywords=0, n_subsections=0, repeats=.false., &
522 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
523 description=
"activates the functional", &
524 lone_keyword_l_val=.true., default_l_val=.false.)
527 CALL keyword_create(keyword, __location__, name=
"parametrization", &
528 description=
"switches between the different "// &
529 "parametrizations of the functional. "// &
530 "Note: Beta parameters used have only 5 significant digits, "// &
531 "as published. For higher precision and program comparison "// &
532 "use the LIBXC library.", &
534 enum_c_vals=(/
"ORIG ",
"revPBE",
"PBEsol"/), &
535 enum_desc=(/
"original PBE ", &
536 "revised PBE (revPBE) ", &
537 "PBE for solids and surfaces (PBEsol)"/), &
542 description=
"scales the exchange part of the functional", &
547 description=
"scales the correlation part of the functional", &
555 description=
"Uses the short range PBE functional", &
556 n_keywords=0, n_subsections=0, repeats=.false., &
558 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
559 description=
"activates the functional", &
560 lone_keyword_l_val=.true., default_l_val=.false.)
564 description=
"scales the exchange part of the functional", &
569 description=
"scales the exchange part of the original hole PBE-functional", &
570 default_r_val=0.0_dp)
574 description=
"screening parameter", &
582 description=
"Uses the Becke 97 exchange correlation functional", &
583 n_keywords=0, n_subsections=0, repeats=.false., &
585 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
586 description=
"activates the functional", &
587 lone_keyword_l_val=.true., default_l_val=.false.)
591 description=
"scales the exchange part of the functional, if -1 the default for the given parametrization is used", &
592 default_r_val=-1._dp)
596 description=
"scales the correlation part of the functional", &
600 CALL keyword_create(keyword, __location__, name=
"parametrization", &
601 description=
"switches between the B97 and Grimme parametrization ", &
603 enum_c_vals=(/
"ORIG ",
"B97GRIMME ",
"B97_GRIMME",
"wB97X-V ",
"B97-3c "/), &
611 CALL section_create(subsection, __location__, name=
"BECKE_ROUSSEL", &
612 description=
"Becke Roussel exchange hole model. Can be used "// &
613 "as long range correction with a truncated coulomb potential", &
614 n_keywords=0, n_subsections=0, repeats=.false., &
616 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
617 description=
"activates the functional", &
618 lone_keyword_l_val=.true., default_l_val=.false.)
622 description=
"scales the exchange part of the functional", &
626 CALL keyword_create(keyword, __location__, name=
"CUTOFF_RADIUS", &
627 description=
"Defines the cutoff radius for the truncation. "// &
628 "If put to zero, the standard full range potential will be used", &
629 usage=
"CUTOFF_RADIUS 2.0", default_r_val=0.0_dp)
633 description=
"Parameter in the exchange hole. "// &
634 "Usually this is put to 1.0 or 0.8", &
635 usage=
"GAMMA 0.8", default_r_val=1.0_dp)
641 CALL section_create(subsection, __location__, name=
"LDA_HOLE_T_C_LR", &
642 description=
"LDA exchange hole model in truncated coulomb potential", &
643 n_keywords=0, n_subsections=0, repeats=.false.)
644 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
645 description=
"activates the functional", &
646 lone_keyword_l_val=.true., default_l_val=.false.)
650 description=
"scales the exchange part of the functional", &
654 CALL keyword_create(keyword, __location__, name=
"CUTOFF_RADIUS", &
655 description=
"Defines cutoff for lower integration boundary", &
656 default_r_val=0.0_dp, unit_str=
"angstrom")
662 CALL section_create(subsection, __location__, name=
"PBE_HOLE_T_C_LR", &
663 description=
"PBE exchange hole model in trucanted coulomb potential", &
664 n_keywords=0, n_subsections=0, repeats=.false.)
665 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
666 description=
"activates the functional", &
667 lone_keyword_l_val=.true., default_l_val=.false.)
671 description=
"scales the exchange part of the functional", &
675 CALL keyword_create(keyword, __location__, name=
"CUTOFF_RADIUS", &
676 description=
"Defines cutoff for lower integration boundary", &
677 default_r_val=1.0_dp, unit_str=
"angstrom")
684 description=
"Combination of three different exchange hole models", &
685 n_keywords=0, n_subsections=0, repeats=.false.)
686 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
687 description=
"activates the functional", &
688 lone_keyword_l_val=.true., default_l_val=.false.)
692 description=
"scales the exchange part of the functional", &
696 CALL keyword_create(keyword, __location__, name=
"CUTOFF_RADIUS", &
697 description=
"Defines cutoff for lower integration boundary", &
698 default_r_val=0.0_dp, unit_str=
"angstrom")
702 description=
"Parameter for Becke Roussel hole", &
703 default_r_val=1.0_dp)
710 description=
"Uses the BEEFvdW exchange functional", &
711 n_keywords=0, n_subsections=0, repeats=.false., &
713 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
714 description=
"activates the functional", &
715 lone_keyword_l_val=.true., default_l_val=.false.)
719 description=
"scales the exchange part of the functional", &
733 SUBROUTINE create_xc_potential_section(section)
739 cpassert(.NOT.
ASSOCIATED(section))
741 description=
"The xc potential to use (CAREFUL: xc potential here refers "// &
742 "to potentials that are not derived from an xc functional, but rather are "// &
743 "modelled directly. Therefore there is no consistent xc energy available. "// &
744 "To still get an energy expression, see ENERGY below", &
745 n_keywords=1, n_subsections=1, repeats=.false.)
747 NULLIFY (subsection, keyword)
749 description=
"Uses the SAOP potential", &
750 n_keywords=3, n_subsections=0, repeats=.true.)
752 description=
"Value of the alpha parameter (default = 1.19).", &
753 usage=
"ALPHA 1.19", default_r_val=1.19_dp)
757 description=
"Value of the beta parameter (default = 0.01).", &
758 usage=
"BETA 0.01", default_r_val=0.01_dp)
762 description=
"Value of the K_rho parameter (default = 0.42).", &
763 usage=
"K_RHO 0.42", default_r_val=0.42_dp)
770 description=
"How to determine the total energy.", &
771 usage=
"ENERGY [NONE,XC_FUNCTIONAL,SUM_EIGENVALUES", &
772 enum_c_vals=
s2a(
"NONE",
"XC_FUNCTIONAL",
"FUNCTIONAL",
"SUM_EIGENVALUES",
"SOE"), &
782 END SUBROUTINE create_xc_potential_section
789 SUBROUTINE create_xc_kernel_section(section)
794 cpassert(.NOT.
ASSOCIATED(section))
796 description=
"The xc kernel to use (CAREFUL: xc kernel here refers "// &
797 "to kernels that are not derived from an xc functional, but rather are "// &
798 "modelled directly. This kernel will be used in a TDDFPT calculation. "// &
799 "Cannot be combined with XC_FUNCTIONAL or XC_POTENTIAL.", &
800 n_keywords=1, n_subsections=1, repeats=.false.)
804 keyword, __location__, name=
"_SECTION_PARAMETERS_", &
805 description=
"Selection of kernel functionals.", &
806 usage=
"&XC_KERNEL LDAfxc", &
807 enum_c_vals=
s2a(
"PADEfxc",
"LDAfxc",
"GGAfxc",
"NONE"), &
809 enum_desc=
s2a(
"Fxc based on LDA PADE approximation", &
810 "Fxc based on LDA functionals", &
811 "Fxc model from fit to PBE functional", &
819 description=
"List of parameters specific to the kernel function", &
820 usage=
"PARAMETER <REAL> .. <REAL>", &
821 type_of_var=
real_t, n_var=-1)
825 description=
"B97 GAMMA parameters [gx, gab, gaa]", &
826 usage=
"GAMMA <REAL> <REAL> <REAL>", &
827 default_r_vals=(/0.004_dp, 0.006_dp, 0.2_dp/), &
828 type_of_var=
real_t, n_var=3)
832 description=
"B97 C parameters for exchange", &
833 usage=
"C_XAA <REAL> <REAL> <REAL>", &
834 default_r_vals=(/1.0_dp, 0.63_dp, 0.94_dp/), &
835 type_of_var=
real_t, n_var=3)
839 description=
"B97 C parameters for same spin correlation.", &
840 usage=
"C_CAB <REAL> <REAL> <REAL>", &
841 default_r_vals=(/1.0_dp, 0.75_dp, -4.60_dp/), &
842 type_of_var=
real_t, n_var=3)
846 description=
"B97 C parameters for opposite spin correlation.", &
847 usage=
"C_CAA <REAL> <REAL> <REAL>", &
848 default_r_vals=(/0.17_dp, 2.35_dp, -2.55_dp/), &
849 type_of_var=
real_t, n_var=3)
853 description=
"Scaling parameter for exchange kernel.", &
854 usage=
"SCALE_X 0.2", default_r_val=1.0_dp)
858 description=
"Scaling parameter for correlation kernel.", &
859 usage=
"SCALE_C 0.2", default_r_val=1.0_dp)
863 END SUBROUTINE create_xc_kernel_section
870 SUBROUTINE create_hfx_kernel_section(section)
876 cpassert(.NOT.
ASSOCIATED(section))
878 description=
"The hfx kernel to use. Cannot be combined with HF section.", &
879 n_keywords=1, n_subsections=2, repeats=.false.)
881 NULLIFY (subsection, keyword)
883 description=
"Switch to use the HFXSR (short range) kernel.", &
884 usage=
"DO_HFXSR T/F", default_l_val=.false., &
885 lone_keyword_l_val=.true.)
888 NULLIFY (subsection, keyword)
889 CALL keyword_create(keyword, __location__, name=
"HFXSR_PRIMBAS", &
890 description=
"Default number of primitives in ADMM basis in HFXSR. "// &
891 "0 indicates the use of a contracted minimal basis. ", &
892 usage=
"HFXSR_PRIMBAS 3", default_i_val=0)
901 description=
"Uses the HFXLR (long range) kernel", &
902 n_keywords=2, n_subsections=0, repeats=.false.)
904 description=
"Value of lower range cutoff of interaction [Bohr]", &
905 usage=
"RCUT 5.00", default_r_val=6.00_dp, unit_str=
"bohr")
909 description=
"Scaling parameter for HFX kernel.", &
910 usage=
"SCALE 0.25", default_r_val=1.00_dp)
916 END SUBROUTINE create_hfx_kernel_section
922 SUBROUTINE create_vdw_potential_section(section)
926 TYPE(
section_type),
POINTER :: newsection, print_key, subsection
928 cpassert(.NOT.
ASSOCIATED(section))
929 CALL section_create(section, __location__, name=
"vdw_potential", &
930 description=
"This section combines all possible additional dispersion "// &
931 "corrections to the normal XC functionals. This can be more functionals "// &
932 "or simple empirical pair potentials. ", &
934 n_keywords=1, n_subsections=1, repeats=.false.)
936 NULLIFY (subsection, keyword)
937 CALL keyword_create(keyword, __location__, name=
"POTENTIAL_TYPE", &
938 variants=
s2a(
"DISPERSION_FUNCTIONAL"), &
939 description=
"Type of dispersion/vdW functional or potential to use", &
940 usage=
"POTENTIAL_TYPE (NONE|PAIR_POTENTIAL|NON_LOCAL)", &
941 enum_c_vals=
s2a(
"NONE",
"PAIR_POTENTIAL",
"NON_LOCAL"), &
943 enum_desc=
s2a(
"No dispersion/van der Waals functional", &
944 "Pair potential van der Waals density functional", &
945 "Nonlocal van der Waals density functional"), &
950 CALL section_create(subsection, __location__, name=
"PAIR_POTENTIAL", &
951 description=
"Information on the pair potential to calculate dispersion", &
952 n_keywords=5, n_subsections=0, repeats=.true.)
954 variants=
s2a(
"D3_CUTOFF",
"D4_3B_CUTOFF"), &
955 description=
"Range of potential. The cutoff will be 2 times this value. "// &
956 "In the case of D4 it will be used for the 3-body term", &
957 usage=
"R_CUTOFF 20.0", default_r_val=20.0_dp, &
962 description=
"Range of potential. The cutoff will be 2 times this value. "// &
963 "Only used for the 2-body term of D4", &
964 usage=
"D4_CUTOFF 30.0", default_r_val=20.0_dp, &
969 description=
"Coordination number cutoff for D4", &
970 usage=
"D4_CN_CUTOFF 30.0", default_r_val=10.0_dp, &
975 description=
"Type of potential", &
977 usage=
"TYPE (DFTD2|DFTD3|DFTD3(BJ)|DFTD4)", &
978 enum_c_vals=
s2a(
"DFTD2",
"DFTD3",
"DFTD3(BJ)",
"DFTD4"), &
981 enum_desc=
s2a(
"Grimme D2 method", &
982 "Grimme D3 method (zero damping)", &
983 "Grimme D3 method (Becke-Johnson damping)", &
984 "Grimme D4 method"), &
988 CALL keyword_create(keyword, __location__, name=
"PARAMETER_FILE_NAME", &
989 description=
"Name of the parameter file, may include a path (not used for D4)", &
990 usage=
"PARAMETER_FILE_NAME <FILENAME>", &
991 default_lc_val=
"dftd3.dat")
994 CALL keyword_create(keyword, __location__, name=
"REFERENCE_FUNCTIONAL", &
995 description=
"Use parameters for this specific density functional. "// &
996 "For available D3 and D3(BJ) parameters see: "// &
997 "<https://www.chemie.uni-bonn.de/grimme/de/software/dft-d3>. "// &
998 "For the defintion of D4 parameters see: "// &
999 "<https://github.com/dftd4/dftd4>.", &
1000 usage=
"REFERENCE_FUNCTIONAL <functional>", &
1004 CALL keyword_create(keyword, __location__, name=
"D4_REFERENCE_CODE", &
1005 description=
"Calculate D4 energy using external library.", &
1006 usage=
"D4_REFERENCE_CODE", default_l_val=.true., &
1007 lone_keyword_l_val=.true.)
1011 description=
"Debug output for D4 method using reference code.", &
1012 usage=
"D4_DEBUG", default_l_val=.false., &
1013 lone_keyword_l_val=.true.)
1017 variants=[
"SCALING"], &
1018 description=
"XC Functional dependent scaling parameter, if set to zero CP2K attempts"// &
1019 " to guess the xc functional that is in use and sets the associated scaling parameter.", &
1020 usage=
"SCALING 0.2", default_r_val=0._dp)
1024 variants=[
"EXP_PRE"], &
1025 description=
"Prefactor in exponential damping factor (DFT-D2 potential)", &
1026 usage=
"D2_EXP_PRE 20.", default_r_val=20._dp)
1030 description=
"Cutoff value for coordination number function (DFT-D3 method)", &
1031 usage=
"EPS_CN 1.e-6_dp", default_r_val=1.e-6_dp)
1035 description=
"XC Functional dependent scaling parameters (s6,sr6,s8) for the DFT-D3 method,"// &
1036 " if set to zero CP2K attempts"// &
1037 " to guess the xc functional from REFERENCE_FUNCTIONAL and sets the associated scaling parameter.", &
1038 usage=
"D3_SCALING 1.0 1.0 1.0", n_var=3, &
1039 default_r_vals=(/0.0_dp, 0.0_dp, 0.0_dp/))
1042 CALL keyword_create(keyword, __location__, name=
"D3BJ_SCALING", &
1043 description=
"XC Functional dependent scaling parameters (s6,a1,s8,a2) for the DFT-D3(BJ) method,"// &
1044 " if set to zero CP2K attempts"// &
1045 " to guess the xc functional from REFERENCE_FUNCTIONAL and sets the associated scaling parameter.", &
1046 usage=
"D3BJ_SCALING 1.0 1.0 1.0 1.0", n_var=4, &
1047 default_r_vals=(/0.0_dp, 0.0_dp, 0.0_dp, 0.0_dp/))
1051 description=
"XC Functional dependent scaling parameters (s6,a1,s8,a2) for the DFT-D4 method,"// &
1052 " if set to zero CP2K attempts"// &
1053 " to guess the xc functional from REFERENCE_FUNCTIONAL and sets the associated scaling parameter.", &
1054 usage=
"D4_SCALING 1.0 1.0 1.0 1.0", n_var=4, &
1055 default_r_vals=(/0.0_dp, 0.0_dp, 0.0_dp, 0.0_dp/))
1058 CALL keyword_create(keyword, __location__, name=
"CALCULATE_C9_TERM", &
1059 description=
"Calculate C9 terms in DFT-D3 model", &
1060 usage=
"CALCULATE_C9_TERM", default_l_val=.false., &
1061 lone_keyword_l_val=.true.)
1064 CALL keyword_create(keyword, __location__, name=
"REFERENCE_C9_TERM", &
1065 description=
"Calculate C9 terms in DFT-D3 model using reference coordination numbers", &
1066 usage=
"REFERENCE_C9_TERM", default_l_val=.false., &
1067 lone_keyword_l_val=.true.)
1070 CALL keyword_create(keyword, __location__, name=
"FACTOR_S9_TERM", &
1071 description=
"S9 prefactor of the many-body term in the DFT-D4 method.", &
1072 usage=
"FACTOR_S9_TERM 1.e-0", default_r_val=1.00_dp)
1075 CALL keyword_create(keyword, __location__, name=
"LONG_RANGE_CORRECTION", &
1076 description=
"Calculate a long range correction to the DFT-D3 model."// &
1077 " WARNING: Use with care! Only for isotropic dense systems.", &
1078 usage=
"LONG_RANGE_CORRECTION", default_l_val=.false., &
1079 lone_keyword_l_val=.true.)
1082 CALL keyword_create(keyword, __location__, name=
"SHORT_RANGE_CORRECTION", &
1083 description=
"Calculate a short-range bond correction to the DFT-D3 model", &
1084 usage=
"SHORT_RANGE_CORRECTION", default_l_val=.false., &
1085 lone_keyword_l_val=.true.)
1088 CALL keyword_create(keyword, __location__, name=
"SHORT_RANGE_CORRECTION_PARAMETERS", &
1089 description=
"Parameters for the short-range bond correction to the DFT-D3 model. "// &
1090 "s*(za*zb)^t1*EXP(-g*dr*r0ab^t2), parameters: s, g, t1, t2 "// &
1091 "Defaults: s=0.08, g=10.0, t1=0.5, t2=-1.0 ", &
1092 usage=
"SHORT_RANGE_CORRECTION_PARAMETERS", default_r_vals=(/0.08_dp, 10.0_dp, 0.5_dp, -1.0_dp/), &
1093 n_var=4, type_of_var=
real_t)
1097 CALL keyword_create(keyword, __location__, name=
"MOLECULE_CORRECTION", &
1098 description=
"Calculate a intermolecular correction to the DFT-D3 model", &
1099 usage=
"MOLECULE_CORRECTION", default_l_val=.false., &
1100 lone_keyword_l_val=.true.)
1103 CALL keyword_create(keyword, __location__, name=
"MOLECULE_CORRECTION_C8", &
1104 description=
"Calculate a intermolecular correction to the C8 term in the DFT-D3 model", &
1105 usage=
"MOLECULE_CORRECTION_C8 1.0 ", default_r_val=0.0_dp)
1108 CALL keyword_create(keyword, __location__, name=
"VERBOSE_OUTPUT", &
1109 description=
"Extensive output for the DFT-D2 and DFT-D3 models."// &
1110 " Needs PRINT_DFTD section to be specified.", &
1111 usage=
"VERBOSE_OUTPUT", default_l_val=.false., &
1112 lone_keyword_l_val=.true.)
1117 CALL keyword_create(keyword, __location__, name=
"D3_EXCLUDE_KIND", &
1118 description=
"Specifies the atomic kinds excluded in the DFT-D3 calculation.", &
1119 usage=
"D3_EXCLUDE_KIND kind1 kind2 ... ", repeats=.false., &
1125 CALL keyword_create(keyword, __location__, name=
"D3_EXCLUDE_KIND_PAIR", &
1126 description=
"Specifies the atomic kinds for interactions excluded from the DFT-D3 calculation.", &
1127 usage=
"D3_EXCLUDE_KIND_PAIR kind1 kind2 ", repeats=.true., &
1133 CALL keyword_create(keyword, __location__, name=
"KIND_COORDINATION_NUMBERS", &
1134 description=
"Specifies the coordination number for a kind for the C9 term in DFT-D3.", &
1135 usage=
"KIND_COORDINATION_NUMBERS CN kind ", repeats=.true., &
1136 n_var=-1, type_of_var=
char_t)
1140 CALL keyword_create(keyword, __location__, name=
"ATOM_COORDINATION_NUMBERS", &
1141 description=
"Specifies the coordination number of a set of atoms for the C9 term in DFT-D3.", &
1142 usage=
"ATOM_COORDINATION_NUMBERS CN atom1 atom2 ... ", repeats=.true., &
1143 n_var=-1, type_of_var=
char_t)
1149 description=
"Specifies parameters for atom types (in atomic units). If "// &
1150 "not provided default parameters are used (DFT-D2).", &
1151 usage=
"ATOMPARM <ELEMENT> <C6_parameter> <vdw_radii>", &
1152 repeats=.true., n_var=-1, type_of_var=
char_t)
1158 description=
"Controls the printing of some info about DFTD contributions", &
1163 NULLIFY (newsection)
1172 NULLIFY (subsection, keyword)
1173 CALL section_create(subsection, __location__, name=
"NON_LOCAL", &
1174 description=
"Information on the non local part of dispersion functionals. "// &
1175 "Correct functionals require a corresponding setting of XC_FUNCTIONAL.", &
1176 n_keywords=0, n_subsections=0, repeats=.true.)
1179 description=
"Type of functional (the corresponding kernel data file should be selected). "// &
1180 "Allows for common forms such as vdW-DF, vdW-DF2, optB88-vdW, rVV10.", &
1181 usage=
"TYPE DRSLL", &
1182 enum_c_vals=
s2a(
"DRSLL",
"LMKLL",
"RVV10"), &
1184 enum_desc=
s2a(
"Dion-Rydberg-Schroeder-Langreth-Lundqvist nonlocal van der Waals density functional", &
1185 "Lee-Murray-Kong-Lundqvist-Langreth nonlocal van der Waals density functional", &
1186 "Revised Vydrov-van Voorhis nonlocal van der Waals density functional"), &
1191 CALL keyword_create(keyword, __location__, name=
"VERBOSE_OUTPUT", &
1192 description=
"Extensive output for non local functionals", &
1193 usage=
"VERBOSE_OUTPUT", default_l_val=.false., &
1194 lone_keyword_l_val=.true.)
1197 CALL keyword_create(keyword, __location__, name=
"KERNEL_FILE_NAME", &
1198 description=
"Name of the kernel data file, may include a path. "// &
1199 "vdW_kernel_table.dat is for DRSLL and LMKLL and "// &
1200 "rVV10_kernel_table.dat is for rVV10.", &
1201 usage=
"KERNEL_FILE_NAME <FILENAME>", &
1202 default_lc_val=
"vdW_kernel_table.dat")
1206 description=
"The cutoff of the FFT grid used in the calculation "// &
1207 "of the nonlocal vdW functional [Ry].", &
1208 usage=
"CUTOFF 300", &
1209 default_r_val=-1._dp, unit_str=
"Ry")
1213 description=
"Parameters b and C of the rVV10 functional", &
1214 usage=
"PARAMETERS 6.3 0.0093", &
1215 type_of_var=
real_t, default_r_vals=(/6.3_dp, 0.0093_dp/), n_var=2)
1219 description=
"Scales the energy contribution of the rVV10 functional", &
1220 usage=
"SCALE 1.0", &
1221 type_of_var=
real_t, default_r_val=1.0_dp)
1228 END SUBROUTINE create_vdw_potential_section
1235 SUBROUTINE create_gcp_potential_section(section)
1240 cpassert(.NOT.
ASSOCIATED(section))
1241 CALL section_create(section, __location__, name=
"gcp_potential", &
1242 description=
"This section combines geometrical counterpoise potentials."// &
1243 " This is a simple empirical pair potential to correct for BSSE. ", &
1245 n_keywords=1, n_subsections=1, repeats=.false.)
1248 CALL keyword_create(keyword, __location__, name=
"PARAMETER_FILE_NAME", &
1249 description=
"Name of the parameter file, may include a path", &
1250 usage=
"PARAMETER_FILE_NAME <FILENAME>", &
1251 default_lc_val=
"---")
1255 CALL keyword_create(keyword, __location__, name=
"GLOBAL_PARAMETERS", &
1256 description=
"Global parameters of the gCP method."// &
1257 " Parameters are sigma, alpha, beta, eta from the original paper.", &
1258 usage=
"GLOBAL_PARAMETERS 1.0 1.0 1.0 1.0", n_var=4, &
1259 default_r_vals=(/0.0_dp, 0.0_dp, 0.0_dp, 0.0_dp/))
1263 CALL keyword_create(keyword, __location__, name=
"DELTA_ENERGY", &
1264 description=
"Specify the delta energy [Hartree] term for an atom kind", &
1265 usage=
"DELTA_ENERGY type value", &
1266 type_of_var=
char_t, repeats=.true., n_var=-1, default_c_vals=(/
"XX ",
"0.0"/))
1271 description=
"Verbose output for gCP calculation", &
1272 usage=
"VERBOSE logical_value", &
1273 default_l_val=.true., lone_keyword_l_val=.true.)
1277 END SUBROUTINE create_gcp_potential_section
1290 cpassert(.NOT.
ASSOCIATED(section))
1292 description=
"Parameters needed for the calculation of the eXchange and Correlation potential", &
1293 n_keywords=5, n_subsections=2, repeats=.false.)
1295 NULLIFY (subsection, keyword)
1297 CALL keyword_create(keyword, __location__, name=
"density_cutoff", &
1298 description=
"The cutoff on the density used by the xc calculation", &
1299 usage=
"density_cutoff 1.e-11", default_r_val=1.0e-10_dp)
1303 CALL keyword_create(keyword, __location__, name=
"gradient_cutoff", &
1304 description=
"The cutoff on the gradient of the density used by the "// &
1306 usage=
"gradient_cutoff 1.e-11", default_r_val=1.0e-10_dp)
1310 CALL keyword_create(keyword, __location__, name=
"DENSITY_SMOOTH_CUTOFF_RANGE", &
1311 description=
"Parameter for the smoothing procedure in xc calculation", &
1312 usage=
"DENSITY_SMOOTH_CUTOFF_RANGE {real}", default_r_val=0.0_dp)
1317 description=
"The cutoff on tau used by the xc calculation", &
1318 usage=
"tau_cutoff 1.e-11", default_r_val=1.0e-10_dp)
1323 keyword, __location__, name=
"FUNCTIONAL_ROUTINE", &
1324 description=
"Select the code for xc calculation", &
1325 usage=
"FUNCTIONAL_ROUTINE (DEFAULT|TEST_LSD|DEBUG)", &
1327 enum_c_vals=
s2a(
"DEFAULT",
"TEST_LSD",
"DEBUG"), &
1329 enum_desc=
s2a(
"Carry out exchange-correlation functional calculation", &
1330 "Use test local-spin-density approximation code for exchange-correlation functional calculation", &
1331 "Use debug new code for exchange-correlation functional calculation"))
1336 description=
"The xc parameters used when calculating the xc on the grid", &
1337 n_keywords=5, n_subsections=0, repeats=.false.)
1338 CALL keyword_create(keyword, __location__, name=
"xc_smooth_rho", &
1339 description=
"The density smoothing used for the xc calculation", &
1341 enum_c_vals=
s2a(
"NONE",
"NN50",
"NN10",
"SPLINE2",
"NN6",
"SPLINE3",
"NN4"), &
1349 description=
"The method used to compute the derivatives", &
1350 usage=
"xc_deriv NN10_SMOOTH", default_i_val=
xc_deriv_pw, &
1351 enum_c_vals=
s2a(
"PW",
"SPLINE3",
"SPLINE2",
"NN50_SMOOTH",
"NN10_SMOOTH", &
1352 "SPLINE2_SMOOTH",
"NN6_SMOOTH",
"SPLINE3_SMOOTH",
"NN4_SMOOTH",
"COLLOCATE"), &
1360 CALL keyword_create(keyword, __location__, name=
"use_finer_grid", &
1361 description=
"Uses a finer grid only to calculate the xc", &
1362 usage=
"use_finer_grid", default_l_val=.false., &
1363 lone_keyword_l_val=.true.)
1367 CALL keyword_create(keyword, __location__, name=
"2ND_DERIV_ANALYTICAL", &
1368 description=
"Use analytical formulas or finite differences for 2nd derivatives of XC", &
1369 usage=
"2ND_DERIV_ANALYTICAL logical", default_l_val=.true., &
1370 lone_keyword_l_val=.true.)
1374 CALL keyword_create(keyword, __location__, name=
"3RD_DERIV_ANALYTICAL", &
1375 description=
"Use analytical formulas or finite differences for 3rd derivatives of XC", &
1376 usage=
"3RD_DERIV_ANALYTICAL logical", default_l_val=.true., &
1377 lone_keyword_l_val=.true.)
1382 description=
"Step size in terms of the first order potential for the numerical "// &
1383 "evaluation of XC derivatives", &
1384 usage=
"STEP_SIZE 1.0E-3", default_r_val=1e-3_dp)
1389 description=
"Number of steps to consider in each direction for the numerical "// &
1390 "evaluation of XC derivatives. Must be a value from 1 to 4 (Default: 3).", &
1391 usage=
"NSTEPS 4", default_i_val=3)
1410 CALL create_adiabatic_section(subsection)
1414 CALL create_xc_potential_section(subsection)
1418 CALL create_xc_kernel_section(subsection)
1422 CALL create_hfx_kernel_section(subsection)
1426 CALL create_vdw_potential_section(subsection)
1430 CALL create_gcp_potential_section(subsection)
1441 SUBROUTINE create_adiabatic_section(section)
1446 cpassert(.NOT.
ASSOCIATED(section))
1447 CALL section_create(section, __location__, name=
"ADIABATIC_RESCALING", &
1448 description=
"Parameters for self interaction corrected hybrid functionals", &
1449 n_keywords=0, n_subsections=0, repeats=.false.)
1452 keyword, __location__, &
1453 name=
"FUNCTIONAL_TYPE", &
1454 description=
"Which Hybrid functional should be used. "// &
1455 "(Has to be consistent with the definitions in XC and HF).", &
1456 usage=
"FUNCTIONAL_TYPE MCY3", &
1457 enum_c_vals=
s2a(
"MCY3"), &
1459 enum_desc=
s2a(
"Use MCY3 hybrid functional"), &
1466 keyword, __location__, &
1468 description=
"The point to be used along the adiabatic curve (0 < λ < 1)", &
1469 usage=
"LAMBDA 0.71", &
1470 default_r_val=0.71_dp)
1476 keyword, __location__, &
1478 description=
"Long-range parameter", &
1479 usage=
"OMEGA 0.2", &
1480 default_r_val=0.2_dp)
1486 keyword, __location__, &
1487 name=
"FUNCTIONAL_MODEL", &
1488 description=
"Which model for the coupling constant integration should be used. ", &
1489 usage=
"FUNCTIONAL_MODEL PADE", &
1490 enum_c_vals=
s2a(
"PADE"), &
1492 enum_desc=
s2a(
"Use pade model: W(lambda)=a+(b*lambda)/(1+c*lambda)"), &
1496 END SUBROUTINE create_adiabatic_section
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public goedecker1996
integer, save, public perdew1996
integer, save, public proynov2007
integer, save, public heyd2004
integer, save, public wellendorff2012
integer, save, public caldeweyher2020
integer, save, public grimme2006
integer, save, public becke1997
integer, save, public perdew2008
integer, save, public vosko1980
integer, save, public beckeroussel1989
integer, save, public perdew1981
integer, save, public tao2003
integer, save, public tran2013
integer, save, public ortiz1994
integer, save, public lee1988
integer, save, public grimme2011
integer, save, public kruse2012
integer, save, public grimme2010
integer, save, public becke1988
integer, save, public zhang1998
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer, parameter, public high_print_level
integer, parameter, public add_last_numeric
subroutine, public cp_print_key_section_create(print_key_section, location, name, description, print_level, each_iter_names, each_iter_values, add_last, filename, common_iter_levels, citations, unit_str)
creates a print_key section
Defines the basic variable types.
integer, parameter, public dp
Utilities for string manipulations.
calculates a functional from libxc and its derivatives
subroutine, public libxc_add_sections(section)
...