Line data Source code
1 : !--------------------------------------------------------------------------------------------------!
2 : ! CP2K: A general program to perform molecular dynamics simulations !
3 : ! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
4 : ! !
5 : ! SPDX-License-Identifier: GPL-2.0-or-later !
6 : !--------------------------------------------------------------------------------------------------!
7 :
8 : ! **************************************************************************************************
9 : !> \brief creates the mm section of the input
10 : !> \note
11 : !> moved out of input_cp2k
12 : !> \par History
13 : !> 04.2004 created
14 : !> \author fawzi
15 : ! **************************************************************************************************
16 : MODULE input_cp2k_mm
17 : USE bibliography, ONLY: &
18 : Batzner2022, Bochkarev2024, Clabaut2020, Clabaut2021, Devynck2012, Dick1958, Drautz2019, &
19 : Foiles1986, Lysogorskiy2021, Mitchell1993, Musaelian2023, Siepmann1995, Tan2025, &
20 : Tersoff1988, Tosi1964a, Tosi1964b, Wang2018, Yamada2000, Zeng2023
21 : USE cp_output_handling, ONLY: cp_print_key_section_create,&
22 : debug_print_level,&
23 : high_print_level,&
24 : low_print_level,&
25 : medium_print_level,&
26 : silent_print_level
27 : USE cp_units, ONLY: cp_unit_to_cp2k
28 : USE force_field_kind_types, ONLY: &
29 : do_ff_amber, do_ff_charmm, do_ff_cubic, do_ff_fues, do_ff_g87, do_ff_g96, do_ff_harmonic, &
30 : do_ff_legendre, do_ff_mixed_bend_stretch, do_ff_mm2, do_ff_mm3, do_ff_mm4, do_ff_morse, &
31 : do_ff_opls, do_ff_quartic, do_ff_undef
32 : USE fparser, ONLY: docf
33 : USE input_constants, ONLY: use_mom_ref_coac,&
34 : use_mom_ref_com,&
35 : use_mom_ref_user,&
36 : use_mom_ref_zero
37 : USE input_cp2k_field, ONLY: create_per_efield_section
38 : USE input_cp2k_poisson, ONLY: create_poisson_section
39 : USE input_keyword_types, ONLY: keyword_create,&
40 : keyword_release,&
41 : keyword_type
42 : USE input_section_types, ONLY: section_add_keyword,&
43 : section_add_subsection,&
44 : section_create,&
45 : section_release,&
46 : section_type
47 : USE input_val_types, ONLY: char_t,&
48 : integer_t,&
49 : lchar_t,&
50 : real_t
51 : USE kinds, ONLY: default_string_length,&
52 : dp
53 : USE string_utilities, ONLY: newline,&
54 : s2a
55 : #include "./base/base_uses.f90"
56 :
57 : IMPLICIT NONE
58 : PRIVATE
59 :
60 : LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .TRUE.
61 : CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_mm'
62 :
63 : PUBLIC :: create_mm_section, create_dipoles_section
64 : PUBLIC :: create_NONBONDED14_section, create_LJ_section, create_Williams_section, &
65 : create_Goodwin_section, &
66 : create_GENPOT_section, create_TABPOT_section, create_neighbor_lists_section
67 : PUBLIC :: create_CHARGE_section
68 : !***
69 : CONTAINS
70 :
71 : ! **************************************************************************************************
72 : !> \brief Create the input section for FIST.. Come on.. Let's get woohooo
73 : !> \param section the section to create
74 : !> \author teo
75 : ! **************************************************************************************************
76 9544 : SUBROUTINE create_mm_section(section)
77 : TYPE(section_type), POINTER :: section
78 :
79 : TYPE(section_type), POINTER :: subsection
80 :
81 9544 : CPASSERT(.NOT. ASSOCIATED(section))
82 : CALL section_create(section, __LOCATION__, name="mm", &
83 : description="This section contains all information to run a MM calculation.", &
84 9544 : n_keywords=5, n_subsections=0, repeats=.FALSE.)
85 :
86 9544 : NULLIFY (subsection)
87 :
88 9544 : CALL create_forcefield_section(subsection)
89 9544 : CALL section_add_subsection(section, subsection)
90 9544 : CALL section_release(subsection)
91 :
92 9544 : CALL create_neighbor_lists_section(subsection)
93 9544 : CALL section_add_subsection(section, subsection)
94 9544 : CALL section_release(subsection)
95 :
96 9544 : CALL create_poisson_section(subsection)
97 9544 : CALL section_add_subsection(section, subsection)
98 9544 : CALL section_release(subsection)
99 :
100 9544 : CALL create_per_efield_section(subsection)
101 9544 : CALL section_add_subsection(section, subsection)
102 9544 : CALL section_release(subsection)
103 :
104 9544 : CALL create_print_mm_section(subsection)
105 9544 : CALL section_add_subsection(section, subsection)
106 9544 : CALL section_release(subsection)
107 :
108 9544 : END SUBROUTINE create_mm_section
109 :
110 : ! **************************************************************************************************
111 : !> \brief Create the print mm section
112 : !> \param section the section to create
113 : !> \author teo
114 : ! **************************************************************************************************
115 9544 : SUBROUTINE create_print_mm_section(section)
116 : TYPE(section_type), POINTER :: section
117 :
118 : TYPE(keyword_type), POINTER :: keyword
119 : TYPE(section_type), POINTER :: print_key
120 :
121 9544 : CPASSERT(.NOT. ASSOCIATED(section))
122 : CALL section_create(section, __LOCATION__, name="print", &
123 : description="Section of possible print options in MM code.", &
124 9544 : n_keywords=0, n_subsections=1, repeats=.FALSE.)
125 :
126 9544 : NULLIFY (print_key, keyword)
127 :
128 : CALL cp_print_key_section_create(print_key, __LOCATION__, "DERIVATIVES", &
129 : description="Controls the printing of derivatives.", &
130 9544 : print_level=high_print_level, filename="__STD_OUT__")
131 9544 : CALL section_add_subsection(section, print_key)
132 9544 : CALL section_release(print_key)
133 :
134 : CALL cp_print_key_section_create(print_key, __LOCATION__, "EWALD_INFO", &
135 : description="Controls the printing of Ewald energy components during the "// &
136 : "evaluation of the electrostatics.", &
137 9544 : print_level=high_print_level, filename="__STD_OUT__")
138 9544 : CALL section_add_subsection(section, print_key)
139 9544 : CALL section_release(print_key)
140 :
141 9544 : CALL create_dipoles_section(print_key, "DIPOLE", medium_print_level)
142 9544 : CALL section_add_subsection(section, print_key)
143 9544 : CALL section_release(print_key)
144 :
145 : CALL cp_print_key_section_create(print_key, __LOCATION__, "NEIGHBOR_LISTS", &
146 : description="Activates the printing of the neighbor lists.", &
147 9544 : print_level=high_print_level, filename="", unit_str="angstrom")
148 9544 : CALL section_add_subsection(section, print_key)
149 9544 : CALL section_release(print_key)
150 :
151 : CALL cp_print_key_section_create(print_key, __LOCATION__, "ITER_INFO", &
152 : description="Activates the printing of iteration info during the self-consistent "// &
153 : "calculation of a polarizable forcefield.", &
154 9544 : print_level=medium_print_level, filename="__STD_OUT__")
155 9544 : CALL section_add_subsection(section, print_key)
156 9544 : CALL section_release(print_key)
157 :
158 : CALL cp_print_key_section_create(print_key, __LOCATION__, "SUBCELL", &
159 : description="Activates the printing of the subcells used for the "// &
160 : "generation of neighbor lists.", &
161 9544 : print_level=high_print_level, filename="__STD_OUT__")
162 9544 : CALL section_add_subsection(section, print_key)
163 9544 : CALL section_release(print_key)
164 :
165 : CALL cp_print_key_section_create(print_key, __LOCATION__, "PROGRAM_BANNER", &
166 : description="Controls the printing of the banner of the MM program", &
167 9544 : print_level=silent_print_level, filename="__STD_OUT__")
168 9544 : CALL section_add_subsection(section, print_key)
169 9544 : CALL section_release(print_key)
170 :
171 : CALL cp_print_key_section_create(print_key, __LOCATION__, "PROGRAM_RUN_INFO", &
172 : description="Controls the printing of information regarding the run.", &
173 9544 : print_level=low_print_level, filename="__STD_OUT__")
174 9544 : CALL section_add_subsection(section, print_key)
175 9544 : CALL section_release(print_key)
176 :
177 : CALL cp_print_key_section_create(print_key, __LOCATION__, "FF_PARAMETER_FILE", description= &
178 : "Controls the printing of Force Field parameter file", &
179 9544 : print_level=debug_print_level + 1, filename="", common_iter_levels=2)
180 9544 : CALL section_add_subsection(section, print_key)
181 9544 : CALL section_release(print_key)
182 :
183 : CALL cp_print_key_section_create(print_key, __LOCATION__, "FF_INFO", description= &
184 : "Controls the printing of information in the forcefield settings", &
185 9544 : print_level=high_print_level, filename="__STD_OUT__")
186 :
187 : CALL keyword_create(keyword, __LOCATION__, name="spline_info", &
188 : description="if the printkey is active prints information regarding the splines"// &
189 : " used in the nonbonded interactions", &
190 9544 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
191 9544 : CALL section_add_keyword(print_key, keyword)
192 9544 : CALL keyword_release(keyword)
193 :
194 : CALL keyword_create(keyword, __LOCATION__, name="spline_data", &
195 : description="if the printkey is active prints on separated files the splined function"// &
196 : " together with the reference one. Useful to check the spline behavior.", &
197 9544 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
198 9544 : CALL section_add_keyword(print_key, keyword)
199 9544 : CALL keyword_release(keyword)
200 :
201 9544 : CALL section_add_subsection(section, print_key)
202 9544 : CALL section_release(print_key)
203 :
204 9544 : END SUBROUTINE create_print_mm_section
205 :
206 : ! **************************************************************************************************
207 : !> \brief Create the forcefield section. This section is useful to set up the
208 : !> proper force_field for FIST calculations
209 : !> \param section the section to create
210 : !> \author teo
211 : ! **************************************************************************************************
212 9544 : SUBROUTINE create_forcefield_section(section)
213 : TYPE(section_type), POINTER :: section
214 :
215 : TYPE(keyword_type), POINTER :: keyword
216 : TYPE(section_type), POINTER :: subsection
217 :
218 9544 : CPASSERT(.NOT. ASSOCIATED(section))
219 : CALL section_create(section, __LOCATION__, name="FORCEFIELD", &
220 : description="Section specifying information regarding how to set up properly"// &
221 : " a force_field for the classical calculations.", &
222 9544 : n_keywords=2, n_subsections=2, repeats=.FALSE.)
223 :
224 9544 : NULLIFY (subsection, keyword)
225 :
226 : CALL keyword_create( &
227 : keyword, __LOCATION__, name="PARMTYPE", &
228 : description="Define the kind of torsion potential", &
229 : usage="PARMTYPE {OFF,CHM,G87,G96}", &
230 : enum_c_vals=s2a("OFF", "CHM", "G87", "G96", "AMBER"), &
231 : enum_desc=s2a("Provides force field parameters through the input file", &
232 : "Provides force field parameters through an external file with CHARMM format", &
233 : "Provides force field parameters through an external file with GROMOS 87 format", &
234 : "Provides force field parameters through an external file with GROMOS 96 format", &
235 : "Provides force field parameters through an external file with AMBER format (from v.8 on)"), &
236 : enum_i_vals=[do_ff_undef, &
237 : do_ff_charmm, &
238 : do_ff_g87, &
239 : do_ff_g96, &
240 : do_ff_amber], &
241 9544 : default_i_val=do_ff_undef)
242 9544 : CALL section_add_keyword(section, keyword)
243 9544 : CALL keyword_release(keyword)
244 :
245 : CALL keyword_create(keyword, __LOCATION__, name="PARM_FILE_NAME", &
246 : description="Specifies the filename that contains the parameters of the FF.", &
247 9544 : usage="PARM_FILE_NAME {FILENAME}", type_of_var=lchar_t)
248 9544 : CALL section_add_keyword(section, keyword)
249 9544 : CALL keyword_release(keyword)
250 :
251 : CALL keyword_create(keyword, __LOCATION__, name="VDW_SCALE14", &
252 : description="Scaling factor for the VDW 1-4 ", &
253 9544 : usage="VDW_SCALE14 1.0", default_r_val=1.0_dp)
254 9544 : CALL section_add_keyword(section, keyword)
255 9544 : CALL keyword_release(keyword)
256 :
257 : CALL keyword_create(keyword, __LOCATION__, name="EI_SCALE14", &
258 : description="Scaling factor for the electrostatics 1-4 ", &
259 9544 : usage="EI_SCALE14 1.0", default_r_val=0.0_dp)
260 9544 : CALL section_add_keyword(section, keyword)
261 9544 : CALL keyword_release(keyword)
262 :
263 : CALL keyword_create(keyword, __LOCATION__, name="SHIFT_CUTOFF", &
264 : description="Add a constant energy shift to the real-space "// &
265 : "non-bonding interactions (both Van der Waals and "// &
266 : "electrostatic) such that the energy at the cutoff radius is "// &
267 : "zero. This makes the non-bonding interactions continuous at "// &
268 : "the cutoff.", &
269 9544 : usage="SHIFT_CUTOFF <LOGICAL>", default_l_val=.TRUE.)
270 9544 : CALL section_add_keyword(section, keyword)
271 9544 : CALL keyword_release(keyword)
272 :
273 : CALL keyword_create(keyword, __LOCATION__, name="DO_NONBONDED", &
274 : description="Controls the computation of all the real-space "// &
275 : "(short-range) nonbonded interactions. This also "// &
276 : "includes the real-space corrections for excluded "// &
277 : "or scaled 1-2, 1-3 and 1-4 interactions. When set "// &
278 : "to F, the neighborlists are not created and all "// &
279 : "interactions that depend on them are not computed.", &
280 9544 : usage="DO_NONBONDED T", default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
281 9544 : CALL section_add_keyword(section, keyword)
282 9544 : CALL keyword_release(keyword)
283 :
284 : CALL keyword_create(keyword, __LOCATION__, name="DO_ELECTROSTATICS", &
285 : description="Controls the computation of all the real-space "// &
286 : "(short-range) electrostatics interactions. This does not "// &
287 : "affect the QM/MM electrostatic coupling when turned off.", &
288 9544 : usage="DO_ELECTROSTATICS T", default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
289 9544 : CALL section_add_keyword(section, keyword)
290 9544 : CALL keyword_release(keyword)
291 :
292 : CALL keyword_create(keyword, __LOCATION__, name="IGNORE_MISSING_CRITICAL_PARAMS", &
293 : description="Do not abort when critical force-field parameters "// &
294 : "are missing. CP2K will run as if the terms containing the "// &
295 : "missing parameters are zero.", &
296 : usage="IGNORE_MISSING_CRITICAL_PARAMS .TRUE.", default_l_val=.FALSE., &
297 9544 : lone_keyword_l_val=.TRUE.)
298 9544 : CALL section_add_keyword(section, keyword)
299 9544 : CALL keyword_release(keyword)
300 :
301 : CALL keyword_create(keyword, __LOCATION__, name="MULTIPLE_POTENTIAL", &
302 : description="Enables the possibility to define NONBONDED and NONBONDED14 as a"// &
303 : " sum of different kinds of potential. Useful for piecewise defined potentials.", &
304 9544 : usage="MULTIPLE_POTENTIAL T", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
305 9544 : CALL section_add_keyword(section, keyword)
306 9544 : CALL keyword_release(keyword)
307 : !Universal scattering potential at very short distances
308 : CALL keyword_create(keyword, __LOCATION__, name="ZBL_SCATTERING", &
309 : description="A short range repulsive potential is added, to simulate "// &
310 : "collisions and scattering.", &
311 9544 : usage="ZBL_SCATTERING T", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
312 9544 : CALL section_add_keyword(section, keyword)
313 9544 : CALL keyword_release(keyword)
314 :
315 : !
316 : ! subsections
317 : !
318 9544 : CALL create_SPLINE_section(subsection)
319 9544 : CALL section_add_subsection(section, subsection)
320 9544 : CALL section_release(subsection)
321 :
322 9544 : CALL create_NONBONDED_section(subsection)
323 9544 : CALL section_add_subsection(section, subsection)
324 9544 : CALL section_release(subsection)
325 :
326 9544 : CALL create_NONBONDED14_section(subsection)
327 9544 : CALL section_add_subsection(section, subsection)
328 9544 : CALL section_release(subsection)
329 :
330 9544 : CALL create_CHARGE_section(subsection)
331 9544 : CALL section_add_subsection(section, subsection)
332 9544 : CALL section_release(subsection)
333 :
334 9544 : CALL create_CHARGES_section(subsection)
335 9544 : CALL section_add_subsection(section, subsection)
336 9544 : CALL section_release(subsection)
337 :
338 9544 : CALL create_SHELL_section(subsection)
339 9544 : CALL section_add_subsection(section, subsection)
340 9544 : CALL section_release(subsection)
341 :
342 9544 : CALL create_BOND_section(subsection, "BOND")
343 9544 : CALL section_add_subsection(section, subsection)
344 9544 : CALL section_release(subsection)
345 :
346 9544 : CALL create_BEND_section(subsection)
347 9544 : CALL section_add_subsection(section, subsection)
348 9544 : CALL section_release(subsection)
349 :
350 9544 : CALL create_TORSION_section(subsection)
351 9544 : CALL section_add_subsection(section, subsection)
352 9544 : CALL section_release(subsection)
353 :
354 9544 : CALL create_IMPROPER_section(subsection)
355 9544 : CALL section_add_subsection(section, subsection)
356 9544 : CALL section_release(subsection)
357 :
358 9544 : CALL create_OPBEND_section(subsection)
359 9544 : CALL section_add_subsection(section, subsection)
360 9544 : CALL section_release(subsection)
361 :
362 9544 : CALL create_DIPOLE_section(subsection)
363 9544 : CALL section_add_subsection(section, subsection)
364 9544 : CALL section_release(subsection)
365 :
366 9544 : CALL create_QUADRUPOLE_section(subsection)
367 9544 : CALL section_add_subsection(section, subsection)
368 9544 : CALL section_release(subsection)
369 :
370 9544 : END SUBROUTINE create_forcefield_section
371 :
372 : ! **************************************************************************************************
373 : !> \brief This section specifies the parameters for the splines
374 : !> \param section the section to create
375 : !> \author teo
376 : ! **************************************************************************************************
377 9544 : SUBROUTINE create_SPLINE_section(section)
378 : TYPE(section_type), POINTER :: section
379 :
380 : TYPE(keyword_type), POINTER :: keyword
381 :
382 9544 : CPASSERT(.NOT. ASSOCIATED(section))
383 : CALL section_create(section, __LOCATION__, name="SPLINE", &
384 : description="specifies parameters to set up the splines used in the"// &
385 : " nonboned interactions (both pair body potential and many body potential)", &
386 9544 : n_keywords=1, n_subsections=0, repeats=.TRUE.)
387 :
388 9544 : NULLIFY (keyword)
389 :
390 : CALL keyword_create(keyword, __LOCATION__, name="R0_NB", &
391 : description="Specify the minimum value of the distance interval "// &
392 : "that brackets the value of emax_spline.", &
393 : usage="R0_NB <REAL>", default_r_val=cp_unit_to_cp2k(value=0.9_dp, &
394 : unit_str="bohr"), &
395 9544 : unit_str="angstrom")
396 9544 : CALL section_add_keyword(section, keyword)
397 9544 : CALL keyword_release(keyword)
398 :
399 : CALL keyword_create(keyword, __LOCATION__, name="RCUT_NB", &
400 : description="Cutoff radius for nonbonded interactions. This value overrides"// &
401 : " the value specified in the potential definition and is global for all potentials.", &
402 : usage="RCUT_NB {real}", default_r_val=cp_unit_to_cp2k(value=-1.0_dp, &
403 : unit_str="angstrom"), &
404 9544 : unit_str="angstrom")
405 9544 : CALL section_add_keyword(section, keyword)
406 9544 : CALL keyword_release(keyword)
407 :
408 : CALL keyword_create(keyword, __LOCATION__, name="EMAX_SPLINE", &
409 : description="Specify the maximum value of the potential up to which"// &
410 : " splines will be constructed", &
411 : usage="EMAX_SPLINE <REAL>", &
412 9544 : default_r_val=0.5_dp, unit_str="hartree")
413 9544 : CALL section_add_keyword(section, keyword)
414 9544 : CALL keyword_release(keyword)
415 :
416 : CALL keyword_create(keyword, __LOCATION__, name="EMAX_ACCURACY", &
417 : description="Specify the maximum value of energy used to check the accuracy"// &
418 : " requested through EPS_SPLINE. Energy values larger than EMAX_ACCURACY"// &
419 : " generally do not satisfy the requested accuracy", &
420 9544 : usage="EMAX_ACCURACY <REAL>", default_r_val=0.02_dp, unit_str="hartree")
421 9544 : CALL section_add_keyword(section, keyword)
422 9544 : CALL keyword_release(keyword)
423 :
424 : CALL keyword_create(keyword, __LOCATION__, name="EPS_SPLINE", &
425 : description="Specify the threshold for the choice of the number of"// &
426 : " points used in the splines (comparing the splined value with the"// &
427 : " analytically evaluated one)", &
428 9544 : usage="EPS_SPLINE <REAL>", default_r_val=1.0E-7_dp, unit_str="hartree")
429 9544 : CALL section_add_keyword(section, keyword)
430 9544 : CALL keyword_release(keyword)
431 :
432 : CALL keyword_create( &
433 : keyword, __LOCATION__, name="NPOINTS", &
434 : description="Override the default search for an accurate spline by specifying a fixed number of spline points.", &
435 9544 : usage="NPOINTS 1024", default_i_val=-1)
436 9544 : CALL section_add_keyword(section, keyword)
437 9544 : CALL keyword_release(keyword)
438 :
439 : CALL keyword_create(keyword, __LOCATION__, name="UNIQUE_SPLINE", &
440 : description="For few potentials (Lennard-Jones) one global optimal spline is generated instead"// &
441 : " of different optimal splines for each kind of potential", &
442 9544 : usage="UNIQUE_SPLINE <LOGICAL>", lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
443 9544 : CALL section_add_keyword(section, keyword)
444 9544 : CALL keyword_release(keyword)
445 :
446 9544 : END SUBROUTINE create_SPLINE_section
447 :
448 : ! **************************************************************************************************
449 : !> \brief This section specifies the torsion of the MM atoms
450 : !> \param section the section to create
451 : !> \author teo
452 : ! **************************************************************************************************
453 9544 : SUBROUTINE create_TORSION_section(section)
454 : TYPE(section_type), POINTER :: section
455 :
456 : TYPE(keyword_type), POINTER :: keyword
457 :
458 9544 : CPASSERT(.NOT. ASSOCIATED(section))
459 : CALL section_create(section, __LOCATION__, name="TORSION", &
460 : description="Specifies the torsion potential of the MM system.", &
461 9544 : n_keywords=1, n_subsections=0, repeats=.TRUE.)
462 :
463 9544 : NULLIFY (keyword)
464 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
465 : description="Defines the atomic kinds involved in the tors.", &
466 : usage="ATOMS {KIND1} {KIND2} {KIND3} {KIND4}", type_of_var=char_t, &
467 9544 : n_var=4)
468 9544 : CALL section_add_keyword(section, keyword)
469 9544 : CALL keyword_release(keyword)
470 :
471 : CALL keyword_create(keyword, __LOCATION__, name="KIND", &
472 : description="Define the kind of torsion potential", &
473 : usage="KIND CHARMM", &
474 : enum_c_vals=s2a("CHARMM", "G87", "G96", "AMBER", "OPLS"), &
475 : enum_desc=s2a("Functional Form (CHARMM|G87|G96|AMBER): K * [ 1 + cos[M*PHI - PHI0]]", &
476 : "Functional Form (CHARMM|G87|G96|AMBER): K * [ 1 + cos[M*PHI - PHI0]]", &
477 : "Functional Form (CHARMM|G87|G96|AMBER): K * [ 1 + cos[M*PHI - PHI0]]", &
478 : "Functional Form (CHARMM|G87|G96|AMBER): K * [ 1 + cos[M*PHI - PHI0]]", &
479 : "Functional Form: K / 2 * [ 1 + (-1)^(M-1) * cos[M*PHI]]"), &
480 : enum_i_vals=[do_ff_charmm, &
481 : do_ff_g87, &
482 : do_ff_g96, &
483 : do_ff_amber, &
484 : do_ff_opls], &
485 9544 : default_i_val=do_ff_charmm)
486 9544 : CALL section_add_keyword(section, keyword)
487 9544 : CALL keyword_release(keyword)
488 :
489 : CALL keyword_create(keyword, __LOCATION__, name="K", &
490 : description="Defines the force constant of the potential", &
491 : usage="K {real}", type_of_var=real_t, &
492 9544 : n_var=1, unit_str="hartree")
493 9544 : CALL section_add_keyword(section, keyword)
494 9544 : CALL keyword_release(keyword)
495 :
496 : CALL keyword_create(keyword, __LOCATION__, name="PHI0", &
497 : description="Defines the phase of the potential.", &
498 : usage="PHI0 {real}", type_of_var=real_t, &
499 9544 : n_var=1, unit_str="rad", default_r_val=0.0_dp)
500 9544 : CALL section_add_keyword(section, keyword)
501 9544 : CALL keyword_release(keyword)
502 :
503 : CALL keyword_create(keyword, __LOCATION__, name="M", &
504 : description="Defines the multiplicity of the potential.", &
505 : usage="M {integer}", type_of_var=integer_t, &
506 9544 : n_var=1)
507 9544 : CALL section_add_keyword(section, keyword)
508 9544 : CALL keyword_release(keyword)
509 :
510 9544 : END SUBROUTINE create_TORSION_section
511 :
512 : ! **************************************************************************************************
513 : !> \brief This section specifies the improper torsion of the MM atoms
514 : !> \param section the section to create
515 : !> \author louis vanduyfhuys
516 : ! **************************************************************************************************
517 9544 : SUBROUTINE create_IMPROPER_section(section)
518 : TYPE(section_type), POINTER :: section
519 :
520 : TYPE(keyword_type), POINTER :: keyword
521 :
522 9544 : CPASSERT(.NOT. ASSOCIATED(section))
523 : CALL section_create(section, __LOCATION__, name="IMPROPER", &
524 : description="Specifies the improper torsion potential of the MM system.", &
525 9544 : n_keywords=1, n_subsections=0, repeats=.TRUE.)
526 :
527 9544 : NULLIFY (keyword)
528 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
529 : description="Defines the atomic kinds involved in the improper tors.", &
530 : usage="ATOMS {KIND1} {KIND2} {KIND3} {KIND4}", type_of_var=char_t, &
531 9544 : n_var=4)
532 9544 : CALL section_add_keyword(section, keyword)
533 9544 : CALL keyword_release(keyword)
534 :
535 : CALL keyword_create(keyword, __LOCATION__, name="KIND", &
536 : description="Define the kind of improper torsion potential", &
537 : usage="KIND CHARMM", &
538 : enum_c_vals=s2a("CHARMM", "G87", "G96", "HARMONIC"), &
539 : enum_desc=s2a("Functional Form (CHARMM): K * [ PHI - PHI0 ]**2", &
540 : "Functional Form (G87|G96|HARMONIC): 0.5 * K * [ PHI - PHI0 ]**2", &
541 : "Functional Form (G87|G96|HARMONIC): 0.5 * K * [ PHI - PHI0 ]**2", &
542 : "Functional Form (G87|G96|HARMONIC): 0.5 * K * [ PHI - PHI0 ]**2"), &
543 : enum_i_vals=[do_ff_charmm, &
544 : do_ff_g87, &
545 : do_ff_g96, &
546 : do_ff_harmonic], &
547 9544 : default_i_val=do_ff_charmm)
548 9544 : CALL section_add_keyword(section, keyword)
549 9544 : CALL keyword_release(keyword)
550 :
551 : CALL keyword_create(keyword, __LOCATION__, name="K", &
552 : description="Defines the force constant of the potential", &
553 : usage="K {real}", type_of_var=real_t, &
554 9544 : n_var=1, unit_str="hartree*rad^-2")
555 9544 : CALL section_add_keyword(section, keyword)
556 9544 : CALL keyword_release(keyword)
557 :
558 : CALL keyword_create(keyword, __LOCATION__, name="PHI0", &
559 : description="Defines the phase of the potential.", &
560 : usage="PHI0 {real}", type_of_var=real_t, &
561 9544 : n_var=1, unit_str="rad")
562 9544 : CALL section_add_keyword(section, keyword)
563 9544 : CALL keyword_release(keyword)
564 :
565 9544 : END SUBROUTINE create_IMPROPER_section
566 :
567 : ! **************************************************************************************************
568 : !> \brief This section specifies the out of plane bend of the MM atoms
569 : !> \param section the section to create
570 : !> \author louis vanduyfhuys
571 : ! **************************************************************************************************
572 9544 : SUBROUTINE create_OPBEND_section(section)
573 : TYPE(section_type), POINTER :: section
574 :
575 : TYPE(keyword_type), POINTER :: keyword
576 :
577 9544 : CPASSERT(.NOT. ASSOCIATED(section))
578 : CALL section_create(section, __LOCATION__, name="OPBEND", &
579 : description="Specifies the out of plane bend potential of the MM system."// &
580 : " (Only defined for atom quadruples which are also defined as an improper"// &
581 : " pattern in the topology.)", &
582 9544 : n_keywords=1, n_subsections=0, repeats=.TRUE.)
583 :
584 9544 : NULLIFY (keyword)
585 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
586 : description="Defines the atomic kinds involved in the opbend.", &
587 : usage="ATOMS {KIND1} {KIND2} {KIND3} {KIND4}", type_of_var=char_t, &
588 9544 : n_var=4)
589 9544 : CALL section_add_keyword(section, keyword)
590 9544 : CALL keyword_release(keyword)
591 :
592 : CALL keyword_create(keyword, __LOCATION__, name="KIND", &
593 : description="Define the kind of out of plane bend potential", &
594 : usage="KIND HARMONIC", &
595 : enum_c_vals=s2a("HARMONIC", "MM2", "MM3", "MM4"), &
596 : enum_desc=s2a("Functional Form (HARMONIC): 0.5 * K * [ PHI - PHI0 ]**2", &
597 : "Functional Form (MM2|MM3|MM4): K * [ PHI - PHI0 ]**2", &
598 : "Functional Form (MM2|MM3|MM4): K * [ PHI - PHI0 ]**2", &
599 : "Functional Form (MM2|MM3|MM4): K * [ PHI - PHI0 ]**2"), &
600 : enum_i_vals=[do_ff_harmonic, &
601 : do_ff_mm2, &
602 : do_ff_mm3, &
603 : do_ff_mm4], &
604 9544 : default_i_val=do_ff_harmonic)
605 9544 : CALL section_add_keyword(section, keyword)
606 9544 : CALL keyword_release(keyword)
607 :
608 : CALL keyword_create(keyword, __LOCATION__, name="K", &
609 : description="Defines the force constant of the potential", &
610 : usage="K {real}", type_of_var=real_t, &
611 9544 : n_var=1, unit_str="hartree*rad^-2")
612 9544 : CALL section_add_keyword(section, keyword)
613 9544 : CALL keyword_release(keyword)
614 :
615 : CALL keyword_create(keyword, __LOCATION__, name="PHI0", &
616 : description="Defines the phase of the potential.", &
617 : usage="PHI0 {real}", type_of_var=real_t, &
618 9544 : n_var=1, unit_str="rad")
619 9544 : CALL section_add_keyword(section, keyword)
620 9544 : CALL keyword_release(keyword)
621 :
622 9544 : END SUBROUTINE create_OPBEND_section
623 :
624 : ! **************************************************************************************************
625 : !> \brief This section specifies the bend of the MM atoms
626 : !> \param section the section to create
627 : !> \author teo
628 : ! **************************************************************************************************
629 9544 : SUBROUTINE create_BEND_section(section)
630 : TYPE(section_type), POINTER :: section
631 :
632 : TYPE(keyword_type), POINTER :: keyword
633 : TYPE(section_type), POINTER :: subsection
634 :
635 9544 : CPASSERT(.NOT. ASSOCIATED(section))
636 : CALL section_create(section, __LOCATION__, name="BEND", &
637 : description="Specifies the bend potential of the MM system.", &
638 9544 : n_keywords=11, n_subsections=1, repeats=.TRUE.)
639 :
640 9544 : NULLIFY (keyword, subsection)
641 :
642 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
643 : description="Defines the atomic kinds involved in the bend.", &
644 : usage="ATOMS {KIND1} {KIND2} {KIND3}", type_of_var=char_t, &
645 9544 : n_var=3)
646 9544 : CALL section_add_keyword(section, keyword)
647 9544 : CALL keyword_release(keyword)
648 :
649 : CALL keyword_create( &
650 : keyword, __LOCATION__, name="KIND", &
651 : description="Define the kind of bend potential", &
652 : usage="KIND HARMONIC", &
653 : enum_c_vals=s2a("HARMONIC", "CHARMM", "AMBER", "G87", "G96", "CUBIC", "MIXED_BEND_STRETCH", "MM3", &
654 : "LEGENDRE"), &
655 : enum_desc=s2a("Functional Form (HARMONIC|G87): 1/2*K*(THETA-THETA0)^2", &
656 : "Functional Form (CHARMM|AMBER): K*(THETA-THETA0)^2", &
657 : "Functional Form (CHARMM|AMBER): K*(THETA-THETA0)^2", &
658 : "Functional Form (HARMONIC|G87): 1/2*K*(THETA-THETA0)^2", &
659 : "Functional Form (G96): 1/2*K*(COS(THETA)-THETA0)^2", &
660 : "Functional Form (CUBIC): K*(THETA-THETA0)**2*(1+CB*(THETA-THETA0))", &
661 : "Functional Form (MIXED_BEND_STRETCH): K*(THETA-THETA0)**2*(1+CB*(THETA-THETA0))+"// &
662 : " KSS*(R12-R012)*(R32-R032)+KBS12*(R12-R012)*(THETA-THETA0)+KBS32*(R32-R032)*(THETA-THETA0)", &
663 : "Functional Form (MM3): 1/2*K*(THETA-THETA0)**2*(1-0.014*(THETA-THETA0)+5.6E-5*(THETA-THETA0)**2"// &
664 : " -7.0E-7*(THETA-THETA0)**3+9.0E-10*(THETA-THETA0)**4)+KBS12*(R12-R012)*(THETA-THETA0)+"// &
665 : " KBS32*(R32-R032)*(THETA-THETA0)", &
666 : "Functional Form (LEGENDRE): sum_{i=0}^N c_i*P_i(COS(THETA)) "), &
667 : enum_i_vals=[do_ff_harmonic, &
668 : do_ff_charmm, &
669 : do_ff_amber, &
670 : do_ff_g87, &
671 : do_ff_g96, &
672 : do_ff_cubic, &
673 : do_ff_mixed_bend_stretch, &
674 : do_ff_mm3, &
675 : do_ff_legendre], &
676 9544 : default_i_val=do_ff_charmm)
677 9544 : CALL section_add_keyword(section, keyword)
678 9544 : CALL keyword_release(keyword)
679 :
680 : CALL keyword_create(keyword, __LOCATION__, name="K", &
681 : description="Defines the force constant of the potential", &
682 : usage="K {real}", type_of_var=real_t, &
683 9544 : n_var=1, unit_str="hartree*rad^-2")
684 9544 : CALL section_add_keyword(section, keyword)
685 9544 : CALL keyword_release(keyword)
686 :
687 : CALL keyword_create(keyword, __LOCATION__, name="CB", &
688 : description="Defines the the cubic force constant of the bend", &
689 : usage="CB {real}", default_r_val=0.0_dp, type_of_var=real_t, &
690 9544 : n_var=1, unit_str="rad^-1")
691 9544 : CALL section_add_keyword(section, keyword)
692 9544 : CALL keyword_release(keyword)
693 :
694 : CALL keyword_create(keyword, __LOCATION__, name="R012", &
695 : description="Mixed bend stretch parameter", &
696 : usage="R012 {real}", default_r_val=0.0_dp, type_of_var=real_t, &
697 9544 : n_var=1, unit_str="bohr")
698 9544 : CALL section_add_keyword(section, keyword)
699 9544 : CALL keyword_release(keyword)
700 : CALL keyword_create(keyword, __LOCATION__, name="R032", &
701 : description="Mixed bend stretch parameter", &
702 : usage="R032 {real}", default_r_val=0.0_dp, type_of_var=real_t, &
703 9544 : n_var=1, unit_str="bohr")
704 9544 : CALL section_add_keyword(section, keyword)
705 9544 : CALL keyword_release(keyword)
706 : CALL keyword_create(keyword, __LOCATION__, name="KBS12", &
707 : description="Mixed bend stretch parameter", &
708 : usage="KBS12 {real}", default_r_val=0.0_dp, type_of_var=real_t, &
709 9544 : n_var=1, unit_str="hartree*bohr^-1*rad^-1")
710 9544 : CALL section_add_keyword(section, keyword)
711 9544 : CALL keyword_release(keyword)
712 : CALL keyword_create(keyword, __LOCATION__, name="KBS32", &
713 : description="Mixed bend stretch parameter", &
714 : usage="KBS32 {real}", default_r_val=0.0_dp, type_of_var=real_t, &
715 9544 : n_var=1, unit_str="hartree*bohr^-1*rad^-1")
716 9544 : CALL section_add_keyword(section, keyword)
717 9544 : CALL keyword_release(keyword)
718 : CALL keyword_create(keyword, __LOCATION__, name="KSS", &
719 : description="Mixed bend stretch parameter", &
720 : usage="KSS {real}", default_r_val=0.0_dp, type_of_var=real_t, &
721 9544 : n_var=1, unit_str="hartree*bohr^-2")
722 9544 : CALL section_add_keyword(section, keyword)
723 9544 : CALL keyword_release(keyword)
724 :
725 : CALL keyword_create(keyword, __LOCATION__, name="THETA0", &
726 : description="Defines the equilibrium angle.", &
727 : usage="THETA0 {real}", type_of_var=real_t, &
728 9544 : n_var=1, unit_str='rad')
729 9544 : CALL section_add_keyword(section, keyword)
730 9544 : CALL keyword_release(keyword)
731 :
732 : CALL keyword_create(keyword, __LOCATION__, name="LEGENDRE", &
733 : description="Specifies the coefficients for the legendre"// &
734 : " expansion of the bending potential."// &
735 : " 'THETA0' and 'K' are not used, but need to be specified."// &
736 : " Use an arbitrary value.", usage="LEGENDRE {REAL} {REAL} ...", &
737 : default_r_val=0.0d0, type_of_var=real_t, &
738 9544 : n_var=-1, unit_str="hartree")
739 9544 : CALL section_add_keyword(section, keyword)
740 9544 : CALL keyword_release(keyword)
741 :
742 : ! Create the Urey-Bradley section
743 9544 : CALL create_BOND_section(subsection, "UB")
744 9544 : CALL section_add_subsection(section, subsection)
745 9544 : CALL section_release(subsection)
746 :
747 9544 : END SUBROUTINE create_BEND_section
748 :
749 : ! **************************************************************************************************
750 : !> \brief This section specifies the bond of the MM atoms
751 : !> \param section the section to create
752 : !> \param label ...
753 : !> \author teo
754 : ! **************************************************************************************************
755 19088 : SUBROUTINE create_BOND_section(section, label)
756 : TYPE(section_type), POINTER :: section
757 : CHARACTER(LEN=*), INTENT(IN) :: label
758 :
759 : CHARACTER(LEN=default_string_length) :: tag
760 : TYPE(keyword_type), POINTER :: keyword
761 :
762 19088 : CPASSERT(.NOT. ASSOCIATED(section))
763 19088 : NULLIFY (keyword)
764 :
765 19088 : IF (TRIM(label) == "UB") THEN
766 9544 : tag = " Urey-Bradley "
767 : CALL section_create(section, __LOCATION__, name=TRIM(label), &
768 : description="Specifies the Urey-Bradley potential between the external atoms"// &
769 : " defining the angle", &
770 9544 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
771 :
772 : ELSE
773 9544 : tag = " Bond "
774 : CALL section_create(section, __LOCATION__, name=TRIM(label), &
775 : description="Specifies the bond potential", &
776 9544 : n_keywords=1, n_subsections=0, repeats=.TRUE.)
777 :
778 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
779 : description="Defines the atomic kinds involved in the bond.", &
780 : usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
781 9544 : n_var=2)
782 9544 : CALL section_add_keyword(section, keyword)
783 9544 : CALL keyword_release(keyword)
784 : END IF
785 :
786 : CALL keyword_create(keyword, __LOCATION__, name="KIND", &
787 : description="Define the kind of"//TRIM(tag)//"potential.", &
788 : usage="KIND HARMONIC", &
789 : enum_c_vals=s2a("HARMONIC", "CHARMM", "AMBER", "G87", "G96", "QUARTIC", &
790 : "MORSE", "CUBIC", "FUES"), &
791 : enum_desc=s2a("Functional Form (HARMONIC|G87): 1/2*K*(R-R0)^2", &
792 : "Functional Form (CHARMM|AMBER): K*(R-R0)^2", &
793 : "Functional Form (CHARMM|AMBER): K*(R-R0)^2", &
794 : "Functional Form (HARMONIC|G87): 1/2*K*(R-R0)^2", &
795 : "Functional Form (G96): 1/4*K*(R^2-R0^2)^2", &
796 : "Functional Form (QUARTIC): (1/2*K1+[1/3*K2+1/4*K3*|R-R0|]*|R-R0|)(R-R0)^2", &
797 : "Functional Form (MORSE): K1*[(1-exp(-K2*(R-R0)))^2-1])", &
798 : "Functional Form (CUBIC): K*(R-R0)^2*(1+cs*(R-R0)+7/12*(cs^2*(R-R0)^2))", &
799 : "Functional Form (FUES): 1/2*K*R0^2*(1+R0/R*(R0/R-2))"), &
800 : enum_i_vals=[do_ff_harmonic, &
801 : do_ff_charmm, &
802 : do_ff_amber, &
803 : do_ff_g87, &
804 : do_ff_g96, &
805 : do_ff_quartic, &
806 : do_ff_morse, &
807 : do_ff_cubic, &
808 : do_ff_fues], &
809 19088 : default_i_val=do_ff_charmm)
810 19088 : CALL section_add_keyword(section, keyword)
811 19088 : CALL keyword_release(keyword)
812 :
813 : CALL keyword_create(keyword, __LOCATION__, name="K", &
814 : description="Defines the force constant of the potential. "// &
815 : "For MORSE potentials 2 numbers are expected. "// &
816 : "For QUARTIC potentials 3 numbers are expected.", &
817 : usage="K {real}", type_of_var=real_t, &
818 19088 : n_var=-1, unit_str="internal_cp2k")
819 19088 : CALL section_add_keyword(section, keyword)
820 19088 : CALL keyword_release(keyword)
821 :
822 : CALL keyword_create(keyword, __LOCATION__, name="CS", &
823 : description="Defines the cubic stretch term.", &
824 : usage="CS {real}", default_r_val=0.0_dp, type_of_var=real_t, &
825 19088 : n_var=1, unit_str="bohr^-1")
826 19088 : CALL section_add_keyword(section, keyword)
827 19088 : CALL keyword_release(keyword)
828 :
829 : CALL keyword_create(keyword, __LOCATION__, name="R0", &
830 : description="Defines the equilibrium distance.", &
831 : usage="R0 {real}", type_of_var=real_t, &
832 19088 : n_var=1, unit_str="bohr")
833 19088 : CALL section_add_keyword(section, keyword)
834 19088 : CALL keyword_release(keyword)
835 :
836 19088 : END SUBROUTINE create_BOND_section
837 :
838 : ! **************************************************************************************************
839 : !> \brief This section specifies the charge of the MM atoms
840 : !> \param section the section to create
841 : !> \author teo
842 : ! **************************************************************************************************
843 9544 : SUBROUTINE create_charges_section(section)
844 : TYPE(section_type), POINTER :: section
845 :
846 : TYPE(keyword_type), POINTER :: keyword
847 :
848 9544 : CPASSERT(.NOT. ASSOCIATED(section))
849 : CALL section_create(section, __LOCATION__, name="charges", &
850 : description="Allow to specify an array of classical charges, thus avoiding the"// &
851 : " packing and permitting the usage of different charges for same atomic types.", &
852 9544 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
853 :
854 9544 : NULLIFY (keyword)
855 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
856 : description="Value of the charge for the individual atom. Order MUST reflect"// &
857 : " the one specified for the geometry.", repeats=.TRUE., usage="{Real}", &
858 9544 : type_of_var=real_t)
859 9544 : CALL section_add_keyword(section, keyword)
860 9544 : CALL keyword_release(keyword)
861 :
862 9544 : END SUBROUTINE create_charges_section
863 :
864 : ! **************************************************************************************************
865 : !> \brief This section specifies the charge of the MM atoms
866 : !> \param section the section to create
867 : !> \author teo
868 : ! **************************************************************************************************
869 28632 : SUBROUTINE create_charge_section(section)
870 : TYPE(section_type), POINTER :: section
871 :
872 : TYPE(keyword_type), POINTER :: keyword
873 :
874 28632 : CPASSERT(.NOT. ASSOCIATED(section))
875 : CALL section_create(section, __LOCATION__, name="charge", &
876 : description="This section specifies the charge of the MM atoms", &
877 28632 : n_keywords=1, n_subsections=0, repeats=.TRUE.)
878 :
879 28632 : NULLIFY (keyword)
880 :
881 : CALL keyword_create(keyword, __LOCATION__, name="ATOM", &
882 : description="Defines the atomic kind of the charge.", &
883 : usage="ATOM {KIND1}", type_of_var=char_t, &
884 28632 : n_var=1)
885 28632 : CALL section_add_keyword(section, keyword)
886 28632 : CALL keyword_release(keyword)
887 :
888 : CALL keyword_create(keyword, __LOCATION__, name="CHARGE", &
889 : description="Defines the charge of the MM atom in electron charge unit.", &
890 : usage="CHARGE {real}", type_of_var=real_t, &
891 28632 : n_var=1)
892 28632 : CALL section_add_keyword(section, keyword)
893 28632 : CALL keyword_release(keyword)
894 :
895 28632 : END SUBROUTINE create_charge_section
896 :
897 : ! **************************************************************************************************
898 : !> \brief This section specifies the isotropic polarizability of the MM atoms
899 : !> \param section the section to create
900 : !> \author Marcel Baer
901 : ! **************************************************************************************************
902 9544 : SUBROUTINE create_quadrupole_section(section)
903 : TYPE(section_type), POINTER :: section
904 :
905 : TYPE(keyword_type), POINTER :: keyword
906 :
907 9544 : CPASSERT(.NOT. ASSOCIATED(section))
908 : CALL section_create( &
909 : section, __LOCATION__, name="QUADRUPOLE", &
910 : description="This section specifies that we will perform an SCF quadrupole calculation of the MM atoms. "// &
911 : "Needs KEYWORD POL_SCF in POISSON secton", &
912 9544 : n_keywords=1, n_subsections=0, repeats=.TRUE.)
913 :
914 9544 : NULLIFY (keyword)
915 :
916 : CALL keyword_create(keyword, __LOCATION__, name="ATOM", &
917 : description="Defines the atomic kind of the SCF quadrupole.", &
918 : usage="ATOM {KIND1}", type_of_var=char_t, &
919 9544 : n_var=1)
920 9544 : CALL section_add_keyword(section, keyword)
921 9544 : CALL keyword_release(keyword)
922 :
923 : CALL keyword_create(keyword, __LOCATION__, name="CPOL", &
924 : description="Defines the isotropic polarizability of the MM atom.", &
925 : usage="CPOL {real}", type_of_var=real_t, &
926 9544 : n_var=1, unit_str='internal_cp2k')
927 9544 : CALL section_add_keyword(section, keyword)
928 9544 : CALL keyword_release(keyword)
929 :
930 9544 : END SUBROUTINE create_quadrupole_section
931 :
932 : ! **************************************************************************************************
933 : !> \brief This section specifies the isotropic polarizability of the MM atoms
934 : !> \param section the section to create
935 : !> \author Marcel Baer
936 : ! **************************************************************************************************
937 9544 : SUBROUTINE create_dipole_section(section)
938 : TYPE(section_type), POINTER :: section
939 :
940 : TYPE(keyword_type), POINTER :: keyword
941 : TYPE(section_type), POINTER :: subsection
942 :
943 9544 : CPASSERT(.NOT. ASSOCIATED(section))
944 : CALL section_create(section, __LOCATION__, name="DIPOLE", &
945 : description="This section specifies that we will perform an SCF dipole calculation of the MM atoms. "// &
946 : "Needs KEYWORD POL_SCF in POISSON secton", &
947 9544 : n_keywords=1, n_subsections=1, repeats=.TRUE.)
948 :
949 9544 : NULLIFY (subsection, keyword)
950 :
951 : CALL keyword_create(keyword, __LOCATION__, name="ATOM", &
952 : description="Defines the atomic kind of the SCF dipole.", &
953 : usage="ATOM {KIND1}", type_of_var=char_t, &
954 9544 : n_var=1)
955 9544 : CALL section_add_keyword(section, keyword)
956 9544 : CALL keyword_release(keyword)
957 :
958 : CALL keyword_create(keyword, __LOCATION__, name="APOL", &
959 : description="Defines the isotropic polarizability of the MM atom.", &
960 : usage="APOL {real}", type_of_var=real_t, &
961 9544 : n_var=1, unit_str='angstrom^3')
962 9544 : CALL section_add_keyword(section, keyword)
963 9544 : CALL keyword_release(keyword)
964 :
965 9544 : CALL create_DAMPING_section(subsection)
966 9544 : CALL section_add_subsection(section, subsection)
967 9544 : CALL section_release(subsection)
968 9544 : END SUBROUTINE create_dipole_section
969 :
970 : ! **************************************************************************************************
971 : !> \brief This section specifies the idamping parameters for polarizable atoms
972 : !> \param section the section to create
973 : !> \author Rodolphe Vuilleumier
974 : ! **************************************************************************************************
975 9544 : SUBROUTINE create_damping_section(section)
976 : TYPE(section_type), POINTER :: section
977 :
978 : TYPE(keyword_type), POINTER :: keyword
979 :
980 9544 : CPASSERT(.NOT. ASSOCIATED(section))
981 : CALL section_create(section, __LOCATION__, name="DAMPING", &
982 : description="This section specifies optional electric field damping for the polarizable atoms. ", &
983 9544 : n_keywords=4, n_subsections=0, repeats=.TRUE.)
984 :
985 9544 : NULLIFY (keyword)
986 :
987 : CALL keyword_create(keyword, __LOCATION__, name="ATOM", &
988 : description="Defines the atomic kind for this damping function.", &
989 : usage="ATOM {KIND1}", type_of_var=char_t, &
990 9544 : n_var=1)
991 9544 : CALL section_add_keyword(section, keyword)
992 9544 : CALL keyword_release(keyword)
993 :
994 : CALL keyword_create(keyword, __LOCATION__, name="TYPE", &
995 : description="Defines the damping type.", &
996 : usage="TYPE {string}", type_of_var=char_t, &
997 9544 : n_var=1, default_c_val="TANG-TOENNIES")
998 9544 : CALL section_add_keyword(section, keyword)
999 9544 : CALL keyword_release(keyword)
1000 :
1001 : CALL keyword_create(keyword, __LOCATION__, name="ORDER", &
1002 : description="Defines the order for this damping.", &
1003 : usage="ORDER {integer}", type_of_var=integer_t, &
1004 9544 : n_var=1, default_i_val=3)
1005 9544 : CALL section_add_keyword(section, keyword)
1006 9544 : CALL keyword_release(keyword)
1007 :
1008 : CALL keyword_create(keyword, __LOCATION__, name="BIJ", &
1009 : description="Defines the BIJ parameter for this damping.", &
1010 : usage="BIJ {real}", type_of_var=real_t, &
1011 9544 : n_var=1, unit_str='angstrom^-1')
1012 9544 : CALL section_add_keyword(section, keyword)
1013 9544 : CALL keyword_release(keyword)
1014 :
1015 : CALL keyword_create(keyword, __LOCATION__, name="CIJ", &
1016 : description="Defines the CIJ parameter for this damping.", &
1017 : usage="CIJ {real}", type_of_var=real_t, &
1018 9544 : n_var=1, unit_str='')
1019 9544 : CALL section_add_keyword(section, keyword)
1020 9544 : CALL keyword_release(keyword)
1021 :
1022 9544 : END SUBROUTINE create_damping_section
1023 :
1024 : ! **************************************************************************************************
1025 : !> \brief This section specifies the charge of the MM atoms
1026 : !> \param section the section to create
1027 : !> \author teo
1028 : ! **************************************************************************************************
1029 9544 : SUBROUTINE create_shell_section(section)
1030 : TYPE(section_type), POINTER :: section
1031 :
1032 : TYPE(keyword_type), POINTER :: keyword
1033 :
1034 9544 : CPASSERT(.NOT. ASSOCIATED(section))
1035 : CALL section_create(section, __LOCATION__, name="SHELL", &
1036 : description="This section specifies the parameters for shell-model potentials", &
1037 : n_keywords=6, n_subsections=0, repeats=.TRUE., &
1038 38176 : citations=[Dick1958, Mitchell1993, Devynck2012])
1039 :
1040 9544 : NULLIFY (keyword)
1041 :
1042 : CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
1043 : description="The kind for which the shell potential parameters are given ", &
1044 9544 : usage="H", default_c_val="DEFAULT")
1045 9544 : CALL section_add_keyword(section, keyword)
1046 9544 : CALL keyword_release(keyword)
1047 :
1048 : CALL keyword_create(keyword, __LOCATION__, name="CORE_CHARGE", &
1049 : variants=["CORE"], &
1050 : description="Partial charge assigned to the core (electron charge units)", &
1051 : usage="CORE_CHARGE {real}", &
1052 19088 : default_r_val=0.0_dp)
1053 9544 : CALL section_add_keyword(section, keyword)
1054 9544 : CALL keyword_release(keyword)
1055 :
1056 : CALL keyword_create(keyword, __LOCATION__, name="SHELL_CHARGE", &
1057 : variants=["SHELL"], &
1058 : description="Partial charge assigned to the shell (electron charge units)", &
1059 : usage="SHELL_CHARGE {real}", &
1060 19088 : default_r_val=0.0_dp)
1061 9544 : CALL section_add_keyword(section, keyword)
1062 9544 : CALL keyword_release(keyword)
1063 :
1064 : CALL keyword_create(keyword, __LOCATION__, name="MASS_FRACTION", &
1065 : variants=["MASS"], &
1066 : description="Fraction of the mass of the atom to be assigned to the shell", &
1067 : usage="MASS_FRACTION {real}", &
1068 19088 : default_r_val=0.1_dp)
1069 9544 : CALL section_add_keyword(section, keyword)
1070 9544 : CALL keyword_release(keyword)
1071 :
1072 : CALL keyword_create(keyword, __LOCATION__, name="K2_SPRING", &
1073 : variants=s2a("K2", "SPRING"), &
1074 : description="Force constant k2 of the spring potential 1/2*k2*r^2 + 1/24*k4*r^4 "// &
1075 : "binding a core-shell pair when a core-shell potential is employed.", &
1076 : repeats=.FALSE., &
1077 : usage="K2_SPRING {real}", &
1078 : default_r_val=-1.0_dp, &
1079 9544 : unit_str="hartree*bohr^-2")
1080 9544 : CALL section_add_keyword(section, keyword)
1081 9544 : CALL keyword_release(keyword)
1082 :
1083 : CALL keyword_create(keyword, __LOCATION__, name="K4_SPRING", &
1084 : variants=s2a("K4"), &
1085 : description="Force constant k4 of the spring potential 1/2*k2*r^2 + 1/24*k4*r^4 "// &
1086 : "binding a core-shell pair when a core-shell potential is employed. "// &
1087 : "By default a harmonic spring potential is used, i.e. k4 is zero.", &
1088 : repeats=.FALSE., &
1089 : usage="K4_SPRING {real}", &
1090 : default_r_val=0.0_dp, &
1091 9544 : unit_str="hartree*bohr^-4")
1092 9544 : CALL section_add_keyword(section, keyword)
1093 9544 : CALL keyword_release(keyword)
1094 :
1095 : CALL keyword_create(keyword, __LOCATION__, name="MAX_DISTANCE", &
1096 : description="Assign a maximum elongation of the spring, "// &
1097 : "if negative no limit is imposed", &
1098 : usage="MAX_DISTANCE 0.0", &
1099 : default_r_val=-1.0_dp, &
1100 9544 : unit_str="angstrom")
1101 9544 : CALL section_add_keyword(section, keyword)
1102 9544 : CALL keyword_release(keyword)
1103 :
1104 : CALL keyword_create(keyword, __LOCATION__, name="SHELL_CUTOFF", &
1105 : description="Define a screening function to exclude some neighbors "// &
1106 : "of the shell when electrostatic interaction are considered, "// &
1107 : "if negative no screening is operated", &
1108 : usage="SHELL_CUTOFF -1.0", &
1109 : default_r_val=-1.0_dp, &
1110 9544 : unit_str="angstrom")
1111 9544 : CALL section_add_keyword(section, keyword)
1112 9544 : CALL keyword_release(keyword)
1113 :
1114 9544 : END SUBROUTINE create_shell_section
1115 :
1116 : ! **************************************************************************************************
1117 : !> \brief This section specifies the input parameters for 1-4 NON-BONDED
1118 : !> Interactions
1119 : !> \param section the section to create
1120 : !> \author teo
1121 : ! **************************************************************************************************
1122 19088 : SUBROUTINE create_NONBONDED14_section(section)
1123 : TYPE(section_type), POINTER :: section
1124 :
1125 : TYPE(section_type), POINTER :: subsection
1126 :
1127 19088 : CPASSERT(.NOT. ASSOCIATED(section))
1128 : CALL section_create(section, __LOCATION__, name="nonbonded14", &
1129 : description="This section specifies the input parameters for 1-4 NON-BONDED interactions.", &
1130 19088 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
1131 :
1132 19088 : NULLIFY (subsection)
1133 19088 : CALL create_LJ_section(subsection)
1134 19088 : CALL section_add_subsection(section, subsection)
1135 19088 : CALL section_release(subsection)
1136 :
1137 19088 : CALL create_Williams_section(subsection)
1138 19088 : CALL section_add_subsection(section, subsection)
1139 19088 : CALL section_release(subsection)
1140 :
1141 19088 : CALL create_Goodwin_section(subsection)
1142 19088 : CALL section_add_subsection(section, subsection)
1143 19088 : CALL section_release(subsection)
1144 :
1145 19088 : CALL create_GENPOT_section(subsection)
1146 19088 : CALL section_add_subsection(section, subsection)
1147 19088 : CALL section_release(subsection)
1148 :
1149 19088 : END SUBROUTINE create_NONBONDED14_section
1150 :
1151 : ! **************************************************************************************************
1152 : !> \brief This section specifies the input parameters for 1-4 NON-BONDED
1153 : !> Interactions
1154 : !> \param section the section to create
1155 : !> \author teo
1156 : ! **************************************************************************************************
1157 9544 : SUBROUTINE create_NONBONDED_section(section)
1158 : TYPE(section_type), POINTER :: section
1159 :
1160 : TYPE(section_type), POINTER :: subsection
1161 :
1162 9544 : CPASSERT(.NOT. ASSOCIATED(section))
1163 : CALL section_create(section, __LOCATION__, name="nonbonded", &
1164 : description="This section specifies the input parameters for NON-BONDED interactions.", &
1165 9544 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
1166 :
1167 9544 : NULLIFY (subsection)
1168 9544 : CALL create_LJ_section(subsection)
1169 9544 : CALL section_add_subsection(section, subsection)
1170 9544 : CALL section_release(subsection)
1171 :
1172 9544 : CALL create_Williams_section(subsection)
1173 9544 : CALL section_add_subsection(section, subsection)
1174 9544 : CALL section_release(subsection)
1175 :
1176 9544 : CALL create_EAM_section(subsection)
1177 9544 : CALL section_add_subsection(section, subsection)
1178 9544 : CALL section_release(subsection)
1179 :
1180 9544 : CALL create_NEQUIP_section(subsection)
1181 9544 : CALL section_add_subsection(section, subsection)
1182 9544 : CALL section_release(subsection)
1183 :
1184 9544 : CALL create_ACE_section(subsection)
1185 9544 : CALL section_add_subsection(section, subsection)
1186 9544 : CALL section_release(subsection)
1187 :
1188 9544 : CALL create_DEEPMD_section(subsection)
1189 9544 : CALL section_add_subsection(section, subsection)
1190 9544 : CALL section_release(subsection)
1191 :
1192 9544 : CALL create_Goodwin_section(subsection)
1193 9544 : CALL section_add_subsection(section, subsection)
1194 9544 : CALL section_release(subsection)
1195 :
1196 9544 : CALL create_IPBV_section(subsection)
1197 9544 : CALL section_add_subsection(section, subsection)
1198 9544 : CALL section_release(subsection)
1199 :
1200 9544 : CALL create_BMHFT_section(subsection)
1201 9544 : CALL section_add_subsection(section, subsection)
1202 9544 : CALL section_release(subsection)
1203 :
1204 9544 : CALL create_BMHFTD_section(subsection)
1205 9544 : CALL section_add_subsection(section, subsection)
1206 9544 : CALL section_release(subsection)
1207 :
1208 9544 : CALL create_Buck4r_section(subsection)
1209 9544 : CALL section_add_subsection(section, subsection)
1210 9544 : CALL section_release(subsection)
1211 :
1212 9544 : CALL create_Buckmorse_section(subsection)
1213 9544 : CALL section_add_subsection(section, subsection)
1214 9544 : CALL section_release(subsection)
1215 :
1216 9544 : CALL create_GENPOT_section(subsection)
1217 9544 : CALL section_add_subsection(section, subsection)
1218 9544 : CALL section_release(subsection)
1219 :
1220 9544 : CALL create_Tersoff_section(subsection)
1221 9544 : CALL section_add_subsection(section, subsection)
1222 9544 : CALL section_release(subsection)
1223 :
1224 9544 : CALL create_Siepmann_section(subsection)
1225 9544 : CALL section_add_subsection(section, subsection)
1226 9544 : CALL section_release(subsection)
1227 :
1228 9544 : CALL create_Gal_section(subsection)
1229 9544 : CALL section_add_subsection(section, subsection)
1230 9544 : CALL section_release(subsection)
1231 :
1232 9544 : CALL create_Gal21_section(subsection)
1233 9544 : CALL section_add_subsection(section, subsection)
1234 9544 : CALL section_release(subsection)
1235 :
1236 9544 : CALL create_TABPOT_section(subsection)
1237 9544 : CALL section_add_subsection(section, subsection)
1238 9544 : CALL section_release(subsection)
1239 :
1240 9544 : END SUBROUTINE create_NONBONDED_section
1241 :
1242 : ! **************************************************************************************************
1243 : !> \brief This section specifies the input parameters for generation of
1244 : !> neighbor lists
1245 : !> \param section the section to create
1246 : !> \author teo [07.2007] - Zurich University
1247 : ! **************************************************************************************************
1248 28648 : SUBROUTINE create_neighbor_lists_section(section)
1249 : TYPE(section_type), POINTER :: section
1250 :
1251 : TYPE(keyword_type), POINTER :: keyword
1252 :
1253 28648 : NULLIFY (keyword)
1254 28648 : CPASSERT(.NOT. ASSOCIATED(section))
1255 : CALL section_create(section, __LOCATION__, name="neighbor_lists", &
1256 : description="This section specifies the input parameters for the construction of"// &
1257 : " neighbor lists.", &
1258 28648 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
1259 :
1260 : CALL keyword_create(keyword, __LOCATION__, name="VERLET_SKIN", &
1261 : description="Defines the Verlet Skin for the generation of the neighbor lists", &
1262 : usage="VERLET_SKIN {real}", default_r_val=cp_unit_to_cp2k(value=1.0_dp, &
1263 : unit_str="angstrom"), &
1264 28648 : unit_str="angstrom")
1265 28648 : CALL section_add_keyword(section, keyword)
1266 28648 : CALL keyword_release(keyword)
1267 :
1268 : CALL keyword_create(keyword, __LOCATION__, name="neighbor_lists_from_scratch", &
1269 : description="This keyword enables the building of the neighbouring list from scratch.", &
1270 : usage="neighbor_lists_from_scratch logical", &
1271 28648 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1272 28648 : CALL section_add_keyword(section, keyword)
1273 28648 : CALL keyword_release(keyword)
1274 :
1275 : CALL keyword_create(keyword, __LOCATION__, name="GEO_CHECK", &
1276 : description="This keyword enables the check that two atoms are never below the minimum"// &
1277 : " value used to construct the splines during the construction of the neighbouring list."// &
1278 : " Disabling this keyword avoids CP2K to abort in case two atoms are below the minimum"// &
1279 : " value of the radius used to generate the splines.", &
1280 : usage="GEO_CHECK", &
1281 28648 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
1282 28648 : CALL section_add_keyword(section, keyword)
1283 28648 : CALL keyword_release(keyword)
1284 :
1285 28648 : END SUBROUTINE create_neighbor_lists_section
1286 :
1287 : ! **************************************************************************************************
1288 : !> \brief This section specifies the input parameters for a generic potential form
1289 : !> \param section the section to create
1290 : !> \author teo
1291 : ! **************************************************************************************************
1292 47736 : SUBROUTINE create_GENPOT_section(section)
1293 : TYPE(section_type), POINTER :: section
1294 :
1295 : TYPE(keyword_type), POINTER :: keyword
1296 :
1297 47736 : CPASSERT(.NOT. ASSOCIATED(section))
1298 : CALL section_create(section, __LOCATION__, name="GENPOT", &
1299 : description="This section specifies the input parameters for a generic potential type. "// &
1300 : docf(), &
1301 47736 : n_keywords=1, n_subsections=0, repeats=.TRUE.)
1302 :
1303 47736 : NULLIFY (keyword)
1304 :
1305 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
1306 : description="Defines the atomic kind involved in the generic potential", &
1307 : usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
1308 47736 : n_var=2)
1309 47736 : CALL section_add_keyword(section, keyword)
1310 47736 : CALL keyword_release(keyword)
1311 :
1312 : CALL keyword_create(keyword, __LOCATION__, name="FUNCTION", &
1313 : description="Specifies the functional form in mathematical notation.", &
1314 : usage="FUNCTION a\*EXP(-b\*x^2)/x+D\*log10(x)", type_of_var=lchar_t, &
1315 47736 : n_var=1)
1316 47736 : CALL section_add_keyword(section, keyword)
1317 47736 : CALL keyword_release(keyword)
1318 :
1319 : CALL keyword_create(keyword, __LOCATION__, name="VARIABLES", &
1320 : description="Defines the variable of the functional form.", &
1321 : usage="VARIABLES x", type_of_var=char_t, &
1322 47736 : n_var=-1)
1323 47736 : CALL section_add_keyword(section, keyword)
1324 47736 : CALL keyword_release(keyword)
1325 :
1326 : CALL keyword_create(keyword, __LOCATION__, name="PARAMETERS", &
1327 : description="Defines the parameters of the functional form", &
1328 : usage="PARAMETERS a b D", type_of_var=char_t, &
1329 47736 : n_var=-1, repeats=.TRUE.)
1330 47736 : CALL section_add_keyword(section, keyword)
1331 47736 : CALL keyword_release(keyword)
1332 :
1333 : CALL keyword_create(keyword, __LOCATION__, name="VALUES", &
1334 : description="Defines the values of parameter of the functional form", &
1335 : usage="VALUES ", type_of_var=real_t, &
1336 47736 : n_var=-1, repeats=.TRUE., unit_str="internal_cp2k")
1337 47736 : CALL section_add_keyword(section, keyword)
1338 47736 : CALL keyword_release(keyword)
1339 :
1340 : CALL keyword_create(keyword, __LOCATION__, name="UNITS", &
1341 : description="Optionally, allows to define valid CP2K unit strings for each parameter value. "// &
1342 : "It is assumed that the corresponding parameter value is specified in this unit.", &
1343 : usage="UNITS angstrom eV*angstrom^-1 angstrom^1 K", type_of_var=char_t, &
1344 47736 : n_var=-1, repeats=.TRUE.)
1345 47736 : CALL section_add_keyword(section, keyword)
1346 47736 : CALL keyword_release(keyword)
1347 :
1348 : CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
1349 : description="Defines the cutoff parameter of the generic potential", &
1350 : usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
1351 : unit_str="angstrom"), &
1352 47736 : unit_str="angstrom")
1353 47736 : CALL section_add_keyword(section, keyword)
1354 47736 : CALL keyword_release(keyword)
1355 :
1356 : CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
1357 : description="Defines the lower bound of the potential. If not set the range is the"// &
1358 : " full range generate by the spline", usage="RMIN {real}", &
1359 47736 : type_of_var=real_t, unit_str="angstrom")
1360 47736 : CALL section_add_keyword(section, keyword)
1361 47736 : CALL keyword_release(keyword)
1362 :
1363 : CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
1364 : description="Defines the upper bound of the potential. If not set the range is the"// &
1365 : " full range generate by the spline", usage="RMAX {real}", &
1366 47736 : type_of_var=real_t, unit_str="angstrom")
1367 47736 : CALL section_add_keyword(section, keyword)
1368 47736 : CALL keyword_release(keyword)
1369 :
1370 47736 : END SUBROUTINE create_GENPOT_section
1371 :
1372 : ! **************************************************************************************************
1373 : !> \brief This section specifies the input parameters for EAM potential type
1374 : !> \param section the section to create
1375 : !> \author teo
1376 : ! **************************************************************************************************
1377 9544 : SUBROUTINE create_EAM_section(section)
1378 : TYPE(section_type), POINTER :: section
1379 :
1380 : TYPE(keyword_type), POINTER :: keyword
1381 :
1382 9544 : CPASSERT(.NOT. ASSOCIATED(section))
1383 : CALL section_create(section, __LOCATION__, name="EAM", &
1384 : description="This section specifies the input parameters for EAM potential type.", &
1385 19088 : citations=[Foiles1986], n_keywords=1, n_subsections=0, repeats=.TRUE.)
1386 :
1387 9544 : NULLIFY (keyword)
1388 :
1389 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
1390 : description="Defines the atomic kind involved in the nonbond potential", &
1391 : usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
1392 9544 : n_var=2)
1393 9544 : CALL section_add_keyword(section, keyword)
1394 9544 : CALL keyword_release(keyword)
1395 :
1396 : CALL keyword_create(keyword, __LOCATION__, name="PARM_FILE_NAME", &
1397 : variants=["PARMFILE"], &
1398 : description="Specifies the filename that contains the tabulated EAM potential. "// &
1399 : "File structure: the first line of the potential file contains a title. "// &
1400 : "The second line contains: atomic number, mass and lattice constant. "// &
1401 : "These information are parsed but not used in CP2K. The third line contains: "// &
1402 : "dr: increment of r for the tabulated values of density and phi (assuming r starts in 0) [angstrom]; "// &
1403 : "drho: increment of density for the tabulated values of the embedding function (assuming rho starts "// &
1404 : "in 0) [au_c]; cutoff: cutoff of the EAM potential; npoints: number of points in tabulated. Follow "// &
1405 : "in order npoints lines for rho [au_c] and its derivative [au_c*angstrom^-1]; npoints lines for "// &
1406 : "PHI [ev] and its derivative [ev*angstrom^-1] and npoint lines for the embedded function [ev] "// &
1407 : "and its derivative [ev*au_c^-1].", &
1408 19088 : usage="PARM_FILE_NAME {FILENAME}", default_lc_val=" ")
1409 9544 : CALL section_add_keyword(section, keyword)
1410 9544 : CALL keyword_release(keyword)
1411 :
1412 9544 : END SUBROUTINE create_EAM_section
1413 :
1414 : ! **************************************************************************************************
1415 : !> \brief This section specifies the input parameters for NEQUIP potential type
1416 : !> \param section the section to create
1417 : !> \author teo
1418 : ! **************************************************************************************************
1419 9544 : SUBROUTINE create_NEQUIP_section(section)
1420 : TYPE(section_type), POINTER :: section
1421 :
1422 : TYPE(keyword_type), POINTER :: keyword
1423 :
1424 9544 : CPASSERT(.NOT. ASSOCIATED(section))
1425 : CALL section_create(section, __LOCATION__, name="NEQUIP", &
1426 : description="This section specifies the input parameters for NEQUIP potential type "// &
1427 : "based on equivariant neural networks, and for ALLEGRO, a local large-scale variant. "// &
1428 : "Note: To enable the prediction of stress, along with energies and forces, the keyword "// &
1429 : "StressForceOutput must be included in the nequip config *.yaml file used to train the "// &
1430 : "model, regardless of whether the model has been trained on the stress. "// &
1431 : "Requires linking with libtorch library from <https://pytorch.org/cppdocs/installing.html>.", &
1432 38176 : citations=[Batzner2022, Musaelian2023, Tan2025], n_keywords=1, n_subsections=0, repeats=.FALSE.)
1433 :
1434 9544 : NULLIFY (keyword)
1435 :
1436 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
1437 : description="Defines the atomic kinds involved in the NEQUIP potential. "// &
1438 : "Provide a list of each element, making sure that the mapping from the ATOMS list "// &
1439 : "to NequIP atom types is correct. This mapping should also be consistent for the "// &
1440 : "atomic coordinates as specified in the sections COORDS or TOPOLOGY.", &
1441 : usage="ATOMS {KIND 1} {KIND 2} .. {KIND N}", type_of_var=char_t, &
1442 9544 : n_var=-1)
1443 9544 : CALL section_add_keyword(section, keyword)
1444 9544 : CALL keyword_release(keyword)
1445 :
1446 : CALL keyword_create(keyword, __LOCATION__, name="MODEL_TYPE", &
1447 : variants=["MODEL"], &
1448 : description="Specifies the type of model used. Allowed values are NEQUIP or ALLEGRO.", &
1449 19088 : usage="MODEL_TYPE {NEQUIP}", default_lc_val=" ")
1450 9544 : CALL section_add_keyword(section, keyword)
1451 9544 : CALL keyword_release(keyword)
1452 :
1453 : CALL keyword_create(keyword, __LOCATION__, name="POT_FILE_NAME", &
1454 : variants=["MODEL_FILE_NAME"], &
1455 : description="Specifies the filename that contains the NEQUIP model.", &
1456 19088 : usage="POT_FILE_NAME {FILENAME}", default_lc_val=" ")
1457 9544 : CALL section_add_keyword(section, keyword)
1458 9544 : CALL keyword_release(keyword)
1459 :
1460 : CALL keyword_create(keyword, __LOCATION__, name="UNIT_LENGTH", &
1461 : description="Units of length in the NEQUIP model.pth file. "// &
1462 : "The units of positions, cell, energies and forces must be self-consistent: "// &
1463 : "e.g. coordinates in Angstrom, energies in eV, forces in eV/Angstrom. ", &
1464 9544 : usage="UNIT_LENGTH angstrom", default_c_val="angstrom")
1465 9544 : CALL section_add_keyword(section, keyword)
1466 9544 : CALL keyword_release(keyword)
1467 :
1468 : CALL keyword_create(keyword, __LOCATION__, name="UNIT_ENERGY", &
1469 : description="Units of energy in the NEQUIP model.pth file. "// &
1470 : "The units of positions, energies and forces must be self-consistent: "// &
1471 : "e.g. coordinates in Angstrom, energies in eV, forces in eV/Angstrom. ", &
1472 9544 : usage="UNIT_ENERGY hartree", default_c_val="eV")
1473 9544 : CALL section_add_keyword(section, keyword)
1474 9544 : CALL keyword_release(keyword)
1475 :
1476 : CALL keyword_create(keyword, __LOCATION__, name="UNIT_FORCES", &
1477 : description="Units of the forces in the NEQUIP model.pth file. "// &
1478 : "The units of positions, energies and forces must be self-consistent: "// &
1479 : "e.g. coordinates in Angstrom, energies in eV, forces in eV/Angstrom. ", &
1480 9544 : usage="UNIT_FORCES hartree/bohr", default_c_val="eV/Angstrom")
1481 9544 : CALL section_add_keyword(section, keyword)
1482 9544 : CALL keyword_release(keyword)
1483 :
1484 9544 : END SUBROUTINE create_NEQUIP_section
1485 :
1486 : ! **************************************************************************************************
1487 : !> \brief This section specifies the input parameters for ACE potential type
1488 : !> \param section the section to create
1489 : !> \author
1490 : ! **************************************************************************************************
1491 9544 : SUBROUTINE create_ACE_section(section)
1492 : TYPE(section_type), POINTER :: section
1493 :
1494 : TYPE(keyword_type), POINTER :: keyword
1495 :
1496 : CALL section_create(section, __LOCATION__, name="ACE", &
1497 : description="This section specifies the input parameters for Atomic Cluster Expansion type. "// &
1498 : "Mainly intended for accurate representation of "// &
1499 : "potential energy surfaces. "// &
1500 : "Requires linking with ACE library from "// &
1501 : "<a href=""https://github.com/ICAMS/lammps-user-pace"" "// &
1502 : "target=""_blank"">https://github.com/ICAMS/lammps-user-pace</a> .", &
1503 : citations=[Drautz2019, Lysogorskiy2021, Bochkarev2024], &
1504 38176 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
1505 9544 : NULLIFY (keyword)
1506 :
1507 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
1508 : description="Defines the atomic species. "// &
1509 : "Provide a list of each element, "// &
1510 : "making sure that the mapping from the ATOMS list to ACE atom types is correct.", &
1511 : usage="ATOMS {KIND 1} {KIND 2} .. {KIND N}", type_of_var=char_t, &
1512 9544 : n_var=-1)
1513 9544 : CALL section_add_keyword(section, keyword)
1514 9544 : CALL keyword_release(keyword)
1515 : CALL keyword_create(keyword, __LOCATION__, name="POT_FILE_NAME", &
1516 : variants=["PARMFILE"], &
1517 : description="Specifies the filename that contains the ACE potential parameters.", &
1518 19088 : usage="POT_FILE_NAME {FILENAME}", default_lc_val="test.yaml")
1519 9544 : CALL section_add_keyword(section, keyword)
1520 9544 : CALL keyword_release(keyword)
1521 9544 : END SUBROUTINE create_ACE_section
1522 :
1523 : ! **************************************************************************************************
1524 : !> \brief This section specifies the input parameters for DEEPMD potential type
1525 : !> \param section the section to create
1526 : !> \author ybzhuang
1527 : ! **************************************************************************************************
1528 9544 : SUBROUTINE create_DEEPMD_section(section)
1529 : TYPE(section_type), POINTER :: section
1530 :
1531 : TYPE(keyword_type), POINTER :: keyword
1532 :
1533 : CALL section_create(section, __LOCATION__, name="DEEPMD", &
1534 : description="This section specifies the input parameters for Deep Potential type. "// &
1535 : "Mainly intended for things like neural network to DFT "// &
1536 : "to achieve correlated-wavefunction-like accuracy. "// &
1537 : "Requires linking with DeePMD-kit library from "// &
1538 : "<a href=""https://docs.deepmodeling.com/projects/deepmd/en/master"" "// &
1539 : "target=""_blank"">https://docs.deepmodeling.com/projects/deepmd/en/master</a> .", &
1540 28632 : citations=[Wang2018, Zeng2023], n_keywords=1, n_subsections=0, repeats=.FALSE.)
1541 9544 : NULLIFY (keyword)
1542 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
1543 : description="Defines the atomic kinds involved in the Deep Potential. "// &
1544 : "Provide a list of each element, "// &
1545 : "making sure that the mapping from the ATOMS list to DeePMD atom types is correct.", &
1546 : usage="ATOMS {KIND 1} {KIND 2} .. {KIND N}", type_of_var=char_t, &
1547 9544 : n_var=-1)
1548 9544 : CALL section_add_keyword(section, keyword)
1549 9544 : CALL keyword_release(keyword)
1550 : CALL keyword_create(keyword, __LOCATION__, name="POT_FILE_NAME", &
1551 : variants=["PARMFILE"], &
1552 : description="Specifies the filename that contains the DeePMD-kit potential.", &
1553 19088 : usage="POT_FILE_NAME {FILENAME}", default_lc_val="graph.pb")
1554 9544 : CALL section_add_keyword(section, keyword)
1555 9544 : CALL keyword_release(keyword)
1556 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS_DEEPMD_TYPE", &
1557 : description="Specifies the atomic TYPE for the DeePMD-kit potential. "// &
1558 : "Provide a list of index, making sure that the mapping "// &
1559 : "from the ATOMS list to DeePMD atom types is correct. ", &
1560 : usage="ATOMS_DEEPMD_TYPE {TYPE INTEGER 1} {TYPE INTEGER 2} .. "// &
1561 : "{TYPE INTEGER N}", type_of_var=integer_t, &
1562 9544 : n_var=-1)
1563 9544 : CALL section_add_keyword(section, keyword)
1564 9544 : CALL keyword_release(keyword)
1565 9544 : END SUBROUTINE create_DEEPMD_section
1566 :
1567 : ! **************************************************************************************************
1568 : !> \brief This section specifies the input parameters for Lennard-Jones potential type
1569 : !> \param section the section to create
1570 : !> \author teo
1571 : ! **************************************************************************************************
1572 38176 : SUBROUTINE create_LJ_section(section)
1573 : TYPE(section_type), POINTER :: section
1574 :
1575 : TYPE(keyword_type), POINTER :: keyword
1576 :
1577 38176 : CPASSERT(.NOT. ASSOCIATED(section))
1578 : CALL section_create(section, __LOCATION__, name="lennard-jones", &
1579 : description="This section specifies the input parameters for LENNARD-JONES potential type. "// &
1580 : "Functional form: V(r) = 4.0 * EPSILON * [(SIGMA/r)^12-(SIGMA/r)^6].", &
1581 38176 : n_keywords=1, n_subsections=0, repeats=.TRUE.)
1582 :
1583 38176 : NULLIFY (keyword)
1584 :
1585 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
1586 : description="Defines the atomic kind involved in the nonbond potential", &
1587 : usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
1588 38176 : n_var=2)
1589 38176 : CALL section_add_keyword(section, keyword)
1590 38176 : CALL keyword_release(keyword)
1591 :
1592 : CALL keyword_create(keyword, __LOCATION__, name="EPSILON", &
1593 : description="Defines the EPSILON parameter of the LJ potential", &
1594 : usage="EPSILON {real}", type_of_var=real_t, &
1595 38176 : n_var=1, unit_str="K_e")
1596 38176 : CALL section_add_keyword(section, keyword)
1597 38176 : CALL keyword_release(keyword)
1598 :
1599 : CALL keyword_create(keyword, __LOCATION__, name="SIGMA", &
1600 : description="Defines the SIGMA parameter of the LJ potential", &
1601 : usage="SIGMA {real}", type_of_var=real_t, &
1602 38176 : n_var=1, unit_str="angstrom")
1603 38176 : CALL section_add_keyword(section, keyword)
1604 38176 : CALL keyword_release(keyword)
1605 :
1606 : CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
1607 : description="Defines the cutoff parameter of the LJ potential", &
1608 : usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
1609 : unit_str="angstrom"), &
1610 38176 : unit_str="angstrom")
1611 38176 : CALL section_add_keyword(section, keyword)
1612 38176 : CALL keyword_release(keyword)
1613 :
1614 : CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
1615 : description="Defines the lower bound of the potential. If not set the range is the"// &
1616 : " full range generate by the spline", usage="RMIN {real}", &
1617 38176 : type_of_var=real_t, unit_str="angstrom")
1618 38176 : CALL section_add_keyword(section, keyword)
1619 38176 : CALL keyword_release(keyword)
1620 :
1621 : CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
1622 : description="Defines the upper bound of the potential. If not set the range is the"// &
1623 : " full range generate by the spline", usage="RMAX {real}", &
1624 38176 : type_of_var=real_t, unit_str="angstrom")
1625 38176 : CALL section_add_keyword(section, keyword)
1626 38176 : CALL keyword_release(keyword)
1627 :
1628 38176 : END SUBROUTINE create_LJ_section
1629 :
1630 : ! **************************************************************************************************
1631 : !> \brief This section specifies the input parameters for Williams potential type
1632 : !> \param section the section to create
1633 : !> \author teo
1634 : ! **************************************************************************************************
1635 38176 : SUBROUTINE create_Williams_section(section)
1636 : TYPE(section_type), POINTER :: section
1637 :
1638 : TYPE(keyword_type), POINTER :: keyword
1639 :
1640 38176 : CPASSERT(.NOT. ASSOCIATED(section))
1641 : CALL section_create(section, __LOCATION__, name="williams", &
1642 : description="This section specifies the input parameters for WILLIAMS potential type. "// &
1643 : "Functional form: V(r) = A*EXP(-B*r) - C / r^6 .", &
1644 38176 : n_keywords=1, n_subsections=0, repeats=.TRUE.)
1645 :
1646 38176 : NULLIFY (keyword)
1647 :
1648 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
1649 : description="Defines the atomic kind involved in the nonbond potential", &
1650 : usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
1651 38176 : n_var=2)
1652 38176 : CALL section_add_keyword(section, keyword)
1653 38176 : CALL keyword_release(keyword)
1654 :
1655 : CALL keyword_create(keyword, __LOCATION__, name="A", &
1656 : description="Defines the A parameter of the Williams potential", &
1657 : usage="A {real}", type_of_var=real_t, &
1658 38176 : n_var=1, unit_str="K_e")
1659 38176 : CALL section_add_keyword(section, keyword)
1660 38176 : CALL keyword_release(keyword)
1661 :
1662 : CALL keyword_create(keyword, __LOCATION__, name="B", &
1663 : description="Defines the B parameter of the Williams potential", &
1664 : usage="B {real}", type_of_var=real_t, &
1665 38176 : n_var=1, unit_str="angstrom^-1")
1666 38176 : CALL section_add_keyword(section, keyword)
1667 38176 : CALL keyword_release(keyword)
1668 :
1669 : CALL keyword_create(keyword, __LOCATION__, name="C", &
1670 : description="Defines the C parameter of the Williams potential", &
1671 : usage="C {real}", type_of_var=real_t, &
1672 38176 : n_var=1, unit_str="K_e*angstrom^6")
1673 38176 : CALL section_add_keyword(section, keyword)
1674 38176 : CALL keyword_release(keyword)
1675 :
1676 : CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
1677 : description="Defines the cutoff parameter of the Williams potential", &
1678 : usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
1679 : unit_str="angstrom"), &
1680 38176 : unit_str="angstrom")
1681 38176 : CALL section_add_keyword(section, keyword)
1682 38176 : CALL keyword_release(keyword)
1683 :
1684 : CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
1685 : description="Defines the lower bound of the potential. If not set the range is the"// &
1686 : " full range generate by the spline", usage="RMIN {real}", &
1687 38176 : type_of_var=real_t, unit_str="angstrom")
1688 38176 : CALL section_add_keyword(section, keyword)
1689 38176 : CALL keyword_release(keyword)
1690 :
1691 : CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
1692 : description="Defines the upper bound of the potential. If not set the range is the"// &
1693 : " full range generate by the spline", usage="RMAX {real}", &
1694 38176 : type_of_var=real_t, unit_str="angstrom")
1695 38176 : CALL section_add_keyword(section, keyword)
1696 38176 : CALL keyword_release(keyword)
1697 :
1698 38176 : END SUBROUTINE create_Williams_section
1699 :
1700 : ! **************************************************************************************************
1701 : !> \brief This section specifies the input parameters for Goodwin potential type
1702 : !> \param section the section to create
1703 : !> \author teo
1704 : ! **************************************************************************************************
1705 38176 : SUBROUTINE create_Goodwin_section(section)
1706 : TYPE(section_type), POINTER :: section
1707 :
1708 : TYPE(keyword_type), POINTER :: keyword
1709 :
1710 38176 : CPASSERT(.NOT. ASSOCIATED(section))
1711 : CALL section_create(section, __LOCATION__, name="goodwin", &
1712 : description="This section specifies the input parameters for GOODWIN potential type. "// &
1713 : "Functional form: V(r) = EXP(M*(-(r/DC)**MC+(D/DC)**MC))*VR0*(D/r)**M.", &
1714 38176 : n_keywords=1, n_subsections=0, repeats=.TRUE.)
1715 :
1716 38176 : NULLIFY (keyword)
1717 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
1718 : description="Defines the atomic kind involved in the nonbond potential", &
1719 : usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
1720 38176 : n_var=2)
1721 38176 : CALL section_add_keyword(section, keyword)
1722 38176 : CALL keyword_release(keyword)
1723 :
1724 : CALL keyword_create(keyword, __LOCATION__, name="VR0", &
1725 : description="Defines the VR0 parameter of the Goodwin potential", &
1726 : usage="VR0 {real}", type_of_var=real_t, &
1727 38176 : n_var=1, unit_str="K_e")
1728 38176 : CALL section_add_keyword(section, keyword)
1729 38176 : CALL keyword_release(keyword)
1730 :
1731 : CALL keyword_create(keyword, __LOCATION__, name="D", &
1732 : description="Defines the D parameter of the Goodwin potential", &
1733 : usage="D {real}", type_of_var=real_t, &
1734 38176 : n_var=1, unit_str="angstrom")
1735 38176 : CALL section_add_keyword(section, keyword)
1736 38176 : CALL keyword_release(keyword)
1737 :
1738 : CALL keyword_create(keyword, __LOCATION__, name="DC", &
1739 : description="Defines the DC parameter of the Goodwin potential", &
1740 : usage="DC {real}", type_of_var=real_t, &
1741 38176 : n_var=1, unit_str="angstrom")
1742 38176 : CALL section_add_keyword(section, keyword)
1743 38176 : CALL keyword_release(keyword)
1744 :
1745 : CALL keyword_create(keyword, __LOCATION__, name="M", &
1746 : description="Defines the M parameter of the Goodwin potential", &
1747 : usage="M {real}", type_of_var=integer_t, &
1748 38176 : n_var=1)
1749 38176 : CALL section_add_keyword(section, keyword)
1750 38176 : CALL keyword_release(keyword)
1751 :
1752 : CALL keyword_create(keyword, __LOCATION__, name="MC", &
1753 : description="Defines the MC parameter of the Goodwin potential", &
1754 : usage="MC {real}", type_of_var=integer_t, &
1755 38176 : n_var=1)
1756 38176 : CALL section_add_keyword(section, keyword)
1757 38176 : CALL keyword_release(keyword)
1758 :
1759 : CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
1760 : description="Defines the cutoff parameter of the Goodwin potential", &
1761 : usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
1762 : unit_str="angstrom"), &
1763 38176 : unit_str="angstrom")
1764 38176 : CALL section_add_keyword(section, keyword)
1765 38176 : CALL keyword_release(keyword)
1766 :
1767 : CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
1768 : description="Defines the lower bound of the potential. If not set the range is the"// &
1769 : " full range generate by the spline", usage="RMIN {real}", &
1770 38176 : type_of_var=real_t, unit_str="angstrom")
1771 38176 : CALL section_add_keyword(section, keyword)
1772 38176 : CALL keyword_release(keyword)
1773 :
1774 : CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
1775 : description="Defines the upper bound of the potential. If not set the range is the"// &
1776 : " full range generate by the spline", usage="RMAX {real}", &
1777 38176 : type_of_var=real_t, unit_str="angstrom")
1778 38176 : CALL section_add_keyword(section, keyword)
1779 38176 : CALL keyword_release(keyword)
1780 :
1781 38176 : END SUBROUTINE create_Goodwin_section
1782 :
1783 : ! **************************************************************************************************
1784 : !> \brief This section specifies the input parameters for IPBV potential type
1785 : !> \param section the section to create
1786 : !> \author teo
1787 : ! **************************************************************************************************
1788 9544 : SUBROUTINE create_ipbv_section(section)
1789 : TYPE(section_type), POINTER :: section
1790 :
1791 : TYPE(keyword_type), POINTER :: keyword
1792 :
1793 9544 : CPASSERT(.NOT. ASSOCIATED(section))
1794 : CALL section_create(section, __LOCATION__, name="ipbv", &
1795 : description="This section specifies the input parameters for IPBV potential type. "// &
1796 : "Functional form: Implicit table function.", &
1797 9544 : n_keywords=1, n_subsections=0, repeats=.TRUE.)
1798 :
1799 9544 : NULLIFY (keyword)
1800 :
1801 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
1802 : description="Defines the atomic kind involved in the IPBV nonbond potential", &
1803 : usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
1804 9544 : n_var=2)
1805 9544 : CALL section_add_keyword(section, keyword)
1806 9544 : CALL keyword_release(keyword)
1807 :
1808 : CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
1809 : description="Defines the cutoff parameter of the IPBV potential", &
1810 : usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
1811 : unit_str="angstrom"), &
1812 9544 : unit_str="angstrom")
1813 9544 : CALL section_add_keyword(section, keyword)
1814 9544 : CALL keyword_release(keyword)
1815 :
1816 : CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
1817 : description="Defines the lower bound of the potential. If not set the range is the"// &
1818 : " full range generate by the spline", usage="RMIN {real}", &
1819 9544 : type_of_var=real_t, unit_str="angstrom")
1820 9544 : CALL section_add_keyword(section, keyword)
1821 9544 : CALL keyword_release(keyword)
1822 :
1823 : CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
1824 : description="Defines the upper bound of the potential. If not set the range is the"// &
1825 : " full range generate by the spline", usage="RMAX {real}", &
1826 9544 : type_of_var=real_t, unit_str="angstrom")
1827 9544 : CALL section_add_keyword(section, keyword)
1828 9544 : CALL keyword_release(keyword)
1829 :
1830 9544 : END SUBROUTINE create_ipbv_section
1831 :
1832 : ! **************************************************************************************************
1833 : !> \brief This section specifies the input parameters for BMHFT potential type
1834 : !> \param section the section to create
1835 : !> \author teo
1836 : ! **************************************************************************************************
1837 9544 : SUBROUTINE create_BMHFT_section(section)
1838 : TYPE(section_type), POINTER :: section
1839 :
1840 : TYPE(keyword_type), POINTER :: keyword
1841 :
1842 9544 : CPASSERT(.NOT. ASSOCIATED(section))
1843 : CALL section_create(section, __LOCATION__, name="BMHFT", &
1844 : description="This section specifies the input parameters for BMHFT potential type. "// &
1845 : "Functional form: V(r) = A * EXP(-B*r) - C/r^6 - D/r^8. "// &
1846 : "Values available inside cp2k only for the Na/Cl pair.", &
1847 28632 : citations=[Tosi1964a, Tosi1964b], n_keywords=1, n_subsections=0, repeats=.TRUE.)
1848 :
1849 9544 : NULLIFY (keyword)
1850 :
1851 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
1852 : description="Defines the atomic kind involved in the BMHFT nonbond potential", &
1853 : usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
1854 9544 : n_var=2)
1855 9544 : CALL section_add_keyword(section, keyword)
1856 9544 : CALL keyword_release(keyword)
1857 :
1858 : CALL keyword_create(keyword, __LOCATION__, name="MAP_ATOMS", &
1859 : description="Defines the kinds for which internally is defined the BMHFT nonbond potential"// &
1860 : " at the moment only Na and Cl.", &
1861 : usage="MAP_ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
1862 9544 : n_var=2)
1863 9544 : CALL section_add_keyword(section, keyword)
1864 9544 : CALL keyword_release(keyword)
1865 :
1866 : CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
1867 : description="Defines the cutoff parameter of the BMHFT potential", &
1868 : usage="RCUT {real}", default_r_val=7.8_dp, &
1869 9544 : unit_str="angstrom")
1870 9544 : CALL section_add_keyword(section, keyword)
1871 9544 : CALL keyword_release(keyword)
1872 :
1873 : CALL keyword_create(keyword, __LOCATION__, name="A", &
1874 : description="Defines the A parameter of the Fumi-Tosi Potential", &
1875 : usage="A {real}", type_of_var=real_t, &
1876 9544 : n_var=1, unit_str="hartree")
1877 9544 : CALL section_add_keyword(section, keyword)
1878 9544 : CALL keyword_release(keyword)
1879 :
1880 : CALL keyword_create(keyword, __LOCATION__, name="B", &
1881 : description="Defines the B parameter of the Fumi-Tosi Potential", &
1882 : usage="B {real}", type_of_var=real_t, &
1883 9544 : n_var=1, unit_str="angstrom^-1")
1884 9544 : CALL section_add_keyword(section, keyword)
1885 9544 : CALL keyword_release(keyword)
1886 :
1887 : CALL keyword_create(keyword, __LOCATION__, name="C", &
1888 : description="Defines the C parameter of the Fumi-Tosi Potential", &
1889 : usage="C {real}", type_of_var=real_t, &
1890 9544 : n_var=1, unit_str="hartree*angstrom^6")
1891 9544 : CALL section_add_keyword(section, keyword)
1892 9544 : CALL keyword_release(keyword)
1893 :
1894 : CALL keyword_create(keyword, __LOCATION__, name="D", &
1895 : description="Defines the D parameter of the Fumi-Tosi Potential", &
1896 : usage="D {real}", type_of_var=real_t, &
1897 9544 : n_var=1, unit_str="hartree*angstrom^8")
1898 9544 : CALL section_add_keyword(section, keyword)
1899 9544 : CALL keyword_release(keyword)
1900 :
1901 : CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
1902 : description="Defines the lower bound of the potential. If not set the range is the"// &
1903 : " full range generate by the spline", usage="RMIN {real}", &
1904 9544 : type_of_var=real_t, unit_str="angstrom")
1905 9544 : CALL section_add_keyword(section, keyword)
1906 9544 : CALL keyword_release(keyword)
1907 :
1908 : CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
1909 : description="Defines the upper bound of the potential. If not set the range is the"// &
1910 : " full range generate by the spline", usage="RMAX {real}", &
1911 9544 : type_of_var=real_t, unit_str="angstrom")
1912 9544 : CALL section_add_keyword(section, keyword)
1913 9544 : CALL keyword_release(keyword)
1914 :
1915 9544 : END SUBROUTINE create_BMHFT_section
1916 :
1917 : ! **************************************************************************************************
1918 : !> \brief This section specifies the input parameters for BMHFTD potential type
1919 : !> \param section the section to create
1920 : !> \par History
1921 : !> - Unused input keyword ORDER removed (18.10.2021, MK)
1922 : !> \author Mathieu Salanne 05.2010
1923 : ! **************************************************************************************************
1924 9544 : SUBROUTINE create_BMHFTD_section(section)
1925 : TYPE(section_type), POINTER :: section
1926 :
1927 : TYPE(keyword_type), POINTER :: keyword
1928 :
1929 9544 : CPASSERT(.NOT. ASSOCIATED(section))
1930 : CALL section_create(section, __LOCATION__, name="BMHFTD", &
1931 : description="This section specifies the input parameters for the BMHFTD potential type. "// &
1932 : "Functional form: V(r) = A*exp(-B*r) - f_6*(r)C/r^6 - f_8(r)*D/r^8 "// &
1933 : "where f_order(r) = 1 - exp(-BD*r)*\sum_{k=0}^order (BD*r)^k/k! "// &
1934 : "(Tang-Toennies damping function). No pre-defined parameter values are available.", &
1935 28632 : citations=[Tosi1964a, Tosi1964b], n_keywords=1, n_subsections=0, repeats=.TRUE.)
1936 :
1937 9544 : NULLIFY (keyword)
1938 :
1939 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
1940 : description="Defines the atomic kind involved in the BMHFTD nonbond potential", &
1941 : usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
1942 9544 : n_var=2)
1943 9544 : CALL section_add_keyword(section, keyword)
1944 9544 : CALL keyword_release(keyword)
1945 :
1946 : CALL keyword_create(keyword, __LOCATION__, name="MAP_ATOMS", &
1947 : description="Defines the kinds for which internally is defined the BMHFTD nonbond potential"// &
1948 : " at the moment no species included.", &
1949 : usage="MAP_ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
1950 9544 : n_var=2)
1951 9544 : CALL section_add_keyword(section, keyword)
1952 9544 : CALL keyword_release(keyword)
1953 :
1954 : CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
1955 : description="Defines the cutoff parameter of the BMHFTD potential", &
1956 : usage="RCUT {real}", default_r_val=7.8_dp, &
1957 9544 : unit_str="angstrom")
1958 9544 : CALL section_add_keyword(section, keyword)
1959 9544 : CALL keyword_release(keyword)
1960 :
1961 : CALL keyword_create(keyword, __LOCATION__, name="A", &
1962 : description="Defines the A parameter of the dispersion-damped Fumi-Tosi potential", &
1963 : usage="A {real}", type_of_var=real_t, &
1964 9544 : n_var=1, unit_str="hartree")
1965 9544 : CALL section_add_keyword(section, keyword)
1966 9544 : CALL keyword_release(keyword)
1967 :
1968 : CALL keyword_create(keyword, __LOCATION__, name="B", &
1969 : description="Defines the B parameter of the dispersion-damped Fumi-Tosi potential", &
1970 : usage="B {real}", type_of_var=real_t, &
1971 9544 : n_var=1, unit_str="angstrom^-1")
1972 9544 : CALL section_add_keyword(section, keyword)
1973 9544 : CALL keyword_release(keyword)
1974 :
1975 : CALL keyword_create(keyword, __LOCATION__, name="C", &
1976 : description="Defines the C parameter of the dispersion-damped Fumi-Tosi potential", &
1977 : usage="C {real}", type_of_var=real_t, &
1978 9544 : n_var=1, unit_str="hartree*angstrom^6")
1979 9544 : CALL section_add_keyword(section, keyword)
1980 9544 : CALL keyword_release(keyword)
1981 :
1982 : CALL keyword_create(keyword, __LOCATION__, name="D", &
1983 : description="Defines the D parameter of the dispersion-damped Fumi-Tosi potential", &
1984 : usage="D {real}", type_of_var=real_t, &
1985 9544 : n_var=1, unit_str="hartree*angstrom^8")
1986 9544 : CALL section_add_keyword(section, keyword)
1987 9544 : CALL keyword_release(keyword)
1988 :
1989 : CALL keyword_create(keyword, __LOCATION__, name="BD", &
1990 : description="Defines the BD parameters of the dispersion-damped Fumi-Tosi potential. "// &
1991 : "One or two parameter values are expected. If only one value is provided, then this "// &
1992 : "value will be used both for the 6th and the 8th order term.", &
1993 : usage="BD {real} {real}", type_of_var=real_t, &
1994 9544 : n_var=-1, unit_str="angstrom^-1")
1995 9544 : CALL section_add_keyword(section, keyword)
1996 9544 : CALL keyword_release(keyword)
1997 :
1998 : CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
1999 : description="Defines the lower bound of the potential. If not set the range is the"// &
2000 : " full range generate by the spline", usage="RMIN {real}", &
2001 9544 : type_of_var=real_t, unit_str="angstrom")
2002 9544 : CALL section_add_keyword(section, keyword)
2003 9544 : CALL keyword_release(keyword)
2004 :
2005 : CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
2006 : description="Defines the upper bound of the potential. If not set the range is the"// &
2007 : " full range generate by the spline", usage="RMAX {real}", &
2008 9544 : type_of_var=real_t, unit_str="angstrom")
2009 9544 : CALL section_add_keyword(section, keyword)
2010 9544 : CALL keyword_release(keyword)
2011 :
2012 9544 : END SUBROUTINE create_BMHFTD_section
2013 :
2014 : ! **************************************************************************************************
2015 : !> \brief This section specifies the input parameters for Buckingham 4 ranges potential type
2016 : !> \param section the section to create
2017 : !> \author MI
2018 : ! **************************************************************************************************
2019 9544 : SUBROUTINE create_Buck4r_section(section)
2020 : TYPE(section_type), POINTER :: section
2021 :
2022 : TYPE(keyword_type), POINTER :: keyword
2023 :
2024 9544 : CPASSERT(.NOT. ASSOCIATED(section))
2025 : CALL section_create(section, __LOCATION__, name="BUCK4RANGES", &
2026 : description="This section specifies the input parameters for the Buckingham 4-ranges"// &
2027 : " potential type."//newline// &
2028 : "| Range | Functional Form |"//newline// &
2029 : "| ----- | --------------- |"//newline// &
2030 : "| $ r < r_1 $ | $ V(r) = A\exp(-Br) $ |"//newline// &
2031 : "| $ r_1 \leq r < r_2 $ | $ V(r) = \sum_n \operatorname{POLY1}(n)r_n $ |"//newline// &
2032 : "| $ r_2 \leq r < r_3 $ | $ V(r) = \sum_n \operatorname{POLY2}(n)r_n $ |"//newline// &
2033 : "| $ r \geq r_3 $ | $ V(r) = -C/r_6 $ |"//newline, &
2034 9544 : n_keywords=1, n_subsections=0, repeats=.TRUE.)
2035 :
2036 9544 : NULLIFY (keyword)
2037 :
2038 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
2039 : description="Defines the atomic kind involved in the nonbond potential", &
2040 : usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
2041 9544 : n_var=2)
2042 9544 : CALL section_add_keyword(section, keyword)
2043 9544 : CALL keyword_release(keyword)
2044 :
2045 : CALL keyword_create(keyword, __LOCATION__, name="A", &
2046 : description="Defines the A parameter of the Buckingham potential", &
2047 : usage="A {real}", type_of_var=real_t, &
2048 9544 : n_var=1, unit_str="K_e")
2049 9544 : CALL section_add_keyword(section, keyword)
2050 9544 : CALL keyword_release(keyword)
2051 :
2052 : CALL keyword_create(keyword, __LOCATION__, name="B", &
2053 : description="Defines the B parameter of the Buckingham potential", &
2054 : usage="B {real}", type_of_var=real_t, &
2055 9544 : n_var=1, unit_str="angstrom^-1")
2056 9544 : CALL section_add_keyword(section, keyword)
2057 9544 : CALL keyword_release(keyword)
2058 :
2059 : CALL keyword_create(keyword, __LOCATION__, name="C", &
2060 : description="Defines the C parameter of the Buckingham potential", &
2061 : usage="C {real}", type_of_var=real_t, &
2062 9544 : n_var=1, unit_str="K_e*angstrom^6")
2063 9544 : CALL section_add_keyword(section, keyword)
2064 9544 : CALL keyword_release(keyword)
2065 :
2066 : CALL keyword_create(keyword, __LOCATION__, name="R1", &
2067 : description="Defines the upper bound of the first range ", &
2068 : usage="R1 {real}", type_of_var=real_t, &
2069 9544 : n_var=1, unit_str="angstrom")
2070 9544 : CALL section_add_keyword(section, keyword)
2071 9544 : CALL keyword_release(keyword)
2072 :
2073 : CALL keyword_create(keyword, __LOCATION__, name="R2", &
2074 : description="Defines the upper bound of the second range ", &
2075 : usage="R2 {real}", type_of_var=real_t, &
2076 9544 : n_var=1, unit_str="angstrom")
2077 9544 : CALL section_add_keyword(section, keyword)
2078 9544 : CALL keyword_release(keyword)
2079 :
2080 : CALL keyword_create(keyword, __LOCATION__, name="R3", &
2081 : description="Defines the upper bound of the third range ", &
2082 : usage="R3 {real}", type_of_var=real_t, &
2083 9544 : n_var=1, unit_str="angstrom")
2084 9544 : CALL section_add_keyword(section, keyword)
2085 9544 : CALL keyword_release(keyword)
2086 :
2087 : CALL keyword_create(keyword, __LOCATION__, name="POLY1", &
2088 : description="Coefficients of the polynomial used in the second range "// &
2089 : "This keyword can be repeated several times.", &
2090 : usage="POLY1 C1 C2 C3 ..", &
2091 9544 : n_var=-1, unit_str="K_e", type_of_var=real_t, repeats=.TRUE.)
2092 9544 : CALL section_add_keyword(section, keyword)
2093 9544 : CALL keyword_release(keyword)
2094 :
2095 : CALL keyword_create(keyword, __LOCATION__, name="POLY2", &
2096 : description="Coefficients of the polynomial used in the third range "// &
2097 : "This keyword can be repeated several times.", &
2098 : usage="POLY2 C1 C2 C3 ..", &
2099 9544 : n_var=-1, unit_str="K_e", type_of_var=real_t, repeats=.TRUE.)
2100 9544 : CALL section_add_keyword(section, keyword)
2101 9544 : CALL keyword_release(keyword)
2102 :
2103 : CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
2104 : description="Defines the cutoff parameter of the Buckingham potential", &
2105 : usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
2106 : unit_str="angstrom"), &
2107 9544 : unit_str="angstrom")
2108 9544 : CALL section_add_keyword(section, keyword)
2109 9544 : CALL keyword_release(keyword)
2110 :
2111 : CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
2112 : description="Defines the lower bound of the potential. If not set the range is the"// &
2113 : " full range generate by the spline", usage="RMIN {real}", &
2114 9544 : type_of_var=real_t, unit_str="angstrom")
2115 9544 : CALL section_add_keyword(section, keyword)
2116 9544 : CALL keyword_release(keyword)
2117 :
2118 : CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
2119 : description="Defines the upper bound of the potential. If not set the range is the"// &
2120 : " full range generate by the spline", usage="RMAX {real}", &
2121 9544 : type_of_var=real_t, unit_str="angstrom")
2122 9544 : CALL section_add_keyword(section, keyword)
2123 9544 : CALL keyword_release(keyword)
2124 :
2125 9544 : END SUBROUTINE create_Buck4r_section
2126 :
2127 : ! **************************************************************************************************
2128 : !> \brief This section specifies the input parameters for Buckingham + Morse potential type
2129 : !> \param section the section to create
2130 : !> \author MI
2131 : ! **************************************************************************************************
2132 9544 : SUBROUTINE create_Buckmorse_section(section)
2133 : TYPE(section_type), POINTER :: section
2134 :
2135 : TYPE(keyword_type), POINTER :: keyword
2136 :
2137 9544 : CPASSERT(.NOT. ASSOCIATED(section))
2138 : CALL section_create( &
2139 : section, __LOCATION__, name="BUCKMORSE", &
2140 : description="This section specifies the input parameters for"// &
2141 : " Buckingham plus Morse potential type"// &
2142 : " Functional Form: V(r) = F0*(B1+B2)*EXP([A1+A2-r]/[B1+B2])-C/r^6+D*{EXP[-2*beta*(r-R0)]-2*EXP[-beta*(r-R0)]}.", &
2143 19088 : citations=[Yamada2000], n_keywords=1, n_subsections=0, repeats=.TRUE.)
2144 :
2145 9544 : NULLIFY (keyword)
2146 :
2147 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
2148 : description="Defines the atomic kind involved in the nonbond potential", &
2149 : usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
2150 9544 : n_var=2)
2151 9544 : CALL section_add_keyword(section, keyword)
2152 9544 : CALL keyword_release(keyword)
2153 :
2154 : CALL keyword_create(keyword, __LOCATION__, name="F0", &
2155 : description="Defines the f0 parameter of Buckingham+Morse potential", &
2156 : usage="F0 {real}", type_of_var=real_t, &
2157 9544 : n_var=1, unit_str="K_e*angstrom^-1")
2158 9544 : CALL section_add_keyword(section, keyword)
2159 9544 : CALL keyword_release(keyword)
2160 :
2161 : CALL keyword_create(keyword, __LOCATION__, name="A1", &
2162 : description="Defines the A1 parameter of Buckingham+Morse potential", &
2163 : usage="A1 {real}", type_of_var=real_t, &
2164 9544 : n_var=1, unit_str="angstrom")
2165 9544 : CALL section_add_keyword(section, keyword)
2166 9544 : CALL keyword_release(keyword)
2167 :
2168 : CALL keyword_create(keyword, __LOCATION__, name="A2", &
2169 : description="Defines the A2 parameter of Buckingham+Morse potential", &
2170 : usage="A2 {real}", type_of_var=real_t, &
2171 9544 : n_var=1, unit_str="angstrom")
2172 9544 : CALL section_add_keyword(section, keyword)
2173 9544 : CALL keyword_release(keyword)
2174 :
2175 : CALL keyword_create(keyword, __LOCATION__, name="B1", &
2176 : description="Defines the B1 parameter of Buckingham+Morse potential", &
2177 : usage="B1 {real}", type_of_var=real_t, &
2178 9544 : n_var=1, unit_str="angstrom")
2179 9544 : CALL section_add_keyword(section, keyword)
2180 9544 : CALL keyword_release(keyword)
2181 :
2182 : CALL keyword_create(keyword, __LOCATION__, name="B2", &
2183 : description="Defines the B2 parameter of Buckingham+Morse potential", &
2184 : usage="B2 {real}", type_of_var=real_t, &
2185 9544 : n_var=1, unit_str="angstrom")
2186 9544 : CALL section_add_keyword(section, keyword)
2187 9544 : CALL keyword_release(keyword)
2188 :
2189 : CALL keyword_create(keyword, __LOCATION__, name="C", &
2190 : description="Defines the C parameter of Buckingham+Morse potential", &
2191 : usage="C {real}", type_of_var=real_t, &
2192 9544 : n_var=1, unit_str="K_e*angstrom^6")
2193 9544 : CALL section_add_keyword(section, keyword)
2194 9544 : CALL keyword_release(keyword)
2195 :
2196 : CALL keyword_create(keyword, __LOCATION__, name="D", &
2197 : description="Defines the amplitude for the Morse part ", &
2198 : usage="D {real}", type_of_var=real_t, &
2199 9544 : n_var=1, unit_str="K_e")
2200 9544 : CALL section_add_keyword(section, keyword)
2201 9544 : CALL keyword_release(keyword)
2202 :
2203 : CALL keyword_create(keyword, __LOCATION__, name="R0", &
2204 : description="Defines the equilibrium distance for the Morse part ", &
2205 : usage="R0 {real}", type_of_var=real_t, &
2206 9544 : n_var=1, unit_str="angstrom")
2207 9544 : CALL section_add_keyword(section, keyword)
2208 9544 : CALL keyword_release(keyword)
2209 :
2210 : CALL keyword_create(keyword, __LOCATION__, name="Beta", &
2211 : description="Defines the width for the Morse part ", &
2212 : usage="Beta {real}", type_of_var=real_t, &
2213 9544 : n_var=1, unit_str="angstrom^-1")
2214 9544 : CALL section_add_keyword(section, keyword)
2215 9544 : CALL keyword_release(keyword)
2216 :
2217 : CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
2218 : description="Defines the cutoff parameter of the Buckingham potential", &
2219 : usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
2220 : unit_str="angstrom"), &
2221 9544 : unit_str="angstrom")
2222 9544 : CALL section_add_keyword(section, keyword)
2223 9544 : CALL keyword_release(keyword)
2224 :
2225 : CALL keyword_create(keyword, __LOCATION__, name="RMIN", &
2226 : description="Defines the lower bound of the potential. If not set the range is the"// &
2227 : " full range generate by the spline", usage="RMIN {real}", &
2228 9544 : type_of_var=real_t, unit_str="angstrom")
2229 9544 : CALL section_add_keyword(section, keyword)
2230 9544 : CALL keyword_release(keyword)
2231 :
2232 : CALL keyword_create(keyword, __LOCATION__, name="RMAX", &
2233 : description="Defines the upper bound of the potential. If not set the range is the"// &
2234 : " full range generate by the spline", usage="RMAX {real}", &
2235 9544 : type_of_var=real_t, unit_str="angstrom")
2236 9544 : CALL section_add_keyword(section, keyword)
2237 9544 : CALL keyword_release(keyword)
2238 :
2239 9544 : END SUBROUTINE create_Buckmorse_section
2240 :
2241 : ! **************************************************************************************************
2242 : !> \brief This section specifies the input parameters for Tersoff potential type
2243 : !> (Tersoff, J. PRB 39(8), 5566, 1989)
2244 : !> \param section ...
2245 : ! **************************************************************************************************
2246 9544 : SUBROUTINE create_Tersoff_section(section)
2247 : TYPE(section_type), POINTER :: section
2248 :
2249 : TYPE(keyword_type), POINTER :: keyword
2250 :
2251 9544 : CPASSERT(.NOT. ASSOCIATED(section))
2252 : CALL section_create(section, __LOCATION__, name="TERSOFF", &
2253 : description="This section specifies the input parameters for Tersoff potential type.", &
2254 19088 : citations=[Tersoff1988], n_keywords=1, n_subsections=0, repeats=.TRUE.)
2255 :
2256 9544 : NULLIFY (keyword)
2257 :
2258 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
2259 : description="Defines the atomic kind involved in the nonbond potential", &
2260 : usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
2261 9544 : n_var=2)
2262 9544 : CALL section_add_keyword(section, keyword)
2263 9544 : CALL keyword_release(keyword)
2264 :
2265 : CALL keyword_create(keyword, __LOCATION__, name="A", &
2266 : description="Defines the A parameter of Tersoff potential", &
2267 : usage="A {real}", type_of_var=real_t, &
2268 : default_r_val=cp_unit_to_cp2k(value=1.8308E3_dp, &
2269 : unit_str="eV"), &
2270 9544 : n_var=1, unit_str="eV")
2271 9544 : CALL section_add_keyword(section, keyword)
2272 9544 : CALL keyword_release(keyword)
2273 :
2274 : CALL keyword_create(keyword, __LOCATION__, name="B", &
2275 : description="Defines the B parameter of Tersoff potential", &
2276 : usage="B {real}", type_of_var=real_t, &
2277 : default_r_val=cp_unit_to_cp2k(value=4.7118E2_dp, &
2278 : unit_str="eV"), &
2279 9544 : n_var=1, unit_str="eV")
2280 9544 : CALL section_add_keyword(section, keyword)
2281 9544 : CALL keyword_release(keyword)
2282 :
2283 : CALL keyword_create(keyword, __LOCATION__, name="lambda1", &
2284 : description="Defines the lambda1 parameter of Tersoff potential", &
2285 : usage="lambda1 {real}", type_of_var=real_t, &
2286 : default_r_val=cp_unit_to_cp2k(value=2.4799_dp, &
2287 : unit_str="angstrom^-1"), &
2288 9544 : n_var=1, unit_str="angstrom^-1")
2289 9544 : CALL section_add_keyword(section, keyword)
2290 9544 : CALL keyword_release(keyword)
2291 :
2292 : CALL keyword_create(keyword, __LOCATION__, name="lambda2", &
2293 : description="Defines the lambda2 parameter of Tersoff potential", &
2294 : usage="lambda2 {real}", type_of_var=real_t, &
2295 : default_r_val=cp_unit_to_cp2k(value=1.7322_dp, &
2296 : unit_str="angstrom^-1"), &
2297 9544 : n_var=1, unit_str="angstrom^-1")
2298 9544 : CALL section_add_keyword(section, keyword)
2299 9544 : CALL keyword_release(keyword)
2300 :
2301 : CALL keyword_create(keyword, __LOCATION__, name="alpha", &
2302 : description="Defines the alpha parameter of Tersoff potential", &
2303 : usage="alpha {real}", type_of_var=real_t, &
2304 : default_r_val=0.0_dp, &
2305 9544 : n_var=1)
2306 9544 : CALL section_add_keyword(section, keyword)
2307 9544 : CALL keyword_release(keyword)
2308 :
2309 : CALL keyword_create(keyword, __LOCATION__, name="beta", &
2310 : description="Defines the beta parameter of Tersoff potential", &
2311 : usage="beta {real}", type_of_var=real_t, &
2312 : default_r_val=1.0999E-6_dp, &
2313 9544 : n_var=1, unit_str="")
2314 9544 : CALL section_add_keyword(section, keyword)
2315 9544 : CALL keyword_release(keyword)
2316 :
2317 : CALL keyword_create(keyword, __LOCATION__, name="n", &
2318 : description="Defines the n parameter of Tersoff potential", &
2319 : usage="n {real}", type_of_var=real_t, &
2320 : default_r_val=7.8734E-1_dp, &
2321 9544 : n_var=1, unit_str="")
2322 9544 : CALL section_add_keyword(section, keyword)
2323 9544 : CALL keyword_release(keyword)
2324 :
2325 : CALL keyword_create(keyword, __LOCATION__, name="c", &
2326 : description="Defines the c parameter of Tersoff potential", &
2327 : usage="c {real}", type_of_var=real_t, &
2328 : default_r_val=1.0039E5_dp, &
2329 9544 : n_var=1, unit_str="")
2330 9544 : CALL section_add_keyword(section, keyword)
2331 9544 : CALL keyword_release(keyword)
2332 :
2333 : CALL keyword_create(keyword, __LOCATION__, name="d", &
2334 : description="Defines the d parameter of Tersoff potential", &
2335 : usage="d {real}", type_of_var=real_t, &
2336 : default_r_val=1.6218E1_dp, &
2337 9544 : n_var=1, unit_str="")
2338 9544 : CALL section_add_keyword(section, keyword)
2339 9544 : CALL keyword_release(keyword)
2340 :
2341 : CALL keyword_create(keyword, __LOCATION__, name="h", &
2342 : description="Defines the h parameter of Tersoff potential", &
2343 : usage="h {real}", type_of_var=real_t, &
2344 : default_r_val=-5.9826E-1_dp, &
2345 9544 : n_var=1, unit_str="")
2346 9544 : CALL section_add_keyword(section, keyword)
2347 9544 : CALL keyword_release(keyword)
2348 :
2349 : CALL keyword_create(keyword, __LOCATION__, name="lambda3", &
2350 : description="Defines the lambda3 parameter of Tersoff potential", &
2351 : usage="lambda3 {real}", type_of_var=real_t, &
2352 : default_r_val=cp_unit_to_cp2k(value=1.7322_dp, &
2353 : unit_str="angstrom^-1"), &
2354 9544 : n_var=1, unit_str="angstrom^-1")
2355 9544 : CALL section_add_keyword(section, keyword)
2356 9544 : CALL keyword_release(keyword)
2357 :
2358 : CALL keyword_create(keyword, __LOCATION__, name="bigR", &
2359 : description="Defines the bigR parameter of Tersoff potential", &
2360 : usage="bigR {real}", type_of_var=real_t, &
2361 : default_r_val=cp_unit_to_cp2k(value=2.85_dp, &
2362 : unit_str="angstrom"), &
2363 9544 : n_var=1, unit_str="angstrom")
2364 9544 : CALL section_add_keyword(section, keyword)
2365 9544 : CALL keyword_release(keyword)
2366 :
2367 : CALL keyword_create(keyword, __LOCATION__, name="bigD", &
2368 : description="Defines the D parameter of Tersoff potential", &
2369 : usage="bigD {real}", type_of_var=real_t, &
2370 : default_r_val=cp_unit_to_cp2k(value=0.15_dp, &
2371 : unit_str="angstrom"), &
2372 9544 : n_var=1, unit_str="angstrom")
2373 9544 : CALL section_add_keyword(section, keyword)
2374 9544 : CALL keyword_release(keyword)
2375 :
2376 : CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
2377 : description="Defines the cutoff parameter of the tersoff potential."// &
2378 : " This parameter is in principle already defined by the values of"// &
2379 : " bigD and bigR. But it is necessary to define it when using the tersoff"// &
2380 : " in conjunction with other potentials (for the same atomic pair) in order to have"// &
2381 : " the same consistent definition of RCUT for all potentials.", &
2382 : usage="RCUT {real}", type_of_var=real_t, &
2383 9544 : n_var=1, unit_str="angstrom")
2384 9544 : CALL section_add_keyword(section, keyword)
2385 9544 : CALL keyword_release(keyword)
2386 :
2387 9544 : END SUBROUTINE create_Tersoff_section
2388 :
2389 : ! **************************************************************************************************
2390 : !> \brief This section specifies the input parameters for Siepmann-Sprik
2391 : !> potential type
2392 : !> (Siepmann and Sprik, J. Chem. Phys. 102(1) 511, 1995)
2393 : !> \param section ...
2394 : ! **************************************************************************************************
2395 9544 : SUBROUTINE create_Siepmann_section(section)
2396 : TYPE(section_type), POINTER :: section
2397 :
2398 : TYPE(keyword_type), POINTER :: keyword
2399 :
2400 9544 : CPASSERT(.NOT. ASSOCIATED(section))
2401 : CALL section_create(section, __LOCATION__, name="SIEPMANN", &
2402 : description="This section specifies the input parameters for the"// &
2403 : " Siepmann-Sprik potential type. Consists of 4 terms:"// &
2404 : " T1+T2+T3+T4. The terms T1=A/rij^alpha and T2=-C/rij^6"// &
2405 : " have to be given via the GENPOT section. The terms T3+T4"// &
2406 : " are obtained from the SIEPMANN section. The Siepmann-Sprik"// &
2407 : " potential is designed for water-metal chemisorption.", &
2408 19088 : citations=[Siepmann1995], n_keywords=1, n_subsections=0, repeats=.TRUE.)
2409 :
2410 9544 : NULLIFY (keyword)
2411 :
2412 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
2413 : description="Defines the atomic kind involved in the nonbond potential", &
2414 : usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
2415 9544 : n_var=2)
2416 9544 : CALL section_add_keyword(section, keyword)
2417 9544 : CALL keyword_release(keyword)
2418 :
2419 : CALL keyword_create(keyword, __LOCATION__, name="B", &
2420 : description="Defines the B parameter of Siepmann potential", &
2421 : usage="B {real}", type_of_var=real_t, &
2422 : default_r_val=cp_unit_to_cp2k(value=0.6_dp, &
2423 : unit_str="angstrom"), &
2424 9544 : n_var=1, unit_str="angstrom")
2425 9544 : CALL section_add_keyword(section, keyword)
2426 9544 : CALL keyword_release(keyword)
2427 :
2428 : CALL keyword_create(keyword, __LOCATION__, name="D", &
2429 : description="Defines the D parameter of Siepmann potential", &
2430 : usage="D {real}", type_of_var=real_t, &
2431 : default_r_val=cp_unit_to_cp2k(value=3.688388_dp, &
2432 : unit_str="internal_cp2k"), &
2433 9544 : n_var=1, unit_str="internal_cp2k")
2434 9544 : CALL section_add_keyword(section, keyword)
2435 9544 : CALL keyword_release(keyword)
2436 :
2437 : CALL keyword_create(keyword, __LOCATION__, name="E", &
2438 : description="Defines the E parameter of Siepmann potential", &
2439 : usage="E {real}", type_of_var=real_t, &
2440 : default_r_val=cp_unit_to_cp2k(value=9.069025_dp, &
2441 : unit_str="internal_cp2k"), &
2442 9544 : n_var=1, unit_str="internal_cp2k")
2443 9544 : CALL section_add_keyword(section, keyword)
2444 9544 : CALL keyword_release(keyword)
2445 :
2446 : CALL keyword_create(keyword, __LOCATION__, name="F", &
2447 : description="Defines the F parameter of Siepmann potential", &
2448 : usage="F {real}", type_of_var=real_t, &
2449 9544 : default_r_val=13.3_dp, n_var=1)
2450 9544 : CALL section_add_keyword(section, keyword)
2451 9544 : CALL keyword_release(keyword)
2452 : !
2453 : CALL keyword_create(keyword, __LOCATION__, name="beta", &
2454 : description="Defines the beta parameter of Siepmann potential", &
2455 : usage="beta {real}", type_of_var=real_t, &
2456 9544 : default_r_val=10.0_dp, n_var=1)
2457 9544 : CALL section_add_keyword(section, keyword)
2458 9544 : CALL keyword_release(keyword)
2459 : !
2460 : CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
2461 : description="Defines the cutoff parameter of Siepmann potential", &
2462 : usage="RCUT {real}", type_of_var=real_t, &
2463 : default_r_val=cp_unit_to_cp2k(value=3.2_dp, &
2464 : unit_str="angstrom"), &
2465 9544 : n_var=1, unit_str="angstrom")
2466 9544 : CALL section_add_keyword(section, keyword)
2467 9544 : CALL keyword_release(keyword)
2468 : !
2469 : CALL keyword_create(keyword, __LOCATION__, name="ALLOW_OH_FORMATION", &
2470 : description=" The Siepmann-Sprik potential is actually designed for intact"// &
2471 : " water molecules only. If water is treated at the QM level,"// &
2472 : " water molecules can potentially dissociate, i.e."// &
2473 : " some O-H bonds might be stretched leading temporarily"// &
2474 : " to the formation of OH- ions. This keyword allows the"// &
2475 : " the formation of such ions. The T3 term (dipole term)"// &
2476 : " is then switched off for evaluating the interaction"// &
2477 : " between the OH- ion and the metal.", &
2478 : usage="ALLOW_OH_FORMATION TRUE", &
2479 9544 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2480 9544 : CALL section_add_keyword(section, keyword)
2481 9544 : CALL keyword_release(keyword)
2482 :
2483 : CALL keyword_create(keyword, __LOCATION__, name="ALLOW_H3O_FORMATION", &
2484 : description=" The Siepmann-Sprik potential is designed for intact water"// &
2485 : " molecules only. If water is treated at the QM level"// &
2486 : " and an acid is present, hydronium ions might occur."// &
2487 : " This keyword allows the formation of hydronium ions."// &
2488 : " The T3 term (dipole term) is switched off for evaluating"// &
2489 : " the interaction between hydronium and the metal.", &
2490 : usage="ALLOW_H3O_FORMATION TRUE", &
2491 9544 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2492 9544 : CALL section_add_keyword(section, keyword)
2493 9544 : CALL keyword_release(keyword)
2494 :
2495 : CALL keyword_create(keyword, __LOCATION__, name="ALLOW_O_FORMATION", &
2496 : description=" The Siepmann-Sprik potential is actually designed for intact"// &
2497 : " water molecules only. If water is treated at the QM level,"// &
2498 : " water molecules can potentially dissociate, i.e."// &
2499 : " some O-H bonds might be stretched leading temporarily"// &
2500 : " to the formation of O^2- ions. This keyword allows the"// &
2501 : " the formation of such ions. The T3 term (dipole term)"// &
2502 : " is then switched off for evaluating the interaction"// &
2503 : " between the O^2- ion and the metal.", &
2504 : usage="ALLOW_O_FORMATION .TRUE.", &
2505 9544 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2506 9544 : CALL section_add_keyword(section, keyword)
2507 9544 : CALL keyword_release(keyword)
2508 :
2509 9544 : END SUBROUTINE create_Siepmann_section
2510 :
2511 : ! **************************************************************************************************
2512 : !> \brief This section specifies the input parameters for GAL19
2513 : !> potential type
2514 : !> (??)
2515 : !> \param section ...
2516 : ! **************************************************************************************************
2517 9544 : SUBROUTINE create_Gal_section(section)
2518 : TYPE(section_type), POINTER :: section
2519 :
2520 : TYPE(keyword_type), POINTER :: keyword
2521 : TYPE(section_type), POINTER :: subsection
2522 :
2523 9544 : CPASSERT(.NOT. ASSOCIATED(section))
2524 : CALL section_create(section, __LOCATION__, name="GAL19", &
2525 : description="Implementation of the GAL19 forcefield, see associated paper", &
2526 19088 : citations=[Clabaut2020], n_keywords=1, n_subsections=1, repeats=.TRUE.)
2527 :
2528 9544 : NULLIFY (keyword, subsection)
2529 :
2530 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
2531 : description="Defines the atomic kind involved in the nonbond potential", &
2532 : usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
2533 9544 : n_var=2)
2534 9544 : CALL section_add_keyword(section, keyword)
2535 9544 : CALL keyword_release(keyword)
2536 :
2537 : CALL keyword_create(keyword, __LOCATION__, name="METALS", &
2538 : description="Defines the two atomic kinds to be considered as part of the metallic phase in the system", &
2539 : usage="METALS {KIND1} {KIND2} ..", type_of_var=char_t, &
2540 9544 : n_var=2)
2541 9544 : CALL section_add_keyword(section, keyword)
2542 9544 : CALL keyword_release(keyword)
2543 :
2544 : CALL keyword_create(keyword, __LOCATION__, name="epsilon", &
2545 : description="Defines the epsilon_a parameter of GAL19 potential", &
2546 : usage="epsilon {real}", type_of_var=real_t, &
2547 : default_r_val=cp_unit_to_cp2k(value=0.6_dp, &
2548 : unit_str="kcalmol"), &
2549 9544 : n_var=1, unit_str="kcalmol")
2550 9544 : CALL section_add_keyword(section, keyword)
2551 9544 : CALL keyword_release(keyword)
2552 :
2553 : CALL keyword_create(keyword, __LOCATION__, name="bxy", &
2554 : description="Defines the b perpendicular parameter of GAL19 potential", &
2555 : usage="bxy {real}", type_of_var=real_t, &
2556 : default_r_val=cp_unit_to_cp2k(value=3.688388_dp, &
2557 : unit_str="internal_cp2k"), &
2558 9544 : n_var=1, unit_str="angstrom^-2")
2559 9544 : CALL section_add_keyword(section, keyword)
2560 9544 : CALL keyword_release(keyword)
2561 :
2562 : CALL keyword_create(keyword, __LOCATION__, name="bz", &
2563 : description="Defines the b parallel parameter of GAL19 potential", &
2564 : usage="bz {real}", type_of_var=real_t, &
2565 : default_r_val=cp_unit_to_cp2k(value=9.069025_dp, &
2566 : unit_str="internal_cp2k"), &
2567 9544 : n_var=1, unit_str="angstrom^-2")
2568 9544 : CALL section_add_keyword(section, keyword)
2569 9544 : CALL keyword_release(keyword)
2570 :
2571 : CALL keyword_create(keyword, __LOCATION__, name="r", &
2572 : description="Defines the R_0 parameters of GAL19 potential for the two METALS. "// &
2573 : "This is the only parameter that is shared between the two section of the "// &
2574 : "forcefield in the case of two metals (alloy). "// &
2575 : "If one metal only is present, a second number should be given but won't be read", &
2576 9544 : usage="r {real} {real}", type_of_var=real_t, n_var=2, unit_str="angstrom")
2577 9544 : CALL section_add_keyword(section, keyword)
2578 9544 : CALL keyword_release(keyword)
2579 :
2580 : CALL keyword_create(keyword, __LOCATION__, name="a1", &
2581 : description="Defines the a1 parameter of GAL19 potential", &
2582 : usage="a1 {real}", type_of_var=real_t, &
2583 9544 : default_r_val=10.0_dp, n_var=1, unit_str="kcalmol")
2584 9544 : CALL section_add_keyword(section, keyword)
2585 9544 : CALL keyword_release(keyword)
2586 :
2587 : CALL keyword_create(keyword, __LOCATION__, name="a2", &
2588 : description="Defines the a2 parameter of GAL19 potential", &
2589 : usage="a2 {real}", type_of_var=real_t, &
2590 9544 : default_r_val=10.0_dp, n_var=1, unit_str="kcalmol")
2591 9544 : CALL section_add_keyword(section, keyword)
2592 9544 : CALL keyword_release(keyword)
2593 :
2594 : CALL keyword_create(keyword, __LOCATION__, name="a3", &
2595 : description="Defines the a3 parameter of GAL19 potential", &
2596 : usage="a3 {real}", type_of_var=real_t, &
2597 9544 : default_r_val=10.0_dp, n_var=1, unit_str="kcalmol")
2598 9544 : CALL section_add_keyword(section, keyword)
2599 9544 : CALL keyword_release(keyword)
2600 :
2601 : CALL keyword_create(keyword, __LOCATION__, name="a4", &
2602 : description="Defines the a4 parameter of GAL19 potential", &
2603 : usage="a4 {real}", type_of_var=real_t, &
2604 9544 : default_r_val=10.0_dp, n_var=1, unit_str="kcalmol")
2605 9544 : CALL section_add_keyword(section, keyword)
2606 9544 : CALL keyword_release(keyword)
2607 :
2608 : CALL keyword_create(keyword, __LOCATION__, name="A", &
2609 : description="Defines the A parameter of GAL19 potential", &
2610 : usage="A {real}", type_of_var=real_t, &
2611 9544 : default_r_val=10.0_dp, n_var=1, unit_str="kcalmol")
2612 9544 : CALL section_add_keyword(section, keyword)
2613 9544 : CALL keyword_release(keyword)
2614 :
2615 : CALL keyword_create(keyword, __LOCATION__, name="B", &
2616 : description="Defines the B parameter of GAL19 potential", &
2617 : usage="B {real}", type_of_var=real_t, &
2618 9544 : default_r_val=10.0_dp, n_var=1, unit_str="angstrom^-1")
2619 9544 : CALL section_add_keyword(section, keyword)
2620 9544 : CALL keyword_release(keyword)
2621 :
2622 : CALL keyword_create(keyword, __LOCATION__, name="C", &
2623 : description="Defines the C parameter of GAL19 potential", &
2624 : usage="C {real}", type_of_var=real_t, &
2625 9544 : default_r_val=10.0_dp, n_var=1, unit_str="angstrom^6*kcalmol")
2626 9544 : CALL section_add_keyword(section, keyword)
2627 9544 : CALL keyword_release(keyword)
2628 :
2629 : CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
2630 : description="Defines the cutoff parameter of GAL19 potential", &
2631 : usage="RCUT {real}", type_of_var=real_t, &
2632 : default_r_val=cp_unit_to_cp2k(value=3.2_dp, &
2633 : unit_str="angstrom"), &
2634 9544 : n_var=1, unit_str="angstrom")
2635 9544 : CALL section_add_keyword(section, keyword)
2636 9544 : CALL keyword_release(keyword)
2637 : CALL keyword_create(keyword, __LOCATION__, name="Fit_express", &
2638 : description="Demands the particular output needed to a least square fit", &
2639 : usage="Fit_express TRUE", &
2640 9544 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2641 9544 : CALL section_add_keyword(section, keyword)
2642 9544 : CALL keyword_release(keyword)
2643 9544 : CALL create_GCN_section(subsection)
2644 9544 : CALL section_add_subsection(section, subsection)
2645 9544 : CALL section_release(subsection)
2646 :
2647 9544 : END SUBROUTINE create_Gal_section
2648 :
2649 : ! **************************************************************************************************
2650 : !> \brief This section specifies the input parameters for GAL21
2651 : !> potential type
2652 : !> (??)
2653 : !> \param section ...
2654 : ! **************************************************************************************************
2655 9544 : SUBROUTINE create_Gal21_section(section)
2656 : TYPE(section_type), POINTER :: section
2657 :
2658 : TYPE(keyword_type), POINTER :: keyword
2659 : TYPE(section_type), POINTER :: subsection
2660 :
2661 9544 : CPASSERT(.NOT. ASSOCIATED(section))
2662 : CALL section_create(section, __LOCATION__, name="GAL21", &
2663 : description="Implementation of the GAL21 forcefield, see associated paper", &
2664 19088 : citations=[Clabaut2021], n_keywords=1, n_subsections=1, repeats=.TRUE.)
2665 :
2666 9544 : NULLIFY (keyword, subsection)
2667 :
2668 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
2669 : description="Defines the atomic kind involved in the nonbond potential", &
2670 : usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
2671 9544 : n_var=2)
2672 9544 : CALL section_add_keyword(section, keyword)
2673 9544 : CALL keyword_release(keyword)
2674 :
2675 : CALL keyword_create(keyword, __LOCATION__, name="METALS", &
2676 : description="Defines the two atomic kinds to be considered as part of the metallic phase in the system", &
2677 : usage="METALS {KIND1} {KIND2} ..", type_of_var=char_t, &
2678 9544 : n_var=2)
2679 9544 : CALL section_add_keyword(section, keyword)
2680 9544 : CALL keyword_release(keyword)
2681 :
2682 : CALL keyword_create(keyword, __LOCATION__, name="epsilon", &
2683 : description="Defines the epsilon parameter of GAL21 potential", &
2684 : usage="epsilon {real} {real} {real}", type_of_var=real_t, &
2685 9544 : n_var=3, unit_str="kcalmol")
2686 9544 : CALL section_add_keyword(section, keyword)
2687 9544 : CALL keyword_release(keyword)
2688 :
2689 : CALL keyword_create(keyword, __LOCATION__, name="bxy", &
2690 : description="Defines the b perpendicular parameter of GAL21 potential", &
2691 : usage="bxy {real} {real}", type_of_var=real_t, &
2692 9544 : n_var=2, unit_str="angstrom^-2")
2693 9544 : CALL section_add_keyword(section, keyword)
2694 9544 : CALL keyword_release(keyword)
2695 :
2696 : CALL keyword_create(keyword, __LOCATION__, name="bz", &
2697 : description="Defines the b parallel parameter of GAL21 potential", &
2698 : usage="bz {real} {real}", type_of_var=real_t, &
2699 9544 : n_var=2, unit_str="angstrom^-2")
2700 9544 : CALL section_add_keyword(section, keyword)
2701 9544 : CALL keyword_release(keyword)
2702 :
2703 : CALL keyword_create(keyword, __LOCATION__, name="r", &
2704 : description="Defines the R_0 parameters of GAL21 potential for the two METALS. "// &
2705 : "This is the only parameter that is shared between the two section of "// &
2706 : "the forcefield in the case of two metals (alloy). "// &
2707 : "If one metal only is present, a second number should be given but won't be read", &
2708 9544 : usage="r {real} {real}", type_of_var=real_t, n_var=2, unit_str="angstrom")
2709 9544 : CALL section_add_keyword(section, keyword)
2710 9544 : CALL keyword_release(keyword)
2711 :
2712 : CALL keyword_create(keyword, __LOCATION__, name="a1", &
2713 : description="Defines the a1 parameter of GAL21 potential", &
2714 : usage="a1 {real} {real} {real}", type_of_var=real_t, &
2715 9544 : n_var=3, unit_str="kcalmol")
2716 9544 : CALL section_add_keyword(section, keyword)
2717 9544 : CALL keyword_release(keyword)
2718 :
2719 : CALL keyword_create(keyword, __LOCATION__, name="a2", &
2720 : description="Defines the a2 parameter of GAL21 potential", &
2721 : usage="a2 {real} {real} {real}", type_of_var=real_t, &
2722 9544 : n_var=3, unit_str="kcalmol")
2723 9544 : CALL section_add_keyword(section, keyword)
2724 9544 : CALL keyword_release(keyword)
2725 :
2726 : CALL keyword_create(keyword, __LOCATION__, name="a3", &
2727 : description="Defines the a3 parameter of GAL21 potential", &
2728 : usage="a3 {real} {real} {real}", type_of_var=real_t, &
2729 9544 : n_var=3, unit_str="kcalmol")
2730 9544 : CALL section_add_keyword(section, keyword)
2731 9544 : CALL keyword_release(keyword)
2732 :
2733 : CALL keyword_create(keyword, __LOCATION__, name="a4", &
2734 : description="Defines the a4 parameter of GAL21 potential", &
2735 : usage="a4 {real} {real} {real}", type_of_var=real_t, &
2736 9544 : n_var=3, unit_str="kcalmol")
2737 9544 : CALL section_add_keyword(section, keyword)
2738 9544 : CALL keyword_release(keyword)
2739 :
2740 : CALL keyword_create(keyword, __LOCATION__, name="A", &
2741 : description="Defines the A parameter of GAL21 potential", &
2742 : usage="A {real} {real}", type_of_var=real_t, &
2743 9544 : n_var=2, unit_str="kcalmol")
2744 9544 : CALL section_add_keyword(section, keyword)
2745 9544 : CALL keyword_release(keyword)
2746 :
2747 : CALL keyword_create(keyword, __LOCATION__, name="B", &
2748 : description="Defines the B parameter of GAL21 potential", &
2749 : usage="B {real} {real}", type_of_var=real_t, &
2750 9544 : n_var=2, unit_str="angstrom^-1")
2751 9544 : CALL section_add_keyword(section, keyword)
2752 9544 : CALL keyword_release(keyword)
2753 :
2754 : CALL keyword_create(keyword, __LOCATION__, name="C", &
2755 : description="Defines the C parameter of GAL21 potential", &
2756 : usage="C {real}", type_of_var=real_t, &
2757 9544 : n_var=1, unit_str="angstrom^6*kcalmol")
2758 9544 : CALL section_add_keyword(section, keyword)
2759 9544 : CALL keyword_release(keyword)
2760 :
2761 : CALL keyword_create(keyword, __LOCATION__, name="AH", &
2762 : description="Defines the AH parameter of GAL21 potential", &
2763 : usage="AH {real} {real}", type_of_var=real_t, &
2764 9544 : n_var=2, unit_str="kcalmol")
2765 9544 : CALL section_add_keyword(section, keyword)
2766 9544 : CALL keyword_release(keyword)
2767 :
2768 : CALL keyword_create(keyword, __LOCATION__, name="BH", &
2769 : description="Defines the BH parameter of GAL21 potential", &
2770 : usage="BH {real} {real}", type_of_var=real_t, &
2771 9544 : n_var=2, unit_str="angstrom^-1")
2772 9544 : CALL section_add_keyword(section, keyword)
2773 9544 : CALL keyword_release(keyword)
2774 :
2775 : CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
2776 : description="Defines the cutoff parameter of GAL21 potential", &
2777 : usage="RCUT {real}", type_of_var=real_t, &
2778 : default_r_val=cp_unit_to_cp2k(value=3.2_dp, &
2779 : unit_str="angstrom"), &
2780 9544 : n_var=1, unit_str="angstrom")
2781 9544 : CALL section_add_keyword(section, keyword)
2782 9544 : CALL keyword_release(keyword)
2783 :
2784 : CALL keyword_create(keyword, __LOCATION__, name="Fit_express", &
2785 : description="Demands the particular output needed to a least square fit", &
2786 : usage="Fit_express TRUE", &
2787 9544 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2788 9544 : CALL section_add_keyword(section, keyword)
2789 9544 : CALL keyword_release(keyword)
2790 :
2791 9544 : CALL create_GCN_section(subsection)
2792 9544 : CALL section_add_subsection(section, subsection)
2793 9544 : CALL section_release(subsection)
2794 :
2795 9544 : END SUBROUTINE create_Gal21_section
2796 :
2797 : ! **************************************************************************************************
2798 : !> \brief This section specifies the input parameters for TABPOT potential type
2799 : !> \param section the section to create
2800 : !> \author teo, Alex Mironenko, Da Teng
2801 : ! **************************************************************************************************
2802 9544 : SUBROUTINE create_TABPOT_section(section)
2803 :
2804 : TYPE(section_type), POINTER :: section
2805 :
2806 : TYPE(keyword_type), POINTER :: keyword
2807 :
2808 9544 : CPASSERT(.NOT. ASSOCIATED(section))
2809 :
2810 : CALL section_create(section, __LOCATION__, name="TABPOT", &
2811 : description="This section specifies the input parameters for TABPOT potential type.", &
2812 9544 : n_keywords=1, n_subsections=0, repeats=.TRUE.)
2813 :
2814 9544 : NULLIFY (keyword)
2815 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
2816 : description="Defines the atomic kind involved", &
2817 : usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
2818 9544 : n_var=2)
2819 9544 : CALL section_add_keyword(section, keyword)
2820 9544 : CALL keyword_release(keyword)
2821 :
2822 : CALL keyword_create(keyword, __LOCATION__, name="PARM_FILE_NAME", &
2823 : variants=["PARMFILE"], &
2824 : description="Specifies the filename that contains the tabulated NONBONDED potential. "// &
2825 : "File structure: the third line of the potential file contains a title. "// &
2826 : "The 4th line contains: 'N', number of data points, 'R', lower bound of distance, distance cutoff. "// &
2827 : "Follow "// &
2828 : "in order npoints lines for index, distance [A], energy [kcal/mol], and force [kcal/mol/A]", &
2829 19088 : usage="PARM_FILE_NAME {FILENAME}", default_lc_val="")
2830 9544 : CALL section_add_keyword(section, keyword)
2831 9544 : CALL keyword_release(keyword)
2832 :
2833 9544 : END SUBROUTINE create_TABPOT_section
2834 :
2835 : ! **************************************************************************************************
2836 : !> \brief This section specifies the input parameters for the subsection GCN of GAL19 and GAL21
2837 : !> potential type
2838 : !> (??)
2839 : !> \param section ...
2840 : ! **************************************************************************************************
2841 19088 : SUBROUTINE create_GCN_section(section)
2842 : TYPE(section_type), POINTER :: section
2843 :
2844 : TYPE(keyword_type), POINTER :: keyword
2845 :
2846 19088 : CPASSERT(.NOT. ASSOCIATED(section))
2847 : CALL section_create(section, __LOCATION__, name="GCN", &
2848 : description="Allow to specify the generalized coordination number of the atoms. "// &
2849 : "Those numbers msust be generated by another program ", &
2850 19088 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
2851 :
2852 19088 : NULLIFY (keyword)
2853 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
2854 : description="Value of the GCN for the individual atom. Order MUST reflect"// &
2855 : " the one specified for the geometry.", repeats=.TRUE., usage="{Real}", &
2856 19088 : default_r_val=0.0_dp, type_of_var=real_t)
2857 19088 : CALL section_add_keyword(section, keyword)
2858 19088 : CALL keyword_release(keyword)
2859 :
2860 19088 : END SUBROUTINE create_GCN_section
2861 :
2862 : ! **************************************************************************************************
2863 : !> \brief creates the input section for the qs part
2864 : !> \param print_key ...
2865 : !> \param label ...
2866 : !> \param print_level ...
2867 : !> \author teo
2868 : ! **************************************************************************************************
2869 105240 : SUBROUTINE create_dipoles_section(print_key, label, print_level)
2870 : TYPE(section_type), POINTER :: print_key
2871 : CHARACTER(LEN=*), INTENT(IN) :: label
2872 : INTEGER, INTENT(IN) :: print_level
2873 :
2874 : TYPE(keyword_type), POINTER :: keyword
2875 :
2876 105240 : CPASSERT(.NOT. ASSOCIATED(print_key))
2877 : CALL cp_print_key_section_create(print_key, __LOCATION__, name=TRIM(label), &
2878 : description="Section controlling the calculation of "//TRIM(label)//"."// &
2879 : " Note that the result in the periodic case might be defined modulo a certain period,"// &
2880 : " determined by the lattice vectors. During MD, this can lead to jumps.", &
2881 105240 : print_level=print_level, filename="__STD_OUT__")
2882 :
2883 105240 : NULLIFY (keyword)
2884 : CALL keyword_create(keyword, __LOCATION__, &
2885 : name="PERIODIC", &
2886 : description="Use Berry phase formula (PERIODIC=T) or simple operator (PERIODIC=F). "// &
2887 : "The latter normally requires that the CELL is periodic NONE.", &
2888 : usage="PERIODIC {logical}", &
2889 : repeats=.FALSE., &
2890 : n_var=1, &
2891 105240 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
2892 105240 : CALL section_add_keyword(print_key, keyword)
2893 105240 : CALL keyword_release(keyword)
2894 :
2895 : CALL keyword_create(keyword, __LOCATION__, name="REFERENCE", &
2896 : variants=s2a("REF"), &
2897 : description="Define the reference point for the calculation of the electrostatic moment.", &
2898 : usage="REFERENCE COM", &
2899 : enum_c_vals=s2a("COM", "COAC", "USER_DEFINED", "ZERO"), &
2900 : enum_desc=s2a("Use Center of Mass", &
2901 : "Use Center of Atomic Charges", &
2902 : "Use User Defined Point (Keyword:REF_POINT)", &
2903 : "Use Origin of Coordinate System"), &
2904 : enum_i_vals=[use_mom_ref_com, &
2905 : use_mom_ref_coac, &
2906 : use_mom_ref_user, &
2907 : use_mom_ref_zero], &
2908 105240 : default_i_val=use_mom_ref_zero)
2909 105240 : CALL section_add_keyword(print_key, keyword)
2910 105240 : CALL keyword_release(keyword)
2911 :
2912 : CALL keyword_create(keyword, __LOCATION__, name="REFERENCE_POINT", &
2913 : variants=s2a("REF_POINT"), &
2914 : description="Fixed reference point for the calculations of the electrostatic moment.", &
2915 : usage="REFERENCE_POINT x y z", &
2916 : repeats=.FALSE., &
2917 : n_var=3, default_r_vals=[0._dp, 0._dp, 0._dp], &
2918 : type_of_var=real_t, &
2919 105240 : unit_str='bohr')
2920 105240 : CALL section_add_keyword(print_key, keyword)
2921 105240 : CALL keyword_release(keyword)
2922 105240 : END SUBROUTINE create_dipoles_section
2923 :
2924 : END MODULE input_cp2k_mm
|