46 c_pw92,
c_pw92dmc,
c_pw92vmc,
c_pz,
c_pzdmc,
c_pzvmc,
do_vwn3,
do_vwn5,
ke_lc,
ke_llp, &
55 #include "./base/base_uses.f90"
60 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .true.
61 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_xc'
73 TYPE(section_type),
POINTER :: section
75 TYPE(keyword_type),
POINTER :: keyword
76 TYPE(section_type),
POINTER :: subsection
78 cpassert(.NOT.
ASSOCIATED(section))
80 description=
"The eXchange-Correlation functional to use.", &
81 n_keywords=0, n_subsections=4, repeats=.false., &
86 NULLIFY (subsection, keyword)
88 keyword, __location__, name=
"_SECTION_PARAMETERS_", &
89 description=
"Shortcut for the most common functional combinations.", &
90 usage=
"&xc_functional BLYP", &
91 enum_c_vals=s2a(
"B3LYP",
"PBE0",
"BLYP",
"BP",
"PADE",
"LDA",
"PBE", &
92 "TPSS",
"HCTH120",
"OLYP",
"BEEFVDW",
"NO_SHORTCUT",
"NONE"), &
95 enum_desc=s2a(
"B3LYP", &
96 "PBE0 (see note in section XC/XC_FUNCTIONAL/PBE)", &
97 "BLYP",
"BP",
"PADE",
"Alias for PADE", &
98 "PBE (see note in section XC/XC_FUNCTIONAL/PBE)", &
99 "TPSS (not available with LSD, use LIBXC version instead)",
"HCTH120",
"OLYP", &
100 "BEEFVDW",
"NO_SHORTCUT",
"NONE"), &
107 description=
"Uses the Becke 88 exchange functional", &
108 n_keywords=0, n_subsections=0, repeats=.false., &
110 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
111 description=
"activates the functional", &
112 lone_keyword_l_val=.true., default_l_val=.false.)
116 keyword, __location__, name=
"scale_x", &
117 description=
"scales the exchange part of the functional", &
125 CALL section_create(subsection, __location__, name=
"LYP_ADIABATIC", &
126 description=
"Uses the LYP correlation functional in an adiabatic fashion", &
127 n_keywords=0, n_subsections=0, repeats=.false., &
129 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
130 description=
"activates the functional", &
131 lone_keyword_l_val=.true., default_l_val=.false.)
135 description=
"Defines the parameter of the adiabatic curve.", &
143 CALL section_create(subsection, __location__, name=
"BECKE88_LR_ADIABATIC", &
144 description=
"Uses the Becke 88 longrange exchange functional in an adiabatic fashion", &
145 n_keywords=0, n_subsections=0, repeats=.false., &
147 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
148 description=
"activates the functional", &
149 lone_keyword_l_val=.true., default_l_val=.false.)
153 description=
"scales the exchange part of the functional", &
158 description=
"Potential parameter in erf(omega*r)/r", &
163 description=
"Defines the parameter of the adiabatic curve", &
171 CALL section_create(subsection, __location__, name=
"BECKE88_LR", &
172 description=
"Uses the Becke 88 longrange exchange functional", &
173 n_keywords=0, n_subsections=0, repeats=.false., &
175 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
176 description=
"activates the functional", &
177 lone_keyword_l_val=.true., default_l_val=.false.)
181 description=
"scales the exchange part of the functional", &
186 description=
"Potential parameter in erf(omega*r)/r", &
195 description=
"Uses the LYP functional", &
196 n_keywords=0, n_subsections=0, repeats=.false., &
198 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
199 description=
"activates the functional", &
200 lone_keyword_l_val=.true., default_l_val=.false.)
204 description=
"scales the correlation part of the functional", &
212 description=
"Uses the PADE functional", &
213 n_keywords=0, n_subsections=0, repeats=.false., &
215 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
216 description=
"activates the functional", &
217 lone_keyword_l_val=.true., default_l_val=.false.)
224 description=
"Uses the HCTH class of functionals", &
225 n_keywords=0, n_subsections=0, repeats=.false.)
226 CALL keyword_create(keyword, __location__, name=
"PARAMETER_SET", &
227 description=
"Which version of the parameters should be used", &
228 usage=
"PARAMETER_SET 407", &
229 enum_c_vals=(/
"93 ",
"120",
"147",
"407",
"HLE"/), &
230 enum_i_vals=(/93, 120, 147, 407, 408/), &
234 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
235 description=
"activates the functional", &
236 lone_keyword_l_val=.true., default_l_val=.false.)
243 description=
"Uses the OPTX functional", &
244 n_keywords=0, n_subsections=0, repeats=.false.)
245 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
246 description=
"activates the functional", &
247 lone_keyword_l_val=.true., default_l_val=.false.)
251 description=
"scales the exchange part of the functional", &
256 description=
"OPTX a1 coefficient", &
257 default_r_val=1.05151_dp)
261 description=
"OPTX a2 coefficient", &
262 default_r_val=1.43169_dp)
266 description=
"OPTX gamma coefficient", &
267 default_r_val=0.006_dp)
276 description=
"Uses the CS1 functional", &
277 n_keywords=0, n_subsections=0, repeats=.false.)
278 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
279 description=
"activates the functional", &
280 lone_keyword_l_val=.true., default_l_val=.false.)
287 description=
"Uses one of the XGGA functionals (optimized versions of "// &
288 "some of these functionals might be available outside this section).", &
289 n_keywords=1, n_subsections=0, repeats=.false.)
290 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
291 description=
"activates the functional", &
292 lone_keyword_l_val=.true., default_l_val=.false.)
296 description=
"Which one of the XGGA functionals should be used", &
297 usage=
"FUNCTIONAL PW86X", &
314 description=
"Uses one of the KE_GGA functionals (optimized versions of "// &
315 "some of these functionals might be available outside this section). "// &
316 "These functionals are needed for the computation of the kinetic "// &
317 "energy in the Kim-Gordon method.", &
318 n_keywords=1, n_subsections=0, repeats=.false.)
319 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
320 description=
"activates the functional", &
321 lone_keyword_l_val=.true., default_l_val=.false.)
325 description=
"Which one of the KE_GGA functionals should be used", &
326 usage=
"FUNCTIONAL (OL1|OL2|LLP|PW86|PW91|LC|T92|PBE)", &
327 enum_c_vals=(/
"OL1 ",
"OL2 ",
"LLP ",
"PW86",
"PW91",
"LC ",
"T92 ",
"PBE "/), &
329 enum_desc=s2a(
"Uses first Ou-Yang and Levy functional, currently not producing correct results", &
330 "Uses second Ou-Yang and Levy functional, currently not producing correct results", &
331 "Uses Lee, Lee, and Parr functional", &
332 "Uses Perdew and Wang's 1986 functional", &
333 "Uses Perdew and Wang's 1991 functional", &
334 "Uses Lembarki and Chermette functional", &
335 "Uses Thakkar functional", &
336 "Uses the 1996 functional of Perdew, Burke and Ernzerhof"), &
344 description=
"Uses the P86C functional", &
345 n_keywords=0, n_subsections=0, repeats=.false.)
346 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
347 description=
"activates the functional", &
348 lone_keyword_l_val=.true., default_l_val=.false.)
352 description=
"scales the correlation part of the functional", &
360 description=
"Uses the PerdewWang correlation functional.", &
361 n_keywords=1, n_subsections=0, repeats=.false.)
362 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
363 description=
"activates the functional", &
364 lone_keyword_l_val=.true., default_l_val=.false.)
368 description=
"Scaling of the energy functional", &
369 default_r_val=1.0_dp)
372 CALL keyword_create(keyword, __location__, name=
"PARAMETRIZATION", &
373 description=
"Which one of parametrizations should be used", &
374 usage=
"PARAMETRIZATION DMC", &
387 description=
"Uses the PZ functional.", &
388 n_keywords=1, n_subsections=0, repeats=.false., &
390 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
391 description=
"activates the functional", &
392 lone_keyword_l_val=.true., default_l_val=.false.)
395 CALL keyword_create(keyword, __location__, name=
"PARAMETRIZATION", &
396 description=
"Which one of parametrizations should be used", &
397 usage=
"PARAMETRIZATION DMC", &
407 description=
"scales the correlation part of the functional", &
415 description=
"Uses the TFW functional", &
416 n_keywords=0, n_subsections=0, repeats=.false.)
417 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
418 description=
"activates the functional", &
419 lone_keyword_l_val=.true., default_l_val=.false.)
426 description=
"Uses the TF functional", &
427 n_keywords=0, n_subsections=0, repeats=.false.)
428 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
429 description=
"activates the functional", &
430 lone_keyword_l_val=.true., default_l_val=.false.)
437 description=
"Uses the VWN functional", &
438 n_keywords=0, n_subsections=0, repeats=.false., &
440 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
441 description=
"activates the functional", &
442 lone_keyword_l_val=.true., default_l_val=.false.)
446 description=
"scales the correlation part of the functional", &
451 CALL keyword_create(keyword, __location__, name=
"FUNCTIONAL_TYPE", &
452 description=
"Which version of the VWN functional should be used", &
453 usage=
"FUNCTIONAL_TYPE VWN5", &
454 enum_c_vals=s2a(
"VWN5",
"VWN3"), &
456 enum_desc=s2a(
"This is the recommended (correct) version of the VWN functional", &
457 "This version is the default in Gaussian, but not recommended. "// &
458 "Notice that it is also employed in Gaussian's default version of B3LYP"), &
467 description=
"Uses the XALPHA (SLATER) functional.", &
468 n_keywords=1, n_subsections=0, repeats=.false.)
469 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
470 description=
"activates the functional", &
471 lone_keyword_l_val=.true., default_l_val=.false.)
475 description=
"Value of the xa parameter (this does not change the exponent, "// &
476 "just the mixing)", &
477 usage=
"XA 0.7", default_r_val=2._dp/3._dp)
481 description=
"scales the exchange part of the functional", &
489 description=
"Uses the TPSS functional. Note, that there is no LSD version available. "// &
490 "In such cases, use the LIBXC version instead.", &
491 n_keywords=0, n_subsections=0, repeats=.false., &
493 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
494 description=
"Activates the functional", &
495 lone_keyword_l_val=.true., default_l_val=.false.)
499 description=
"scales the exchange part of the functional", &
504 description=
"scales the correlation part of the functional", &
512 description=
"Uses the PBE functional", &
513 n_keywords=0, n_subsections=0, repeats=.false., &
515 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
516 description=
"activates the functional", &
517 lone_keyword_l_val=.true., default_l_val=.false.)
520 CALL keyword_create(keyword, __location__, name=
"parametrization", &
521 description=
"switches between the different "// &
522 "parametrizations of the functional. "// &
523 "Note: Beta parameters used have only 5 significant digits, "// &
524 "as published. For higher precision and program comparison "// &
525 "use section XC/XC_FUNCTIONAL/LIBXC.", &
527 enum_c_vals=(/
"ORIG ",
"revPBE",
"PBEsol"/), &
528 enum_desc=(/
"original PBE ", &
529 "revised PBE (revPBE) ", &
530 "PBE for solids and surfaces (PBEsol)"/), &
535 description=
"scales the exchange part of the functional", &
540 description=
"scales the correlation part of the functional", &
548 description=
"Uses the short range PBE functional", &
549 n_keywords=0, n_subsections=0, repeats=.false., &
551 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
552 description=
"activates the functional", &
553 lone_keyword_l_val=.true., default_l_val=.false.)
557 description=
"scales the exchange part of the functional", &
562 description=
"scales the exchange part of the original hole PBE-functional", &
563 default_r_val=0.0_dp)
567 description=
"screening parameter", &
575 description=
"Uses the Becke 97 exchange correlation functional", &
576 n_keywords=0, n_subsections=0, repeats=.false., &
578 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
579 description=
"activates the functional", &
580 lone_keyword_l_val=.true., default_l_val=.false.)
584 description=
"scales the exchange part of the functional, if -1 the default for the given parametrization is used", &
585 default_r_val=-1._dp)
589 description=
"scales the correlation part of the functional", &
593 CALL keyword_create(keyword, __location__, name=
"parametrization", &
594 description=
"switches between the B97 and Grimme parametrization ", &
596 enum_c_vals=(/
"ORIG ",
"B97GRIMME ",
"B97_GRIMME",
"wB97X-V ",
"B97-3c "/), &
604 CALL section_create(subsection, __location__, name=
"BECKE_ROUSSEL", &
605 description=
"Becke Roussel exchange hole model. Can be used "// &
606 "as long range correction with a truncated coulomb potential", &
607 n_keywords=0, n_subsections=0, repeats=.false., &
609 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
610 description=
"activates the functional", &
611 lone_keyword_l_val=.true., default_l_val=.false.)
615 description=
"scales the exchange part of the functional", &
619 CALL keyword_create(keyword, __location__, name=
"CUTOFF_RADIUS", &
620 description=
"Defines the cutoff radius for the truncation. "// &
621 "If put to zero, the standard full range potential will be used", &
622 usage=
"CUTOFF_RADIUS 2.0", default_r_val=0.0_dp)
626 description=
"Parameter in the exchange hole. "// &
627 "Usually this is put to 1.0 or 0.8", &
628 usage=
"GAMMA 0.8", default_r_val=1.0_dp)
634 CALL section_create(subsection, __location__, name=
"LDA_HOLE_T_C_LR", &
635 description=
"LDA exchange hole model in truncated coulomb potential", &
636 n_keywords=0, n_subsections=0, repeats=.false.)
637 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
638 description=
"activates the functional", &
639 lone_keyword_l_val=.true., default_l_val=.false.)
643 description=
"scales the exchange part of the functional", &
647 CALL keyword_create(keyword, __location__, name=
"CUTOFF_RADIUS", &
648 description=
"Defines cutoff for lower integration boundary", &
649 default_r_val=0.0_dp, unit_str=
"angstrom")
655 CALL section_create(subsection, __location__, name=
"PBE_HOLE_T_C_LR", &
656 description=
"PBE exchange hole model in trucanted coulomb potential", &
657 n_keywords=0, n_subsections=0, repeats=.false.)
658 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
659 description=
"activates the functional", &
660 lone_keyword_l_val=.true., default_l_val=.false.)
664 description=
"scales the exchange part of the functional", &
668 CALL keyword_create(keyword, __location__, name=
"CUTOFF_RADIUS", &
669 description=
"Defines cutoff for lower integration boundary", &
670 default_r_val=1.0_dp, unit_str=
"angstrom")
677 description=
"Combination of three different exchange hole models", &
678 n_keywords=0, n_subsections=0, repeats=.false.)
679 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
680 description=
"activates the functional", &
681 lone_keyword_l_val=.true., default_l_val=.false.)
685 description=
"scales the exchange part of the functional", &
689 CALL keyword_create(keyword, __location__, name=
"CUTOFF_RADIUS", &
690 description=
"Defines cutoff for lower integration boundary", &
691 default_r_val=0.0_dp, unit_str=
"angstrom")
695 description=
"Parameter for Becke Roussel hole", &
696 default_r_val=1.0_dp)
703 description=
"Uses the BEEFvdW exchange functional", &
704 n_keywords=0, n_subsections=0, repeats=.false., &
706 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
707 description=
"activates the functional", &
708 lone_keyword_l_val=.true., default_l_val=.false.)
712 description=
"scales the exchange part of the functional", &
726 SUBROUTINE create_xc_potential_section(section)
727 TYPE(section_type),
POINTER :: section
729 TYPE(keyword_type),
POINTER :: keyword
730 TYPE(section_type),
POINTER :: subsection
732 cpassert(.NOT.
ASSOCIATED(section))
734 description=
"The xc potential to use (CAREFUL: xc potential here refers "// &
735 "to potentials that are not derived from an xc functional, but rather are "// &
736 "modelled directly. Therefore there is no consistent xc energy available. "// &
737 "To still get an energy expression, see ENERGY below", &
738 n_keywords=1, n_subsections=1, repeats=.false.)
740 NULLIFY (subsection, keyword)
742 description=
"Uses the SAOP potential", &
743 n_keywords=3, n_subsections=0, repeats=.true.)
745 description=
"Value of the alpha parameter (default = 1.19).", &
746 usage=
"ALPHA 1.19", default_r_val=1.19_dp)
750 description=
"Value of the beta parameter (default = 0.01).", &
751 usage=
"BETA 0.01", default_r_val=0.01_dp)
755 description=
"Value of the K_rho parameter (default = 0.42).", &
756 usage=
"ALPHA 0.42", default_r_val=0.42_dp)
763 description=
"How to determine the total energy.", &
764 usage=
"ENERGY [NONE,XC_FUNCTIONAL,SUM_EIGENVALUES", &
765 enum_c_vals=s2a(
"NONE",
"XC_FUNCTIONAL",
"FUNCTIONAL",
"SUM_EIGENVALUES",
"SOE"), &
775 END SUBROUTINE create_xc_potential_section
782 SUBROUTINE create_xc_kernel_section(section)
783 TYPE(section_type),
POINTER :: section
785 TYPE(keyword_type),
POINTER :: keyword
787 cpassert(.NOT.
ASSOCIATED(section))
789 description=
"The xc kernel to use (CAREFUL: xc kernel here refers "// &
790 "to kernels that are not derived from an xc functional, but rather are "// &
791 "modelled directly. This kernel will be used in a TDDFPT calculation. "// &
792 "Cannot be combined with XC_FUNCTIONAL or XC_POTENTIAL.", &
793 n_keywords=1, n_subsections=1, repeats=.false.)
797 keyword, __location__, name=
"_SECTION_PARAMETERS_", &
798 description=
"Selection of kernel functionals.", &
799 usage=
"&XC_KERNEL LDAfxc", &
800 enum_c_vals=s2a(
"PADEfxc",
"LDAfxc",
"GGAfxc",
"NONE"), &
802 enum_desc=s2a(
"Fxc based on LDA PADE approximation", &
803 "Fxc based on LDA functionals", &
804 "Fxc model from fit to PBE functional", &
812 description=
"List of parameters specific to the kernel function", &
813 usage=
"PARAMETER <REAL> .. <REAL>", &
814 type_of_var=
real_t, n_var=-1)
818 description=
"B97 GAMMA parameters [gx, gab, gaa]", &
819 usage=
"GAMMA <REAL> <REAL> <REAL>", &
820 default_r_vals=(/0.004_dp, 0.006_dp, 0.2_dp/), &
821 type_of_var=
real_t, n_var=3)
825 description=
"B97 C parameters for exchange", &
826 usage=
"C_XAA <REAL> <REAL> <REAL>", &
827 default_r_vals=(/1.0_dp, 0.63_dp, 0.94_dp/), &
828 type_of_var=
real_t, n_var=3)
832 description=
"B97 C parameters for same spin correlation.", &
833 usage=
"C_CAB <REAL> <REAL> <REAL>", &
834 default_r_vals=(/1.0_dp, 0.75_dp, -4.60_dp/), &
835 type_of_var=
real_t, n_var=3)
839 description=
"B97 C parameters for opposite spin correlation.", &
840 usage=
"C_CAB <REAL> <REAL> <REAL>", &
841 default_r_vals=(/0.17_dp, 2.35_dp, -2.55_dp/), &
842 type_of_var=
real_t, n_var=3)
846 description=
"Scaling parameter for exchange kernel.", &
847 usage=
"SCALE_X 0.2", default_r_val=1.0_dp)
851 description=
"Scaling parameter for correlation kernel.", &
852 usage=
"SCALE_C 0.2", default_r_val=1.0_dp)
856 END SUBROUTINE create_xc_kernel_section
863 SUBROUTINE create_hfx_kernel_section(section)
864 TYPE(section_type),
POINTER :: section
866 TYPE(keyword_type),
POINTER :: keyword
867 TYPE(section_type),
POINTER :: subsection
869 cpassert(.NOT.
ASSOCIATED(section))
871 description=
"The hfx kernel to use. Cannot be combined with HF section.", &
872 n_keywords=1, n_subsections=2, repeats=.false.)
874 NULLIFY (subsection, keyword)
876 description=
"Switch to use the HFXSR (short range) kernel.", &
877 usage=
"DO_HFXSR T/F", default_l_val=.false., &
878 lone_keyword_l_val=.true.)
881 NULLIFY (subsection, keyword)
882 CALL keyword_create(keyword, __location__, name=
"HFXSR_PRIMBAS", &
883 description=
"Default number of primitives in ADMM basis in HFXSR. "// &
884 "0 indicates the use of a contracted minimal basis. ", &
885 usage=
"HFXSR_PRIMBAS 3", default_i_val=0)
894 description=
"Uses the HFXLR (long range) kernel", &
895 n_keywords=2, n_subsections=0, repeats=.false.)
897 description=
"Value of lower range cutoff of interaction [Bohr]", &
898 usage=
"RCUT 5.00", default_r_val=6.00_dp, unit_str=
"bohr")
902 description=
"Scaling parameter for HFX kernel.", &
903 usage=
"SCALE 0.25", default_r_val=1.00_dp)
909 END SUBROUTINE create_hfx_kernel_section
915 SUBROUTINE create_vdw_potential_section(section)
916 TYPE(section_type),
POINTER :: section
918 TYPE(keyword_type),
POINTER :: keyword
919 TYPE(section_type),
POINTER :: print_key, subsection
921 cpassert(.NOT.
ASSOCIATED(section))
922 CALL section_create(section, __location__, name=
"vdw_potential", &
923 description=
"This section combines all possible additional dispersion "// &
924 "corrections to the normal XC functionals. This can be more functionals "// &
925 "or simple empirical pair potentials. ", &
927 n_keywords=1, n_subsections=1, repeats=.false.)
929 NULLIFY (subsection, keyword)
930 CALL keyword_create(keyword, __location__, name=
"POTENTIAL_TYPE", &
931 variants=s2a(
"DISPERSION_FUNCTIONAL"), &
932 description=
"Type of dispersion/vdW functional or potential to use", &
933 usage=
"POTENTIAL_TYPE (NONE|PAIR_POTENTIAL|NON_LOCAL)", &
934 enum_c_vals=s2a(
"NONE",
"PAIR_POTENTIAL",
"NON_LOCAL"), &
936 enum_desc=s2a(
"No dispersion/van der Waals functional", &
937 "Pair potential van der Waals density functional", &
938 "Nonlocal van der Waals density functional"), &
943 CALL section_create(subsection, __location__, name=
"PAIR_POTENTIAL", &
944 description=
"Information on the pair potential to calculate dispersion", &
945 n_keywords=5, n_subsections=0, repeats=.true.)
947 description=
"Range of potential. The cutoff will be 2 times this value", &
948 usage=
"R_CUTOFF 24.0", default_r_val=20.0_dp, &
953 description=
"Type of potential", &
955 usage=
"TYPE (DFTD2|DFTD3|DFTD3(BJ))", &
956 enum_c_vals=s2a(
"DFTD2",
"DFTD3",
"DFTD3(BJ)"), &
958 enum_desc=s2a(
"Grimme D2 method", &
959 "Grimme D3 method (zero damping)", &
960 "Grimme D3 method (Becke-Johnson damping)"), &
964 CALL keyword_create(keyword, __location__, name=
"PARAMETER_FILE_NAME", &
965 description=
"Name of the parameter file, may include a path", &
966 usage=
"PARAMETER_FILE_NAME <FILENAME>", &
967 default_lc_val=
"DISPERSION_PARAMETERS")
970 CALL keyword_create(keyword, __location__, name=
"REFERENCE_FUNCTIONAL", &
971 description=
"Use parameters for this specific density functional. "// &
972 "For available D3 and D3(BJ) parameters see: "// &
973 "<https://www.chemie.uni-bonn.de/grimme/de/software/dft-d3>.", &
974 usage=
"REFERENCE_FUNCTIONAL <functional>", &
979 description=
"XC Functional dependent scaling parameter, if set to zero CP2K attempts"// &
980 " to guess the xc functional that is in use and sets the associated scaling parameter.", &
981 usage=
"SCALING 0.2", default_r_val=0._dp)
985 description=
"Prefactor in exponential damping factor (DFT-D2 potential)", &
986 usage=
"EXP_PRE 20.", default_r_val=20._dp)
990 description=
"Cutoff value for coordination number function (DFT-D3 method)", &
991 usage=
"EPS_CN 1.e-6_dp", default_r_val=1.e-6_dp)
995 description=
"XC Functional dependent scaling parameters (s6,sr6,s8) for the DFT-D3 method,"// &
996 " if set to zero CP2K attempts"// &
997 " to guess the xc functional from REFERENCE_FUNCTIONAL and sets the associated scaling parameter.", &
998 usage=
"D3_SCALING 1.0 1.0 1.0", n_var=3, &
999 default_r_vals=(/0.0_dp, 0.0_dp, 0.0_dp/))
1002 CALL keyword_create(keyword, __location__, name=
"D3BJ_SCALING", &
1003 description=
"XC Functional dependent scaling parameters (s6,a1,s8,a2) for the DFT-D3(BJ) method,"// &
1004 " if set to zero CP2K attempts"// &
1005 " to guess the xc functional from REFERENCE_FUNCTIONAL and sets the associated scaling parameter.", &
1006 usage=
"D3BJ_SCALING 1.0 1.0 1.0 1.0", n_var=4, &
1007 default_r_vals=(/0.0_dp, 0.0_dp, 0.0_dp, 0.0_dp/))
1010 CALL keyword_create(keyword, __location__, name=
"CALCULATE_C9_TERM", &
1011 description=
"Calculate C9 terms in DFT-D3 model", &
1012 usage=
"CALCULATE_C9_TERM", default_l_val=.false., &
1013 lone_keyword_l_val=.true.)
1016 CALL keyword_create(keyword, __location__, name=
"REFERENCE_C9_TERM", &
1017 description=
"Calculate C9 terms in DFT-D3 model using reference coordination numbers", &
1018 usage=
"REFERENCE_C9_TERM", default_l_val=.false., &
1019 lone_keyword_l_val=.true.)
1022 CALL keyword_create(keyword, __location__, name=
"LONG_RANGE_CORRECTION", &
1023 description=
"Calculate a long range correction to the DFT-D3 model."// &
1024 " WARNING: Use with care! Only for isotropic dense systems.", &
1025 usage=
"LONG_RANGE_CORRECTION", default_l_val=.false., &
1026 lone_keyword_l_val=.true.)
1029 CALL keyword_create(keyword, __location__, name=
"SHORT_RANGE_CORRECTION", &
1030 description=
"Calculate a short-range bond correction to the DFT-D3 model", &
1031 usage=
"SHORT_RANGE_CORRECTION", default_l_val=.false., &
1032 lone_keyword_l_val=.true.)
1035 CALL keyword_create(keyword, __location__, name=
"SHORT_RANGE_CORRECTION_PARAMETERS", &
1036 description=
"Parameters for the short-range bond correction to the DFT-D3 model. "// &
1037 "s*(za*zb)^t1*EXP(-g*dr*r0ab^t2), parameters: s, g, t1, t2 "// &
1038 "Defaults: s=0.08, g=10.0, t1=0.5, t2=-1.0 ", &
1039 usage=
"SHORT_RANGE_CORRECTION_PARAMETRS", default_r_vals=(/0.08_dp, 10.0_dp, 0.5_dp, -1.0_dp/), &
1040 n_var=4, type_of_var=
real_t)
1044 CALL keyword_create(keyword, __location__, name=
"MOLECULE_CORRECTION", &
1045 description=
"Calculate a intermolecular correction to the DFT-D3 model", &
1046 usage=
"MOLECULE_CORRECTION", default_l_val=.false., &
1047 lone_keyword_l_val=.true.)
1050 CALL keyword_create(keyword, __location__, name=
"MOLECULE_CORRECTION_C8", &
1051 description=
"Calculate a intermolecular correction to the C8 term in the DFT-D3 model", &
1052 usage=
"MOLECULE_CORRECTION_C8 1.0 ", default_r_val=0.0_dp)
1055 CALL keyword_create(keyword, __location__, name=
"VERBOSE_OUTPUT", &
1056 description=
"Extensive output for the DFT-D2 and DFT-D3 models", &
1057 usage=
"VERBOSE_OUTPUT", default_l_val=.false., &
1058 lone_keyword_l_val=.true.)
1063 CALL keyword_create(keyword, __location__, name=
"D3_EXCLUDE_KIND", &
1064 description=
"Specifies the atomic kinds excluded in the DFT-D3 calculation.", &
1065 usage=
"D3_EXCLUDE_KIND kind1 kind2 ... ", repeats=.false., &
1071 CALL keyword_create(keyword, __location__, name=
"D3_EXCLUDE_KIND_PAIR", &
1072 description=
"Specifies the atomic kinds for interactions excluded from the DFT-D3 calculation.", &
1073 usage=
"D3_EXCLUDE_KIND_PAIR kind1 kind2 ", repeats=.true., &
1079 CALL keyword_create(keyword, __location__, name=
"KIND_COORDINATION_NUMBERS", &
1080 description=
"Specifies the coordination number for a kind for the C9 term in DFT-D3.", &
1081 usage=
"KIND_COORDINATION_NUMBERS CN kind ", repeats=.true., &
1082 n_var=-1, type_of_var=
char_t)
1086 CALL keyword_create(keyword, __location__, name=
"ATOM_COORDINATION_NUMBERS", &
1087 description=
"Specifies the coordination number of a set of atoms for the C9 term in DFT-D3.", &
1088 usage=
"ATOM_COORDINATION_NUMBERS CN atom1 atom2 ... ", repeats=.true., &
1089 n_var=-1, type_of_var=
char_t)
1095 description=
"Specifies parameters for atom types (in atomic units). If "// &
1096 "not provided default parameters are used (DFT-D2).", &
1097 usage=
"ATOMPARM <ELEMENT> <C6_parameter> <vdw_radii>", &
1098 repeats=.true., n_var=-1, type_of_var=
char_t)
1104 description=
"Controls the printing of some info about DFTD contributions", &
1113 NULLIFY (subsection, keyword)
1114 CALL section_create(subsection, __location__, name=
"NON_LOCAL", &
1115 description=
"Information on the non local part of dispersion functionals. "// &
1116 "Correct functionals require a corresponding setting of XC_FUNCTIONAL.", &
1117 n_keywords=0, n_subsections=0, repeats=.true.)
1120 description=
"Type of functional (the corresponding kernel data file should be selected). "// &
1121 "Allows for common forms such as vdW-DF, vdW-DF2, optB88-vdW, rVV10.", &
1122 usage=
"TYPE DRSLL", &
1123 enum_c_vals=s2a(
"DRSLL",
"LMKLL",
"RVV10"), &
1125 enum_desc=s2a(
"Dion-Rydberg-Schroeder-Langreth-Lundqvist nonlocal van der Waals density functional", &
1126 "Lee-Murray-Kong-Lundqvist-Langreth nonlocal van der Waals density functional", &
1127 "Revised Vydrov-van Voorhis nonlocal van der Waals density functional"), &
1132 CALL keyword_create(keyword, __location__, name=
"VERBOSE_OUTPUT", &
1133 description=
"Extensive output for non local functionals", &
1134 usage=
"VERBOSE_OUTPUT", default_l_val=.false., &
1135 lone_keyword_l_val=.true.)
1138 CALL keyword_create(keyword, __location__, name=
"KERNEL_FILE_NAME", &
1139 description=
"Name of the kernel data file, may include a path. "// &
1140 "vdW_kernel_table.dat is for DRSLL and LMKLL and "// &
1141 "rVV10_kernel_table.dat is for rVV10.", &
1142 usage=
"KERNEL_FILE_NAME <FILENAME>", &
1143 default_lc_val=
"vdW_kernel_table.dat")
1147 description=
"The cutoff of the FFT grid used in the calculation "// &
1148 "of the nonlocal vdW functional [Ry].", &
1149 usage=
"CUTOFF 300", &
1150 default_r_val=-1._dp, unit_str=
"Ry")
1154 description=
"Parameters b and C of the rVV10 functional", &
1155 usage=
"PARAMETERS 6.3 0.0093", &
1156 type_of_var=
real_t, default_r_vals=(/6.3_dp, 0.0093_dp/), n_var=2)
1160 description=
"Scales the energy contribution of the rVV10 functional", &
1161 usage=
"SCALE 1.0", &
1162 type_of_var=
real_t, default_r_val=1.0_dp)
1169 END SUBROUTINE create_vdw_potential_section
1176 SUBROUTINE create_gcp_potential_section(section)
1177 TYPE(section_type),
POINTER :: section
1179 TYPE(keyword_type),
POINTER :: keyword
1181 cpassert(.NOT.
ASSOCIATED(section))
1182 CALL section_create(section, __location__, name=
"gcp_potential", &
1183 description=
"This section combines geometrical counterpoise potentials."// &
1184 " This is a simple empirical pair potential to correct for BSSE. ", &
1186 n_keywords=1, n_subsections=1, repeats=.false.)
1189 CALL keyword_create(keyword, __location__, name=
"PARAMETER_FILE_NAME", &
1190 description=
"Name of the parameter file, may include a path", &
1191 usage=
"PARAMETER_FILE_NAME <FILENAME>", &
1192 default_lc_val=
"---")
1196 CALL keyword_create(keyword, __location__, name=
"GLOBAL_PARAMETERS", &
1197 description=
"Global parameters of the gCP method."// &
1198 " Parameters are sigma, alpha, beta, eta from the original paper.", &
1199 usage=
"GLOBAL_PARAMETERS 1.0 1.0 1.0 1.0", n_var=4, &
1200 default_r_vals=(/0.0_dp, 0.0_dp, 0.0_dp, 0.0_dp/))
1204 CALL keyword_create(keyword, __location__, name=
"DELTA_ENERGY", &
1205 description=
"Specify the delta energy [Hartree] term for an atom kind", &
1206 usage=
"DELTA_ENERGY type value", &
1207 type_of_var=
char_t, repeats=.true., n_var=-1, default_c_vals=(/
"XX ",
"0.0"/))
1212 description=
"Verbose output for gCP calculation", &
1213 usage=
"VERBOSE logical_value", &
1214 default_l_val=.true., lone_keyword_l_val=.true.)
1218 END SUBROUTINE create_gcp_potential_section
1226 TYPE(section_type),
POINTER :: section
1228 TYPE(keyword_type),
POINTER :: keyword
1229 TYPE(section_type),
POINTER :: subsection
1231 cpassert(.NOT.
ASSOCIATED(section))
1233 description=
"Parameters needed for the calculation of the eXchange and Correlation potential", &
1234 n_keywords=5, n_subsections=2, repeats=.false.)
1236 NULLIFY (subsection, keyword)
1238 CALL keyword_create(keyword, __location__, name=
"density_cutoff", &
1239 description=
"The cutoff on the density used by the xc calculation", &
1240 usage=
"density_cutoff 1.e-11", default_r_val=1.0e-10_dp)
1244 CALL keyword_create(keyword, __location__, name=
"gradient_cutoff", &
1245 description=
"The cutoff on the gradient of the density used by the "// &
1247 usage=
"gradient_cutoff 1.e-11", default_r_val=1.0e-10_dp)
1251 CALL keyword_create(keyword, __location__, name=
"DENSITY_SMOOTH_CUTOFF_RANGE", &
1252 description=
"Parameter for the smoothing procedure in xc calculation", &
1253 usage=
"gradient_cutoff {real}", default_r_val=0.0_dp)
1258 description=
"The cutoff on tau used by the xc calculation", &
1259 usage=
"tau_cutoff 1.e-11", default_r_val=1.0e-10_dp)
1264 keyword, __location__, name=
"FUNCTIONAL_ROUTINE", &
1265 description=
"Select the code for xc calculation", &
1266 usage=
"FUNCTIONAL_ROUTINE (DEFAULT|TEST_LSD|DEBUG)", &
1268 enum_c_vals=s2a(
"DEFAULT",
"TEST_LSD",
"DEBUG"), &
1270 enum_desc=s2a(
"Carry out exchange-correlation functional calculation", &
1271 "Use test local-spin-density approximation code for exchange-correlation functional calculation", &
1272 "Use debug new code for exchange-correlation functional calculation"))
1277 description=
"The xc parameters used when calculating the xc on the grid", &
1278 n_keywords=5, n_subsections=0, repeats=.false.)
1279 CALL keyword_create(keyword, __location__, name=
"xc_smooth_rho", &
1280 description=
"The density smoothing used for the xc calculation", &
1282 enum_c_vals=s2a(
"NONE",
"NN50",
"NN10",
"SPLINE2",
"NN6",
"SPLINE3",
"NN4"), &
1290 description=
"The method used to compute the derivatives", &
1291 usage=
"xc_deriv NN10_SMOOTH", default_i_val=
xc_deriv_pw, &
1292 enum_c_vals=s2a(
"PW",
"SPLINE3",
"SPLINE2",
"NN50_SMOOTH",
"NN10_SMOOTH", &
1293 "SPLINE2_SMOOTH",
"NN6_SMOOTH",
"SPLINE3_SMOOTH",
"NN4_SMOOTH",
"COLLOCATE"), &
1301 CALL keyword_create(keyword, __location__, name=
"use_finer_grid", &
1302 description=
"Uses a finer grid only to calculate the xc", &
1303 usage=
"use_finer_grid", default_l_val=.false., &
1304 lone_keyword_l_val=.true.)
1308 CALL keyword_create(keyword, __location__, name=
"2ND_DERIV_ANALYTICAL", &
1309 description=
"Use analytical formulas or finite differences for 2nd derivatives of XC", &
1310 usage=
"2ND_DERIV_ANALYTICAL logical", default_l_val=.true., &
1311 lone_keyword_l_val=.true.)
1315 CALL keyword_create(keyword, __location__, name=
"3RD_DERIV_ANALYTICAL", &
1316 description=
"Use analytical formulas or finite differences for 3rd derivatives of XC", &
1317 usage=
"3RD_DERIV_ANALYTICAL logical", default_l_val=.true., &
1318 lone_keyword_l_val=.true.)
1323 description=
"Step size in terms of the first order potential for the numerical "// &
1324 "evaluation of XC derivatives", &
1325 usage=
"STEP_SIZE 1.0E-3", default_r_val=1e-3_dp)
1330 description=
"Number of steps to consider in each direction for the numerical "// &
1331 "evaluation of XC derivatives. Must be a value from 1 to 4 (Default: 3).", &
1332 usage=
"NSTEPS 4", default_i_val=3)
1351 CALL create_adiabatic_section(subsection)
1355 CALL create_xc_potential_section(subsection)
1359 CALL create_xc_kernel_section(subsection)
1363 CALL create_hfx_kernel_section(subsection)
1367 CALL create_vdw_potential_section(subsection)
1371 CALL create_gcp_potential_section(subsection)
1382 SUBROUTINE create_adiabatic_section(section)
1383 TYPE(section_type),
POINTER :: section
1385 TYPE(keyword_type),
POINTER :: keyword
1387 cpassert(.NOT.
ASSOCIATED(section))
1388 CALL section_create(section, __location__, name=
"ADIABATIC_RESCALING", &
1389 description=
"Parameters for self interaction corrected hybrid functionals", &
1390 n_keywords=0, n_subsections=0, repeats=.false.)
1393 keyword, __location__, &
1394 name=
"FUNCTIONAL_TYPE", &
1395 description=
"Which Hybrid functional should be used. "// &
1396 "(Has to be consistent with the definitions in XC and HF).", &
1397 usage=
"FUNCTIONAL_TYPE MCY3", &
1398 enum_c_vals=s2a(
"MCY3"), &
1400 enum_desc=s2a(
"Use MCY3 hybrid functional"), &
1407 keyword, __location__, &
1409 description=
"The point to be used along the adiabatic curve (0 < λ < 1)", &
1410 usage=
"LAMBDA 0.71", &
1411 default_r_val=0.71_dp)
1417 keyword, __location__, &
1419 description=
"Long-range parameter", &
1420 usage=
"OMEGA 0.2", &
1421 default_r_val=0.2_dp)
1427 keyword, __location__, &
1428 name=
"FUNCTIONAL_MODEL", &
1429 description=
"Which model for the coupling constant integration should be used. ", &
1430 usage=
"FUNCTIONAL_MODEL PADE", &
1431 enum_c_vals=s2a(
"PADE"), &
1433 enum_desc=s2a(
"Use pade model: W(lambda)=a+(b*lambda)/(1+c*lambda)"), &
1437 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 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)
...