40 #include "./base/base_uses.f90"
45 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_tb'
56 TYPE(section_type),
POINTER :: section
58 TYPE(keyword_type),
POINTER :: keyword
59 TYPE(section_type),
POINTER :: subsection
61 cpassert(.NOT.
ASSOCIATED(section))
63 description=
"Parameters needed to set up the DFTB methods", &
64 n_keywords=1, n_subsections=1, repeats=.false., &
68 CALL create_dftb_parameter_section(subsection)
73 CALL keyword_create(keyword, __location__, name=
"self_consistent", &
74 description=
"Use self-consistent method", &
76 usage=
"SELF_CONSISTENT", default_l_val=.true.)
80 CALL keyword_create(keyword, __location__, name=
"orthogonal_basis", &
81 description=
"Assume orthogonal basis set", &
82 usage=
"ORTHOGONAL_BASIS", default_l_val=.false.)
87 description=
"Use Ewald type method instead of direct sum for Coulomb interaction", &
88 usage=
"DO_EWALD", default_l_val=.false., lone_keyword_l_val=.true.)
93 description=
"Use dispersion correction", &
95 usage=
"DISPERSION", default_l_val=.false.)
99 CALL keyword_create(keyword, __location__, name=
"DIAGONAL_DFTB3", &
100 description=
"Use a diagonal version of the 3rd order energy correction (DFTB3) ", &
101 lone_keyword_l_val=.true., &
102 usage=
"DIAGONAL_DFTB3", default_l_val=.false.)
107 description=
"Uses a modified version for the GAMMA within the SCC-DFTB scheme, "// &
108 "specifically tuned for hydrogen bonds.", &
109 citations=(/
hu2007/), lone_keyword_l_val=.true., &
110 usage=
"HB_SR_GAMMA", default_l_val=.false.)
115 description=
"Define accuracy of dispersion interaction", &
116 usage=
"EPS_DISP", default_r_val=0.0001_dp)
127 TYPE(section_type),
POINTER :: section
129 TYPE(keyword_type),
POINTER :: keyword
130 TYPE(section_type),
POINTER :: subsection
132 cpassert(.NOT.
ASSOCIATED(section))
134 description=
"Parameters needed to set up the xTB methods", &
135 n_keywords=1, n_subsections=1, repeats=.false., &
139 CALL create_xtb_parameter_section(subsection)
143 CALL create_atom_parameter_section(subsection)
147 CALL create_xtb_nonbonded_section(subsection)
153 description=
"Use Ewald type method instead of direct sum for Coulomb interaction", &
154 usage=
"DO_EWALD", default_l_val=.false., lone_keyword_l_val=.true.)
159 description=
"Provides the order of the Slater orbital expansion in GTOs.", &
160 usage=
"STO_NG", default_i_val=6)
164 CALL keyword_create(keyword, __location__, name=
"HYDROGEN_STO_NG", &
165 description=
"Number of GTOs for Hydrogen basis expansion.", &
166 usage=
"HYDROGEN_STO_NG", default_i_val=4)
170 CALL keyword_create(keyword, __location__, name=
"USE_HALOGEN_CORRECTION", &
171 description=
"Use XB interaction term", &
172 usage=
"USE_HALOGEN_CORRECTION T", default_l_val=.true., lone_keyword_l_val=.true.)
177 description=
"Controls the computation of real-space "// &
178 "(short-range) nonbonded interactions as correction to xTB.", &
179 usage=
"DO_NONBONDED T", default_l_val=.false., lone_keyword_l_val=.true.)
183 CALL keyword_create(keyword, __location__, name=
"COULOMB_INTERACTION", &
184 description=
"Use Coulomb interaction terms (electrostatics + TB3); for debug only", &
185 usage=
"COULOMB_INTERACTION T", default_l_val=.true., lone_keyword_l_val=.true.)
190 description=
"Use Coulomb LR (1/r) interaction terms; for debug only", &
191 usage=
"COULOMB_LR T", default_l_val=.true., lone_keyword_l_val=.true.)
195 CALL keyword_create(keyword, __location__, name=
"TB3_INTERACTION", &
196 description=
"Use TB3 interaction terms; for debug only", &
197 usage=
"TB3_INTERACTION T", default_l_val=.true., lone_keyword_l_val=.true.)
201 CALL keyword_create(keyword, __location__, name=
"CHECK_ATOMIC_CHARGES", &
202 description=
"Stop calculation if atomic charges are outside chemical range.", &
203 usage=
"CHECK_ATOMIC_CHARGES T", default_l_val=.true., lone_keyword_l_val=.true.)
207 CALL keyword_create(keyword, __location__, name=
"OLD_COULOMB_DAMPING", &
208 description=
"Only use for backward compatability. Handle with extreme caution.", &
209 usage=
"OLD_COULOMB_DAMPING T", default_l_val=.false., lone_keyword_l_val=.true.)
219 SUBROUTINE create_dftb_parameter_section(section)
221 TYPE(section_type),
POINTER :: section
223 TYPE(keyword_type),
POINTER :: keyword
225 cpassert(.NOT.
ASSOCIATED(section))
228 description=
"Information on where to find DFTB parameters", &
229 n_keywords=1, n_subsections=0, repeats=.false.)
233 description=
"Define parameter file for atom pair", &
234 usage=
"SK_FILE a1 a2 filename", &
235 n_var=3, type_of_var=
char_t, repeats=.true.)
239 CALL keyword_create(keyword, __location__, name=
"PARAM_FILE_PATH", &
240 description=
"Specify the directory with the DFTB parameter files. "// &
241 "Used in combination with the filenames specified in the file "// &
242 "given in PARAM_FILE_NAME.", usage=
"PARAM_FILE_PATH pathname", &
243 n_var=1, type_of_var=
char_t, default_c_val=
"./")
247 CALL keyword_create(keyword, __location__, name=
"PARAM_FILE_NAME", &
248 description=
"Specify file that contains the names of "// &
249 "Slater-Koster tables: A plain text file, each line has the "// &
250 'format "ATOM1 ATOM2 filename.spl".', &
251 usage=
"PARAM_FILE_NAME filename", &
252 n_var=1, type_of_var=
char_t, default_c_val=
"")
256 CALL keyword_create(keyword, __location__, name=
"DISPERSION_TYPE", &
257 description=
"Use dispersion correction of the specified type."// &
258 " Dispersion correction has to be switched on in the DFTB section.", &
259 usage=
"DISPERSION_TYPE (UFF|D3|D3(BJ)|D2)", &
260 enum_c_vals=s2a(
"UFF",
"D3",
"D3(BJ)",
"D2"), &
262 enum_desc=s2a(
"Uses the UFF force field for a pair potential dispersion correction.", &
263 "Uses the Grimme D3 method (simplified) for a pair potential dispersion correction.", &
264 "Uses the Grimme D3 method (simplified) with Becke-Johnson attenuation.", &
265 "Uses the Grimme D2 method for pair potential dispersion correction."), &
270 CALL keyword_create(keyword, __location__, name=
"UFF_FORCE_FIELD", &
271 description=
"Name of file with UFF parameters that will be used "// &
272 "for the dispersion correction. Needs to be specified when "// &
273 "DISPERSION==.TRUE., otherwise cp2k crashes with a Segmentation "// &
274 "Fault.", usage=
"UFF_FORCE_FIELD filename", &
275 n_var=1, type_of_var=
char_t, default_c_val=
"")
279 CALL keyword_create(keyword, __location__, name=
"DISPERSION_PARAMETER_FILE", &
280 description=
"Specify file that contains the atomic dispersion "// &
281 "parameters for the D3 method", &
282 usage=
"DISPERSION_PARAMETER_FILE filename", &
283 n_var=1, type_of_var=
char_t, default_c_val=
"")
287 CALL keyword_create(keyword, __location__, name=
"DISPERSION_RADIUS", &
288 description=
"Define radius of dispersion interaction", &
289 usage=
"DISPERSION_RADIUS", default_r_val=15._dp)
293 CALL keyword_create(keyword, __location__, name=
"COORDINATION_CUTOFF", &
294 description=
"Define cutoff for coordination number calculation", &
295 usage=
"COORDINATION_CUTOFF", default_r_val=1.e-6_dp)
300 description=
"Scaling parameters (s6,sr6,s8) for the D3 dispersion method,", &
301 usage=
"D3_SCALING 1.0 1.0 1.0", n_var=3, default_r_vals=(/0.0_dp, 0.0_dp, 0.0_dp/))
306 description=
"Scaling parameters (s6,a1,s8,a2) for the D3(BJ) dispersion method,", &
307 usage=
"D3BJ_SCALING 1.0 1.0 1.0 1.0", n_var=4, &
308 default_r_vals=(/0.0_dp, 0.0_dp, 0.0_dp, 0.0_dp/))
313 description=
"Scaling parameter for the D2 dispersion method,", &
314 usage=
"D2_SCALING 1.0", default_r_val=1.0_dp)
319 description=
"Exp prefactor for damping for the D2 dispersion method,", &
320 usage=
"EXP_PRE 2.0", default_r_val=2.0_dp)
325 description=
"Uses a modified version for the GAMMA within the SCC-DFTB scheme, "// &
326 "specifically tuned for hydrogen bonds. Specify the exponent used in the exponential.", &
327 usage=
"HB_SR_PARAM {real}", default_r_val=4.0_dp)
331 END SUBROUTINE create_dftb_parameter_section
337 SUBROUTINE create_xtb_parameter_section(section)
339 TYPE(section_type),
POINTER :: section
341 TYPE(keyword_type),
POINTER :: keyword
343 cpassert(.NOT.
ASSOCIATED(section))
346 description=
"Information on and where to find xTB parameters", &
347 n_keywords=1, n_subsections=0, repeats=.false.)
350 CALL keyword_create(keyword, __location__, name=
"PARAM_FILE_PATH", &
351 description=
"Specify the directory with the xTB parameter file. ", &
352 usage=
"PARAM_FILE_PATH pathname", &
353 n_var=1, type_of_var=
char_t, default_c_val=
"")
357 CALL keyword_create(keyword, __location__, name=
"PARAM_FILE_NAME", &
358 description=
"Specify file that contains all xTB default parameters. ", &
359 usage=
"PARAM_FILE_NAME filename", &
360 n_var=1, type_of_var=
char_t, default_c_val=
"xTB_parameters")
364 CALL keyword_create(keyword, __location__, name=
"DISPERSION_PARAMETER_FILE", &
365 description=
"Specify file that contains the atomic dispersion "// &
366 "parameters for the D3 method", &
367 usage=
"DISPERSION_PARAMETER_FILE filename", &
368 n_var=1, type_of_var=
char_t, default_c_val=
"dftd3.dat")
372 CALL keyword_create(keyword, __location__, name=
"DISPERSION_RADIUS", &
373 description=
"Define radius of dispersion interaction", &
374 usage=
"DISPERSION_RADIUS", default_r_val=15._dp)
378 CALL keyword_create(keyword, __location__, name=
"COORDINATION_CUTOFF", &
379 description=
"Define cutoff for coordination number calculation", &
380 usage=
"COORDINATION_CUTOFF", default_r_val=1.e-6_dp)
385 description=
"Scaling parameters (s6,s8) for the D3 dispersion method.", &
386 usage=
"D3BJ_SCALING 1.0 2.4", n_var=2, default_r_vals=(/1.0_dp, 2.4_dp/))
391 description=
"Becke-Johnson parameters (a1, a2 for the D3 dispersion method.", &
392 usage=
"D3BJ_PARAM 0.63 5.0", n_var=2, default_r_vals=(/0.63_dp, 5.0_dp/))
396 CALL keyword_create(keyword, __location__, name=
"HUCKEL_CONSTANTS", &
397 description=
"Huckel parameters (s, p, d, sp, 2sH).", &
398 usage=
"HUCKEL_CONSTANTS 1.85 2.25 2.00 2.08 2.85", n_var=5, &
399 default_r_vals=(/1.85_dp, 2.25_dp, 2.00_dp, 2.08_dp, 2.85_dp/))
403 CALL keyword_create(keyword, __location__, name=
"COULOMB_CONSTANTS", &
404 description=
"Scaling parameters for Coulomb interactions (electrons, nuclei).", &
405 usage=
"COULOMB_CONSTANTS 2.00 1.50", n_var=2, &
406 default_r_vals=(/2.00_dp, 1.50_dp/))
411 description=
"Scaling parameters for Coordination number correction term.", &
412 usage=
"CN_CONSTANTS 0.006 -0.003 -0.005", n_var=3, &
413 default_r_vals=(/0.006_dp, -0.003_dp, -0.005_dp/))
418 description=
"Scaling parameters for electronegativity correction term.", &
419 usage=
"EN_CONSTANT -0.007", n_var=1, default_r_val=-0.007_dp)
423 CALL keyword_create(keyword, __location__, name=
"HALOGEN_BINDING", &
424 description=
"Scaling parameters for electronegativity correction term.", &
425 usage=
"HALOGEN_BINDING 1.30 0.44", n_var=2, default_r_vals=(/1.30_dp, 0.44_dp/))
430 description=
"Specifies the specific Kab value for types A and B.", &
431 usage=
"KAB_PARAM kind1 kind2 value ", repeats=.true., &
432 n_var=-1, type_of_var=
char_t)
437 description=
"Specifies the radius [Bohr] of the XB pair interaction in xTB.", &
438 usage=
"XB_RADIUS 20.0 ", repeats=.false., &
439 n_var=1, default_r_val=20.0_dp)
443 CALL keyword_create(keyword, __location__, name=
"COULOMB_SR_CUT", &
444 description=
"Maximum range of short range part of Coulomb interaction.", &
445 usage=
"COULOMB_SR_CUT 20.0 ", repeats=.false., &
446 n_var=1, default_r_val=20.0_dp)
450 CALL keyword_create(keyword, __location__, name=
"COULOMB_SR_EPS", &
451 description=
"Cutoff for short range part of Coulomb interaction.", &
452 usage=
"COULOMB_SR_EPS 1.E-3 ", repeats=.false., &
453 n_var=1, default_r_val=1.0e-03_dp)
457 END SUBROUTINE create_xtb_parameter_section
462 SUBROUTINE create_xtb_nonbonded_section(section)
463 TYPE(section_type),
POINTER :: section
465 TYPE(keyword_type),
POINTER :: keyword
466 TYPE(section_type),
POINTER :: subsection
468 cpassert(.NOT.
ASSOCIATED(section))
470 description=
"This section specifies the input parameters for NON-BONDED interactions.", &
471 n_keywords=1, n_subsections=0, repeats=.false.)
480 description=
"Parameter used for computing the derivative with the Ridders' method.", &
481 usage=
"DX <REAL>", default_r_val=0.1_dp, unit_str=
"bohr")
486 description=
"Checks that the error in computing the derivative is not larger than "// &
487 "the value set; in case error is larger a warning message is printed.", &
488 usage=
"ERROR_LIMIT <REAL>", default_r_val=1.0e-12_dp)
492 END SUBROUTINE create_xtb_nonbonded_section
498 SUBROUTINE create_atom_parameter_section(section)
499 TYPE(section_type),
POINTER :: section
501 TYPE(keyword_type),
POINTER :: keyword
503 CALL section_create(section, __location__, name=
"ATOM_PARAMETER", &
504 description=
"Section used to specify a atom parameter set for xTB calclulations.", &
505 n_keywords=1, n_subsections=0, repeats=.true.)
509 keyword, __location__, name=
"_DEFAULT_KEYWORD_", &
510 repeats=.true., type_of_var=
lchar_t, &
511 description=
"xTB atom parameters in standard format:"//
newline//
newline// &
513 "Element symbol eta gamma alpha Zeff label kpoly kappa Hen zeta"//
newline// &
514 "nshell repeat the following block of lines)"//
newline// &
515 "label kpoly kappa Hen zeta"//
newline// &
520 END SUBROUTINE create_atom_parameter_section
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public grimme2017
integer, save, public elstner1998
integer, save, public hu2007
integer, save, public porezag1995
integer, save, public seifert1996
integer, save, public zhechkov2005
Defines the basic variable types.
integer, parameter, public dp
Utilities for string manipulations.
character(len=1), parameter, public newline