39#include "./base/base_uses.f90"
44 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_tb'
60 cpassert(.NOT.
ASSOCIATED(section))
62 description=
"Parameters needed to set up the DFTB methods", &
63 n_keywords=1, n_subsections=1, repeats=.false., &
67 CALL create_dftb_parameter_section(subsection)
72 CALL keyword_create(keyword, __location__, name=
"self_consistent", &
73 description=
"Use self-consistent method", &
75 usage=
"SELF_CONSISTENT", default_l_val=.true.)
79 CALL keyword_create(keyword, __location__, name=
"orthogonal_basis", &
80 description=
"Assume orthogonal basis set", &
81 usage=
"ORTHOGONAL_BASIS", default_l_val=.false.)
86 description=
"Use Ewald type method instead of direct sum for Coulomb interaction", &
87 usage=
"DO_EWALD", default_l_val=.false., lone_keyword_l_val=.true.)
92 description=
"Use dispersion correction", &
94 usage=
"DISPERSION", default_l_val=.false.)
98 CALL keyword_create(keyword, __location__, name=
"DIAGONAL_DFTB3", &
99 description=
"Use a diagonal version of the 3rd order energy correction (DFTB3) ", &
100 lone_keyword_l_val=.true., &
101 usage=
"DIAGONAL_DFTB3", default_l_val=.false.)
106 description=
"Uses a modified version for the GAMMA within the SCC-DFTB scheme, "// &
107 "specifically tuned for hydrogen bonds.", &
108 citations=(/
hu2007/), lone_keyword_l_val=.true., &
109 usage=
"HB_SR_GAMMA", default_l_val=.false.)
114 description=
"Define accuracy of dispersion interaction", &
115 usage=
"EPS_DISP", default_r_val=0.0001_dp)
131 cpassert(.NOT.
ASSOCIATED(section))
133 description=
"Parameters needed to set up the xTB methods", &
134 n_keywords=1, n_subsections=1, repeats=.false., &
138 CALL create_xtb_parameter_section(subsection)
142 CALL create_xtb_nonbonded_section(subsection)
150 CALL create_xtb_tblite_section(subsection)
156 description=
"Which GFN xTB method should be used.", &
157 usage=
"GFN_TYPE 1", default_i_val=1)
162 description=
"Use Ewald type method instead of direct sum for Coulomb interaction", &
163 usage=
"DO_EWALD", default_l_val=.false., lone_keyword_l_val=.true.)
168 description=
"Provides the order of the Slater orbital expansion in GTOs.", &
169 usage=
"STO_NG 3", default_i_val=6)
173 CALL keyword_create(keyword, __location__, name=
"HYDROGEN_STO_NG", &
174 description=
"Number of GTOs for Hydrogen basis expansion.", &
175 usage=
"HYDROGEN_STO_NG 3", default_i_val=4)
179 CALL keyword_create(keyword, __location__, name=
"USE_HALOGEN_CORRECTION", &
180 description=
"Use XB interaction term", &
181 usage=
"USE_HALOGEN_CORRECTION T", default_l_val=.true., lone_keyword_l_val=.true.)
186 description=
"Controls the computation of real-space "// &
187 "(short-range) nonbonded interactions as correction to xTB.", &
188 usage=
"DO_NONBONDED T", default_l_val=.false., lone_keyword_l_val=.true.)
192 CALL keyword_create(keyword, __location__, name=
"VDW_POTENTIAL", &
193 description=
"vdW potential to be used: NONE, DFTD3, DFTD4. "// &
194 "Defaults: DFTD3(gfn1), DFTD4(gfn0, gfn2).", &
195 usage=
"VDW_POTENTIAL type", default_c_val=
"")
199 CALL keyword_create(keyword, __location__, name=
"COULOMB_INTERACTION", &
200 description=
"Use Coulomb interaction terms (electrostatics + TB3); for debug only", &
201 usage=
"COULOMB_INTERACTION T", default_l_val=.true., lone_keyword_l_val=.true.)
206 description=
"Use Coulomb LR (1/r) interaction terms; for debug only", &
207 usage=
"COULOMB_LR T", default_l_val=.true., lone_keyword_l_val=.true.)
211 CALL keyword_create(keyword, __location__, name=
"TB3_INTERACTION", &
212 description=
"Use TB3 interaction terms; for debug only", &
213 usage=
"TB3_INTERACTION T", default_l_val=.true., lone_keyword_l_val=.true.)
217 CALL keyword_create(keyword, __location__, name=
"CHECK_ATOMIC_CHARGES", &
218 description=
"Stop calculation if atomic charges are outside chemical range.", &
219 usage=
"CHECK_ATOMIC_CHARGES T", default_l_val=.true., lone_keyword_l_val=.true.)
223 CALL keyword_create(keyword, __location__, name=
"VARIATIONAL_DIPOLE", &
224 description=
"gfn0-xTB use dipole definition from energy derivative.", &
225 usage=
"VARIATIONAL_DIPOLE T", default_l_val=.false., lone_keyword_l_val=.true.)
229 CALL keyword_create(keyword, __location__, name=
"EPS_PAIRPOTENTIAL", &
230 description=
"Accuracy for the repulsive pair potential.", &
231 usage=
"EPS_PAIRPOTENTIAL 1.0E-8", default_r_val=1.0e-10_dp)
235 CALL keyword_create(keyword, __location__, name=
"EN_SHIFT_TYPE", &
236 description=
"Shift function for electronegativity in EEQ method. "// &
237 "[Select/Molecule/Crystal] Default Select from periodicity.", &
238 usage=
"EN_SHIFT_TYPE [Select/Molecule/Crystal]", &
239 n_var=1, type_of_var=
char_t, default_c_val=
"Molecule")
249 SUBROUTINE create_dftb_parameter_section(section)
255 cpassert(.NOT.
ASSOCIATED(section))
258 description=
"Information on where to find DFTB parameters", &
259 n_keywords=1, n_subsections=0, repeats=.false.)
263 description=
"Define parameter file for atom pair", &
264 usage=
"SK_FILE a1 a2 filename", &
265 n_var=3, type_of_var=
char_t, repeats=.true.)
269 CALL keyword_create(keyword, __location__, name=
"PARAM_FILE_PATH", &
270 description=
"Specify the directory with the DFTB parameter files. "// &
271 "Used in combination with the filenames specified in the file "// &
272 "given in PARAM_FILE_NAME.", usage=
"PARAM_FILE_PATH pathname", &
273 n_var=1, type_of_var=
char_t, default_c_val=
"./")
277 CALL keyword_create(keyword, __location__, name=
"PARAM_FILE_NAME", &
278 description=
"Specify file that contains the names of "// &
279 "Slater-Koster tables: A plain text file, each line has the "// &
280 'format "ATOM1 ATOM2 filename.spl".', &
281 usage=
"PARAM_FILE_NAME filename", &
282 n_var=1, type_of_var=
char_t, default_c_val=
"")
286 CALL keyword_create(keyword, __location__, name=
"DISPERSION_TYPE", &
287 description=
"Use dispersion correction of the specified type."// &
288 " Dispersion correction has to be switched on in the DFTB section.", &
289 usage=
"DISPERSION_TYPE (UFF|D3|D3(BJ)|D2)", &
290 enum_c_vals=
s2a(
"UFF",
"D3",
"D3(BJ)",
"D2"), &
292 enum_desc=
s2a(
"Uses the UFF force field for a pair potential dispersion correction.", &
293 "Uses the Grimme D3 method (simplified) for a pair potential dispersion correction.", &
294 "Uses the Grimme D3 method (simplified) with Becke-Johnson attenuation.", &
295 "Uses the Grimme D2 method for pair potential dispersion correction."), &
300 CALL keyword_create(keyword, __location__, name=
"UFF_FORCE_FIELD", &
301 description=
"Name of file with UFF parameters that will be used "// &
302 "for the dispersion correction. Needs to be specified when "// &
303 "DISPERSION==.TRUE., otherwise cp2k crashes with a Segmentation "// &
304 "Fault.", usage=
"UFF_FORCE_FIELD filename", &
305 n_var=1, type_of_var=
char_t, default_c_val=
"")
309 CALL keyword_create(keyword, __location__, name=
"DISPERSION_PARAMETER_FILE", &
310 description=
"Specify file that contains the atomic dispersion "// &
311 "parameters for the D3 method", &
312 usage=
"DISPERSION_PARAMETER_FILE filename", &
313 n_var=1, type_of_var=
char_t, default_c_val=
"")
317 CALL keyword_create(keyword, __location__, name=
"DISPERSION_RADIUS", &
318 description=
"Define radius of dispersion interaction", &
319 usage=
"DISPERSION_RADIUS", default_r_val=15._dp)
323 CALL keyword_create(keyword, __location__, name=
"COORDINATION_CUTOFF", &
324 description=
"Define cutoff for coordination number calculation", &
325 usage=
"COORDINATION_CUTOFF", default_r_val=1.e-6_dp)
330 description=
"Scaling parameters (s6,sr6,s8) for the D3 dispersion method,", &
331 usage=
"D3_SCALING 1.0 1.0 1.0", n_var=3, default_r_vals=(/0.0_dp, 0.0_dp, 0.0_dp/))
336 description=
"Scaling parameters (s6,a1,s8,a2) for the D3(BJ) dispersion method,", &
337 usage=
"D3BJ_SCALING 1.0 1.0 1.0 1.0", n_var=4, &
338 default_r_vals=(/0.0_dp, 0.0_dp, 0.0_dp, 0.0_dp/))
343 description=
"Scaling parameter for the D2 dispersion method,", &
344 usage=
"D2_SCALING 1.0", default_r_val=1.0_dp)
349 description=
"Exp prefactor for damping for the D2 dispersion method,", &
350 usage=
"D2_EXP_PRE 2.0", default_r_val=2.0_dp)
355 description=
"Uses a modified version for the GAMMA within the SCC-DFTB scheme, "// &
356 "specifically tuned for hydrogen bonds. Specify the exponent used in the exponential.", &
357 usage=
"HB_SR_PARAM {real}", default_r_val=4.0_dp)
361 END SUBROUTINE create_dftb_parameter_section
367 SUBROUTINE create_xtb_parameter_section(section)
373 cpassert(.NOT.
ASSOCIATED(section))
376 description=
"Information on and where to find xTB parameters", &
377 n_keywords=1, n_subsections=0, repeats=.false.)
380 CALL keyword_create(keyword, __location__, name=
"PARAM_FILE_PATH", &
381 description=
"Specify the directory with the xTB parameter file. ", &
382 usage=
"PARAM_FILE_PATH pathname", &
383 n_var=1, type_of_var=
char_t, default_c_val=
"")
387 CALL keyword_create(keyword, __location__, name=
"PARAM_FILE_NAME", &
388 description=
"Specify file that contains all xTB default parameters. ", &
389 usage=
"PARAM_FILE_NAME filename", &
390 n_var=1, type_of_var=
char_t, default_c_val=
"xTB_parameters")
394 CALL keyword_create(keyword, __location__, name=
"DISPERSION_PARAMETER_FILE", &
395 description=
"Specify file that contains the atomic dispersion "// &
396 "parameters for the D3 method", &
397 usage=
"DISPERSION_PARAMETER_FILE filename", &
398 n_var=1, type_of_var=
char_t, default_c_val=
"dftd3.dat")
402 CALL keyword_create(keyword, __location__, name=
"DISPERSION_RADIUS", &
403 description=
"Define radius of dispersion interaction", &
404 usage=
"DISPERSION_RADIUS", default_r_val=15._dp)
408 CALL keyword_create(keyword, __location__, name=
"COORDINATION_CUTOFF", &
409 description=
"Define cutoff for coordination number calculation", &
410 usage=
"COORDINATION_CUTOFF", default_r_val=1.e-6_dp)
415 description=
"Scaling parameters (s6,s8) for the D3 dispersion method.", &
416 usage=
"D3BJ_SCALING 1.0 2.4", n_var=2, default_r_vals=(/1.0_dp, 2.4_dp/))
421 description=
"Becke-Johnson parameters (a1, a2 for the D3 dispersion method.", &
422 usage=
"D3BJ_PARAM 0.63 5.0", n_var=2, default_r_vals=(/0.63_dp, 5.0_dp/))
426 CALL keyword_create(keyword, __location__, name=
"HUCKEL_CONSTANTS", &
427 description=
"Huckel parameters (s, p, d, sp, 2sH).", &
428 usage=
"HUCKEL_CONSTANTS 1.85 2.25 2.00 2.08 2.85", n_var=5, &
429 default_r_vals=(/1.85_dp, 2.25_dp, 2.00_dp, 2.08_dp, 2.85_dp/))
433 CALL keyword_create(keyword, __location__, name=
"COULOMB_CONSTANTS", &
434 description=
"Scaling parameters for Coulomb interactions (electrons, nuclei).", &
435 usage=
"COULOMB_CONSTANTS 2.00 1.50", n_var=2, &
436 default_r_vals=(/2.00_dp, 1.50_dp/))
441 description=
"Scaling parameters for Coordination number correction term.", &
442 usage=
"CN_CONSTANTS 0.006 -0.003 -0.005", n_var=3, &
443 default_r_vals=(/0.006_dp, -0.003_dp, -0.005_dp/))
448 description=
"Scaling parameters for electronegativity correction term.", &
449 usage=
"EN_CONSTANTS -0.007 0.000 0.000", n_var=3, &
450 default_r_vals=(/-0.007_dp, 0.000_dp, 0.000_dp/))
455 description=
"Scaling parameter for electronegativity correction term.", &
456 usage=
"BEN_CONSTANT 4.0", n_var=1, &
457 default_r_val=4.0_dp)
462 description=
"Scaling parameter repulsive energy (dEN in exponential).", &
463 usage=
"ENSCALE 0.01", n_var=1, &
464 default_r_val=0.0_dp)
468 CALL keyword_create(keyword, __location__, name=
"HALOGEN_BINDING", &
469 description=
"Scaling parameters for electronegativity correction term.", &
470 usage=
"HALOGEN_BINDING 1.30 0.44", n_var=2, default_r_vals=(/1.30_dp, 0.44_dp/))
475 description=
"Specifies the specific Kab value for types A and B.", &
476 usage=
"KAB_PARAM kind1 kind2 value ", repeats=.true., &
477 n_var=-1, type_of_var=
char_t)
482 description=
"Specifies the radius [Bohr] of the XB pair interaction in xTB.", &
483 usage=
"XB_RADIUS 20.0 ", repeats=.false., &
484 n_var=1, default_r_val=20.0_dp)
488 CALL keyword_create(keyword, __location__, name=
"COULOMB_SR_CUT", &
489 description=
"Maximum range of short range part of Coulomb interaction.", &
490 usage=
"COULOMB_SR_CUT 20.0 ", repeats=.false., &
491 n_var=1, default_r_val=20.0_dp)
495 CALL keyword_create(keyword, __location__, name=
"COULOMB_SR_EPS", &
496 description=
"Cutoff for short range part of Coulomb interaction.", &
497 usage=
"COULOMB_SR_EPS 1.E-3 ", repeats=.false., &
498 n_var=1, default_r_val=1.0e-03_dp)
502 CALL keyword_create(keyword, __location__, name=
"SRB_PARAMETER", &
503 description=
"SRB parameters (ksrb, esrb, gscal, c1, c2, shift).", &
504 usage=
"SRB_PARAMETER -0.0129 3.48 0.51 -1.71 2.11 0.0537", n_var=6, &
505 default_r_vals=(/-0.0129_dp, 3.4847_dp, 0.5097_dp, &
506 -1.70549806_dp, 2.10878369_dp, 0.0537_dp/))
510 END SUBROUTINE create_xtb_parameter_section
515 SUBROUTINE create_xtb_nonbonded_section(section)
521 cpassert(.NOT.
ASSOCIATED(section))
523 description=
"This section specifies the input parameters for NON-BONDED interactions.", &
524 n_keywords=1, n_subsections=0, repeats=.false.)
533 description=
"Parameter used for computing the derivative with the Ridders' method.", &
534 usage=
"DX <REAL>", default_r_val=0.1_dp, unit_str=
"bohr")
539 description=
"Checks that the error in computing the derivative is not larger than "// &
540 "the value set; in case error is larger a warning message is printed.", &
541 usage=
"ERROR_LIMIT <REAL>", default_r_val=1.0e-12_dp)
545 END SUBROUTINE create_xtb_nonbonded_section
551 SUBROUTINE create_xtb_tblite_section(section)
556 cpassert(.NOT.
ASSOCIATED(section))
558 description=
"Section used to specify options for an xTB computation using tblite.", &
563 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
564 description=
"activates the execution via tblite", &
565 lone_keyword_l_val=.true., default_l_val=.false.)
571 description=
"Selection of the method used in tblite.", &
572 usage=
"METHOD (GFN1|GFN2|IPEA1)", &
573 enum_c_vals=
s2a(
"GFN1",
"GFN2",
"IPEA1"), &
575 enum_desc=
s2a(
"Uses the GFN1-XTB method by Grimme.", &
576 "Uses the GFN2-XTB method by Grimme.", &
577 "Uses the IEPEA1 method by Grimme."), &
582 END SUBROUTINE create_xtb_tblite_section
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public caldeweyher2020
integer, save, public caldeweyher2017
integer, save, public grimme2017
integer, save, public elstner1998
integer, save, public hu2007
integer, save, public asgeirsson2017
integer, save, public porezag1995
integer, save, public bannwarth2019
integer, save, public seifert1996
integer, save, public zhechkov2005
Defines the basic variable types.
integer, parameter, public dp
Utilities for string manipulations.