Line data Source code
1 : !--------------------------------------------------------------------------------------------------!
2 : ! CP2K: A general program to perform molecular dynamics simulations !
3 : ! Copyright 2000-2024 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 input_constants, ONLY: dispersion_d2,&
22 : dispersion_d3,&
23 : dispersion_d3bj,&
24 : dispersion_uff,&
25 : slater
26 : USE input_cp2k_mm, ONLY: create_GENPOT_section
27 : USE input_keyword_types, ONLY: keyword_create,&
28 : keyword_release,&
29 : keyword_type
30 : USE input_section_types, ONLY: section_add_keyword,&
31 : section_add_subsection,&
32 : section_create,&
33 : section_release,&
34 : section_type
35 : USE input_val_types, ONLY: char_t,&
36 : lchar_t
37 : USE kinds, ONLY: dp
38 : USE string_utilities, ONLY: newline,&
39 : s2a
40 : #include "./base/base_uses.f90"
41 :
42 : IMPLICIT NONE
43 : PRIVATE
44 :
45 : CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_tb'
46 :
47 : PUBLIC :: create_dftb_control_section, create_xtb_control_section
48 :
49 : CONTAINS
50 :
51 : ! **************************************************************************************************
52 : !> \brief ...
53 : !> \param section ...
54 : ! **************************************************************************************************
55 8444 : SUBROUTINE create_dftb_control_section(section)
56 : TYPE(section_type), POINTER :: section
57 :
58 : TYPE(keyword_type), POINTER :: keyword
59 : TYPE(section_type), POINTER :: subsection
60 :
61 8444 : CPASSERT(.NOT. ASSOCIATED(section))
62 : CALL section_create(section, __LOCATION__, name="DFTB", &
63 : description="Parameters needed to set up the DFTB methods", &
64 : n_keywords=1, n_subsections=1, repeats=.FALSE., &
65 42220 : citations=(/Porezag1995, Seifert1996, Elstner1998, Zhechkov2005/))
66 :
67 8444 : NULLIFY (subsection)
68 8444 : CALL create_dftb_parameter_section(subsection)
69 8444 : CALL section_add_subsection(section, subsection)
70 8444 : CALL section_release(subsection)
71 :
72 8444 : NULLIFY (keyword)
73 : CALL keyword_create(keyword, __LOCATION__, name="self_consistent", &
74 : description="Use self-consistent method", &
75 : citations=(/Elstner1998/), &
76 16888 : usage="SELF_CONSISTENT", default_l_val=.TRUE.)
77 8444 : CALL section_add_keyword(section, keyword)
78 8444 : CALL keyword_release(keyword)
79 :
80 : CALL keyword_create(keyword, __LOCATION__, name="orthogonal_basis", &
81 : description="Assume orthogonal basis set", &
82 8444 : usage="ORTHOGONAL_BASIS", default_l_val=.FALSE.)
83 8444 : CALL section_add_keyword(section, keyword)
84 8444 : CALL keyword_release(keyword)
85 :
86 : CALL keyword_create(keyword, __LOCATION__, name="do_ewald", &
87 : description="Use Ewald type method instead of direct sum for Coulomb interaction", &
88 8444 : usage="DO_EWALD", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
89 8444 : CALL section_add_keyword(section, keyword)
90 8444 : CALL keyword_release(keyword)
91 :
92 : CALL keyword_create(keyword, __LOCATION__, name="dispersion", &
93 : description="Use dispersion correction", &
94 : citations=(/Zhechkov2005/), lone_keyword_l_val=.TRUE., &
95 16888 : usage="DISPERSION", default_l_val=.FALSE.)
96 8444 : CALL section_add_keyword(section, keyword)
97 8444 : CALL keyword_release(keyword)
98 :
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 8444 : usage="DIAGONAL_DFTB3", default_l_val=.FALSE.)
103 8444 : CALL section_add_keyword(section, keyword)
104 8444 : CALL keyword_release(keyword)
105 :
106 : CALL keyword_create(keyword, __LOCATION__, name="HB_SR_GAMMA", &
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 16888 : usage="HB_SR_GAMMA", default_l_val=.FALSE.)
111 8444 : CALL section_add_keyword(section, keyword)
112 8444 : CALL keyword_release(keyword)
113 :
114 : CALL keyword_create(keyword, __LOCATION__, name="eps_disp", &
115 : description="Define accuracy of dispersion interaction", &
116 8444 : usage="EPS_DISP", default_r_val=0.0001_dp)
117 8444 : CALL section_add_keyword(section, keyword)
118 8444 : CALL keyword_release(keyword)
119 :
120 8444 : END SUBROUTINE create_dftb_control_section
121 :
122 : ! **************************************************************************************************
123 : !> \brief ...
124 : !> \param section ...
125 : ! **************************************************************************************************
126 8444 : SUBROUTINE create_xtb_control_section(section)
127 : TYPE(section_type), POINTER :: section
128 :
129 : TYPE(keyword_type), POINTER :: keyword
130 : TYPE(section_type), POINTER :: subsection
131 :
132 8444 : CPASSERT(.NOT. ASSOCIATED(section))
133 : CALL section_create(section, __LOCATION__, name="xTB", &
134 : description="Parameters needed to set up the xTB methods", &
135 : n_keywords=1, n_subsections=1, repeats=.FALSE., &
136 16888 : citations=(/GRIMME2017/))
137 :
138 8444 : NULLIFY (subsection)
139 8444 : CALL create_xtb_parameter_section(subsection)
140 8444 : CALL section_add_subsection(section, subsection)
141 8444 : CALL section_release(subsection)
142 :
143 8444 : CALL create_atom_parameter_section(subsection)
144 8444 : CALL section_add_subsection(section, subsection)
145 8444 : CALL section_release(subsection)
146 :
147 8444 : CALL create_xtb_nonbonded_section(subsection)
148 8444 : CALL section_add_subsection(section, subsection)
149 8444 : CALL section_release(subsection)
150 :
151 8444 : NULLIFY (keyword)
152 : CALL keyword_create(keyword, __LOCATION__, name="DO_EWALD", &
153 : description="Use Ewald type method instead of direct sum for Coulomb interaction", &
154 8444 : usage="DO_EWALD", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
155 8444 : CALL section_add_keyword(section, keyword)
156 8444 : CALL keyword_release(keyword)
157 :
158 : CALL keyword_create(keyword, __LOCATION__, name="STO_NG", &
159 : description="Provides the order of the Slater orbital expansion in GTOs.", &
160 8444 : usage="STO_NG", default_i_val=6)
161 8444 : CALL section_add_keyword(section, keyword)
162 8444 : CALL keyword_release(keyword)
163 :
164 : CALL keyword_create(keyword, __LOCATION__, name="HYDROGEN_STO_NG", &
165 : description="Number of GTOs for Hydrogen basis expansion.", &
166 8444 : usage="HYDROGEN_STO_NG", default_i_val=4)
167 8444 : CALL section_add_keyword(section, keyword)
168 8444 : CALL keyword_release(keyword)
169 :
170 : CALL keyword_create(keyword, __LOCATION__, name="USE_HALOGEN_CORRECTION", &
171 : description="Use XB interaction term", &
172 8444 : usage="USE_HALOGEN_CORRECTION T", default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
173 8444 : CALL section_add_keyword(section, keyword)
174 8444 : CALL keyword_release(keyword)
175 :
176 : CALL keyword_create(keyword, __LOCATION__, name="DO_NONBONDED", &
177 : description="Controls the computation of real-space "// &
178 : "(short-range) nonbonded interactions as correction to xTB.", &
179 8444 : usage="DO_NONBONDED T", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
180 8444 : CALL section_add_keyword(section, keyword)
181 8444 : CALL keyword_release(keyword)
182 :
183 : CALL keyword_create(keyword, __LOCATION__, name="COULOMB_INTERACTION", &
184 : description="Use Coulomb interaction terms (electrostatics + TB3); for debug only", &
185 8444 : usage="COULOMB_INTERACTION T", default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
186 8444 : CALL section_add_keyword(section, keyword)
187 8444 : CALL keyword_release(keyword)
188 :
189 : CALL keyword_create(keyword, __LOCATION__, name="COULOMB_LR", &
190 : description="Use Coulomb LR (1/r) interaction terms; for debug only", &
191 8444 : usage="COULOMB_LR T", default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
192 8444 : CALL section_add_keyword(section, keyword)
193 8444 : CALL keyword_release(keyword)
194 :
195 : CALL keyword_create(keyword, __LOCATION__, name="TB3_INTERACTION", &
196 : description="Use TB3 interaction terms; for debug only", &
197 8444 : usage="TB3_INTERACTION T", default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
198 8444 : CALL section_add_keyword(section, keyword)
199 8444 : CALL keyword_release(keyword)
200 :
201 : CALL keyword_create(keyword, __LOCATION__, name="CHECK_ATOMIC_CHARGES", &
202 : description="Stop calculation if atomic charges are outside chemical range.", &
203 8444 : usage="CHECK_ATOMIC_CHARGES T", default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
204 8444 : CALL section_add_keyword(section, keyword)
205 8444 : CALL keyword_release(keyword)
206 :
207 : CALL keyword_create(keyword, __LOCATION__, name="OLD_COULOMB_DAMPING", &
208 : description="Only use for backward compatability. Handle with extreme caution.", &
209 8444 : usage="OLD_COULOMB_DAMPING T", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
210 8444 : CALL section_add_keyword(section, keyword)
211 8444 : CALL keyword_release(keyword)
212 :
213 8444 : END SUBROUTINE create_xtb_control_section
214 :
215 : ! **************************************************************************************************
216 : !> \brief ...
217 : !> \param section ...
218 : ! **************************************************************************************************
219 8444 : SUBROUTINE create_dftb_parameter_section(section)
220 :
221 : TYPE(section_type), POINTER :: section
222 :
223 : TYPE(keyword_type), POINTER :: keyword
224 :
225 8444 : CPASSERT(.NOT. ASSOCIATED(section))
226 :
227 : CALL section_create(section, __LOCATION__, name="PARAMETER", &
228 : description="Information on where to find DFTB parameters", &
229 8444 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
230 :
231 8444 : NULLIFY (keyword)
232 : CALL keyword_create(keyword, __LOCATION__, name="SK_FILE", &
233 : description="Define parameter file for atom pair", &
234 : usage="SK_FILE a1 a2 filename", &
235 8444 : n_var=3, type_of_var=char_t, repeats=.TRUE.)
236 8444 : CALL section_add_keyword(section, keyword)
237 8444 : CALL keyword_release(keyword)
238 :
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 8444 : n_var=1, type_of_var=char_t, default_c_val="./")
244 8444 : CALL section_add_keyword(section, keyword)
245 8444 : CALL keyword_release(keyword)
246 :
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 8444 : n_var=1, type_of_var=char_t, default_c_val="")
253 8444 : CALL section_add_keyword(section, keyword)
254 8444 : CALL keyword_release(keyword)
255 :
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"), &
261 : enum_i_vals=(/dispersion_uff, dispersion_d3, dispersion_d3bj, dispersion_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."), &
266 8444 : default_i_val=dispersion_uff)
267 8444 : CALL section_add_keyword(section, keyword)
268 8444 : CALL keyword_release(keyword)
269 :
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 8444 : n_var=1, type_of_var=char_t, default_c_val="")
276 8444 : CALL section_add_keyword(section, keyword)
277 8444 : CALL keyword_release(keyword)
278 :
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 8444 : n_var=1, type_of_var=char_t, default_c_val="")
284 8444 : CALL section_add_keyword(section, keyword)
285 8444 : CALL keyword_release(keyword)
286 :
287 : CALL keyword_create(keyword, __LOCATION__, name="DISPERSION_RADIUS", &
288 : description="Define radius of dispersion interaction", &
289 8444 : usage="DISPERSION_RADIUS", default_r_val=15._dp)
290 8444 : CALL section_add_keyword(section, keyword)
291 8444 : CALL keyword_release(keyword)
292 :
293 : CALL keyword_create(keyword, __LOCATION__, name="COORDINATION_CUTOFF", &
294 : description="Define cutoff for coordination number calculation", &
295 8444 : usage="COORDINATION_CUTOFF", default_r_val=1.e-6_dp)
296 8444 : CALL section_add_keyword(section, keyword)
297 8444 : CALL keyword_release(keyword)
298 :
299 : CALL keyword_create(keyword, __LOCATION__, name="D3_SCALING", &
300 : description="Scaling parameters (s6,sr6,s8) for the D3 dispersion method,", &
301 8444 : usage="D3_SCALING 1.0 1.0 1.0", n_var=3, default_r_vals=(/0.0_dp, 0.0_dp, 0.0_dp/))
302 8444 : CALL section_add_keyword(section, keyword)
303 8444 : CALL keyword_release(keyword)
304 :
305 : CALL keyword_create(keyword, __LOCATION__, name="D3BJ_SCALING", &
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 8444 : default_r_vals=(/0.0_dp, 0.0_dp, 0.0_dp, 0.0_dp/))
309 8444 : CALL section_add_keyword(section, keyword)
310 8444 : CALL keyword_release(keyword)
311 :
312 : CALL keyword_create(keyword, __LOCATION__, name="D2_SCALING", &
313 : description="Scaling parameter for the D2 dispersion method,", &
314 8444 : usage="D2_SCALING 1.0", default_r_val=1.0_dp)
315 8444 : CALL section_add_keyword(section, keyword)
316 8444 : CALL keyword_release(keyword)
317 :
318 : CALL keyword_create(keyword, __LOCATION__, name="D2_EXP_PRE", &
319 : description="Exp prefactor for damping for the D2 dispersion method,", &
320 8444 : usage="EXP_PRE 2.0", default_r_val=2.0_dp)
321 8444 : CALL section_add_keyword(section, keyword)
322 8444 : CALL keyword_release(keyword)
323 :
324 : CALL keyword_create(keyword, __LOCATION__, name="HB_SR_PARAM", &
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 8444 : usage="HB_SR_PARAM {real}", default_r_val=4.0_dp)
328 8444 : CALL section_add_keyword(section, keyword)
329 8444 : CALL keyword_release(keyword)
330 :
331 8444 : END SUBROUTINE create_dftb_parameter_section
332 :
333 : ! **************************************************************************************************
334 : !> \brief ...
335 : !> \param section ...
336 : ! **************************************************************************************************
337 8444 : SUBROUTINE create_xtb_parameter_section(section)
338 :
339 : TYPE(section_type), POINTER :: section
340 :
341 : TYPE(keyword_type), POINTER :: keyword
342 :
343 8444 : CPASSERT(.NOT. ASSOCIATED(section))
344 :
345 : CALL section_create(section, __LOCATION__, name="PARAMETER", &
346 : description="Information on and where to find xTB parameters", &
347 8444 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
348 :
349 8444 : NULLIFY (keyword)
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 8444 : n_var=1, type_of_var=char_t, default_c_val="")
354 8444 : CALL section_add_keyword(section, keyword)
355 8444 : CALL keyword_release(keyword)
356 :
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 8444 : n_var=1, type_of_var=char_t, default_c_val="xTB_parameters")
361 8444 : CALL section_add_keyword(section, keyword)
362 8444 : CALL keyword_release(keyword)
363 :
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 8444 : n_var=1, type_of_var=char_t, default_c_val="dftd3.dat")
369 8444 : CALL section_add_keyword(section, keyword)
370 8444 : CALL keyword_release(keyword)
371 :
372 : CALL keyword_create(keyword, __LOCATION__, name="DISPERSION_RADIUS", &
373 : description="Define radius of dispersion interaction", &
374 8444 : usage="DISPERSION_RADIUS", default_r_val=15._dp)
375 8444 : CALL section_add_keyword(section, keyword)
376 8444 : CALL keyword_release(keyword)
377 :
378 : CALL keyword_create(keyword, __LOCATION__, name="COORDINATION_CUTOFF", &
379 : description="Define cutoff for coordination number calculation", &
380 8444 : usage="COORDINATION_CUTOFF", default_r_val=1.e-6_dp)
381 8444 : CALL section_add_keyword(section, keyword)
382 8444 : CALL keyword_release(keyword)
383 :
384 : CALL keyword_create(keyword, __LOCATION__, name="D3BJ_SCALING", &
385 : description="Scaling parameters (s6,s8) for the D3 dispersion method.", &
386 8444 : usage="D3BJ_SCALING 1.0 2.4", n_var=2, default_r_vals=(/1.0_dp, 2.4_dp/))
387 8444 : CALL section_add_keyword(section, keyword)
388 8444 : CALL keyword_release(keyword)
389 :
390 : CALL keyword_create(keyword, __LOCATION__, name="D3BJ_PARAM", &
391 : description="Becke-Johnson parameters (a1, a2 for the D3 dispersion method.", &
392 8444 : usage="D3BJ_PARAM 0.63 5.0", n_var=2, default_r_vals=(/0.63_dp, 5.0_dp/))
393 8444 : CALL section_add_keyword(section, keyword)
394 8444 : CALL keyword_release(keyword)
395 :
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 8444 : default_r_vals=(/1.85_dp, 2.25_dp, 2.00_dp, 2.08_dp, 2.85_dp/))
400 8444 : CALL section_add_keyword(section, keyword)
401 8444 : CALL keyword_release(keyword)
402 :
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 8444 : default_r_vals=(/2.00_dp, 1.50_dp/))
407 8444 : CALL section_add_keyword(section, keyword)
408 8444 : CALL keyword_release(keyword)
409 :
410 : CALL keyword_create(keyword, __LOCATION__, name="CN_CONSTANTS", &
411 : description="Scaling parameters for Coordination number correction term.", &
412 : usage="CN_CONSTANTS 0.006 -0.003 -0.005", n_var=3, &
413 8444 : default_r_vals=(/0.006_dp, -0.003_dp, -0.005_dp/))
414 8444 : CALL section_add_keyword(section, keyword)
415 8444 : CALL keyword_release(keyword)
416 :
417 : CALL keyword_create(keyword, __LOCATION__, name="EN_CONSTANT", &
418 : description="Scaling parameters for electronegativity correction term.", &
419 8444 : usage="EN_CONSTANT -0.007", n_var=1, default_r_val=-0.007_dp)
420 8444 : CALL section_add_keyword(section, keyword)
421 8444 : CALL keyword_release(keyword)
422 :
423 : CALL keyword_create(keyword, __LOCATION__, name="HALOGEN_BINDING", &
424 : description="Scaling parameters for electronegativity correction term.", &
425 8444 : usage="HALOGEN_BINDING 1.30 0.44", n_var=2, default_r_vals=(/1.30_dp, 0.44_dp/))
426 8444 : CALL section_add_keyword(section, keyword)
427 8444 : CALL keyword_release(keyword)
428 :
429 : CALL keyword_create(keyword, __LOCATION__, name="KAB_PARAM", &
430 : description="Specifies the specific Kab value for types A and B.", &
431 : usage="KAB_PARAM kind1 kind2 value ", repeats=.TRUE., &
432 8444 : n_var=-1, type_of_var=char_t)
433 8444 : CALL section_add_keyword(section, keyword)
434 8444 : CALL keyword_release(keyword)
435 :
436 : CALL keyword_create(keyword, __LOCATION__, name="XB_RADIUS", &
437 : description="Specifies the radius [Bohr] of the XB pair interaction in xTB.", &
438 : usage="XB_RADIUS 20.0 ", repeats=.FALSE., &
439 8444 : n_var=1, default_r_val=20.0_dp)
440 8444 : CALL section_add_keyword(section, keyword)
441 8444 : CALL keyword_release(keyword)
442 :
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 8444 : n_var=1, default_r_val=20.0_dp)
447 8444 : CALL section_add_keyword(section, keyword)
448 8444 : CALL keyword_release(keyword)
449 :
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 8444 : n_var=1, default_r_val=1.0E-03_dp)
454 8444 : CALL section_add_keyword(section, keyword)
455 8444 : CALL keyword_release(keyword)
456 :
457 8444 : END SUBROUTINE create_xtb_parameter_section
458 : ! **************************************************************************************************
459 : !> \brief ...
460 : !> \param section ...
461 : ! **************************************************************************************************
462 8444 : SUBROUTINE create_xtb_nonbonded_section(section)
463 : TYPE(section_type), POINTER :: section
464 :
465 : TYPE(keyword_type), POINTER :: keyword
466 : TYPE(section_type), POINTER :: subsection
467 :
468 8444 : CPASSERT(.NOT. ASSOCIATED(section))
469 : CALL section_create(section, __LOCATION__, name="NONBONDED", &
470 : description="This section specifies the input parameters for NON-BONDED interactions.", &
471 8444 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
472 8444 : NULLIFY (subsection)
473 :
474 8444 : CALL create_GENPOT_section(subsection)
475 8444 : CALL section_add_subsection(section, subsection)
476 8444 : CALL section_release(subsection)
477 :
478 8444 : NULLIFY (keyword)
479 : CALL keyword_create(keyword, __LOCATION__, name="DX", &
480 : description="Parameter used for computing the derivative with the Ridders' method.", &
481 8444 : usage="DX <REAL>", default_r_val=0.1_dp, unit_str="bohr")
482 8444 : CALL section_add_keyword(section, keyword)
483 8444 : CALL keyword_release(keyword)
484 :
485 : CALL keyword_create(keyword, __LOCATION__, name="ERROR_LIMIT", &
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 8444 : usage="ERROR_LIMIT <REAL>", default_r_val=1.0E-12_dp)
489 8444 : CALL section_add_keyword(section, keyword)
490 8444 : CALL keyword_release(keyword)
491 :
492 8444 : END SUBROUTINE create_xtb_nonbonded_section
493 : ! **************************************************************************************************
494 : !> \brief Creates the &ATOM_APRAMETER section
495 : !> \param section the section to create
496 : !> \author teo
497 : ! **************************************************************************************************
498 8444 : SUBROUTINE create_atom_parameter_section(section)
499 : TYPE(section_type), POINTER :: section
500 :
501 : TYPE(keyword_type), POINTER :: keyword
502 :
503 : CALL section_create(section, __LOCATION__, name="ATOM_PARAMETER", &
504 : description="Section used to specify a atom parameter set for xTB calclulations.", &
505 8444 : n_keywords=1, n_subsections=0, repeats=.TRUE.)
506 :
507 8444 : NULLIFY (keyword)
508 : CALL keyword_create( &
509 : keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
510 : repeats=.TRUE., type_of_var=lchar_t, &
511 : description="xTB atom parameters in standard format:"//newline//newline// &
512 : "```"//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// &
516 8444 : "```")
517 8444 : CALL section_add_keyword(section, keyword)
518 8444 : CALL keyword_release(keyword)
519 :
520 8444 : END SUBROUTINE create_atom_parameter_section
521 :
522 : END MODULE input_cp2k_tb
|