Line data Source code
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 dft section of the input
10 : !> \par History
11 : !> 10.2005 moved out of input_cp2k [fawzi]
12 : !> \author fawzi
13 : ! **************************************************************************************************
14 : MODULE input_cp2k_tb
15 : USE bibliography, ONLY: Elstner1998,&
16 : Grimme2017,&
17 : Hu2007,&
18 : Porezag1995,&
19 : Seifert1996,&
20 : Zhechkov2005
21 : USE eeq_input, ONLY: create_eeq_control_section
22 : USE input_constants, ONLY: dispersion_d2,&
23 : dispersion_d3,&
24 : dispersion_d3bj,&
25 : dispersion_uff,&
26 : gfn1xtb,&
27 : gfn2xtb,&
28 : ipea1xtb,&
29 : slater
30 : USE input_cp2k_mm, ONLY: create_GENPOT_section
31 : USE input_keyword_types, ONLY: keyword_create,&
32 : keyword_release,&
33 : keyword_type
34 : USE input_section_types, ONLY: section_add_keyword,&
35 : section_add_subsection,&
36 : section_create,&
37 : section_release,&
38 : section_type
39 : USE input_val_types, ONLY: char_t
40 : USE kinds, ONLY: dp
41 : USE string_utilities, ONLY: s2a
42 : #include "./base/base_uses.f90"
43 :
44 : IMPLICIT NONE
45 : PRIVATE
46 :
47 : CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_tb'
48 :
49 : PUBLIC :: create_dftb_control_section, create_xtb_control_section
50 :
51 : CONTAINS
52 :
53 : ! **************************************************************************************************
54 : !> \brief ...
55 : !> \param section ...
56 : ! **************************************************************************************************
57 9174 : SUBROUTINE create_dftb_control_section(section)
58 : TYPE(section_type), POINTER :: section
59 :
60 : TYPE(keyword_type), POINTER :: keyword
61 : TYPE(section_type), POINTER :: subsection
62 :
63 9174 : CPASSERT(.NOT. ASSOCIATED(section))
64 : CALL section_create(section, __LOCATION__, name="DFTB", &
65 : description="Parameters needed to set up the DFTB methods", &
66 : n_keywords=1, n_subsections=1, repeats=.FALSE., &
67 45870 : citations=(/Porezag1995, Seifert1996, Elstner1998, Zhechkov2005/))
68 :
69 9174 : NULLIFY (subsection)
70 9174 : CALL create_dftb_parameter_section(subsection)
71 9174 : CALL section_add_subsection(section, subsection)
72 9174 : CALL section_release(subsection)
73 :
74 9174 : NULLIFY (keyword)
75 : CALL keyword_create(keyword, __LOCATION__, name="self_consistent", &
76 : description="Use self-consistent method", &
77 : citations=(/Elstner1998/), &
78 18348 : usage="SELF_CONSISTENT", default_l_val=.TRUE.)
79 9174 : CALL section_add_keyword(section, keyword)
80 9174 : CALL keyword_release(keyword)
81 :
82 : CALL keyword_create(keyword, __LOCATION__, name="orthogonal_basis", &
83 : description="Assume orthogonal basis set", &
84 9174 : usage="ORTHOGONAL_BASIS", default_l_val=.FALSE.)
85 9174 : CALL section_add_keyword(section, keyword)
86 9174 : CALL keyword_release(keyword)
87 :
88 : CALL keyword_create(keyword, __LOCATION__, name="do_ewald", &
89 : description="Use Ewald type method instead of direct sum for Coulomb interaction", &
90 9174 : usage="DO_EWALD", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
91 9174 : CALL section_add_keyword(section, keyword)
92 9174 : CALL keyword_release(keyword)
93 :
94 : CALL keyword_create(keyword, __LOCATION__, name="dispersion", &
95 : description="Use dispersion correction", &
96 : citations=(/Zhechkov2005/), lone_keyword_l_val=.TRUE., &
97 18348 : usage="DISPERSION", default_l_val=.FALSE.)
98 9174 : CALL section_add_keyword(section, keyword)
99 9174 : CALL keyword_release(keyword)
100 :
101 : CALL keyword_create(keyword, __LOCATION__, name="DIAGONAL_DFTB3", &
102 : description="Use a diagonal version of the 3rd order energy correction (DFTB3) ", &
103 : lone_keyword_l_val=.TRUE., &
104 9174 : usage="DIAGONAL_DFTB3", default_l_val=.FALSE.)
105 9174 : CALL section_add_keyword(section, keyword)
106 9174 : CALL keyword_release(keyword)
107 :
108 : CALL keyword_create(keyword, __LOCATION__, name="HB_SR_GAMMA", &
109 : description="Uses a modified version for the GAMMA within the SCC-DFTB scheme, "// &
110 : "specifically tuned for hydrogen bonds.", &
111 : citations=(/Hu2007/), lone_keyword_l_val=.TRUE., &
112 18348 : usage="HB_SR_GAMMA", default_l_val=.FALSE.)
113 9174 : CALL section_add_keyword(section, keyword)
114 9174 : CALL keyword_release(keyword)
115 :
116 : CALL keyword_create(keyword, __LOCATION__, name="eps_disp", &
117 : description="Define accuracy of dispersion interaction", &
118 9174 : usage="EPS_DISP", default_r_val=0.0001_dp)
119 9174 : CALL section_add_keyword(section, keyword)
120 9174 : CALL keyword_release(keyword)
121 :
122 9174 : END SUBROUTINE create_dftb_control_section
123 :
124 : ! **************************************************************************************************
125 : !> \brief ...
126 : !> \param section ...
127 : ! **************************************************************************************************
128 9174 : SUBROUTINE create_xtb_control_section(section)
129 : TYPE(section_type), POINTER :: section
130 :
131 : TYPE(keyword_type), POINTER :: keyword
132 : TYPE(section_type), POINTER :: subsection
133 :
134 9174 : CPASSERT(.NOT. ASSOCIATED(section))
135 : CALL section_create(section, __LOCATION__, name="xTB", &
136 : description="Parameters needed to set up the xTB methods", &
137 : n_keywords=1, n_subsections=1, repeats=.FALSE., &
138 18348 : citations=(/GRIMME2017/))
139 :
140 9174 : NULLIFY (subsection)
141 9174 : CALL create_xtb_parameter_section(subsection)
142 9174 : CALL section_add_subsection(section, subsection)
143 9174 : CALL section_release(subsection)
144 :
145 9174 : CALL create_xtb_nonbonded_section(subsection)
146 9174 : CALL section_add_subsection(section, subsection)
147 9174 : CALL section_release(subsection)
148 :
149 9174 : CALL create_eeq_control_section(subsection)
150 9174 : CALL section_add_subsection(section, subsection)
151 9174 : CALL section_release(subsection)
152 :
153 9174 : CALL create_xtb_tblite_section(subsection)
154 9174 : CALL section_add_subsection(section, subsection)
155 9174 : CALL section_release(subsection)
156 :
157 9174 : NULLIFY (keyword)
158 : CALL keyword_create(keyword, __LOCATION__, name="GFN_TYPE", &
159 : description="Which GFN xTB method should be used.", &
160 9174 : usage="GFN_TYPE 1", default_i_val=1)
161 9174 : CALL section_add_keyword(section, keyword)
162 9174 : CALL keyword_release(keyword)
163 :
164 : CALL keyword_create(keyword, __LOCATION__, name="DO_EWALD", &
165 : description="Use Ewald type method instead of direct sum for Coulomb interaction", &
166 9174 : usage="DO_EWALD", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
167 9174 : CALL section_add_keyword(section, keyword)
168 9174 : CALL keyword_release(keyword)
169 :
170 : CALL keyword_create(keyword, __LOCATION__, name="STO_NG", &
171 : description="Provides the order of the Slater orbital expansion in GTOs.", &
172 9174 : usage="STO_NG 3", default_i_val=6)
173 9174 : CALL section_add_keyword(section, keyword)
174 9174 : CALL keyword_release(keyword)
175 :
176 : CALL keyword_create(keyword, __LOCATION__, name="HYDROGEN_STO_NG", &
177 : description="Number of GTOs for Hydrogen basis expansion.", &
178 9174 : usage="HYDROGEN_STO_NG 3", default_i_val=4)
179 9174 : CALL section_add_keyword(section, keyword)
180 9174 : CALL keyword_release(keyword)
181 :
182 : CALL keyword_create(keyword, __LOCATION__, name="USE_HALOGEN_CORRECTION", &
183 : description="Use XB interaction term", &
184 9174 : usage="USE_HALOGEN_CORRECTION T", default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
185 9174 : CALL section_add_keyword(section, keyword)
186 9174 : CALL keyword_release(keyword)
187 :
188 : CALL keyword_create(keyword, __LOCATION__, name="DO_NONBONDED", &
189 : description="Controls the computation of real-space "// &
190 : "(short-range) nonbonded interactions as correction to xTB.", &
191 9174 : usage="DO_NONBONDED T", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
192 9174 : CALL section_add_keyword(section, keyword)
193 9174 : CALL keyword_release(keyword)
194 :
195 : CALL keyword_create(keyword, __LOCATION__, name="VDW_POTENTIAL", &
196 : description="vdW potential to be used: NONE, DFTD3, DFTD4. "// &
197 : "Defaults: DFTD3(gfn1), DFTD4(gfn0, gfn2).", &
198 9174 : usage="VDW_POTENTIAL type", default_c_val="")
199 9174 : CALL section_add_keyword(section, keyword)
200 9174 : CALL keyword_release(keyword)
201 :
202 : CALL keyword_create(keyword, __LOCATION__, name="COULOMB_INTERACTION", &
203 : description="Use Coulomb interaction terms (electrostatics + TB3); for debug only", &
204 9174 : usage="COULOMB_INTERACTION T", default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
205 9174 : CALL section_add_keyword(section, keyword)
206 9174 : CALL keyword_release(keyword)
207 :
208 : CALL keyword_create(keyword, __LOCATION__, name="COULOMB_LR", &
209 : description="Use Coulomb LR (1/r) interaction terms; for debug only", &
210 9174 : usage="COULOMB_LR T", default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
211 9174 : CALL section_add_keyword(section, keyword)
212 9174 : CALL keyword_release(keyword)
213 :
214 : CALL keyword_create(keyword, __LOCATION__, name="TB3_INTERACTION", &
215 : description="Use TB3 interaction terms; for debug only", &
216 9174 : usage="TB3_INTERACTION T", default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
217 9174 : CALL section_add_keyword(section, keyword)
218 9174 : CALL keyword_release(keyword)
219 :
220 : CALL keyword_create(keyword, __LOCATION__, name="CHECK_ATOMIC_CHARGES", &
221 : description="Stop calculation if atomic charges are outside chemical range.", &
222 9174 : usage="CHECK_ATOMIC_CHARGES T", default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
223 9174 : CALL section_add_keyword(section, keyword)
224 9174 : CALL keyword_release(keyword)
225 :
226 : CALL keyword_create(keyword, __LOCATION__, name="VARIATIONAL_DIPOLE", &
227 : description="gfn0-xTB use dipole definition from energy derivative.", &
228 9174 : usage="VARIATIONAL_DIPOLE T", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
229 9174 : CALL section_add_keyword(section, keyword)
230 9174 : CALL keyword_release(keyword)
231 :
232 : CALL keyword_create(keyword, __LOCATION__, name="EPS_PAIRPOTENTIAL", &
233 : description="Accuracy for the repulsive pair potential.", &
234 9174 : usage="EPS_PAIRPOTENTIAL 1.0E-8", default_r_val=1.0e-10_dp)
235 9174 : CALL section_add_keyword(section, keyword)
236 9174 : CALL keyword_release(keyword)
237 :
238 : CALL keyword_create(keyword, __LOCATION__, name="EN_SHIFT_TYPE", &
239 : description="Shift function for electronegativity in EEQ method. "// &
240 : "[Select/Molecule/Crystal] Default Select from periodicity.", &
241 : usage="EN_SHIFT_TYPE [Select/Molecule/Crystal]", &
242 9174 : n_var=1, type_of_var=char_t, default_c_val="Molecule")
243 9174 : CALL section_add_keyword(section, keyword)
244 9174 : CALL keyword_release(keyword)
245 :
246 9174 : END SUBROUTINE create_xtb_control_section
247 :
248 : ! **************************************************************************************************
249 : !> \brief ...
250 : !> \param section ...
251 : ! **************************************************************************************************
252 9174 : SUBROUTINE create_dftb_parameter_section(section)
253 :
254 : TYPE(section_type), POINTER :: section
255 :
256 : TYPE(keyword_type), POINTER :: keyword
257 :
258 9174 : CPASSERT(.NOT. ASSOCIATED(section))
259 :
260 : CALL section_create(section, __LOCATION__, name="PARAMETER", &
261 : description="Information on where to find DFTB parameters", &
262 9174 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
263 :
264 9174 : NULLIFY (keyword)
265 : CALL keyword_create(keyword, __LOCATION__, name="SK_FILE", &
266 : description="Define parameter file for atom pair", &
267 : usage="SK_FILE a1 a2 filename", &
268 9174 : n_var=3, type_of_var=char_t, repeats=.TRUE.)
269 9174 : CALL section_add_keyword(section, keyword)
270 9174 : CALL keyword_release(keyword)
271 :
272 : CALL keyword_create(keyword, __LOCATION__, name="PARAM_FILE_PATH", &
273 : description="Specify the directory with the DFTB parameter files. "// &
274 : "Used in combination with the filenames specified in the file "// &
275 : "given in PARAM_FILE_NAME.", usage="PARAM_FILE_PATH pathname", &
276 9174 : n_var=1, type_of_var=char_t, default_c_val="./")
277 9174 : CALL section_add_keyword(section, keyword)
278 9174 : CALL keyword_release(keyword)
279 :
280 : CALL keyword_create(keyword, __LOCATION__, name="PARAM_FILE_NAME", &
281 : description="Specify file that contains the names of "// &
282 : "Slater-Koster tables: A plain text file, each line has the "// &
283 : 'format "ATOM1 ATOM2 filename.spl".', &
284 : usage="PARAM_FILE_NAME filename", &
285 9174 : n_var=1, type_of_var=char_t, default_c_val="")
286 9174 : CALL section_add_keyword(section, keyword)
287 9174 : CALL keyword_release(keyword)
288 :
289 : CALL keyword_create(keyword, __LOCATION__, name="DISPERSION_TYPE", &
290 : description="Use dispersion correction of the specified type."// &
291 : " Dispersion correction has to be switched on in the DFTB section.", &
292 : usage="DISPERSION_TYPE (UFF|D3|D3(BJ)|D2)", &
293 : enum_c_vals=s2a("UFF", "D3", "D3(BJ)", "D2"), &
294 : enum_i_vals=(/dispersion_uff, dispersion_d3, dispersion_d3bj, dispersion_d2/), &
295 : enum_desc=s2a("Uses the UFF force field for a pair potential dispersion correction.", &
296 : "Uses the Grimme D3 method (simplified) for a pair potential dispersion correction.", &
297 : "Uses the Grimme D3 method (simplified) with Becke-Johnson attenuation.", &
298 : "Uses the Grimme D2 method for pair potential dispersion correction."), &
299 9174 : default_i_val=dispersion_uff)
300 9174 : CALL section_add_keyword(section, keyword)
301 9174 : CALL keyword_release(keyword)
302 :
303 : CALL keyword_create(keyword, __LOCATION__, name="UFF_FORCE_FIELD", &
304 : description="Name of file with UFF parameters that will be used "// &
305 : "for the dispersion correction. Needs to be specified when "// &
306 : "DISPERSION==.TRUE., otherwise cp2k crashes with a Segmentation "// &
307 : "Fault.", usage="UFF_FORCE_FIELD filename", &
308 9174 : n_var=1, type_of_var=char_t, default_c_val="")
309 9174 : CALL section_add_keyword(section, keyword)
310 9174 : CALL keyword_release(keyword)
311 :
312 : CALL keyword_create(keyword, __LOCATION__, name="DISPERSION_PARAMETER_FILE", &
313 : description="Specify file that contains the atomic dispersion "// &
314 : "parameters for the D3 method", &
315 : usage="DISPERSION_PARAMETER_FILE filename", &
316 9174 : n_var=1, type_of_var=char_t, default_c_val="")
317 9174 : CALL section_add_keyword(section, keyword)
318 9174 : CALL keyword_release(keyword)
319 :
320 : CALL keyword_create(keyword, __LOCATION__, name="DISPERSION_RADIUS", &
321 : description="Define radius of dispersion interaction", &
322 9174 : usage="DISPERSION_RADIUS", default_r_val=15._dp)
323 9174 : CALL section_add_keyword(section, keyword)
324 9174 : CALL keyword_release(keyword)
325 :
326 : CALL keyword_create(keyword, __LOCATION__, name="COORDINATION_CUTOFF", &
327 : description="Define cutoff for coordination number calculation", &
328 9174 : usage="COORDINATION_CUTOFF", default_r_val=1.e-6_dp)
329 9174 : CALL section_add_keyword(section, keyword)
330 9174 : CALL keyword_release(keyword)
331 :
332 : CALL keyword_create(keyword, __LOCATION__, name="D3_SCALING", &
333 : description="Scaling parameters (s6,sr6,s8) for the D3 dispersion method,", &
334 9174 : usage="D3_SCALING 1.0 1.0 1.0", n_var=3, default_r_vals=(/0.0_dp, 0.0_dp, 0.0_dp/))
335 9174 : CALL section_add_keyword(section, keyword)
336 9174 : CALL keyword_release(keyword)
337 :
338 : CALL keyword_create(keyword, __LOCATION__, name="D3BJ_SCALING", &
339 : description="Scaling parameters (s6,a1,s8,a2) for the D3(BJ) dispersion method,", &
340 : usage="D3BJ_SCALING 1.0 1.0 1.0 1.0", n_var=4, &
341 9174 : default_r_vals=(/0.0_dp, 0.0_dp, 0.0_dp, 0.0_dp/))
342 9174 : CALL section_add_keyword(section, keyword)
343 9174 : CALL keyword_release(keyword)
344 :
345 : CALL keyword_create(keyword, __LOCATION__, name="D2_SCALING", &
346 : description="Scaling parameter for the D2 dispersion method,", &
347 9174 : usage="D2_SCALING 1.0", default_r_val=1.0_dp)
348 9174 : CALL section_add_keyword(section, keyword)
349 9174 : CALL keyword_release(keyword)
350 :
351 : CALL keyword_create(keyword, __LOCATION__, name="D2_EXP_PRE", &
352 : description="Exp prefactor for damping for the D2 dispersion method,", &
353 9174 : usage="D2_EXP_PRE 2.0", default_r_val=2.0_dp)
354 9174 : CALL section_add_keyword(section, keyword)
355 9174 : CALL keyword_release(keyword)
356 :
357 : CALL keyword_create(keyword, __LOCATION__, name="HB_SR_PARAM", &
358 : description="Uses a modified version for the GAMMA within the SCC-DFTB scheme, "// &
359 : "specifically tuned for hydrogen bonds. Specify the exponent used in the exponential.", &
360 9174 : usage="HB_SR_PARAM {real}", default_r_val=4.0_dp)
361 9174 : CALL section_add_keyword(section, keyword)
362 9174 : CALL keyword_release(keyword)
363 :
364 9174 : END SUBROUTINE create_dftb_parameter_section
365 :
366 : ! **************************************************************************************************
367 : !> \brief ...
368 : !> \param section ...
369 : ! **************************************************************************************************
370 9174 : SUBROUTINE create_xtb_parameter_section(section)
371 :
372 : TYPE(section_type), POINTER :: section
373 :
374 : TYPE(keyword_type), POINTER :: keyword
375 :
376 9174 : CPASSERT(.NOT. ASSOCIATED(section))
377 :
378 : CALL section_create(section, __LOCATION__, name="PARAMETER", &
379 : description="Information on and where to find xTB parameters", &
380 9174 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
381 :
382 9174 : NULLIFY (keyword)
383 : CALL keyword_create(keyword, __LOCATION__, name="PARAM_FILE_PATH", &
384 : description="Specify the directory with the xTB parameter file. ", &
385 : usage="PARAM_FILE_PATH pathname", &
386 9174 : n_var=1, type_of_var=char_t, default_c_val="")
387 9174 : CALL section_add_keyword(section, keyword)
388 9174 : CALL keyword_release(keyword)
389 :
390 : CALL keyword_create(keyword, __LOCATION__, name="PARAM_FILE_NAME", &
391 : description="Specify file that contains all xTB default parameters. ", &
392 : usage="PARAM_FILE_NAME filename", &
393 9174 : n_var=1, type_of_var=char_t, default_c_val="xTB_parameters")
394 9174 : CALL section_add_keyword(section, keyword)
395 9174 : CALL keyword_release(keyword)
396 :
397 : CALL keyword_create(keyword, __LOCATION__, name="DISPERSION_PARAMETER_FILE", &
398 : description="Specify file that contains the atomic dispersion "// &
399 : "parameters for the D3 method", &
400 : usage="DISPERSION_PARAMETER_FILE filename", &
401 9174 : n_var=1, type_of_var=char_t, default_c_val="dftd3.dat")
402 9174 : CALL section_add_keyword(section, keyword)
403 9174 : CALL keyword_release(keyword)
404 :
405 : CALL keyword_create(keyword, __LOCATION__, name="DISPERSION_RADIUS", &
406 : description="Define radius of dispersion interaction", &
407 9174 : usage="DISPERSION_RADIUS", default_r_val=15._dp)
408 9174 : CALL section_add_keyword(section, keyword)
409 9174 : CALL keyword_release(keyword)
410 :
411 : CALL keyword_create(keyword, __LOCATION__, name="COORDINATION_CUTOFF", &
412 : description="Define cutoff for coordination number calculation", &
413 9174 : usage="COORDINATION_CUTOFF", default_r_val=1.e-6_dp)
414 9174 : CALL section_add_keyword(section, keyword)
415 9174 : CALL keyword_release(keyword)
416 :
417 : CALL keyword_create(keyword, __LOCATION__, name="D3BJ_SCALING", &
418 : description="Scaling parameters (s6,s8) for the D3 dispersion method.", &
419 9174 : usage="D3BJ_SCALING 1.0 2.4", n_var=2, default_r_vals=(/1.0_dp, 2.4_dp/))
420 9174 : CALL section_add_keyword(section, keyword)
421 9174 : CALL keyword_release(keyword)
422 :
423 : CALL keyword_create(keyword, __LOCATION__, name="D3BJ_PARAM", &
424 : description="Becke-Johnson parameters (a1, a2 for the D3 dispersion method.", &
425 9174 : usage="D3BJ_PARAM 0.63 5.0", n_var=2, default_r_vals=(/0.63_dp, 5.0_dp/))
426 9174 : CALL section_add_keyword(section, keyword)
427 9174 : CALL keyword_release(keyword)
428 :
429 : CALL keyword_create(keyword, __LOCATION__, name="HUCKEL_CONSTANTS", &
430 : description="Huckel parameters (s, p, d, sp, 2sH).", &
431 : usage="HUCKEL_CONSTANTS 1.85 2.25 2.00 2.08 2.85", n_var=5, &
432 9174 : default_r_vals=(/1.85_dp, 2.25_dp, 2.00_dp, 2.08_dp, 2.85_dp/))
433 9174 : CALL section_add_keyword(section, keyword)
434 9174 : CALL keyword_release(keyword)
435 :
436 : CALL keyword_create(keyword, __LOCATION__, name="COULOMB_CONSTANTS", &
437 : description="Scaling parameters for Coulomb interactions (electrons, nuclei).", &
438 : usage="COULOMB_CONSTANTS 2.00 1.50", n_var=2, &
439 9174 : default_r_vals=(/2.00_dp, 1.50_dp/))
440 9174 : CALL section_add_keyword(section, keyword)
441 9174 : CALL keyword_release(keyword)
442 :
443 : CALL keyword_create(keyword, __LOCATION__, name="CN_CONSTANTS", &
444 : description="Scaling parameters for Coordination number correction term.", &
445 : usage="CN_CONSTANTS 0.006 -0.003 -0.005", n_var=3, &
446 9174 : default_r_vals=(/0.006_dp, -0.003_dp, -0.005_dp/))
447 9174 : CALL section_add_keyword(section, keyword)
448 9174 : CALL keyword_release(keyword)
449 :
450 : CALL keyword_create(keyword, __LOCATION__, name="EN_CONSTANTS", &
451 : description="Scaling parameters for electronegativity correction term.", &
452 : usage="EN_CONSTANTS -0.007 0.000 0.000", n_var=3, &
453 9174 : default_r_vals=(/-0.007_dp, 0.000_dp, 0.000_dp/))
454 9174 : CALL section_add_keyword(section, keyword)
455 9174 : CALL keyword_release(keyword)
456 :
457 : CALL keyword_create(keyword, __LOCATION__, name="BEN_CONSTANT", &
458 : description="Scaling parameter for electronegativity correction term.", &
459 : usage="BEN_CONSTANT 4.0", n_var=1, &
460 9174 : default_r_val=4.0_dp)
461 9174 : CALL section_add_keyword(section, keyword)
462 9174 : CALL keyword_release(keyword)
463 :
464 : CALL keyword_create(keyword, __LOCATION__, name="ENSCALE", &
465 : description="Scaling parameter repulsive energy (dEN in exponential).", &
466 : usage="ENSCALE 0.01", n_var=1, &
467 9174 : default_r_val=0.0_dp)
468 9174 : CALL section_add_keyword(section, keyword)
469 9174 : CALL keyword_release(keyword)
470 :
471 : CALL keyword_create(keyword, __LOCATION__, name="HALOGEN_BINDING", &
472 : description="Scaling parameters for electronegativity correction term.", &
473 9174 : usage="HALOGEN_BINDING 1.30 0.44", n_var=2, default_r_vals=(/1.30_dp, 0.44_dp/))
474 9174 : CALL section_add_keyword(section, keyword)
475 9174 : CALL keyword_release(keyword)
476 :
477 : CALL keyword_create(keyword, __LOCATION__, name="KAB_PARAM", &
478 : description="Specifies the specific Kab value for types A and B.", &
479 : usage="KAB_PARAM kind1 kind2 value ", repeats=.TRUE., &
480 9174 : n_var=-1, type_of_var=char_t)
481 9174 : CALL section_add_keyword(section, keyword)
482 9174 : CALL keyword_release(keyword)
483 :
484 : CALL keyword_create(keyword, __LOCATION__, name="XB_RADIUS", &
485 : description="Specifies the radius [Bohr] of the XB pair interaction in xTB.", &
486 : usage="XB_RADIUS 20.0 ", repeats=.FALSE., &
487 9174 : n_var=1, default_r_val=20.0_dp)
488 9174 : CALL section_add_keyword(section, keyword)
489 9174 : CALL keyword_release(keyword)
490 :
491 : CALL keyword_create(keyword, __LOCATION__, name="COULOMB_SR_CUT", &
492 : description="Maximum range of short range part of Coulomb interaction.", &
493 : usage="COULOMB_SR_CUT 20.0 ", repeats=.FALSE., &
494 9174 : n_var=1, default_r_val=20.0_dp)
495 9174 : CALL section_add_keyword(section, keyword)
496 9174 : CALL keyword_release(keyword)
497 :
498 : CALL keyword_create(keyword, __LOCATION__, name="COULOMB_SR_EPS", &
499 : description="Cutoff for short range part of Coulomb interaction.", &
500 : usage="COULOMB_SR_EPS 1.E-3 ", repeats=.FALSE., &
501 9174 : n_var=1, default_r_val=1.0E-03_dp)
502 9174 : CALL section_add_keyword(section, keyword)
503 9174 : CALL keyword_release(keyword)
504 :
505 : CALL keyword_create(keyword, __LOCATION__, name="SRB_PARAMETER", &
506 : description="SRB parameters (ksrb, esrb, gscal, c1, c2, shift).", &
507 : usage="SRB_PARAMETER -0.0129 3.48 0.51 -1.71 2.11 0.0537", n_var=6, &
508 : default_r_vals=(/-0.0129_dp, 3.4847_dp, 0.5097_dp, &
509 9174 : -1.70549806_dp, 2.10878369_dp, 0.0537_dp/))
510 9174 : CALL section_add_keyword(section, keyword)
511 9174 : CALL keyword_release(keyword)
512 :
513 9174 : END SUBROUTINE create_xtb_parameter_section
514 : ! **************************************************************************************************
515 : !> \brief ...
516 : !> \param section ...
517 : ! **************************************************************************************************
518 9174 : SUBROUTINE create_xtb_nonbonded_section(section)
519 : TYPE(section_type), POINTER :: section
520 :
521 : TYPE(keyword_type), POINTER :: keyword
522 : TYPE(section_type), POINTER :: subsection
523 :
524 9174 : CPASSERT(.NOT. ASSOCIATED(section))
525 : CALL section_create(section, __LOCATION__, name="NONBONDED", &
526 : description="This section specifies the input parameters for NON-BONDED interactions.", &
527 9174 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
528 9174 : NULLIFY (subsection)
529 :
530 9174 : CALL create_GENPOT_section(subsection)
531 9174 : CALL section_add_subsection(section, subsection)
532 9174 : CALL section_release(subsection)
533 :
534 9174 : NULLIFY (keyword)
535 : CALL keyword_create(keyword, __LOCATION__, name="DX", &
536 : description="Parameter used for computing the derivative with the Ridders' method.", &
537 9174 : usage="DX <REAL>", default_r_val=0.1_dp, unit_str="bohr")
538 9174 : CALL section_add_keyword(section, keyword)
539 9174 : CALL keyword_release(keyword)
540 :
541 : CALL keyword_create(keyword, __LOCATION__, name="ERROR_LIMIT", &
542 : description="Checks that the error in computing the derivative is not larger than "// &
543 : "the value set; in case error is larger a warning message is printed.", &
544 9174 : usage="ERROR_LIMIT <REAL>", default_r_val=1.0E-12_dp)
545 9174 : CALL section_add_keyword(section, keyword)
546 9174 : CALL keyword_release(keyword)
547 :
548 9174 : END SUBROUTINE create_xtb_nonbonded_section
549 : ! **************************************************************************************************
550 : !> \brief Creates the &TBLITE section
551 : !> \param section the section to create
552 : !> \author JVP
553 : ! **************************************************************************************************
554 9174 : SUBROUTINE create_xtb_tblite_section(section)
555 : TYPE(section_type), POINTER :: section
556 :
557 : TYPE(keyword_type), POINTER :: keyword
558 :
559 9174 : CPASSERT(.NOT. ASSOCIATED(section))
560 : CALL section_create(section, __LOCATION__, name="TBLITE", &
561 : description="Section used to specify options for an xTB computation using tblite.", &
562 9174 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
563 :
564 9174 : NULLIFY (keyword)
565 : CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
566 : description="activates the execution via tblite", &
567 9174 : lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
568 9174 : CALL section_add_keyword(section, keyword)
569 9174 : CALL keyword_release(keyword)
570 :
571 9174 : NULLIFY (keyword)
572 : CALL keyword_create(keyword, __LOCATION__, name="METHOD", &
573 : description="Selection of the method used in tblite.", &
574 : usage="METHOD (GFN1|GFN2|IPEA1)", &
575 : enum_c_vals=s2a("GFN1", "GFN2", "IPEA1"), &
576 : enum_i_vals=(/gfn1xtb, gfn2xtb, ipea1xtb/), &
577 : enum_desc=s2a("Uses the GFN1-XTB method by Grimme.", &
578 : "Uses the GFN2-XTB method by Grimme.", &
579 : "Uses the IEPEA1 method by Grimme."), &
580 9174 : default_i_val=gfn2xtb)
581 9174 : CALL section_add_keyword(section, keyword)
582 9174 : CALL keyword_release(keyword)
583 :
584 9174 : END SUBROUTINE create_xtb_tblite_section
585 :
586 : END MODULE input_cp2k_tb
|