(git:b77b4be)
Loading...
Searching...
No Matches
input_cp2k_xc.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 xc section of the input
10!> \par History
11!> 10.2009 moved out of input_cp2k_dft [jgh]
12!> \author fawzi
13! **************************************************************************************************
15 USE bibliography, ONLY: &
23 USE input_constants, ONLY: &
41 USE input_val_types, ONLY: char_t,&
42 integer_t,&
43 real_t
44 USE kinds, ONLY: dp
45 USE string_utilities, ONLY: s2a
46 USE xc_input_constants, ONLY: &
56#include "./base/base_uses.f90"
57
58 IMPLICIT NONE
59 PRIVATE
60
61 LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .true.
62 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_xc'
63
65
66CONTAINS
67
68! **************************************************************************************************
69!> \brief creates the structure of the section needed to select the xc functional
70!> \param section the section that will be created
71!> \author fawzi
72! **************************************************************************************************
73 SUBROUTINE create_xc_fun_section(section)
74 TYPE(section_type), POINTER :: section
75
76 TYPE(keyword_type), POINTER :: keyword
77 TYPE(section_type), POINTER :: subsection
78
79 cpassert(.NOT. ASSOCIATED(section))
80 CALL section_create(section, __location__, name="xc_functional", &
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., &
89
90 NULLIFY (subsection, keyword)
91 CALL keyword_create( &
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"), &
108 default_i_val=xc_funct_no_shortcut, &
109 lone_keyword_i_val=xc_funct_no_shortcut)
110 CALL section_add_keyword(section, keyword)
111 CALL keyword_release(keyword)
112
113 CALL section_create(subsection, __location__, name="BECKE88", &
114 description="Uses the Becke 88 exchange functional", &
115 n_keywords=0, n_subsections=0, repeats=.false., &
116 citations=(/becke1988/))
117 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
118 description="activates the functional", &
119 lone_keyword_l_val=.true., default_l_val=.false.)
120 CALL section_add_keyword(subsection, keyword)
121 CALL keyword_release(keyword)
122 CALL keyword_create( &
123 keyword, __location__, name="scale_x", &
124 description="scales the exchange part of the functional", &
125 default_r_val=1._dp)
126 CALL section_add_keyword(subsection, keyword)
127 CALL keyword_release(keyword)
128
129 CALL section_add_subsection(section, subsection)
130 CALL section_release(subsection)
131
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., &
135 citations=(/lee1988/))
136 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
137 description="activates the functional", &
138 lone_keyword_l_val=.true., default_l_val=.false.)
139 CALL section_add_keyword(subsection, keyword)
140 CALL keyword_release(keyword)
141 CALL keyword_create(keyword, __location__, name="LAMBDA", &
142 description="Defines the parameter of the adiabatic curve.", &
143 default_r_val=1._dp)
144 CALL section_add_keyword(subsection, keyword)
145 CALL keyword_release(keyword)
146
147 CALL section_add_subsection(section, subsection)
148 CALL section_release(subsection)
149
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., &
153 citations=(/becke1988/))
154 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
155 description="activates the functional", &
156 lone_keyword_l_val=.true., default_l_val=.false.)
157 CALL section_add_keyword(subsection, keyword)
158 CALL keyword_release(keyword)
159 CALL keyword_create(keyword, __location__, name="scale_x", &
160 description="scales the exchange part of the functional", &
161 default_r_val=1._dp)
162 CALL section_add_keyword(subsection, keyword)
163 CALL keyword_release(keyword)
164 CALL keyword_create(keyword, __location__, name="OMEGA", &
165 description="Potential parameter in erf(omega*r)/r", &
166 default_r_val=1._dp)
167 CALL section_add_keyword(subsection, keyword)
168 CALL keyword_release(keyword)
169 CALL keyword_create(keyword, __location__, name="LAMBDA", &
170 description="Defines the parameter of the adiabatic curve", &
171 default_r_val=1._dp)
172 CALL section_add_keyword(subsection, keyword)
173 CALL keyword_release(keyword)
174
175 CALL section_add_subsection(section, subsection)
176 CALL section_release(subsection)
177
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., &
181 citations=(/becke1988/))
182 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
183 description="activates the functional", &
184 lone_keyword_l_val=.true., default_l_val=.false.)
185 CALL section_add_keyword(subsection, keyword)
186 CALL keyword_release(keyword)
187 CALL keyword_create(keyword, __location__, name="scale_x", &
188 description="scales the exchange part of the functional", &
189 default_r_val=1._dp)
190 CALL section_add_keyword(subsection, keyword)
191 CALL keyword_release(keyword)
192 CALL keyword_create(keyword, __location__, name="OMEGA", &
193 description="Potential parameter in erf(omega*r)/r", &
194 default_r_val=1._dp)
195 CALL section_add_keyword(subsection, keyword)
196 CALL keyword_release(keyword)
197
198 CALL section_add_subsection(section, subsection)
199 CALL section_release(subsection)
200
201 CALL section_create(subsection, __location__, name="LYP", &
202 description="Uses the LYP functional", &
203 n_keywords=0, n_subsections=0, repeats=.false., &
204 citations=(/lee1988/))
205 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
206 description="activates the functional", &
207 lone_keyword_l_val=.true., default_l_val=.false.)
208 CALL section_add_keyword(subsection, keyword)
209 CALL keyword_release(keyword)
210 CALL keyword_create(keyword, __location__, name="scale_c", &
211 description="scales the correlation part of the functional", &
212 default_r_val=1._dp)
213 CALL section_add_keyword(subsection, keyword)
214 CALL keyword_release(keyword)
215 CALL section_add_subsection(section, subsection)
216 CALL section_release(subsection)
217
218 CALL section_create(subsection, __location__, name="PADE", &
219 description="Uses the PADE functional", &
220 n_keywords=0, n_subsections=0, repeats=.false., &
221 citations=(/goedecker1996/))
222 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
223 description="activates the functional", &
224 lone_keyword_l_val=.true., default_l_val=.false.)
225 CALL section_add_keyword(subsection, keyword)
226 CALL keyword_release(keyword)
227 CALL section_add_subsection(section, subsection)
228 CALL section_release(subsection)
229
230 CALL section_create(subsection, __location__, name="HCTH", &
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/), &
238 default_i_val=120)
239 CALL section_add_keyword(subsection, keyword)
240 CALL keyword_release(keyword)
241 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
242 description="activates the functional", &
243 lone_keyword_l_val=.true., default_l_val=.false.)
244 CALL section_add_keyword(subsection, keyword)
245 CALL keyword_release(keyword)
246 CALL section_add_subsection(section, subsection)
247 CALL section_release(subsection)
248
249 CALL section_create(subsection, __location__, name="OPTX", &
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.)
255 CALL section_add_keyword(subsection, keyword)
256 CALL keyword_release(keyword)
257 CALL keyword_create(keyword, __location__, name="scale_x", &
258 description="scales the exchange part of the functional", &
259 default_r_val=1._dp)
260 CALL section_add_keyword(subsection, keyword)
261 CALL keyword_release(keyword)
262 CALL keyword_create(keyword, __location__, name="a1", &
263 description="OPTX a1 coefficient", &
264 default_r_val=1.05151_dp)
265 CALL section_add_keyword(subsection, keyword)
266 CALL keyword_release(keyword)
267 CALL keyword_create(keyword, __location__, name="a2", &
268 description="OPTX a2 coefficient", &
269 default_r_val=1.43169_dp)
270 CALL section_add_keyword(subsection, keyword)
271 CALL keyword_release(keyword)
272 CALL keyword_create(keyword, __location__, name="gamma", &
273 description="OPTX gamma coefficient", &
274 default_r_val=0.006_dp)
275 CALL section_add_keyword(subsection, keyword)
276 CALL keyword_release(keyword)
277 CALL section_add_subsection(section, subsection)
278 CALL section_release(subsection)
279
280 CALL libxc_add_sections(section)
281
282 CALL section_create(subsection, __location__, name="CS1", &
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.)
288 CALL section_add_keyword(subsection, keyword)
289 CALL keyword_release(keyword)
290 CALL section_add_subsection(section, subsection)
291 CALL section_release(subsection)
292
293 CALL section_create(subsection, __location__, name="XGGA", &
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.)
300 CALL section_add_keyword(subsection, keyword)
301 CALL keyword_release(keyword)
302 CALL keyword_create(keyword, __location__, name="FUNCTIONAL", &
303 description="Which one of the XGGA functionals should be used", &
304 usage="FUNCTIONAL PW86X", &
305 enum_c_vals=(/ &
306 "BECKE88X", &
307 "PW86X ", &
308 "PW91X ", &
309 "PBEX ", &
310 "REV_PBEX", &
311 "OPTX ", &
312 "EV93 "/), &
314 default_i_val=xgga_b88x)
315 CALL section_add_keyword(subsection, keyword)
316 CALL keyword_release(keyword)
317 CALL section_add_subsection(section, subsection)
318 CALL section_release(subsection)
319
320 CALL section_create(subsection, __location__, name="KE_GGA", &
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.)
329 CALL section_add_keyword(subsection, keyword)
330 CALL keyword_release(keyword)
331 CALL keyword_create(keyword, __location__, name="FUNCTIONAL", &
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 "/), &
335 enum_i_vals=(/ke_ol1, ke_ol2, ke_llp, ke_pw86, ke_pw91, ke_lc, ke_t92, ke_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"), &
344 default_i_val=ke_llp)
345 CALL section_add_keyword(subsection, keyword)
346 CALL keyword_release(keyword)
347 CALL section_add_subsection(section, subsection)
348 CALL section_release(subsection)
349
350 CALL section_create(subsection, __location__, name="P86C", &
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.)
356 CALL section_add_keyword(subsection, keyword)
357 CALL keyword_release(keyword)
358 CALL keyword_create(keyword, __location__, name="scale_c", &
359 description="scales the correlation part of the functional", &
360 default_r_val=1._dp)
361 CALL section_add_keyword(subsection, keyword)
362 CALL keyword_release(keyword)
363 CALL section_add_subsection(section, subsection)
364 CALL section_release(subsection)
365
366 CALL section_create(subsection, __location__, name="PW92", &
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.)
372 CALL section_add_keyword(subsection, keyword)
373 CALL keyword_release(keyword)
374 CALL keyword_create(keyword, __location__, name="SCALE", &
375 description="Scaling of the energy functional", &
376 default_r_val=1.0_dp)
377 CALL section_add_keyword(subsection, keyword)
378 CALL keyword_release(keyword)
379 CALL keyword_create(keyword, __location__, name="PARAMETRIZATION", &
380 description="Which one of parametrizations should be used", &
381 usage="PARAMETRIZATION DMC", &
382 enum_c_vals=(/ &
383 "ORIGINAL", &
384 "DMC ", &
385 "VMC "/), &
386 enum_i_vals=(/c_pw92, c_pw92dmc, c_pw92vmc/), &
387 default_i_val=c_pw92)
388 CALL section_add_keyword(subsection, keyword)
389 CALL keyword_release(keyword)
390 CALL section_add_subsection(section, subsection)
391 CALL section_release(subsection)
392
393 CALL section_create(subsection, __location__, name="PZ81", &
394 description="Uses the PZ functional.", &
395 n_keywords=1, n_subsections=0, repeats=.false., &
396 citations=(/perdew1981, ortiz1994/))
397 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
398 description="activates the functional", &
399 lone_keyword_l_val=.true., default_l_val=.false.)
400 CALL section_add_keyword(subsection, keyword)
401 CALL keyword_release(keyword)
402 CALL keyword_create(keyword, __location__, name="PARAMETRIZATION", &
403 description="Which one of parametrizations should be used", &
404 usage="PARAMETRIZATION DMC", &
405 enum_c_vals=(/ &
406 "ORIGINAL", &
407 "DMC ", &
408 "VMC "/), &
409 enum_i_vals=(/c_pz, c_pzdmc, c_pzvmc/), &
410 default_i_val=pz_orig)
411 CALL section_add_keyword(subsection, keyword)
412 CALL keyword_release(keyword)
413 CALL keyword_create(keyword, __location__, name="scale_c", &
414 description="scales the correlation part of the functional", &
415 default_r_val=1._dp)
416 CALL section_add_keyword(subsection, keyword)
417 CALL keyword_release(keyword)
418 CALL section_add_subsection(section, subsection)
419 CALL section_release(subsection)
420
421 CALL section_create(subsection, __location__, name="TFW", &
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.)
427 CALL section_add_keyword(subsection, keyword)
428 CALL keyword_release(keyword)
429 CALL section_add_subsection(section, subsection)
430 CALL section_release(subsection)
431
432 CALL section_create(subsection, __location__, name="TF", &
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.)
438 CALL section_add_keyword(subsection, keyword)
439 CALL keyword_release(keyword)
440 CALL section_add_subsection(section, subsection)
441 CALL section_release(subsection)
442
443 CALL section_create(subsection, __location__, name="VWN", &
444 description="Uses the VWN functional", &
445 n_keywords=0, n_subsections=0, repeats=.false., &
446 citations=(/vosko1980/))
447 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
448 description="activates the functional", &
449 lone_keyword_l_val=.true., default_l_val=.false.)
450 CALL section_add_keyword(subsection, keyword)
451 CALL keyword_release(keyword)
452 CALL keyword_create(keyword, __location__, name="scale_c", &
453 description="scales the correlation part of the functional", &
454 default_r_val=1._dp)
455 CALL section_add_keyword(subsection, keyword)
456 CALL keyword_release(keyword)
457
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"), &
462 enum_i_vals=(/do_vwn5, do_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"), &
466 default_i_val=do_vwn5)
467
468 CALL section_add_keyword(subsection, keyword)
469 CALL keyword_release(keyword)
470 CALL section_add_subsection(section, subsection)
471 CALL section_release(subsection)
472
473 CALL section_create(subsection, __location__, name="XALPHA", &
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.)
479 CALL section_add_keyword(subsection, keyword)
480 CALL keyword_release(keyword)
481 CALL keyword_create(keyword, __location__, name="XA", &
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)
485 CALL section_add_keyword(subsection, keyword)
486 CALL keyword_release(keyword)
487 CALL keyword_create(keyword, __location__, name="scale_x", &
488 description="scales the exchange part of the functional", &
489 default_r_val=1._dp)
490 CALL section_add_keyword(subsection, keyword)
491 CALL keyword_release(keyword)
492 CALL section_add_subsection(section, subsection)
493 CALL section_release(subsection)
494
495 CALL section_create(subsection, __location__, name="TPSS", &
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., &
499 citations=(/tao2003/))
500 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
501 description="Activates the functional", &
502 lone_keyword_l_val=.true., default_l_val=.false.)
503 CALL section_add_keyword(subsection, keyword)
504 CALL keyword_release(keyword)
505 CALL keyword_create(keyword, __location__, name="scale_x", &
506 description="scales the exchange part of the functional", &
507 default_r_val=1._dp)
508 CALL section_add_keyword(subsection, keyword)
509 CALL keyword_release(keyword)
510 CALL keyword_create(keyword, __location__, name="scale_c", &
511 description="scales the correlation part of the functional", &
512 default_r_val=1._dp)
513 CALL section_add_keyword(subsection, keyword)
514 CALL keyword_release(keyword)
515 CALL section_add_subsection(section, subsection)
516 CALL section_release(subsection)
517
518 CALL section_create(subsection, __location__, name="PBE", &
519 description="Uses the PBE functional", &
520 n_keywords=0, n_subsections=0, repeats=.false., &
521 citations=(/perdew1996, zhang1998, perdew2008/))
522 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
523 description="activates the functional", &
524 lone_keyword_l_val=.true., default_l_val=.false.)
525 CALL section_add_keyword(subsection, keyword)
526 CALL keyword_release(keyword)
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.", &
533 enum_i_vals=(/xc_pbe_orig, xc_pbe_rev, xc_pbe_sol/), &
534 enum_c_vals=(/"ORIG ", "revPBE", "PBEsol"/), &
535 enum_desc=(/"original PBE ", &
536 "revised PBE (revPBE) ", &
537 "PBE for solids and surfaces (PBEsol)"/), &
538 default_i_val=xc_pbe_orig)
539 CALL section_add_keyword(subsection, keyword)
540 CALL keyword_release(keyword)
541 CALL keyword_create(keyword, __location__, name="scale_x", &
542 description="scales the exchange part of the functional", &
543 default_r_val=1._dp)
544 CALL section_add_keyword(subsection, keyword)
545 CALL keyword_release(keyword)
546 CALL keyword_create(keyword, __location__, name="scale_c", &
547 description="scales the correlation part of the functional", &
548 default_r_val=1._dp)
549 CALL section_add_keyword(subsection, keyword)
550 CALL keyword_release(keyword)
551 CALL section_add_subsection(section, subsection)
552 CALL section_release(subsection)
553
554 CALL section_create(subsection, __location__, name="XWPBE", &
555 description="Uses the short range PBE functional", &
556 n_keywords=0, n_subsections=0, repeats=.false., &
557 citations=(/heyd2004/))
558 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
559 description="activates the functional", &
560 lone_keyword_l_val=.true., default_l_val=.false.)
561 CALL section_add_keyword(subsection, keyword)
562 CALL keyword_release(keyword)
563 CALL keyword_create(keyword, __location__, name="scale_x", &
564 description="scales the exchange part of the functional", &
565 default_r_val=1._dp)
566 CALL section_add_keyword(subsection, keyword)
567 CALL keyword_release(keyword)
568 CALL keyword_create(keyword, __location__, name="scale_x0", &
569 description="scales the exchange part of the original hole PBE-functional", &
570 default_r_val=0.0_dp)
571 CALL section_add_keyword(subsection, keyword)
572 CALL keyword_release(keyword)
573 CALL keyword_create(keyword, __location__, name="omega", &
574 description="screening parameter", &
575 default_r_val=1._dp)
576 CALL section_add_keyword(subsection, keyword)
577 CALL keyword_release(keyword)
578 CALL section_add_subsection(section, subsection)
579 CALL section_release(subsection)
580
581 CALL section_create(subsection, __location__, name="BECKE97", &
582 description="Uses the Becke 97 exchange correlation functional", &
583 n_keywords=0, n_subsections=0, repeats=.false., &
584 citations=(/becke1997, grimme2006/))
585 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
586 description="activates the functional", &
587 lone_keyword_l_val=.true., default_l_val=.false.)
588 CALL section_add_keyword(subsection, keyword)
589 CALL keyword_release(keyword)
590 CALL keyword_create(keyword, __location__, name="scale_x", &
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)
593 CALL section_add_keyword(subsection, keyword)
594 CALL keyword_release(keyword)
595 CALL keyword_create(keyword, __location__, name="scale_c", &
596 description="scales the correlation part of the functional", &
597 default_r_val=1._dp)
598 CALL section_add_keyword(subsection, keyword)
599 CALL keyword_release(keyword)
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 "/), &
604 default_i_val=xc_b97_orig)
605 CALL section_add_keyword(subsection, keyword)
606 CALL keyword_release(keyword)
607
608 CALL section_add_subsection(section, subsection)
609 CALL section_release(subsection)
610
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., &
615 citations=(/beckeroussel1989, proynov2007/))
616 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
617 description="activates the functional", &
618 lone_keyword_l_val=.true., default_l_val=.false.)
619 CALL section_add_keyword(subsection, keyword)
620 CALL keyword_release(keyword)
621 CALL keyword_create(keyword, __location__, name="scale_x", &
622 description="scales the exchange part of the functional", &
623 default_r_val=1._dp)
624 CALL section_add_keyword(subsection, keyword)
625 CALL keyword_release(keyword)
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)
630 CALL section_add_keyword(subsection, keyword)
631 CALL keyword_release(keyword)
632 CALL keyword_create(keyword, __location__, name="GAMMA", &
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)
636 CALL section_add_keyword(subsection, keyword)
637 CALL keyword_release(keyword)
638 CALL section_add_subsection(section, subsection)
639 CALL section_release(subsection)
640
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.)
647 CALL section_add_keyword(subsection, keyword)
648 CALL keyword_release(keyword)
649 CALL keyword_create(keyword, __location__, name="SCALE_X", &
650 description="scales the exchange part of the functional", &
651 default_r_val=1._dp)
652 CALL section_add_keyword(subsection, keyword)
653 CALL keyword_release(keyword)
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")
657 CALL section_add_keyword(subsection, keyword)
658 CALL keyword_release(keyword)
659 CALL section_add_subsection(section, subsection)
660 CALL section_release(subsection)
661
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.)
668 CALL section_add_keyword(subsection, keyword)
669 CALL keyword_release(keyword)
670 CALL keyword_create(keyword, __location__, name="SCALE_X", &
671 description="scales the exchange part of the functional", &
672 default_r_val=1._dp)
673 CALL section_add_keyword(subsection, keyword)
674 CALL keyword_release(keyword)
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")
678 CALL section_add_keyword(subsection, keyword)
679 CALL keyword_release(keyword)
680 CALL section_add_subsection(section, subsection)
681 CALL section_release(subsection)
682
683 CALL section_create(subsection, __location__, name="GV09", &
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.)
689 CALL section_add_keyword(subsection, keyword)
690 CALL keyword_release(keyword)
691 CALL keyword_create(keyword, __location__, name="SCALE_X", &
692 description="scales the exchange part of the functional", &
693 default_r_val=1._dp)
694 CALL section_add_keyword(subsection, keyword)
695 CALL keyword_release(keyword)
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")
699 CALL section_add_keyword(subsection, keyword)
700 CALL keyword_release(keyword)
701 CALL keyword_create(keyword, __location__, name="GAMMA", &
702 description="Parameter for Becke Roussel hole", &
703 default_r_val=1.0_dp)
704 CALL section_add_keyword(subsection, keyword)
705 CALL keyword_release(keyword)
706 CALL section_add_subsection(section, subsection)
707 CALL section_release(subsection)
708
709 CALL section_create(subsection, __location__, name="BEEF", & !rk: BEEF Exchange
710 description="Uses the BEEFvdW exchange functional", &
711 n_keywords=0, n_subsections=0, repeats=.false., &
712 citations=(/wellendorff2012/))
713 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
714 description="activates the functional", &
715 lone_keyword_l_val=.true., default_l_val=.false.)
716 CALL section_add_keyword(subsection, keyword)
717 CALL keyword_release(keyword)
718 CALL keyword_create(keyword, __location__, name="scale_x", &
719 description="scales the exchange part of the functional", &
720 default_r_val=1._dp)
721 CALL section_add_keyword(subsection, keyword)
722 CALL keyword_release(keyword)
723 CALL section_add_subsection(section, subsection)
724 CALL section_release(subsection)
725
726 END SUBROUTINE create_xc_fun_section
727
728! **************************************************************************************************
729!> \brief creates the structure of the section needed to select an xc potential
730!> \param section the section that will be created
731!> \author thomas chassaing
732! **************************************************************************************************
733 SUBROUTINE create_xc_potential_section(section)
734 TYPE(section_type), POINTER :: section
735
736 TYPE(keyword_type), POINTER :: keyword
737 TYPE(section_type), POINTER :: subsection
738
739 cpassert(.NOT. ASSOCIATED(section))
740 CALL section_create(section, __location__, name="xc_potential", &
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.)
746
747 NULLIFY (subsection, keyword)
748 CALL section_create(subsection, __location__, name="SAOP", &
749 description="Uses the SAOP potential", &
750 n_keywords=3, n_subsections=0, repeats=.true.)
751 CALL keyword_create(keyword, __location__, name="ALPHA", &
752 description="Value of the alpha parameter (default = 1.19).", &
753 usage="ALPHA 1.19", default_r_val=1.19_dp)
754 CALL section_add_keyword(subsection, keyword)
755 CALL keyword_release(keyword)
756 CALL keyword_create(keyword, __location__, name="BETA", &
757 description="Value of the beta parameter (default = 0.01).", &
758 usage="BETA 0.01", default_r_val=0.01_dp)
759 CALL section_add_keyword(subsection, keyword)
760 CALL keyword_release(keyword)
761 CALL keyword_create(keyword, __location__, name="K_RHO", &
762 description="Value of the K_rho parameter (default = 0.42).", &
763 usage="K_RHO 0.42", default_r_val=0.42_dp)
764 CALL section_add_keyword(subsection, keyword)
765 CALL keyword_release(keyword)
766 CALL section_add_subsection(section, subsection)
767 CALL section_release(subsection)
768
769 CALL keyword_create(keyword, __location__, name="ENERGY", &
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"), &
773 enum_i_vals=(/xc_pot_energy_none, &
778 default_i_val=xc_pot_energy_none)
779 CALL section_add_keyword(section, keyword)
780 CALL keyword_release(keyword)
781
782 END SUBROUTINE create_xc_potential_section
783
784! **************************************************************************************************
785!> \brief creates the structure of the section needed to select an xc kernel
786!> \param section the section that will be created
787!> \author JGH
788! **************************************************************************************************
789 SUBROUTINE create_xc_kernel_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="XC_KERNEL", &
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.)
801
802 NULLIFY (keyword)
803 CALL keyword_create( &
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", &
812 "NONE"), &
813 default_i_val=fxc_none, &
814 lone_keyword_i_val=fxc_none)
815 CALL section_add_keyword(section, keyword)
816 CALL keyword_release(keyword)
817
818 CALL keyword_create(keyword, __location__, name="PARAMETER", &
819 description="List of parameters specific to the kernel function", &
820 usage="PARAMETER <REAL> .. <REAL>", &
821 type_of_var=real_t, n_var=-1)
822 CALL section_add_keyword(section, keyword)
823 CALL keyword_release(keyword)
824 CALL keyword_create(keyword, __location__, name="GAMMA", &
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)
829 CALL section_add_keyword(section, keyword)
830 CALL keyword_release(keyword)
831 CALL keyword_create(keyword, __location__, name="C_XAA", &
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)
836 CALL section_add_keyword(section, keyword)
837 CALL keyword_release(keyword)
838 CALL keyword_create(keyword, __location__, name="C_CAB", &
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)
843 CALL section_add_keyword(section, keyword)
844 CALL keyword_release(keyword)
845 CALL keyword_create(keyword, __location__, name="C_CAA", &
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)
850 CALL section_add_keyword(section, keyword)
851 CALL keyword_release(keyword)
852 CALL keyword_create(keyword, __location__, name="SCALE_X", &
853 description="Scaling parameter for exchange kernel.", &
854 usage="SCALE_X 0.2", default_r_val=1.0_dp)
855 CALL section_add_keyword(section, keyword)
856 CALL keyword_release(keyword)
857 CALL keyword_create(keyword, __location__, name="SCALE_C", &
858 description="Scaling parameter for correlation kernel.", &
859 usage="SCALE_C 0.2", default_r_val=1.0_dp)
860 CALL section_add_keyword(section, keyword)
861 CALL keyword_release(keyword)
862
863 END SUBROUTINE create_xc_kernel_section
864
865! **************************************************************************************************
866!> \brief creates the structure of the section needed to select an hfx kernel
867!> \param section the section that will be created
868!> \author JGH
869! **************************************************************************************************
870 SUBROUTINE create_hfx_kernel_section(section)
871 TYPE(section_type), POINTER :: section
872
873 TYPE(keyword_type), POINTER :: keyword
874 TYPE(section_type), POINTER :: subsection
875
876 cpassert(.NOT. ASSOCIATED(section))
877 CALL section_create(section, __location__, name="HFX_KERNEL", &
878 description="The hfx kernel to use. Cannot be combined with HF section.", &
879 n_keywords=1, n_subsections=2, repeats=.false.)
880
881 NULLIFY (subsection, keyword)
882 CALL keyword_create(keyword, __location__, name="DO_HFXSR", &
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.)
886 CALL section_add_keyword(section, keyword)
887 CALL keyword_release(keyword)
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)
893 CALL section_add_keyword(section, keyword)
894 CALL keyword_release(keyword)
895
896 CALL create_hfx_section(subsection)
897 CALL section_add_subsection(section, subsection)
898 CALL section_release(subsection)
899
900 CALL section_create(subsection, __location__, name="HFXLR", &
901 description="Uses the HFXLR (long range) kernel", &
902 n_keywords=2, n_subsections=0, repeats=.false.)
903 CALL keyword_create(keyword, __location__, name="RCUT", &
904 description="Value of lower range cutoff of interaction [Bohr]", &
905 usage="RCUT 5.00", default_r_val=6.00_dp, unit_str="bohr")
906 CALL section_add_keyword(subsection, keyword)
907 CALL keyword_release(keyword)
908 CALL keyword_create(keyword, __location__, name="SCALE", &
909 description="Scaling parameter for HFX kernel.", &
910 usage="SCALE 0.25", default_r_val=1.00_dp)
911 CALL section_add_keyword(subsection, keyword)
912 CALL keyword_release(keyword)
913 CALL section_add_subsection(section, subsection)
914 CALL section_release(subsection)
915
916 END SUBROUTINE create_hfx_kernel_section
917! **************************************************************************************************
918!> \brief creates the structure of the section needed for vdW potentials
919!> \param section the section that will be created
920!> \author jgh
921! **************************************************************************************************
922 SUBROUTINE create_vdw_potential_section(section)
923 TYPE(section_type), POINTER :: section
924
925 TYPE(keyword_type), POINTER :: keyword
926 TYPE(section_type), POINTER :: newsection, print_key, subsection
927
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. ", &
933 citations=(/grimme2006, tran2013/), &
934 n_keywords=1, n_subsections=1, repeats=.false.)
935
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"), &
946 default_i_val=xc_vdw_fun_none)
947 CALL section_add_keyword(section, keyword)
948 CALL keyword_release(keyword)
949
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.)
953 CALL keyword_create(keyword, __location__, name="R_CUTOFF", &
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, &
958 unit_str="angstrom")
959 CALL section_add_keyword(subsection, keyword)
960 CALL keyword_release(keyword)
961 CALL keyword_create(keyword, __location__, name="D4_CUTOFF", &
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, &
965 unit_str="angstrom")
966 CALL section_add_keyword(subsection, keyword)
967 CALL keyword_release(keyword)
968 CALL keyword_create(keyword, __location__, name="D4_CN_CUTOFF", &
969 description="Coordination number cutoff for D4", &
970 usage="D4_CN_CUTOFF 30.0", default_r_val=10.0_dp, &
971 unit_str="angstrom")
972 CALL section_add_keyword(subsection, keyword)
973 CALL keyword_release(keyword)
974 CALL keyword_create(keyword, __location__, name="TYPE", &
975 description="Type of potential", &
977 usage="TYPE (DFTD2|DFTD3|DFTD3(BJ)|DFTD4)", &
978 enum_c_vals=s2a("DFTD2", "DFTD3", "DFTD3(BJ)", "DFTD4"), &
979 enum_i_vals=(/vdw_pairpot_dftd2, vdw_pairpot_dftd3, &
981 enum_desc=s2a("Grimme D2 method", &
982 "Grimme D3 method (zero damping)", &
983 "Grimme D3 method (Becke-Johnson damping)", &
984 "Grimme D4 method"), &
985 default_i_val=vdw_pairpot_dftd3)
986 CALL section_add_keyword(subsection, keyword)
987 CALL keyword_release(keyword)
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")
992 CALL section_add_keyword(subsection, keyword)
993 CALL keyword_release(keyword)
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>", &
1001 type_of_var=char_t)
1002 CALL section_add_keyword(subsection, keyword)
1003 CALL keyword_release(keyword)
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.)
1008 CALL section_add_keyword(subsection, keyword)
1009 CALL keyword_release(keyword)
1010 CALL keyword_create(keyword, __location__, name="D4_DEBUG", &
1011 description="Debug output for D4 method using reference code.", &
1012 usage="D4_DEBUG", default_l_val=.false., &
1013 lone_keyword_l_val=.true.)
1014 CALL section_add_keyword(subsection, keyword)
1015 CALL keyword_release(keyword)
1016 CALL keyword_create(keyword, __location__, name="D2_SCALING", &
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)
1021 CALL section_add_keyword(subsection, keyword)
1022 CALL keyword_release(keyword)
1023 CALL keyword_create(keyword, __location__, name="D2_EXP_PRE", &
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)
1027 CALL section_add_keyword(subsection, keyword)
1028 CALL keyword_release(keyword)
1029 CALL keyword_create(keyword, __location__, name="EPS_CN", &
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)
1032 CALL section_add_keyword(subsection, keyword)
1033 CALL keyword_release(keyword)
1034 CALL keyword_create(keyword, __location__, name="D3_SCALING", &
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/))
1040 CALL section_add_keyword(subsection, keyword)
1041 CALL keyword_release(keyword)
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/))
1048 CALL section_add_keyword(subsection, keyword)
1049 CALL keyword_release(keyword)
1050 CALL keyword_create(keyword, __location__, name="D4_SCALING", &
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/))
1056 CALL section_add_keyword(subsection, keyword)
1057 CALL keyword_release(keyword)
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.)
1062 CALL section_add_keyword(subsection, keyword)
1063 CALL keyword_release(keyword)
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.)
1068 CALL section_add_keyword(subsection, keyword)
1069 CALL keyword_release(keyword)
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)
1073 CALL section_add_keyword(subsection, keyword)
1074 CALL keyword_release(keyword)
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.)
1080 CALL section_add_keyword(subsection, keyword)
1081 CALL keyword_release(keyword)
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.)
1086 CALL section_add_keyword(subsection, keyword)
1087 CALL keyword_release(keyword)
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)
1094 CALL section_add_keyword(subsection, keyword)
1095 CALL keyword_release(keyword)
1096 ! KG molecular corrections
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.)
1101 CALL section_add_keyword(subsection, keyword)
1102 CALL keyword_release(keyword)
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)
1106 CALL section_add_keyword(subsection, keyword)
1107 CALL keyword_release(keyword)
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.)
1113 CALL section_add_keyword(subsection, keyword)
1114 CALL keyword_release(keyword)
1115
1116 ! Set coordination numbers by atom numbers
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., &
1120 n_var=-1, type_of_var=integer_t)
1121 CALL section_add_keyword(subsection, keyword)
1122 CALL keyword_release(keyword)
1123
1124 ! Ignore selected pair interactins
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., &
1128 n_var=2, type_of_var=integer_t)
1129 CALL section_add_keyword(subsection, keyword)
1130 CALL keyword_release(keyword)
1131
1132 ! Set coordination numbers by atom kinds
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)
1137 CALL section_add_keyword(subsection, keyword)
1138 CALL keyword_release(keyword)
1139 ! Set coordination numbers by atom numbers
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)
1144 CALL section_add_keyword(subsection, keyword)
1145 CALL keyword_release(keyword)
1146
1147 ! parameter specification atom by atom
1148 CALL keyword_create(keyword, __location__, name="ATOMPARM", &
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)
1153 CALL section_add_keyword(subsection, keyword)
1154 CALL keyword_release(keyword)
1155
1156 NULLIFY (print_key)
1157 CALL cp_print_key_section_create(print_key, __location__, "PRINT_DFTD", &
1158 description="Controls the printing of some info about DFTD contributions", &
1159 print_level=high_print_level, add_last=add_last_numeric, filename="")
1160 CALL section_add_subsection(subsection, print_key)
1161 CALL section_release(print_key)
1162
1163 NULLIFY (newsection)
1164 CALL create_eeq_control_section(newsection)
1165 CALL section_add_subsection(subsection, newsection)
1166 CALL section_release(newsection)
1167
1168 CALL section_add_subsection(section, subsection)
1169 CALL section_release(subsection)
1170
1171 ! nonlocal section
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.)
1177
1178 CALL keyword_create(keyword, __location__, name="TYPE", &
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"), &
1183 enum_i_vals=(/vdw_nl_drsll, vdw_nl_lmkll, vdw_nl_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"), &
1187 citations=(/tran2013/), &
1188 default_i_val=vdw_nl_drsll)
1189 CALL section_add_keyword(subsection, keyword)
1190 CALL keyword_release(keyword)
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.)
1195 CALL section_add_keyword(subsection, keyword)
1196 CALL keyword_release(keyword)
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")
1203 CALL section_add_keyword(subsection, keyword)
1204 CALL keyword_release(keyword)
1205 CALL keyword_create(keyword, __location__, name="CUTOFF", &
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")
1210 CALL section_add_keyword(subsection, keyword)
1211 CALL keyword_release(keyword)
1212 CALL keyword_create(keyword, __location__, name="PARAMETERS", &
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)
1216 CALL section_add_keyword(subsection, keyword)
1217 CALL keyword_release(keyword)
1218 CALL keyword_create(keyword, __location__, name="SCALE", &
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)
1222 CALL section_add_keyword(subsection, keyword)
1223 CALL keyword_release(keyword)
1224
1225 CALL section_add_subsection(section, subsection)
1226 CALL section_release(subsection)
1227
1228 END SUBROUTINE create_vdw_potential_section
1229
1230! **************************************************************************************************
1231!> \brief creates the structure of the section needed for gCP potentials
1232!> \param section the section that will be created
1233!> \author jgh
1234! **************************************************************************************************
1235 SUBROUTINE create_gcp_potential_section(section)
1236 TYPE(section_type), POINTER :: section
1237
1238 TYPE(keyword_type), POINTER :: keyword
1239
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. ", &
1244 citations=(/kruse2012/), &
1245 n_keywords=1, n_subsections=1, repeats=.false.)
1246
1247 NULLIFY (keyword)
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="---")
1252 CALL section_add_keyword(section, keyword)
1253 CALL keyword_release(keyword)
1254
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/))
1260 CALL section_add_keyword(section, keyword)
1261 CALL keyword_release(keyword)
1262
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"/))
1267 CALL section_add_keyword(section, keyword)
1268 CALL keyword_release(keyword)
1269
1270 CALL keyword_create(keyword, __location__, name="VERBOSE", &
1271 description="Verbose output for gCP calculation", &
1272 usage="VERBOSE logical_value", &
1273 default_l_val=.true., lone_keyword_l_val=.true.)
1274 CALL section_add_keyword(section, keyword)
1275 CALL keyword_release(keyword)
1276
1277 END SUBROUTINE create_gcp_potential_section
1278
1279! **************************************************************************************************
1280!> \brief creates the input section for the xc part
1281!> \param section the section to create
1282!> \author fawzi
1283! **************************************************************************************************
1284 SUBROUTINE create_xc_section(section)
1285 TYPE(section_type), POINTER :: section
1286
1287 TYPE(keyword_type), POINTER :: keyword
1288 TYPE(section_type), POINTER :: subsection
1289
1290 cpassert(.NOT. ASSOCIATED(section))
1291 CALL section_create(section, __location__, name="xc", &
1292 description="Parameters needed for the calculation of the eXchange and Correlation potential", &
1293 n_keywords=5, n_subsections=2, repeats=.false.)
1294
1295 NULLIFY (subsection, keyword)
1296
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)
1300 CALL section_add_keyword(section, keyword)
1301 CALL keyword_release(keyword)
1302
1303 CALL keyword_create(keyword, __location__, name="gradient_cutoff", &
1304 description="The cutoff on the gradient of the density used by the "// &
1305 "xc calculation", &
1306 usage="gradient_cutoff 1.e-11", default_r_val=1.0e-10_dp)
1307 CALL section_add_keyword(section, keyword)
1308 CALL keyword_release(keyword)
1309
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)
1313 CALL section_add_keyword(section, keyword)
1314 CALL keyword_release(keyword)
1315
1316 CALL keyword_create(keyword, __location__, name="tau_cutoff", &
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)
1319 CALL section_add_keyword(section, keyword)
1320 CALL keyword_release(keyword)
1321
1322 CALL keyword_create( &
1323 keyword, __location__, name="FUNCTIONAL_ROUTINE", &
1324 description="Select the code for xc calculation", &
1325 usage="FUNCTIONAL_ROUTINE (DEFAULT|TEST_LSD|DEBUG)", &
1326 default_i_val=xc_default_f_routine, &
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"))
1332 CALL section_add_keyword(section, keyword)
1333 CALL keyword_release(keyword)
1334
1335 CALL section_create(subsection, __location__, name="xc_grid", & !FM to do
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", &
1340 usage="xc_smooth_rho nn10", default_i_val=xc_rho_no_smooth, &
1341 enum_c_vals=s2a("NONE", "NN50", "NN10", "SPLINE2", "NN6", "SPLINE3", "NN4"), &
1342 enum_i_vals=(/xc_rho_no_smooth, xc_rho_nn50, xc_rho_nn10, &
1345 CALL section_add_keyword(subsection, keyword)
1346 CALL keyword_release(keyword)
1347
1348 CALL keyword_create(keyword, __location__, name="xc_deriv", &
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"), &
1357 CALL section_add_keyword(subsection, keyword)
1358 CALL keyword_release(keyword)
1359
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.)
1364 CALL section_add_keyword(subsection, keyword)
1365 CALL keyword_release(keyword)
1366
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.)
1371 CALL section_add_keyword(section, keyword)
1372 CALL keyword_release(keyword)
1373
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.)
1378 CALL section_add_keyword(section, keyword)
1379 CALL keyword_release(keyword)
1380
1381 CALL keyword_create(keyword, __location__, name="STEP_SIZE", &
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)
1385 CALL section_add_keyword(section, keyword)
1386 CALL keyword_release(keyword)
1387
1388 CALL keyword_create(keyword, __location__, name="NSTEPS", &
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)
1392 CALL section_add_keyword(section, keyword)
1393 CALL keyword_release(keyword)
1394
1395 CALL section_add_subsection(section, subsection)
1396 CALL section_release(subsection)
1397
1398 CALL create_xc_fun_section(subsection)
1399 CALL section_add_subsection(section, subsection)
1400 CALL section_release(subsection)
1401
1402 CALL create_hfx_section(subsection)
1403 CALL section_add_subsection(section, subsection)
1404 CALL section_release(subsection)
1405
1406 CALL create_mp2_section(subsection)
1407 CALL section_add_subsection(section, subsection)
1408 CALL section_release(subsection)
1409
1410 CALL create_adiabatic_section(subsection)
1411 CALL section_add_subsection(section, subsection)
1412 CALL section_release(subsection)
1413
1414 CALL create_xc_potential_section(subsection)
1415 CALL section_add_subsection(section, subsection)
1416 CALL section_release(subsection)
1417
1418 CALL create_xc_kernel_section(subsection)
1419 CALL section_add_subsection(section, subsection)
1420 CALL section_release(subsection)
1421
1422 CALL create_hfx_kernel_section(subsection)
1423 CALL section_add_subsection(section, subsection)
1424 CALL section_release(subsection)
1425
1426 CALL create_vdw_potential_section(subsection)
1427 CALL section_add_subsection(section, subsection)
1428 CALL section_release(subsection)
1429
1430 CALL create_gcp_potential_section(subsection)
1431 CALL section_add_subsection(section, subsection)
1432 CALL section_release(subsection)
1433
1434 END SUBROUTINE create_xc_section
1435
1436! **************************************************************************************************
1437!> \brief creates the section for adiabatic hybrid functionals
1438!> \param section ...
1439!> \author Manuel Guidon
1440! **************************************************************************************************
1441 SUBROUTINE create_adiabatic_section(section)
1442 TYPE(section_type), POINTER :: section
1443
1444 TYPE(keyword_type), POINTER :: keyword
1445
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.)
1450 NULLIFY (keyword)
1451 CALL keyword_create( &
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"), &
1458 enum_i_vals=(/do_adiabatic_hybrid_mcy3/), &
1459 enum_desc=s2a("Use MCY3 hybrid functional"), &
1460 default_i_val=do_adiabatic_hybrid_mcy3)
1461 CALL section_add_keyword(section, keyword)
1462 CALL keyword_release(keyword)
1463
1464 NULLIFY (keyword)
1465 CALL keyword_create( &
1466 keyword, __location__, &
1467 name="LAMBDA", &
1468 description="The point to be used along the adiabatic curve (0 &lt; &lambda; &lt; 1)", &
1469 usage="LAMBDA 0.71", &
1470 default_r_val=0.71_dp)
1471 CALL section_add_keyword(section, keyword)
1472 CALL keyword_release(keyword)
1473
1474 NULLIFY (keyword)
1475 CALL keyword_create( &
1476 keyword, __location__, &
1477 name="OMEGA", &
1478 description="Long-range parameter", &
1479 usage="OMEGA 0.2", &
1480 default_r_val=0.2_dp)
1481 CALL section_add_keyword(section, keyword)
1482 CALL keyword_release(keyword)
1483
1484 NULLIFY (keyword)
1485 CALL keyword_create( &
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"), &
1491 enum_i_vals=(/do_adiabatic_model_pade/), &
1492 enum_desc=s2a("Use pade model: W(lambda)=a+(b*lambda)/(1+c*lambda)"), &
1493 default_i_val=do_adiabatic_model_pade)
1494 CALL section_add_keyword(section, keyword)
1495 CALL keyword_release(keyword)
1496 END SUBROUTINE create_adiabatic_section
1497
1498END MODULE input_cp2k_xc
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
Input definition and setup for EEQ model.
Definition eeq_input.F:12
subroutine, public create_eeq_control_section(section)
...
Definition eeq_input.F:50
collects all constants needed in input so that they can be used without circular dependencies
integer, parameter, public xc_funct_tpss
integer, parameter, public xc_funct_bp
integer, parameter, public xc_funct_olyp
integer, parameter, public vdw_nl_rvv10
integer, parameter, public xc_vdw_fun_none
integer, parameter, public xc_funct_pbe
integer, parameter, public fxc_funct_pade
integer, parameter, public fxc_funct_gga
integer, parameter, public vdw_pairpot_dftd3
integer, parameter, public xc_funct_no_shortcut
integer, parameter, public do_adiabatic_hybrid_mcy3
integer, parameter, public xc_vdw_fun_nonloc
integer, parameter, public xc_funct_pbe0
integer, parameter, public fxc_none
integer, parameter, public vdw_pairpot_dftd4
integer, parameter, public xc_funct_beefvdw
integer, parameter, public xc_funct_pade
integer, parameter, public xc_funct_blyp
integer, parameter, public vdw_nl_drsll
integer, parameter, public xc_pot_energy_xc_functional
integer, parameter, public xc_pot_energy_none
integer, parameter, public do_adiabatic_model_pade
integer, parameter, public xc_pot_energy_sum_eigenvalues
integer, parameter, public vdw_nl_lmkll
integer, parameter, public gaussian
integer, parameter, public vdw_pairpot_dftd2
integer, parameter, public fxc_funct_lda
integer, parameter, public xc_vdw_fun_pairpot
integer, parameter, public xc_funct_b3lyp
integer, parameter, public xc_none
integer, parameter, public vdw_pairpot_dftd3bj
integer, parameter, public xc_funct_hcth120
integer, parameter, public slater
function that builds the hartree fock exchange section of the input
subroutine, public create_hfx_section(section)
creates the input section for the hf part
input section for MP2
subroutine, public create_mp2_section(section)
creates the input section for the mp2 part
function that build the xc section of the input
subroutine, public create_xc_section(section)
creates the input section for the xc part
subroutine, public create_xc_fun_section(section)
creates the structure of the section needed to select the xc functional
represents keywords in an input
subroutine, public keyword_release(keyword)
releases the given keyword (see doc/ReferenceCounting.html)
subroutine, public keyword_create(keyword, location, name, description, usage, type_of_var, n_var, repeats, variants, default_val, default_l_val, default_r_val, default_lc_val, default_c_val, default_i_val, default_l_vals, default_r_vals, default_c_vals, default_i_vals, lone_keyword_val, lone_keyword_l_val, lone_keyword_r_val, lone_keyword_c_val, lone_keyword_i_val, lone_keyword_l_vals, lone_keyword_r_vals, lone_keyword_c_vals, lone_keyword_i_vals, enum_c_vals, enum_i_vals, enum, enum_strict, enum_desc, unit_str, citations, deprecation_notice, removed)
creates a keyword object
objects that represent the structure of input sections and the data contained in an input section
subroutine, public section_create(section, location, name, description, n_keywords, n_subsections, repeats, citations, deprecation_notice)
creates a list of keywords
subroutine, public section_add_keyword(section, keyword)
adds a keyword to the given section
subroutine, public section_add_subsection(section, subsection)
adds a subsection to the given section
recursive subroutine, public section_release(section)
releases the given keyword list (see doc/ReferenceCounting.html)
a wrapper for basic fortran types.
integer, parameter, public real_t
integer, parameter, public char_t
integer, parameter, public integer_t
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
Utilities for string manipulations.
input constants for xc
integer, parameter, public xc_deriv_spline2_smooth
integer, parameter, public xc_rho_spline2_smooth
integer, parameter, public c_pw92
integer, parameter, public ke_ol1
integer, parameter, public xc_deriv_collocate
integer, parameter, public ke_ol2
integer, parameter, public xc_rho_spline3_smooth
integer, parameter, public xc_deriv_nn10_smooth
integer, parameter, public xc_pbe_orig
integer, parameter, public xc_deriv_pw
integer, parameter, public xc_pbe_rev
integer, parameter, public xgga_opt
integer, parameter, public xc_b97_mardirossian
integer, parameter, public xc_b97_orig
integer, parameter, public do_vwn5
integer, parameter, public xgga_revpbe
integer, parameter, public ke_pw91
integer, parameter, public ke_pbe
integer, parameter, public xc_default_f_routine
integer, parameter, public xgga_pw86
integer, parameter, public c_pz
integer, parameter, public c_pw92vmc
integer, parameter, public xc_deriv_spline2
integer, parameter, public pz_orig
integer, parameter, public xc_rho_nn10
integer, parameter, public ke_pw86
integer, parameter, public xgga_pw91
integer, parameter, public xc_deriv_nn50_smooth
integer, parameter, public xc_b97_grimme
integer, parameter, public xc_deriv_spline3
integer, parameter, public c_pzvmc
integer, parameter, public xc_pbe_sol
integer, parameter, public xc_rho_nn50
integer, parameter, public ke_lc
integer, parameter, public xgga_ev93
integer, parameter, public xc_test_lsd_f_routine
integer, parameter, public xalpha
integer, parameter, public ke_llp
integer, parameter, public xc_deriv_spline3_smooth
integer, parameter, public xc_b97_3c
integer, parameter, public xc_debug_new_routine
integer, parameter, public ke_t92
integer, parameter, public xgga_pbex
integer, parameter, public c_pw92dmc
integer, parameter, public do_vwn3
integer, parameter, public xgga_b88x
integer, parameter, public c_pzdmc
integer, parameter, public xc_rho_no_smooth
calculates a functional from libxc and its derivatives
Definition xc_libxc.F:28
subroutine, public libxc_add_sections(section)
...
Definition xc_libxc.F:206
represent a keyword in the input
represent a section of the input file