(git:5e7fe52)
Loading...
Searching...
No Matches
input_cp2k_mm.F
Go to the documentation of this file.
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! **************************************************************************************************
17 USE bibliography, ONLY: &
27 USE cp_units, ONLY: cp_unit_to_cp2k
28 USE force_field_kind_types, ONLY: &
32 USE fparser, ONLY: docf
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
67 PUBLIC :: create_charge_section
68!***
69CONTAINS
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 SUBROUTINE create_mm_section(section)
77 TYPE(section_type), POINTER :: section
78
79 TYPE(section_type), POINTER :: subsection
80
81 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 n_keywords=5, n_subsections=0, repeats=.false.)
85
86 NULLIFY (subsection)
87
88 CALL create_forcefield_section(subsection)
89 CALL section_add_subsection(section, subsection)
90 CALL section_release(subsection)
91
92 CALL create_neighbor_lists_section(subsection)
93 CALL section_add_subsection(section, subsection)
94 CALL section_release(subsection)
95
96 CALL create_poisson_section(subsection)
97 CALL section_add_subsection(section, subsection)
98 CALL section_release(subsection)
99
100 CALL create_per_efield_section(subsection)
101 CALL section_add_subsection(section, subsection)
102 CALL section_release(subsection)
103
104 CALL create_print_mm_section(subsection)
105 CALL section_add_subsection(section, subsection)
106 CALL section_release(subsection)
107
108 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 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 cpassert(.NOT. ASSOCIATED(section))
122 CALL section_create(section, __location__, name="print", &
123 description="Section of possible print options in MM code.", &
124 n_keywords=0, n_subsections=1, repeats=.false.)
125
126 NULLIFY (print_key, keyword)
127
128 CALL cp_print_key_section_create(print_key, __location__, "DERIVATIVES", &
129 description="Controls the printing of derivatives.", &
130 print_level=high_print_level, filename="__STD_OUT__")
131 CALL section_add_subsection(section, print_key)
132 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 print_level=high_print_level, filename="__STD_OUT__")
138 CALL section_add_subsection(section, print_key)
139 CALL section_release(print_key)
140
141 CALL create_dipoles_section(print_key, "DIPOLE", medium_print_level)
142 CALL section_add_subsection(section, print_key)
143 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 print_level=high_print_level, filename="", unit_str="angstrom")
148 CALL section_add_subsection(section, print_key)
149 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 print_level=medium_print_level, filename="__STD_OUT__")
155 CALL section_add_subsection(section, print_key)
156 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 print_level=high_print_level, filename="__STD_OUT__")
162 CALL section_add_subsection(section, print_key)
163 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 print_level=silent_print_level, filename="__STD_OUT__")
168 CALL section_add_subsection(section, print_key)
169 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 print_level=low_print_level, filename="__STD_OUT__")
174 CALL section_add_subsection(section, print_key)
175 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 print_level=debug_print_level + 1, filename="", common_iter_levels=2)
180 CALL section_add_subsection(section, print_key)
181 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 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 default_l_val=.true., lone_keyword_l_val=.true.)
191 CALL section_add_keyword(print_key, keyword)
192 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 default_l_val=.false., lone_keyword_l_val=.true.)
198 CALL section_add_keyword(print_key, keyword)
199 CALL keyword_release(keyword)
200
201 CALL section_add_subsection(section, print_key)
202 CALL section_release(print_key)
203
204 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 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 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 n_keywords=2, n_subsections=2, repeats=.false.)
223
224 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 default_i_val=do_ff_undef)
242 CALL section_add_keyword(section, keyword)
243 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 usage="PARM_FILE_NAME {FILENAME}", type_of_var=lchar_t)
248 CALL section_add_keyword(section, keyword)
249 CALL keyword_release(keyword)
250
251 CALL keyword_create(keyword, __location__, name="VDW_SCALE14", &
252 description="Scaling factor for the VDW 1-4 ", &
253 usage="VDW_SCALE14 1.0", default_r_val=1.0_dp)
254 CALL section_add_keyword(section, keyword)
255 CALL keyword_release(keyword)
256
257 CALL keyword_create(keyword, __location__, name="EI_SCALE14", &
258 description="Scaling factor for the electrostatics 1-4 ", &
259 usage="EI_SCALE14 1.0", default_r_val=0.0_dp)
260 CALL section_add_keyword(section, keyword)
261 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 usage="SHIFT_CUTOFF <LOGICAL>", default_l_val=.true.)
270 CALL section_add_keyword(section, keyword)
271 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 usage="DO_NONBONDED T", default_l_val=.true., lone_keyword_l_val=.true.)
281 CALL section_add_keyword(section, keyword)
282 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 usage="DO_ELECTROSTATICS T", default_l_val=.true., lone_keyword_l_val=.true.)
289 CALL section_add_keyword(section, keyword)
290 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 lone_keyword_l_val=.true.)
298 CALL section_add_keyword(section, keyword)
299 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 usage="MULTIPLE_POTENTIAL T", default_l_val=.false., lone_keyword_l_val=.true.)
305 CALL section_add_keyword(section, keyword)
306 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 usage="ZBL_SCATTERING T", default_l_val=.false., lone_keyword_l_val=.true.)
312 CALL section_add_keyword(section, keyword)
313 CALL keyword_release(keyword)
314
315 !
316 ! subsections
317 !
318 CALL create_spline_section(subsection)
319 CALL section_add_subsection(section, subsection)
320 CALL section_release(subsection)
321
322 CALL create_nonbonded_section(subsection)
323 CALL section_add_subsection(section, subsection)
324 CALL section_release(subsection)
325
326 CALL create_nonbonded14_section(subsection)
327 CALL section_add_subsection(section, subsection)
328 CALL section_release(subsection)
329
330 CALL create_charge_section(subsection)
331 CALL section_add_subsection(section, subsection)
332 CALL section_release(subsection)
333
334 CALL create_charges_section(subsection)
335 CALL section_add_subsection(section, subsection)
336 CALL section_release(subsection)
337
338 CALL create_shell_section(subsection)
339 CALL section_add_subsection(section, subsection)
340 CALL section_release(subsection)
341
342 CALL create_bond_section(subsection, "BOND")
343 CALL section_add_subsection(section, subsection)
344 CALL section_release(subsection)
345
346 CALL create_bend_section(subsection)
347 CALL section_add_subsection(section, subsection)
348 CALL section_release(subsection)
349
350 CALL create_torsion_section(subsection)
351 CALL section_add_subsection(section, subsection)
352 CALL section_release(subsection)
353
354 CALL create_improper_section(subsection)
355 CALL section_add_subsection(section, subsection)
356 CALL section_release(subsection)
357
358 CALL create_opbend_section(subsection)
359 CALL section_add_subsection(section, subsection)
360 CALL section_release(subsection)
361
362 CALL create_dipole_section(subsection)
363 CALL section_add_subsection(section, subsection)
364 CALL section_release(subsection)
365
366 CALL create_quadrupole_section(subsection)
367 CALL section_add_subsection(section, subsection)
368 CALL section_release(subsection)
369
370 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 SUBROUTINE create_spline_section(section)
378 TYPE(section_type), POINTER :: section
379
380 TYPE(keyword_type), POINTER :: keyword
381
382 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 n_keywords=1, n_subsections=0, repeats=.true.)
387
388 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 unit_str="angstrom")
396 CALL section_add_keyword(section, keyword)
397 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 unit_str="angstrom")
405 CALL section_add_keyword(section, keyword)
406 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 default_r_val=0.5_dp, unit_str="hartree")
413 CALL section_add_keyword(section, keyword)
414 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 usage="EMAX_ACCURACY <REAL>", default_r_val=0.02_dp, unit_str="hartree")
421 CALL section_add_keyword(section, keyword)
422 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 usage="EPS_SPLINE <REAL>", default_r_val=1.0e-7_dp, unit_str="hartree")
429 CALL section_add_keyword(section, keyword)
430 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 usage="NPOINTS 1024", default_i_val=-1)
436 CALL section_add_keyword(section, keyword)
437 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 usage="UNIQUE_SPLINE <LOGICAL>", lone_keyword_l_val=.true., default_l_val=.false.)
443 CALL section_add_keyword(section, keyword)
444 CALL keyword_release(keyword)
445
446 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 SUBROUTINE create_torsion_section(section)
454 TYPE(section_type), POINTER :: section
455
456 TYPE(keyword_type), POINTER :: keyword
457
458 cpassert(.NOT. ASSOCIATED(section))
459 CALL section_create(section, __location__, name="TORSION", &
460 description="Specifies the torsion potential of the MM system.", &
461 n_keywords=1, n_subsections=0, repeats=.true.)
462
463 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 n_var=4)
468 CALL section_add_keyword(section, keyword)
469 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 default_i_val=do_ff_charmm)
486 CALL section_add_keyword(section, keyword)
487 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 n_var=1, unit_str="hartree")
493 CALL section_add_keyword(section, keyword)
494 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 n_var=1, unit_str="rad", default_r_val=0.0_dp)
500 CALL section_add_keyword(section, keyword)
501 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 n_var=1)
507 CALL section_add_keyword(section, keyword)
508 CALL keyword_release(keyword)
509
510 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 SUBROUTINE create_improper_section(section)
518 TYPE(section_type), POINTER :: section
519
520 TYPE(keyword_type), POINTER :: keyword
521
522 cpassert(.NOT. ASSOCIATED(section))
523 CALL section_create(section, __location__, name="IMPROPER", &
524 description="Specifies the improper torsion potential of the MM system.", &
525 n_keywords=1, n_subsections=0, repeats=.true.)
526
527 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 n_var=4)
532 CALL section_add_keyword(section, keyword)
533 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, &
547 default_i_val=do_ff_charmm)
548 CALL section_add_keyword(section, keyword)
549 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 n_var=1, unit_str="hartree*rad^-2")
555 CALL section_add_keyword(section, keyword)
556 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 n_var=1, unit_str="rad")
562 CALL section_add_keyword(section, keyword)
563 CALL keyword_release(keyword)
564
565 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 SUBROUTINE create_opbend_section(section)
573 TYPE(section_type), POINTER :: section
574
575 TYPE(keyword_type), POINTER :: keyword
576
577 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 n_keywords=1, n_subsections=0, repeats=.true.)
583
584 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 n_var=4)
589 CALL section_add_keyword(section, keyword)
590 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 default_i_val=do_ff_harmonic)
605 CALL section_add_keyword(section, keyword)
606 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 n_var=1, unit_str="hartree*rad^-2")
612 CALL section_add_keyword(section, keyword)
613 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 n_var=1, unit_str="rad")
619 CALL section_add_keyword(section, keyword)
620 CALL keyword_release(keyword)
621
622 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 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 cpassert(.NOT. ASSOCIATED(section))
636 CALL section_create(section, __location__, name="BEND", &
637 description="Specifies the bend potential of the MM system.", &
638 n_keywords=11, n_subsections=1, repeats=.true.)
639
640 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 n_var=3)
646 CALL section_add_keyword(section, keyword)
647 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, &
674 do_ff_mm3, &
676 default_i_val=do_ff_charmm)
677 CALL section_add_keyword(section, keyword)
678 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 n_var=1, unit_str="hartree*rad^-2")
684 CALL section_add_keyword(section, keyword)
685 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 n_var=1, unit_str="rad^-1")
691 CALL section_add_keyword(section, keyword)
692 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 n_var=1, unit_str="bohr")
698 CALL section_add_keyword(section, keyword)
699 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 n_var=1, unit_str="bohr")
704 CALL section_add_keyword(section, keyword)
705 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 n_var=1, unit_str="hartree*bohr^-1*rad^-1")
710 CALL section_add_keyword(section, keyword)
711 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 n_var=1, unit_str="hartree*bohr^-1*rad^-1")
716 CALL section_add_keyword(section, keyword)
717 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 n_var=1, unit_str="hartree*bohr^-2")
722 CALL section_add_keyword(section, keyword)
723 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 n_var=1, unit_str='rad')
729 CALL section_add_keyword(section, keyword)
730 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 n_var=-1, unit_str="hartree")
739 CALL section_add_keyword(section, keyword)
740 CALL keyword_release(keyword)
741
742 ! Create the Urey-Bradley section
743 CALL create_bond_section(subsection, "UB")
744 CALL section_add_subsection(section, subsection)
745 CALL section_release(subsection)
746
747 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 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 cpassert(.NOT. ASSOCIATED(section))
763 NULLIFY (keyword)
764
765 IF (trim(label) == "UB") THEN
766 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 n_keywords=1, n_subsections=0, repeats=.false.)
771
772 ELSE
773 tag = " Bond "
774 CALL section_create(section, __location__, name=trim(label), &
775 description="Specifies the bond potential", &
776 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 n_var=2)
782 CALL section_add_keyword(section, keyword)
783 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, &
806 do_ff_morse, &
807 do_ff_cubic, &
808 do_ff_fues], &
809 default_i_val=do_ff_charmm)
810 CALL section_add_keyword(section, keyword)
811 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 n_var=-1, unit_str="internal_cp2k")
819 CALL section_add_keyword(section, keyword)
820 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 n_var=1, unit_str="bohr^-1")
826 CALL section_add_keyword(section, keyword)
827 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 n_var=1, unit_str="bohr")
833 CALL section_add_keyword(section, keyword)
834 CALL keyword_release(keyword)
835
836 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 SUBROUTINE create_charges_section(section)
844 TYPE(section_type), POINTER :: section
845
846 TYPE(keyword_type), POINTER :: keyword
847
848 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 n_keywords=1, n_subsections=0, repeats=.false.)
853
854 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 type_of_var=real_t)
859 CALL section_add_keyword(section, keyword)
860 CALL keyword_release(keyword)
861
862 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 SUBROUTINE create_charge_section(section)
870 TYPE(section_type), POINTER :: section
871
872 TYPE(keyword_type), POINTER :: keyword
873
874 cpassert(.NOT. ASSOCIATED(section))
875 CALL section_create(section, __location__, name="charge", &
876 description="This section specifies the charge of the MM atoms", &
877 n_keywords=1, n_subsections=0, repeats=.true.)
878
879 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 n_var=1)
885 CALL section_add_keyword(section, keyword)
886 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 n_var=1)
892 CALL section_add_keyword(section, keyword)
893 CALL keyword_release(keyword)
894
895 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 SUBROUTINE create_quadrupole_section(section)
903 TYPE(section_type), POINTER :: section
904
905 TYPE(keyword_type), POINTER :: keyword
906
907 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 n_keywords=1, n_subsections=0, repeats=.true.)
913
914 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 n_var=1)
920 CALL section_add_keyword(section, keyword)
921 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 n_var=1, unit_str='internal_cp2k')
927 CALL section_add_keyword(section, keyword)
928 CALL keyword_release(keyword)
929
930 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 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 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 n_keywords=1, n_subsections=1, repeats=.true.)
948
949 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 n_var=1)
955 CALL section_add_keyword(section, keyword)
956 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 n_var=1, unit_str='angstrom^3')
962 CALL section_add_keyword(section, keyword)
963 CALL keyword_release(keyword)
964
965 CALL create_damping_section(subsection)
966 CALL section_add_subsection(section, subsection)
967 CALL section_release(subsection)
968 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 SUBROUTINE create_damping_section(section)
976 TYPE(section_type), POINTER :: section
977
978 TYPE(keyword_type), POINTER :: keyword
979
980 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 n_keywords=4, n_subsections=0, repeats=.true.)
984
985 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 n_var=1)
991 CALL section_add_keyword(section, keyword)
992 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 n_var=1, default_c_val="TANG-TOENNIES")
998 CALL section_add_keyword(section, keyword)
999 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 n_var=1, default_i_val=3)
1005 CALL section_add_keyword(section, keyword)
1006 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 n_var=1, unit_str='angstrom^-1')
1012 CALL section_add_keyword(section, keyword)
1013 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 n_var=1, unit_str='')
1019 CALL section_add_keyword(section, keyword)
1020 CALL keyword_release(keyword)
1021
1022 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 SUBROUTINE create_shell_section(section)
1030 TYPE(section_type), POINTER :: section
1031
1032 TYPE(keyword_type), POINTER :: keyword
1033
1034 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 citations=[dick1958, mitchell1993, devynck2012])
1039
1040 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 usage="H", default_c_val="DEFAULT")
1045 CALL section_add_keyword(section, keyword)
1046 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 default_r_val=0.0_dp)
1053 CALL section_add_keyword(section, keyword)
1054 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 default_r_val=0.0_dp)
1061 CALL section_add_keyword(section, keyword)
1062 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 default_r_val=0.1_dp)
1069 CALL section_add_keyword(section, keyword)
1070 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 unit_str="hartree*bohr^-2")
1080 CALL section_add_keyword(section, keyword)
1081 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 unit_str="hartree*bohr^-4")
1092 CALL section_add_keyword(section, keyword)
1093 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 unit_str="angstrom")
1101 CALL section_add_keyword(section, keyword)
1102 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 unit_str="angstrom")
1111 CALL section_add_keyword(section, keyword)
1112 CALL keyword_release(keyword)
1113
1114 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 SUBROUTINE create_nonbonded14_section(section)
1123 TYPE(section_type), POINTER :: section
1124
1125 TYPE(section_type), POINTER :: subsection
1126
1127 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 n_keywords=1, n_subsections=0, repeats=.false.)
1131
1132 NULLIFY (subsection)
1133 CALL create_lj_section(subsection)
1134 CALL section_add_subsection(section, subsection)
1135 CALL section_release(subsection)
1136
1137 CALL create_williams_section(subsection)
1138 CALL section_add_subsection(section, subsection)
1139 CALL section_release(subsection)
1140
1141 CALL create_goodwin_section(subsection)
1142 CALL section_add_subsection(section, subsection)
1143 CALL section_release(subsection)
1144
1145 CALL create_genpot_section(subsection)
1146 CALL section_add_subsection(section, subsection)
1147 CALL section_release(subsection)
1148
1149 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 SUBROUTINE create_nonbonded_section(section)
1158 TYPE(section_type), POINTER :: section
1159
1160 TYPE(section_type), POINTER :: subsection
1161
1162 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 n_keywords=1, n_subsections=0, repeats=.false.)
1166
1167 NULLIFY (subsection)
1168 CALL create_lj_section(subsection)
1169 CALL section_add_subsection(section, subsection)
1170 CALL section_release(subsection)
1171
1172 CALL create_williams_section(subsection)
1173 CALL section_add_subsection(section, subsection)
1174 CALL section_release(subsection)
1175
1176 CALL create_eam_section(subsection)
1177 CALL section_add_subsection(section, subsection)
1178 CALL section_release(subsection)
1179
1180 CALL create_nequip_section(subsection)
1181 CALL section_add_subsection(section, subsection)
1182 CALL section_release(subsection)
1183
1184 CALL create_ace_section(subsection)
1185 CALL section_add_subsection(section, subsection)
1186 CALL section_release(subsection)
1187
1188 CALL create_mace_section(subsection)
1189 CALL section_add_subsection(section, subsection)
1190 CALL section_release(subsection)
1191
1192 CALL create_deepmd_section(subsection)
1193 CALL section_add_subsection(section, subsection)
1194 CALL section_release(subsection)
1195
1196 CALL create_goodwin_section(subsection)
1197 CALL section_add_subsection(section, subsection)
1198 CALL section_release(subsection)
1199
1200 CALL create_ipbv_section(subsection)
1201 CALL section_add_subsection(section, subsection)
1202 CALL section_release(subsection)
1203
1204 CALL create_bmhft_section(subsection)
1205 CALL section_add_subsection(section, subsection)
1206 CALL section_release(subsection)
1207
1208 CALL create_bmhftd_section(subsection)
1209 CALL section_add_subsection(section, subsection)
1210 CALL section_release(subsection)
1211
1212 CALL create_buck4r_section(subsection)
1213 CALL section_add_subsection(section, subsection)
1214 CALL section_release(subsection)
1215
1216 CALL create_buckmorse_section(subsection)
1217 CALL section_add_subsection(section, subsection)
1218 CALL section_release(subsection)
1219
1220 CALL create_genpot_section(subsection)
1221 CALL section_add_subsection(section, subsection)
1222 CALL section_release(subsection)
1223
1224 CALL create_tersoff_section(subsection)
1225 CALL section_add_subsection(section, subsection)
1226 CALL section_release(subsection)
1227
1228 CALL create_siepmann_section(subsection)
1229 CALL section_add_subsection(section, subsection)
1230 CALL section_release(subsection)
1231
1232 CALL create_gal_section(subsection)
1233 CALL section_add_subsection(section, subsection)
1234 CALL section_release(subsection)
1235
1236 CALL create_gal21_section(subsection)
1237 CALL section_add_subsection(section, subsection)
1238 CALL section_release(subsection)
1239
1240 CALL create_tabpot_section(subsection)
1241 CALL section_add_subsection(section, subsection)
1242 CALL section_release(subsection)
1243
1244 END SUBROUTINE create_nonbonded_section
1245
1246! **************************************************************************************************
1247!> \brief This section specifies the input parameters for generation of
1248!> neighbor lists
1249!> \param section the section to create
1250!> \author teo [07.2007] - Zurich University
1251! **************************************************************************************************
1253 TYPE(section_type), POINTER :: section
1254
1255 TYPE(keyword_type), POINTER :: keyword
1256
1257 NULLIFY (keyword)
1258 cpassert(.NOT. ASSOCIATED(section))
1259 CALL section_create(section, __location__, name="neighbor_lists", &
1260 description="This section specifies the input parameters for the construction of"// &
1261 " neighbor lists.", &
1262 n_keywords=1, n_subsections=0, repeats=.false.)
1263
1264 CALL keyword_create(keyword, __location__, name="VERLET_SKIN", &
1265 description="Defines the Verlet Skin for the generation of the neighbor lists", &
1266 usage="VERLET_SKIN {real}", default_r_val=cp_unit_to_cp2k(value=1.0_dp, &
1267 unit_str="angstrom"), &
1268 unit_str="angstrom")
1269 CALL section_add_keyword(section, keyword)
1270 CALL keyword_release(keyword)
1271
1272 CALL keyword_create(keyword, __location__, name="neighbor_lists_from_scratch", &
1273 description="This keyword enables the building of the neighbouring list from scratch.", &
1274 usage="neighbor_lists_from_scratch logical", &
1275 default_l_val=.false., lone_keyword_l_val=.true.)
1276 CALL section_add_keyword(section, keyword)
1277 CALL keyword_release(keyword)
1278
1279 CALL keyword_create(keyword, __location__, name="GEO_CHECK", &
1280 description="This keyword enables the check that two atoms are never below the minimum"// &
1281 " value used to construct the splines during the construction of the neighbouring list."// &
1282 " Disabling this keyword avoids CP2K to abort in case two atoms are below the minimum"// &
1283 " value of the radius used to generate the splines.", &
1284 usage="GEO_CHECK", &
1285 default_l_val=.true., lone_keyword_l_val=.true.)
1286 CALL section_add_keyword(section, keyword)
1287 CALL keyword_release(keyword)
1288
1289 END SUBROUTINE create_neighbor_lists_section
1290
1291! **************************************************************************************************
1292!> \brief This section specifies the input parameters for a generic potential form
1293!> \param section the section to create
1294!> \author teo
1295! **************************************************************************************************
1296 SUBROUTINE create_genpot_section(section)
1297 TYPE(section_type), POINTER :: section
1298
1299 TYPE(keyword_type), POINTER :: keyword
1300
1301 cpassert(.NOT. ASSOCIATED(section))
1302 CALL section_create(section, __location__, name="GENPOT", &
1303 description="This section specifies the input parameters for a generic potential type. "// &
1304 docf(), &
1305 n_keywords=1, n_subsections=0, repeats=.true.)
1306
1307 NULLIFY (keyword)
1308
1309 CALL keyword_create(keyword, __location__, name="ATOMS", &
1310 description="Defines the atomic kind involved in the generic potential", &
1311 usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
1312 n_var=2)
1313 CALL section_add_keyword(section, keyword)
1314 CALL keyword_release(keyword)
1315
1316 CALL keyword_create(keyword, __location__, name="FUNCTION", &
1317 description="Specifies the functional form in mathematical notation.", &
1318 usage="FUNCTION a\*EXP(-b\*x^2)/x+D\*log10(x)", type_of_var=lchar_t, &
1319 n_var=1)
1320 CALL section_add_keyword(section, keyword)
1321 CALL keyword_release(keyword)
1322
1323 CALL keyword_create(keyword, __location__, name="VARIABLES", &
1324 description="Defines the variable of the functional form.", &
1325 usage="VARIABLES x", type_of_var=char_t, &
1326 n_var=-1)
1327 CALL section_add_keyword(section, keyword)
1328 CALL keyword_release(keyword)
1329
1330 CALL keyword_create(keyword, __location__, name="PARAMETERS", &
1331 description="Defines the parameters of the functional form", &
1332 usage="PARAMETERS a b D", type_of_var=char_t, &
1333 n_var=-1, repeats=.true.)
1334 CALL section_add_keyword(section, keyword)
1335 CALL keyword_release(keyword)
1336
1337 CALL keyword_create(keyword, __location__, name="VALUES", &
1338 description="Defines the values of parameter of the functional form", &
1339 usage="VALUES ", type_of_var=real_t, &
1340 n_var=-1, repeats=.true., unit_str="internal_cp2k")
1341 CALL section_add_keyword(section, keyword)
1342 CALL keyword_release(keyword)
1343
1344 CALL keyword_create(keyword, __location__, name="UNITS", &
1345 description="Optionally, allows to define valid CP2K unit strings for each parameter value. "// &
1346 "It is assumed that the corresponding parameter value is specified in this unit.", &
1347 usage="UNITS angstrom eV*angstrom^-1 angstrom^1 K", type_of_var=char_t, &
1348 n_var=-1, repeats=.true.)
1349 CALL section_add_keyword(section, keyword)
1350 CALL keyword_release(keyword)
1351
1352 CALL keyword_create(keyword, __location__, name="RCUT", &
1353 description="Defines the cutoff parameter of the generic potential", &
1354 usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
1355 unit_str="angstrom"), &
1356 unit_str="angstrom")
1357 CALL section_add_keyword(section, keyword)
1358 CALL keyword_release(keyword)
1359
1360 CALL keyword_create(keyword, __location__, name="RMIN", &
1361 description="Defines the lower bound of the potential. If not set the range is the"// &
1362 " full range generate by the spline", usage="RMIN {real}", &
1363 type_of_var=real_t, unit_str="angstrom")
1364 CALL section_add_keyword(section, keyword)
1365 CALL keyword_release(keyword)
1366
1367 CALL keyword_create(keyword, __location__, name="RMAX", &
1368 description="Defines the upper bound of the potential. If not set the range is the"// &
1369 " full range generate by the spline", usage="RMAX {real}", &
1370 type_of_var=real_t, unit_str="angstrom")
1371 CALL section_add_keyword(section, keyword)
1372 CALL keyword_release(keyword)
1373
1374 END SUBROUTINE create_genpot_section
1375
1376! **************************************************************************************************
1377!> \brief This section specifies the input parameters for EAM potential type
1378!> \param section the section to create
1379!> \author teo
1380! **************************************************************************************************
1381 SUBROUTINE create_eam_section(section)
1382 TYPE(section_type), POINTER :: section
1383
1384 TYPE(keyword_type), POINTER :: keyword
1385
1386 cpassert(.NOT. ASSOCIATED(section))
1387 CALL section_create(section, __location__, name="EAM", &
1388 description="This section specifies the input parameters for EAM potential type.", &
1389 citations=[foiles1986], n_keywords=1, n_subsections=0, repeats=.true.)
1390
1391 NULLIFY (keyword)
1392
1393 CALL keyword_create(keyword, __location__, name="ATOMS", &
1394 description="Defines the atomic kind involved in the nonbond potential", &
1395 usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
1396 n_var=2)
1397 CALL section_add_keyword(section, keyword)
1398 CALL keyword_release(keyword)
1399
1400 CALL keyword_create(keyword, __location__, name="PARM_FILE_NAME", &
1401 variants=["PARMFILE"], &
1402 description="Specifies the filename that contains the tabulated EAM potential. "// &
1403 "File structure: the first line of the potential file contains a title. "// &
1404 "The second line contains: atomic number, mass and lattice constant. "// &
1405 "These information are parsed but not used in CP2K. The third line contains: "// &
1406 "dr: increment of r for the tabulated values of density and phi (assuming r starts in 0) [angstrom]; "// &
1407 "drho: increment of density for the tabulated values of the embedding function (assuming rho starts "// &
1408 "in 0) [au_c]; cutoff: cutoff of the EAM potential; npoints: number of points in tabulated. Follow "// &
1409 "in order npoints lines for rho [au_c] and its derivative [au_c*angstrom^-1]; npoints lines for "// &
1410 "PHI [ev] and its derivative [ev*angstrom^-1] and npoint lines for the embedded function [ev] "// &
1411 "and its derivative [ev*au_c^-1].", &
1412 usage="PARM_FILE_NAME {FILENAME}", default_lc_val=" ")
1413 CALL section_add_keyword(section, keyword)
1414 CALL keyword_release(keyword)
1415
1416 END SUBROUTINE create_eam_section
1417
1418! **************************************************************************************************
1419!> \brief This section specifies the input parameters for NEQUIP potential type
1420!> \param section the section to create
1421!> \author teo
1422! **************************************************************************************************
1423 SUBROUTINE create_nequip_section(section)
1424 TYPE(section_type), POINTER :: section
1425
1426 TYPE(keyword_type), POINTER :: keyword
1427
1428 cpassert(.NOT. ASSOCIATED(section))
1429 CALL section_create(section, __location__, name="NEQUIP", &
1430 description="This section specifies the input parameters for NEQUIP potential type "// &
1431 "based on equivariant neural networks, and for ALLEGRO, a local large-scale variant. "// &
1432 "Note: To enable the prediction of stress, along with energies and forces, the keyword "// &
1433 "StressForceOutput must be included in the nequip config *.yaml file used to train the "// &
1434 "model, regardless of whether the model has been trained on the stress. "// &
1435 "Requires linking with libtorch library from <https://pytorch.org/cppdocs/installing.html>.", &
1436 citations=[batzner2022, musaelian2023, tan2025], n_keywords=1, n_subsections=0, repeats=.false.)
1437
1438 NULLIFY (keyword)
1439
1440 CALL keyword_create(keyword, __location__, name="ATOMS", &
1441 description="Defines the atomic kinds involved in the NEQUIP potential. "// &
1442 "Provide a list of each element, making sure that the mapping from the ATOMS list "// &
1443 "to NequIP atom types is correct. This mapping should also be consistent for the "// &
1444 "atomic coordinates as specified in the sections COORDS or TOPOLOGY.", &
1445 usage="ATOMS {KIND 1} {KIND 2} .. {KIND N}", type_of_var=char_t, &
1446 n_var=-1)
1447 CALL section_add_keyword(section, keyword)
1448 CALL keyword_release(keyword)
1449
1450 CALL keyword_create(keyword, __location__, name="MODEL_TYPE", &
1451 variants=["MODEL"], &
1452 description="Specifies the type of model used. Allowed values are NEQUIP or ALLEGRO.", &
1453 usage="MODEL_TYPE {NEQUIP}", default_lc_val=" ")
1454 CALL section_add_keyword(section, keyword)
1455 CALL keyword_release(keyword)
1456
1457 CALL keyword_create(keyword, __location__, name="POT_FILE_NAME", &
1458 variants=["MODEL_FILE_NAME"], &
1459 description="Specifies the filename that contains the NEQUIP model.", &
1460 usage="POT_FILE_NAME {FILENAME}", default_lc_val=" ")
1461 CALL section_add_keyword(section, keyword)
1462 CALL keyword_release(keyword)
1463
1464 CALL keyword_create(keyword, __location__, name="UNIT_LENGTH", &
1465 description="Units of length in the NEQUIP model.pth file. "// &
1466 "The units of positions, cell, energies and forces must be self-consistent: "// &
1467 "e.g. coordinates in Angstrom, energies in eV, forces in eV/Angstrom. ", &
1468 usage="UNIT_LENGTH angstrom", default_c_val="angstrom")
1469 CALL section_add_keyword(section, keyword)
1470 CALL keyword_release(keyword)
1471
1472 CALL keyword_create(keyword, __location__, name="UNIT_ENERGY", &
1473 description="Units of energy in the NEQUIP model.pth file. "// &
1474 "The units of positions, energies and forces must be self-consistent: "// &
1475 "e.g. coordinates in Angstrom, energies in eV, forces in eV/Angstrom. ", &
1476 usage="UNIT_ENERGY hartree", default_c_val="eV")
1477 CALL section_add_keyword(section, keyword)
1478 CALL keyword_release(keyword)
1479
1480 CALL keyword_create(keyword, __location__, name="UNIT_FORCES", &
1481 description="Units of the forces in the NEQUIP model.pth file. "// &
1482 "The units of positions, energies and forces must be self-consistent: "// &
1483 "e.g. coordinates in Angstrom, energies in eV, forces in eV/Angstrom. ", &
1484 usage="UNIT_FORCES hartree/bohr", default_c_val="eV/Angstrom")
1485 CALL section_add_keyword(section, keyword)
1486 CALL keyword_release(keyword)
1487
1488 END SUBROUTINE create_nequip_section
1489
1490! **************************************************************************************************
1491!> \brief This section specifies the input parameters for MACE potential type
1492!> \param section the section to create
1493!> \author Xinyue Sun
1494! **************************************************************************************************
1495 SUBROUTINE create_mace_section(section)
1496 TYPE(section_type), POINTER :: section
1497
1498 TYPE(keyword_type), POINTER :: keyword
1499
1500 cpassert(.NOT. ASSOCIATED(section))
1501 CALL section_create(section, __location__, name="MACE", &
1502 description="This section specifies the input parameters for MACE potential type, "// &
1503 "a higher-order equivariant message-passing neural network. "// &
1504 "The MACE model must be exported to a TorchScript file that takes a single "// &
1505 "dictionary argument (see the create_cp2k_model.py helper). "// &
1506 "Requires linking with libtorch library from <https://pytorch.org/cppdocs/installing.html>.", &
1507 citations=[batatia2022], n_keywords=1, n_subsections=0, repeats=.false.)
1508
1509 NULLIFY (keyword)
1510
1511 CALL keyword_create(keyword, __location__, name="ATOMS", &
1512 description="Defines the atomic kinds involved in the MACE potential. "// &
1513 "Provide a list of each element, making sure that the mapping from the ATOMS list "// &
1514 "to MACE atom types is correct. This mapping should also be consistent for the "// &
1515 "atomic coordinates as specified in the sections COORDS or TOPOLOGY.", &
1516 usage="ATOMS {KIND 1} {KIND 2} .. {KIND N}", type_of_var=char_t, &
1517 n_var=-1)
1518 CALL section_add_keyword(section, keyword)
1519 CALL keyword_release(keyword)
1520
1521 CALL keyword_create(keyword, __location__, name="POT_FILE_NAME", &
1522 variants=["MODEL_FILE_NAME"], &
1523 description="Specifies the filename that contains the exported MACE model. "// &
1524 "MACE models use standardized units (Angstrom for length, eV for energy, "// &
1525 "eV/Angstrom for forces), so no unit keywords are required.", &
1526 usage="POT_FILE_NAME {FILENAME}", default_lc_val=" ")
1527 CALL section_add_keyword(section, keyword)
1528 CALL keyword_release(keyword)
1529
1530 END SUBROUTINE create_mace_section
1531
1532! **************************************************************************************************
1533!> \brief This section specifies the input parameters for ACE potential type
1534!> \param section the section to create
1535!> \author
1536! **************************************************************************************************
1537 SUBROUTINE create_ace_section(section)
1538 TYPE(section_type), POINTER :: section
1539
1540 TYPE(keyword_type), POINTER :: keyword
1541
1542 CALL section_create(section, __location__, name="ACE", &
1543 description="This section specifies the input parameters for Atomic Cluster Expansion type. "// &
1544 "Mainly intended for accurate representation of "// &
1545 "potential energy surfaces. "// &
1546 "Requires linking with ACE library from "// &
1547 "<a href=""https://github.com/ICAMS/lammps-user-pace"" "// &
1548 "target=""_blank"">https://github.com/ICAMS/lammps-user-pace</a> .", &
1550 n_keywords=1, n_subsections=0, repeats=.false.)
1551 NULLIFY (keyword)
1552
1553 CALL keyword_create(keyword, __location__, name="ATOMS", &
1554 description="Defines the atomic species. "// &
1555 "Provide a list of each element, "// &
1556 "making sure that the mapping from the ATOMS list to ACE atom types is correct.", &
1557 usage="ATOMS {KIND 1} {KIND 2} .. {KIND N}", type_of_var=char_t, &
1558 n_var=-1)
1559 CALL section_add_keyword(section, keyword)
1560 CALL keyword_release(keyword)
1561 CALL keyword_create(keyword, __location__, name="POT_FILE_NAME", &
1562 variants=["PARMFILE"], &
1563 description="Specifies the filename that contains the ACE potential parameters.", &
1564 usage="POT_FILE_NAME {FILENAME}", default_lc_val="test.yaml")
1565 CALL section_add_keyword(section, keyword)
1566 CALL keyword_release(keyword)
1567 END SUBROUTINE create_ace_section
1568
1569! **************************************************************************************************
1570!> \brief This section specifies the input parameters for DEEPMD potential type
1571!> \param section the section to create
1572!> \author ybzhuang
1573! **************************************************************************************************
1574 SUBROUTINE create_deepmd_section(section)
1575 TYPE(section_type), POINTER :: section
1576
1577 TYPE(keyword_type), POINTER :: keyword
1578
1579 CALL section_create(section, __location__, name="DEEPMD", &
1580 description="This section specifies the input parameters for Deep Potential type. "// &
1581 "Mainly intended for things like neural network to DFT "// &
1582 "to achieve correlated-wavefunction-like accuracy. "// &
1583 "Requires linking with DeePMD-kit library from "// &
1584 "<a href=""https://docs.deepmodeling.com/projects/deepmd/en/master"" "// &
1585 "target=""_blank"">https://docs.deepmodeling.com/projects/deepmd/en/master</a> .", &
1586 citations=[wang2018, zeng2023], n_keywords=1, n_subsections=0, repeats=.false.)
1587 NULLIFY (keyword)
1588 CALL keyword_create(keyword, __location__, name="ATOMS", &
1589 description="Defines the atomic kinds involved in the Deep Potential. "// &
1590 "Provide a list of each element, "// &
1591 "making sure that the mapping from the ATOMS list to DeePMD atom types is correct.", &
1592 usage="ATOMS {KIND 1} {KIND 2} .. {KIND N}", type_of_var=char_t, &
1593 n_var=-1)
1594 CALL section_add_keyword(section, keyword)
1595 CALL keyword_release(keyword)
1596 CALL keyword_create(keyword, __location__, name="POT_FILE_NAME", &
1597 variants=["PARMFILE"], &
1598 description="Specifies the filename that contains the DeePMD-kit potential.", &
1599 usage="POT_FILE_NAME {FILENAME}", default_lc_val="graph.pb")
1600 CALL section_add_keyword(section, keyword)
1601 CALL keyword_release(keyword)
1602 CALL keyword_create(keyword, __location__, name="ATOMS_DEEPMD_TYPE", &
1603 description="Specifies the atomic TYPE for the DeePMD-kit potential. "// &
1604 "Provide a list of index, making sure that the mapping "// &
1605 "from the ATOMS list to DeePMD atom types is correct. ", &
1606 usage="ATOMS_DEEPMD_TYPE {TYPE INTEGER 1} {TYPE INTEGER 2} .. "// &
1607 "{TYPE INTEGER N}", type_of_var=integer_t, &
1608 n_var=-1)
1609 CALL section_add_keyword(section, keyword)
1610 CALL keyword_release(keyword)
1611 END SUBROUTINE create_deepmd_section
1612
1613! **************************************************************************************************
1614!> \brief This section specifies the input parameters for Lennard-Jones potential type
1615!> \param section the section to create
1616!> \author teo
1617! **************************************************************************************************
1618 SUBROUTINE create_lj_section(section)
1619 TYPE(section_type), POINTER :: section
1620
1621 TYPE(keyword_type), POINTER :: keyword
1622
1623 cpassert(.NOT. ASSOCIATED(section))
1624 CALL section_create(section, __location__, name="lennard-jones", &
1625 description="This section specifies the input parameters for LENNARD-JONES potential type. "// &
1626 "Functional form: V(r) = 4.0 * EPSILON * [(SIGMA/r)^12-(SIGMA/r)^6].", &
1627 n_keywords=1, n_subsections=0, repeats=.true.)
1628
1629 NULLIFY (keyword)
1630
1631 CALL keyword_create(keyword, __location__, name="ATOMS", &
1632 description="Defines the atomic kind involved in the nonbond potential", &
1633 usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
1634 n_var=2)
1635 CALL section_add_keyword(section, keyword)
1636 CALL keyword_release(keyword)
1637
1638 CALL keyword_create(keyword, __location__, name="EPSILON", &
1639 description="Defines the EPSILON parameter of the LJ potential", &
1640 usage="EPSILON {real}", type_of_var=real_t, &
1641 n_var=1, unit_str="K_e")
1642 CALL section_add_keyword(section, keyword)
1643 CALL keyword_release(keyword)
1644
1645 CALL keyword_create(keyword, __location__, name="SIGMA", &
1646 description="Defines the SIGMA parameter of the LJ potential", &
1647 usage="SIGMA {real}", type_of_var=real_t, &
1648 n_var=1, unit_str="angstrom")
1649 CALL section_add_keyword(section, keyword)
1650 CALL keyword_release(keyword)
1651
1652 CALL keyword_create(keyword, __location__, name="RCUT", &
1653 description="Defines the cutoff parameter of the LJ potential", &
1654 usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
1655 unit_str="angstrom"), &
1656 unit_str="angstrom")
1657 CALL section_add_keyword(section, keyword)
1658 CALL keyword_release(keyword)
1659
1660 CALL keyword_create(keyword, __location__, name="RMIN", &
1661 description="Defines the lower bound of the potential. If not set the range is the"// &
1662 " full range generate by the spline", usage="RMIN {real}", &
1663 type_of_var=real_t, unit_str="angstrom")
1664 CALL section_add_keyword(section, keyword)
1665 CALL keyword_release(keyword)
1666
1667 CALL keyword_create(keyword, __location__, name="RMAX", &
1668 description="Defines the upper bound of the potential. If not set the range is the"// &
1669 " full range generate by the spline", usage="RMAX {real}", &
1670 type_of_var=real_t, unit_str="angstrom")
1671 CALL section_add_keyword(section, keyword)
1672 CALL keyword_release(keyword)
1673
1674 END SUBROUTINE create_lj_section
1675
1676! **************************************************************************************************
1677!> \brief This section specifies the input parameters for Williams potential type
1678!> \param section the section to create
1679!> \author teo
1680! **************************************************************************************************
1681 SUBROUTINE create_williams_section(section)
1682 TYPE(section_type), POINTER :: section
1683
1684 TYPE(keyword_type), POINTER :: keyword
1685
1686 cpassert(.NOT. ASSOCIATED(section))
1687 CALL section_create(section, __location__, name="williams", &
1688 description="This section specifies the input parameters for WILLIAMS potential type. "// &
1689 "Functional form: V(r) = A*EXP(-B*r) - C / r^6 .", &
1690 n_keywords=1, n_subsections=0, repeats=.true.)
1691
1692 NULLIFY (keyword)
1693
1694 CALL keyword_create(keyword, __location__, name="ATOMS", &
1695 description="Defines the atomic kind involved in the nonbond potential", &
1696 usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
1697 n_var=2)
1698 CALL section_add_keyword(section, keyword)
1699 CALL keyword_release(keyword)
1700
1701 CALL keyword_create(keyword, __location__, name="A", &
1702 description="Defines the A parameter of the Williams potential", &
1703 usage="A {real}", type_of_var=real_t, &
1704 n_var=1, unit_str="K_e")
1705 CALL section_add_keyword(section, keyword)
1706 CALL keyword_release(keyword)
1707
1708 CALL keyword_create(keyword, __location__, name="B", &
1709 description="Defines the B parameter of the Williams potential", &
1710 usage="B {real}", type_of_var=real_t, &
1711 n_var=1, unit_str="angstrom^-1")
1712 CALL section_add_keyword(section, keyword)
1713 CALL keyword_release(keyword)
1714
1715 CALL keyword_create(keyword, __location__, name="C", &
1716 description="Defines the C parameter of the Williams potential", &
1717 usage="C {real}", type_of_var=real_t, &
1718 n_var=1, unit_str="K_e*angstrom^6")
1719 CALL section_add_keyword(section, keyword)
1720 CALL keyword_release(keyword)
1721
1722 CALL keyword_create(keyword, __location__, name="RCUT", &
1723 description="Defines the cutoff parameter of the Williams potential", &
1724 usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
1725 unit_str="angstrom"), &
1726 unit_str="angstrom")
1727 CALL section_add_keyword(section, keyword)
1728 CALL keyword_release(keyword)
1729
1730 CALL keyword_create(keyword, __location__, name="RMIN", &
1731 description="Defines the lower bound of the potential. If not set the range is the"// &
1732 " full range generate by the spline", usage="RMIN {real}", &
1733 type_of_var=real_t, unit_str="angstrom")
1734 CALL section_add_keyword(section, keyword)
1735 CALL keyword_release(keyword)
1736
1737 CALL keyword_create(keyword, __location__, name="RMAX", &
1738 description="Defines the upper bound of the potential. If not set the range is the"// &
1739 " full range generate by the spline", usage="RMAX {real}", &
1740 type_of_var=real_t, unit_str="angstrom")
1741 CALL section_add_keyword(section, keyword)
1742 CALL keyword_release(keyword)
1743
1744 END SUBROUTINE create_williams_section
1745
1746! **************************************************************************************************
1747!> \brief This section specifies the input parameters for Goodwin potential type
1748!> \param section the section to create
1749!> \author teo
1750! **************************************************************************************************
1751 SUBROUTINE create_goodwin_section(section)
1752 TYPE(section_type), POINTER :: section
1753
1754 TYPE(keyword_type), POINTER :: keyword
1755
1756 cpassert(.NOT. ASSOCIATED(section))
1757 CALL section_create(section, __location__, name="goodwin", &
1758 description="This section specifies the input parameters for GOODWIN potential type. "// &
1759 "Functional form: V(r) = EXP(M*(-(r/DC)**MC+(D/DC)**MC))*VR0*(D/r)**M.", &
1760 n_keywords=1, n_subsections=0, repeats=.true.)
1761
1762 NULLIFY (keyword)
1763 CALL keyword_create(keyword, __location__, name="ATOMS", &
1764 description="Defines the atomic kind involved in the nonbond potential", &
1765 usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
1766 n_var=2)
1767 CALL section_add_keyword(section, keyword)
1768 CALL keyword_release(keyword)
1769
1770 CALL keyword_create(keyword, __location__, name="VR0", &
1771 description="Defines the VR0 parameter of the Goodwin potential", &
1772 usage="VR0 {real}", type_of_var=real_t, &
1773 n_var=1, unit_str="K_e")
1774 CALL section_add_keyword(section, keyword)
1775 CALL keyword_release(keyword)
1776
1777 CALL keyword_create(keyword, __location__, name="D", &
1778 description="Defines the D parameter of the Goodwin potential", &
1779 usage="D {real}", type_of_var=real_t, &
1780 n_var=1, unit_str="angstrom")
1781 CALL section_add_keyword(section, keyword)
1782 CALL keyword_release(keyword)
1783
1784 CALL keyword_create(keyword, __location__, name="DC", &
1785 description="Defines the DC parameter of the Goodwin potential", &
1786 usage="DC {real}", type_of_var=real_t, &
1787 n_var=1, unit_str="angstrom")
1788 CALL section_add_keyword(section, keyword)
1789 CALL keyword_release(keyword)
1790
1791 CALL keyword_create(keyword, __location__, name="M", &
1792 description="Defines the M parameter of the Goodwin potential", &
1793 usage="M {real}", type_of_var=integer_t, &
1794 n_var=1)
1795 CALL section_add_keyword(section, keyword)
1796 CALL keyword_release(keyword)
1797
1798 CALL keyword_create(keyword, __location__, name="MC", &
1799 description="Defines the MC parameter of the Goodwin potential", &
1800 usage="MC {real}", type_of_var=integer_t, &
1801 n_var=1)
1802 CALL section_add_keyword(section, keyword)
1803 CALL keyword_release(keyword)
1804
1805 CALL keyword_create(keyword, __location__, name="RCUT", &
1806 description="Defines the cutoff parameter of the Goodwin potential", &
1807 usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
1808 unit_str="angstrom"), &
1809 unit_str="angstrom")
1810 CALL section_add_keyword(section, keyword)
1811 CALL keyword_release(keyword)
1812
1813 CALL keyword_create(keyword, __location__, name="RMIN", &
1814 description="Defines the lower bound of the potential. If not set the range is the"// &
1815 " full range generate by the spline", usage="RMIN {real}", &
1816 type_of_var=real_t, unit_str="angstrom")
1817 CALL section_add_keyword(section, keyword)
1818 CALL keyword_release(keyword)
1819
1820 CALL keyword_create(keyword, __location__, name="RMAX", &
1821 description="Defines the upper bound of the potential. If not set the range is the"// &
1822 " full range generate by the spline", usage="RMAX {real}", &
1823 type_of_var=real_t, unit_str="angstrom")
1824 CALL section_add_keyword(section, keyword)
1825 CALL keyword_release(keyword)
1826
1827 END SUBROUTINE create_goodwin_section
1828
1829! **************************************************************************************************
1830!> \brief This section specifies the input parameters for IPBV potential type
1831!> \param section the section to create
1832!> \author teo
1833! **************************************************************************************************
1834 SUBROUTINE create_ipbv_section(section)
1835 TYPE(section_type), POINTER :: section
1836
1837 TYPE(keyword_type), POINTER :: keyword
1838
1839 cpassert(.NOT. ASSOCIATED(section))
1840 CALL section_create(section, __location__, name="ipbv", &
1841 description="This section specifies the input parameters for IPBV potential type. "// &
1842 "Functional form: Implicit table function.", &
1843 n_keywords=1, n_subsections=0, repeats=.true.)
1844
1845 NULLIFY (keyword)
1846
1847 CALL keyword_create(keyword, __location__, name="ATOMS", &
1848 description="Defines the atomic kind involved in the IPBV nonbond potential", &
1849 usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
1850 n_var=2)
1851 CALL section_add_keyword(section, keyword)
1852 CALL keyword_release(keyword)
1853
1854 CALL keyword_create(keyword, __location__, name="RCUT", &
1855 description="Defines the cutoff parameter of the IPBV potential", &
1856 usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
1857 unit_str="angstrom"), &
1858 unit_str="angstrom")
1859 CALL section_add_keyword(section, keyword)
1860 CALL keyword_release(keyword)
1861
1862 CALL keyword_create(keyword, __location__, name="RMIN", &
1863 description="Defines the lower bound of the potential. If not set the range is the"// &
1864 " full range generate by the spline", usage="RMIN {real}", &
1865 type_of_var=real_t, unit_str="angstrom")
1866 CALL section_add_keyword(section, keyword)
1867 CALL keyword_release(keyword)
1868
1869 CALL keyword_create(keyword, __location__, name="RMAX", &
1870 description="Defines the upper bound of the potential. If not set the range is the"// &
1871 " full range generate by the spline", usage="RMAX {real}", &
1872 type_of_var=real_t, unit_str="angstrom")
1873 CALL section_add_keyword(section, keyword)
1874 CALL keyword_release(keyword)
1875
1876 END SUBROUTINE create_ipbv_section
1877
1878! **************************************************************************************************
1879!> \brief This section specifies the input parameters for BMHFT potential type
1880!> \param section the section to create
1881!> \author teo
1882! **************************************************************************************************
1883 SUBROUTINE create_bmhft_section(section)
1884 TYPE(section_type), POINTER :: section
1885
1886 TYPE(keyword_type), POINTER :: keyword
1887
1888 cpassert(.NOT. ASSOCIATED(section))
1889 CALL section_create(section, __location__, name="BMHFT", &
1890 description="This section specifies the input parameters for BMHFT potential type. "// &
1891 "Functional form: V(r) = A * EXP(-B*r) - C/r^6 - D/r^8. "// &
1892 "Values available inside cp2k only for the Na/Cl pair.", &
1893 citations=[tosi1964a, tosi1964b], n_keywords=1, n_subsections=0, repeats=.true.)
1894
1895 NULLIFY (keyword)
1896
1897 CALL keyword_create(keyword, __location__, name="ATOMS", &
1898 description="Defines the atomic kind involved in the BMHFT nonbond potential", &
1899 usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
1900 n_var=2)
1901 CALL section_add_keyword(section, keyword)
1902 CALL keyword_release(keyword)
1903
1904 CALL keyword_create(keyword, __location__, name="MAP_ATOMS", &
1905 description="Defines the kinds for which internally is defined the BMHFT nonbond potential"// &
1906 " at the moment only Na and Cl.", &
1907 usage="MAP_ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
1908 n_var=2)
1909 CALL section_add_keyword(section, keyword)
1910 CALL keyword_release(keyword)
1911
1912 CALL keyword_create(keyword, __location__, name="RCUT", &
1913 description="Defines the cutoff parameter of the BMHFT potential", &
1914 usage="RCUT {real}", default_r_val=7.8_dp, &
1915 unit_str="angstrom")
1916 CALL section_add_keyword(section, keyword)
1917 CALL keyword_release(keyword)
1918
1919 CALL keyword_create(keyword, __location__, name="A", &
1920 description="Defines the A parameter of the Fumi-Tosi Potential", &
1921 usage="A {real}", type_of_var=real_t, &
1922 n_var=1, unit_str="hartree")
1923 CALL section_add_keyword(section, keyword)
1924 CALL keyword_release(keyword)
1925
1926 CALL keyword_create(keyword, __location__, name="B", &
1927 description="Defines the B parameter of the Fumi-Tosi Potential", &
1928 usage="B {real}", type_of_var=real_t, &
1929 n_var=1, unit_str="angstrom^-1")
1930 CALL section_add_keyword(section, keyword)
1931 CALL keyword_release(keyword)
1932
1933 CALL keyword_create(keyword, __location__, name="C", &
1934 description="Defines the C parameter of the Fumi-Tosi Potential", &
1935 usage="C {real}", type_of_var=real_t, &
1936 n_var=1, unit_str="hartree*angstrom^6")
1937 CALL section_add_keyword(section, keyword)
1938 CALL keyword_release(keyword)
1939
1940 CALL keyword_create(keyword, __location__, name="D", &
1941 description="Defines the D parameter of the Fumi-Tosi Potential", &
1942 usage="D {real}", type_of_var=real_t, &
1943 n_var=1, unit_str="hartree*angstrom^8")
1944 CALL section_add_keyword(section, keyword)
1945 CALL keyword_release(keyword)
1946
1947 CALL keyword_create(keyword, __location__, name="RMIN", &
1948 description="Defines the lower bound of the potential. If not set the range is the"// &
1949 " full range generate by the spline", usage="RMIN {real}", &
1950 type_of_var=real_t, unit_str="angstrom")
1951 CALL section_add_keyword(section, keyword)
1952 CALL keyword_release(keyword)
1953
1954 CALL keyword_create(keyword, __location__, name="RMAX", &
1955 description="Defines the upper bound of the potential. If not set the range is the"// &
1956 " full range generate by the spline", usage="RMAX {real}", &
1957 type_of_var=real_t, unit_str="angstrom")
1958 CALL section_add_keyword(section, keyword)
1959 CALL keyword_release(keyword)
1960
1961 END SUBROUTINE create_bmhft_section
1962
1963! **************************************************************************************************
1964!> \brief This section specifies the input parameters for BMHFTD potential type
1965!> \param section the section to create
1966!> \par History
1967!> - Unused input keyword ORDER removed (18.10.2021, MK)
1968!> \author Mathieu Salanne 05.2010
1969! **************************************************************************************************
1970 SUBROUTINE create_bmhftd_section(section)
1971 TYPE(section_type), POINTER :: section
1972
1973 TYPE(keyword_type), POINTER :: keyword
1974
1975 cpassert(.NOT. ASSOCIATED(section))
1976 CALL section_create(section, __location__, name="BMHFTD", &
1977 description="This section specifies the input parameters for the BMHFTD potential type. "// &
1978 "Functional form: V(r) = A*exp(-B*r) - f_6*(r)C/r^6 - f_8(r)*D/r^8 "// &
1979 "where f_order(r) = 1 - exp(-BD*r)*\sum_{k=0}^order (BD*r)^k/k! "// &
1980 "(Tang-Toennies damping function). No pre-defined parameter values are available.", &
1981 citations=[tosi1964a, tosi1964b], n_keywords=1, n_subsections=0, repeats=.true.)
1982
1983 NULLIFY (keyword)
1984
1985 CALL keyword_create(keyword, __location__, name="ATOMS", &
1986 description="Defines the atomic kind involved in the BMHFTD nonbond potential", &
1987 usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
1988 n_var=2)
1989 CALL section_add_keyword(section, keyword)
1990 CALL keyword_release(keyword)
1991
1992 CALL keyword_create(keyword, __location__, name="MAP_ATOMS", &
1993 description="Defines the kinds for which internally is defined the BMHFTD nonbond potential"// &
1994 " at the moment no species included.", &
1995 usage="MAP_ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
1996 n_var=2)
1997 CALL section_add_keyword(section, keyword)
1998 CALL keyword_release(keyword)
1999
2000 CALL keyword_create(keyword, __location__, name="RCUT", &
2001 description="Defines the cutoff parameter of the BMHFTD potential", &
2002 usage="RCUT {real}", default_r_val=7.8_dp, &
2003 unit_str="angstrom")
2004 CALL section_add_keyword(section, keyword)
2005 CALL keyword_release(keyword)
2006
2007 CALL keyword_create(keyword, __location__, name="A", &
2008 description="Defines the A parameter of the dispersion-damped Fumi-Tosi potential", &
2009 usage="A {real}", type_of_var=real_t, &
2010 n_var=1, unit_str="hartree")
2011 CALL section_add_keyword(section, keyword)
2012 CALL keyword_release(keyword)
2013
2014 CALL keyword_create(keyword, __location__, name="B", &
2015 description="Defines the B parameter of the dispersion-damped Fumi-Tosi potential", &
2016 usage="B {real}", type_of_var=real_t, &
2017 n_var=1, unit_str="angstrom^-1")
2018 CALL section_add_keyword(section, keyword)
2019 CALL keyword_release(keyword)
2020
2021 CALL keyword_create(keyword, __location__, name="C", &
2022 description="Defines the C parameter of the dispersion-damped Fumi-Tosi potential", &
2023 usage="C {real}", type_of_var=real_t, &
2024 n_var=1, unit_str="hartree*angstrom^6")
2025 CALL section_add_keyword(section, keyword)
2026 CALL keyword_release(keyword)
2027
2028 CALL keyword_create(keyword, __location__, name="D", &
2029 description="Defines the D parameter of the dispersion-damped Fumi-Tosi potential", &
2030 usage="D {real}", type_of_var=real_t, &
2031 n_var=1, unit_str="hartree*angstrom^8")
2032 CALL section_add_keyword(section, keyword)
2033 CALL keyword_release(keyword)
2034
2035 CALL keyword_create(keyword, __location__, name="BD", &
2036 description="Defines the BD parameters of the dispersion-damped Fumi-Tosi potential. "// &
2037 "One or two parameter values are expected. If only one value is provided, then this "// &
2038 "value will be used both for the 6th and the 8th order term.", &
2039 usage="BD {real} {real}", type_of_var=real_t, &
2040 n_var=-1, unit_str="angstrom^-1")
2041 CALL section_add_keyword(section, keyword)
2042 CALL keyword_release(keyword)
2043
2044 CALL keyword_create(keyword, __location__, name="RMIN", &
2045 description="Defines the lower bound of the potential. If not set the range is the"// &
2046 " full range generate by the spline", usage="RMIN {real}", &
2047 type_of_var=real_t, unit_str="angstrom")
2048 CALL section_add_keyword(section, keyword)
2049 CALL keyword_release(keyword)
2050
2051 CALL keyword_create(keyword, __location__, name="RMAX", &
2052 description="Defines the upper bound of the potential. If not set the range is the"// &
2053 " full range generate by the spline", usage="RMAX {real}", &
2054 type_of_var=real_t, unit_str="angstrom")
2055 CALL section_add_keyword(section, keyword)
2056 CALL keyword_release(keyword)
2057
2058 END SUBROUTINE create_bmhftd_section
2059
2060! **************************************************************************************************
2061!> \brief This section specifies the input parameters for Buckingham 4 ranges potential type
2062!> \param section the section to create
2063!> \author MI
2064! **************************************************************************************************
2065 SUBROUTINE create_buck4r_section(section)
2066 TYPE(section_type), POINTER :: section
2067
2068 TYPE(keyword_type), POINTER :: keyword
2069
2070 cpassert(.NOT. ASSOCIATED(section))
2071 CALL section_create(section, __location__, name="BUCK4RANGES", &
2072 description="This section specifies the input parameters for the Buckingham 4-ranges"// &
2073 " potential type."//newline// &
2074 "| Range | Functional Form |"//newline// &
2075 "| ----- | --------------- |"//newline// &
2076 "| $ r < r_1 $ | $ V(r) = A\exp(-Br) $ |"//newline// &
2077 "| $ r_1 \leq r < r_2 $ | $ V(r) = \sum_n \operatorname{POLY1}(n)r_n $ |"//newline// &
2078 "| $ r_2 \leq r < r_3 $ | $ V(r) = \sum_n \operatorname{POLY2}(n)r_n $ |"//newline// &
2079 "| $ r \geq r_3 $ | $ V(r) = -C/r_6 $ |"//newline, &
2080 n_keywords=1, n_subsections=0, repeats=.true.)
2081
2082 NULLIFY (keyword)
2083
2084 CALL keyword_create(keyword, __location__, name="ATOMS", &
2085 description="Defines the atomic kind involved in the nonbond potential", &
2086 usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
2087 n_var=2)
2088 CALL section_add_keyword(section, keyword)
2089 CALL keyword_release(keyword)
2090
2091 CALL keyword_create(keyword, __location__, name="A", &
2092 description="Defines the A parameter of the Buckingham potential", &
2093 usage="A {real}", type_of_var=real_t, &
2094 n_var=1, unit_str="K_e")
2095 CALL section_add_keyword(section, keyword)
2096 CALL keyword_release(keyword)
2097
2098 CALL keyword_create(keyword, __location__, name="B", &
2099 description="Defines the B parameter of the Buckingham potential", &
2100 usage="B {real}", type_of_var=real_t, &
2101 n_var=1, unit_str="angstrom^-1")
2102 CALL section_add_keyword(section, keyword)
2103 CALL keyword_release(keyword)
2104
2105 CALL keyword_create(keyword, __location__, name="C", &
2106 description="Defines the C parameter of the Buckingham potential", &
2107 usage="C {real}", type_of_var=real_t, &
2108 n_var=1, unit_str="K_e*angstrom^6")
2109 CALL section_add_keyword(section, keyword)
2110 CALL keyword_release(keyword)
2111
2112 CALL keyword_create(keyword, __location__, name="R1", &
2113 description="Defines the upper bound of the first range ", &
2114 usage="R1 {real}", type_of_var=real_t, &
2115 n_var=1, unit_str="angstrom")
2116 CALL section_add_keyword(section, keyword)
2117 CALL keyword_release(keyword)
2118
2119 CALL keyword_create(keyword, __location__, name="R2", &
2120 description="Defines the upper bound of the second range ", &
2121 usage="R2 {real}", type_of_var=real_t, &
2122 n_var=1, unit_str="angstrom")
2123 CALL section_add_keyword(section, keyword)
2124 CALL keyword_release(keyword)
2125
2126 CALL keyword_create(keyword, __location__, name="R3", &
2127 description="Defines the upper bound of the third range ", &
2128 usage="R3 {real}", type_of_var=real_t, &
2129 n_var=1, unit_str="angstrom")
2130 CALL section_add_keyword(section, keyword)
2131 CALL keyword_release(keyword)
2132
2133 CALL keyword_create(keyword, __location__, name="POLY1", &
2134 description="Coefficients of the polynomial used in the second range "// &
2135 "This keyword can be repeated several times.", &
2136 usage="POLY1 C1 C2 C3 ..", &
2137 n_var=-1, unit_str="K_e", type_of_var=real_t, repeats=.true.)
2138 CALL section_add_keyword(section, keyword)
2139 CALL keyword_release(keyword)
2140
2141 CALL keyword_create(keyword, __location__, name="POLY2", &
2142 description="Coefficients of the polynomial used in the third range "// &
2143 "This keyword can be repeated several times.", &
2144 usage="POLY2 C1 C2 C3 ..", &
2145 n_var=-1, unit_str="K_e", type_of_var=real_t, repeats=.true.)
2146 CALL section_add_keyword(section, keyword)
2147 CALL keyword_release(keyword)
2148
2149 CALL keyword_create(keyword, __location__, name="RCUT", &
2150 description="Defines the cutoff parameter of the Buckingham potential", &
2151 usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
2152 unit_str="angstrom"), &
2153 unit_str="angstrom")
2154 CALL section_add_keyword(section, keyword)
2155 CALL keyword_release(keyword)
2156
2157 CALL keyword_create(keyword, __location__, name="RMIN", &
2158 description="Defines the lower bound of the potential. If not set the range is the"// &
2159 " full range generate by the spline", usage="RMIN {real}", &
2160 type_of_var=real_t, unit_str="angstrom")
2161 CALL section_add_keyword(section, keyword)
2162 CALL keyword_release(keyword)
2163
2164 CALL keyword_create(keyword, __location__, name="RMAX", &
2165 description="Defines the upper bound of the potential. If not set the range is the"// &
2166 " full range generate by the spline", usage="RMAX {real}", &
2167 type_of_var=real_t, unit_str="angstrom")
2168 CALL section_add_keyword(section, keyword)
2169 CALL keyword_release(keyword)
2170
2171 END SUBROUTINE create_buck4r_section
2172
2173! **************************************************************************************************
2174!> \brief This section specifies the input parameters for Buckingham + Morse potential type
2175!> \param section the section to create
2176!> \author MI
2177! **************************************************************************************************
2178 SUBROUTINE create_buckmorse_section(section)
2179 TYPE(section_type), POINTER :: section
2180
2181 TYPE(keyword_type), POINTER :: keyword
2182
2183 cpassert(.NOT. ASSOCIATED(section))
2184 CALL section_create( &
2185 section, __location__, name="BUCKMORSE", &
2186 description="This section specifies the input parameters for"// &
2187 " Buckingham plus Morse potential type"// &
2188 " 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)]}.", &
2189 citations=[yamada2000], n_keywords=1, n_subsections=0, repeats=.true.)
2190
2191 NULLIFY (keyword)
2192
2193 CALL keyword_create(keyword, __location__, name="ATOMS", &
2194 description="Defines the atomic kind involved in the nonbond potential", &
2195 usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
2196 n_var=2)
2197 CALL section_add_keyword(section, keyword)
2198 CALL keyword_release(keyword)
2199
2200 CALL keyword_create(keyword, __location__, name="F0", &
2201 description="Defines the f0 parameter of Buckingham+Morse potential", &
2202 usage="F0 {real}", type_of_var=real_t, &
2203 n_var=1, unit_str="K_e*angstrom^-1")
2204 CALL section_add_keyword(section, keyword)
2205 CALL keyword_release(keyword)
2206
2207 CALL keyword_create(keyword, __location__, name="A1", &
2208 description="Defines the A1 parameter of Buckingham+Morse potential", &
2209 usage="A1 {real}", type_of_var=real_t, &
2210 n_var=1, unit_str="angstrom")
2211 CALL section_add_keyword(section, keyword)
2212 CALL keyword_release(keyword)
2213
2214 CALL keyword_create(keyword, __location__, name="A2", &
2215 description="Defines the A2 parameter of Buckingham+Morse potential", &
2216 usage="A2 {real}", type_of_var=real_t, &
2217 n_var=1, unit_str="angstrom")
2218 CALL section_add_keyword(section, keyword)
2219 CALL keyword_release(keyword)
2220
2221 CALL keyword_create(keyword, __location__, name="B1", &
2222 description="Defines the B1 parameter of Buckingham+Morse potential", &
2223 usage="B1 {real}", type_of_var=real_t, &
2224 n_var=1, unit_str="angstrom")
2225 CALL section_add_keyword(section, keyword)
2226 CALL keyword_release(keyword)
2227
2228 CALL keyword_create(keyword, __location__, name="B2", &
2229 description="Defines the B2 parameter of Buckingham+Morse potential", &
2230 usage="B2 {real}", type_of_var=real_t, &
2231 n_var=1, unit_str="angstrom")
2232 CALL section_add_keyword(section, keyword)
2233 CALL keyword_release(keyword)
2234
2235 CALL keyword_create(keyword, __location__, name="C", &
2236 description="Defines the C parameter of Buckingham+Morse potential", &
2237 usage="C {real}", type_of_var=real_t, &
2238 n_var=1, unit_str="K_e*angstrom^6")
2239 CALL section_add_keyword(section, keyword)
2240 CALL keyword_release(keyword)
2241
2242 CALL keyword_create(keyword, __location__, name="D", &
2243 description="Defines the amplitude for the Morse part ", &
2244 usage="D {real}", type_of_var=real_t, &
2245 n_var=1, unit_str="K_e")
2246 CALL section_add_keyword(section, keyword)
2247 CALL keyword_release(keyword)
2248
2249 CALL keyword_create(keyword, __location__, name="R0", &
2250 description="Defines the equilibrium distance for the Morse part ", &
2251 usage="R0 {real}", type_of_var=real_t, &
2252 n_var=1, unit_str="angstrom")
2253 CALL section_add_keyword(section, keyword)
2254 CALL keyword_release(keyword)
2255
2256 CALL keyword_create(keyword, __location__, name="Beta", &
2257 description="Defines the width for the Morse part ", &
2258 usage="Beta {real}", type_of_var=real_t, &
2259 n_var=1, unit_str="angstrom^-1")
2260 CALL section_add_keyword(section, keyword)
2261 CALL keyword_release(keyword)
2262
2263 CALL keyword_create(keyword, __location__, name="RCUT", &
2264 description="Defines the cutoff parameter of the Buckingham potential", &
2265 usage="RCUT {real}", default_r_val=cp_unit_to_cp2k(value=10.0_dp, &
2266 unit_str="angstrom"), &
2267 unit_str="angstrom")
2268 CALL section_add_keyword(section, keyword)
2269 CALL keyword_release(keyword)
2270
2271 CALL keyword_create(keyword, __location__, name="RMIN", &
2272 description="Defines the lower bound of the potential. If not set the range is the"// &
2273 " full range generate by the spline", usage="RMIN {real}", &
2274 type_of_var=real_t, unit_str="angstrom")
2275 CALL section_add_keyword(section, keyword)
2276 CALL keyword_release(keyword)
2277
2278 CALL keyword_create(keyword, __location__, name="RMAX", &
2279 description="Defines the upper bound of the potential. If not set the range is the"// &
2280 " full range generate by the spline", usage="RMAX {real}", &
2281 type_of_var=real_t, unit_str="angstrom")
2282 CALL section_add_keyword(section, keyword)
2283 CALL keyword_release(keyword)
2284
2285 END SUBROUTINE create_buckmorse_section
2286
2287! **************************************************************************************************
2288!> \brief This section specifies the input parameters for Tersoff potential type
2289!> (Tersoff, J. PRB 39(8), 5566, 1989)
2290!> \param section ...
2291! **************************************************************************************************
2292 SUBROUTINE create_tersoff_section(section)
2293 TYPE(section_type), POINTER :: section
2294
2295 TYPE(keyword_type), POINTER :: keyword
2296
2297 cpassert(.NOT. ASSOCIATED(section))
2298 CALL section_create(section, __location__, name="TERSOFF", &
2299 description="This section specifies the input parameters for Tersoff potential type.", &
2300 citations=[tersoff1988], n_keywords=1, n_subsections=0, repeats=.true.)
2301
2302 NULLIFY (keyword)
2303
2304 CALL keyword_create(keyword, __location__, name="ATOMS", &
2305 description="Defines the atomic kind involved in the nonbond potential", &
2306 usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
2307 n_var=2)
2308 CALL section_add_keyword(section, keyword)
2309 CALL keyword_release(keyword)
2310
2311 CALL keyword_create(keyword, __location__, name="A", &
2312 description="Defines the A parameter of Tersoff potential", &
2313 usage="A {real}", type_of_var=real_t, &
2314 default_r_val=cp_unit_to_cp2k(value=1.8308e3_dp, &
2315 unit_str="eV"), &
2316 n_var=1, unit_str="eV")
2317 CALL section_add_keyword(section, keyword)
2318 CALL keyword_release(keyword)
2319
2320 CALL keyword_create(keyword, __location__, name="B", &
2321 description="Defines the B parameter of Tersoff potential", &
2322 usage="B {real}", type_of_var=real_t, &
2323 default_r_val=cp_unit_to_cp2k(value=4.7118e2_dp, &
2324 unit_str="eV"), &
2325 n_var=1, unit_str="eV")
2326 CALL section_add_keyword(section, keyword)
2327 CALL keyword_release(keyword)
2328
2329 CALL keyword_create(keyword, __location__, name="lambda1", &
2330 description="Defines the lambda1 parameter of Tersoff potential", &
2331 usage="lambda1 {real}", type_of_var=real_t, &
2332 default_r_val=cp_unit_to_cp2k(value=2.4799_dp, &
2333 unit_str="angstrom^-1"), &
2334 n_var=1, unit_str="angstrom^-1")
2335 CALL section_add_keyword(section, keyword)
2336 CALL keyword_release(keyword)
2337
2338 CALL keyword_create(keyword, __location__, name="lambda2", &
2339 description="Defines the lambda2 parameter of Tersoff potential", &
2340 usage="lambda2 {real}", type_of_var=real_t, &
2341 default_r_val=cp_unit_to_cp2k(value=1.7322_dp, &
2342 unit_str="angstrom^-1"), &
2343 n_var=1, unit_str="angstrom^-1")
2344 CALL section_add_keyword(section, keyword)
2345 CALL keyword_release(keyword)
2346
2347 CALL keyword_create(keyword, __location__, name="alpha", &
2348 description="Defines the alpha parameter of Tersoff potential", &
2349 usage="alpha {real}", type_of_var=real_t, &
2350 default_r_val=0.0_dp, &
2351 n_var=1)
2352 CALL section_add_keyword(section, keyword)
2353 CALL keyword_release(keyword)
2354
2355 CALL keyword_create(keyword, __location__, name="beta", &
2356 description="Defines the beta parameter of Tersoff potential", &
2357 usage="beta {real}", type_of_var=real_t, &
2358 default_r_val=1.0999e-6_dp, &
2359 n_var=1, unit_str="")
2360 CALL section_add_keyword(section, keyword)
2361 CALL keyword_release(keyword)
2362
2363 CALL keyword_create(keyword, __location__, name="n", &
2364 description="Defines the n parameter of Tersoff potential", &
2365 usage="n {real}", type_of_var=real_t, &
2366 default_r_val=7.8734e-1_dp, &
2367 n_var=1, unit_str="")
2368 CALL section_add_keyword(section, keyword)
2369 CALL keyword_release(keyword)
2370
2371 CALL keyword_create(keyword, __location__, name="c", &
2372 description="Defines the c parameter of Tersoff potential", &
2373 usage="c {real}", type_of_var=real_t, &
2374 default_r_val=1.0039e5_dp, &
2375 n_var=1, unit_str="")
2376 CALL section_add_keyword(section, keyword)
2377 CALL keyword_release(keyword)
2378
2379 CALL keyword_create(keyword, __location__, name="d", &
2380 description="Defines the d parameter of Tersoff potential", &
2381 usage="d {real}", type_of_var=real_t, &
2382 default_r_val=1.6218e1_dp, &
2383 n_var=1, unit_str="")
2384 CALL section_add_keyword(section, keyword)
2385 CALL keyword_release(keyword)
2386
2387 CALL keyword_create(keyword, __location__, name="h", &
2388 description="Defines the h parameter of Tersoff potential", &
2389 usage="h {real}", type_of_var=real_t, &
2390 default_r_val=-5.9826e-1_dp, &
2391 n_var=1, unit_str="")
2392 CALL section_add_keyword(section, keyword)
2393 CALL keyword_release(keyword)
2394
2395 CALL keyword_create(keyword, __location__, name="lambda3", &
2396 description="Defines the lambda3 parameter of Tersoff potential", &
2397 usage="lambda3 {real}", type_of_var=real_t, &
2398 default_r_val=cp_unit_to_cp2k(value=1.7322_dp, &
2399 unit_str="angstrom^-1"), &
2400 n_var=1, unit_str="angstrom^-1")
2401 CALL section_add_keyword(section, keyword)
2402 CALL keyword_release(keyword)
2403
2404 CALL keyword_create(keyword, __location__, name="bigR", &
2405 description="Defines the bigR parameter of Tersoff potential", &
2406 usage="bigR {real}", type_of_var=real_t, &
2407 default_r_val=cp_unit_to_cp2k(value=2.85_dp, &
2408 unit_str="angstrom"), &
2409 n_var=1, unit_str="angstrom")
2410 CALL section_add_keyword(section, keyword)
2411 CALL keyword_release(keyword)
2412
2413 CALL keyword_create(keyword, __location__, name="bigD", &
2414 description="Defines the D parameter of Tersoff potential", &
2415 usage="bigD {real}", type_of_var=real_t, &
2416 default_r_val=cp_unit_to_cp2k(value=0.15_dp, &
2417 unit_str="angstrom"), &
2418 n_var=1, unit_str="angstrom")
2419 CALL section_add_keyword(section, keyword)
2420 CALL keyword_release(keyword)
2421
2422 CALL keyword_create(keyword, __location__, name="RCUT", &
2423 description="Defines the cutoff parameter of the tersoff potential."// &
2424 " This parameter is in principle already defined by the values of"// &
2425 " bigD and bigR. But it is necessary to define it when using the tersoff"// &
2426 " in conjunction with other potentials (for the same atomic pair) in order to have"// &
2427 " the same consistent definition of RCUT for all potentials.", &
2428 usage="RCUT {real}", type_of_var=real_t, &
2429 n_var=1, unit_str="angstrom")
2430 CALL section_add_keyword(section, keyword)
2431 CALL keyword_release(keyword)
2432
2433 END SUBROUTINE create_tersoff_section
2434
2435! **************************************************************************************************
2436!> \brief This section specifies the input parameters for Siepmann-Sprik
2437!> potential type
2438!> (Siepmann and Sprik, J. Chem. Phys. 102(1) 511, 1995)
2439!> \param section ...
2440! **************************************************************************************************
2441 SUBROUTINE create_siepmann_section(section)
2442 TYPE(section_type), POINTER :: section
2443
2444 TYPE(keyword_type), POINTER :: keyword
2445
2446 cpassert(.NOT. ASSOCIATED(section))
2447 CALL section_create(section, __location__, name="SIEPMANN", &
2448 description="This section specifies the input parameters for the"// &
2449 " Siepmann-Sprik potential type. Consists of 4 terms:"// &
2450 " T1+T2+T3+T4. The terms T1=A/rij^alpha and T2=-C/rij^6"// &
2451 " have to be given via the GENPOT section. The terms T3+T4"// &
2452 " are obtained from the SIEPMANN section. The Siepmann-Sprik"// &
2453 " potential is designed for water-metal chemisorption.", &
2454 citations=[siepmann1995], n_keywords=1, n_subsections=0, repeats=.true.)
2455
2456 NULLIFY (keyword)
2457
2458 CALL keyword_create(keyword, __location__, name="ATOMS", &
2459 description="Defines the atomic kind involved in the nonbond potential", &
2460 usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
2461 n_var=2)
2462 CALL section_add_keyword(section, keyword)
2463 CALL keyword_release(keyword)
2464
2465 CALL keyword_create(keyword, __location__, name="B", &
2466 description="Defines the B parameter of Siepmann potential", &
2467 usage="B {real}", type_of_var=real_t, &
2468 default_r_val=cp_unit_to_cp2k(value=0.6_dp, &
2469 unit_str="angstrom"), &
2470 n_var=1, unit_str="angstrom")
2471 CALL section_add_keyword(section, keyword)
2472 CALL keyword_release(keyword)
2473
2474 CALL keyword_create(keyword, __location__, name="D", &
2475 description="Defines the D parameter of Siepmann potential", &
2476 usage="D {real}", type_of_var=real_t, &
2477 default_r_val=cp_unit_to_cp2k(value=3.688388_dp, &
2478 unit_str="internal_cp2k"), &
2479 n_var=1, unit_str="internal_cp2k")
2480 CALL section_add_keyword(section, keyword)
2481 CALL keyword_release(keyword)
2482
2483 CALL keyword_create(keyword, __location__, name="E", &
2484 description="Defines the E parameter of Siepmann potential", &
2485 usage="E {real}", type_of_var=real_t, &
2486 default_r_val=cp_unit_to_cp2k(value=9.069025_dp, &
2487 unit_str="internal_cp2k"), &
2488 n_var=1, unit_str="internal_cp2k")
2489 CALL section_add_keyword(section, keyword)
2490 CALL keyword_release(keyword)
2491
2492 CALL keyword_create(keyword, __location__, name="F", &
2493 description="Defines the F parameter of Siepmann potential", &
2494 usage="F {real}", type_of_var=real_t, &
2495 default_r_val=13.3_dp, n_var=1)
2496 CALL section_add_keyword(section, keyword)
2497 CALL keyword_release(keyword)
2498!
2499 CALL keyword_create(keyword, __location__, name="beta", &
2500 description="Defines the beta parameter of Siepmann potential", &
2501 usage="beta {real}", type_of_var=real_t, &
2502 default_r_val=10.0_dp, n_var=1)
2503 CALL section_add_keyword(section, keyword)
2504 CALL keyword_release(keyword)
2505!
2506 CALL keyword_create(keyword, __location__, name="RCUT", &
2507 description="Defines the cutoff parameter of Siepmann potential", &
2508 usage="RCUT {real}", type_of_var=real_t, &
2509 default_r_val=cp_unit_to_cp2k(value=3.2_dp, &
2510 unit_str="angstrom"), &
2511 n_var=1, unit_str="angstrom")
2512 CALL section_add_keyword(section, keyword)
2513 CALL keyword_release(keyword)
2514!
2515 CALL keyword_create(keyword, __location__, name="ALLOW_OH_FORMATION", &
2516 description=" The Siepmann-Sprik potential is actually designed for intact"// &
2517 " water molecules only. If water is treated at the QM level,"// &
2518 " water molecules can potentially dissociate, i.e."// &
2519 " some O-H bonds might be stretched leading temporarily"// &
2520 " to the formation of OH- ions. This keyword allows the"// &
2521 " the formation of such ions. The T3 term (dipole term)"// &
2522 " is then switched off for evaluating the interaction"// &
2523 " between the OH- ion and the metal.", &
2524 usage="ALLOW_OH_FORMATION TRUE", &
2525 default_l_val=.false., lone_keyword_l_val=.true.)
2526 CALL section_add_keyword(section, keyword)
2527 CALL keyword_release(keyword)
2528
2529 CALL keyword_create(keyword, __location__, name="ALLOW_H3O_FORMATION", &
2530 description=" The Siepmann-Sprik potential is designed for intact water"// &
2531 " molecules only. If water is treated at the QM level"// &
2532 " and an acid is present, hydronium ions might occur."// &
2533 " This keyword allows the formation of hydronium ions."// &
2534 " The T3 term (dipole term) is switched off for evaluating"// &
2535 " the interaction between hydronium and the metal.", &
2536 usage="ALLOW_H3O_FORMATION TRUE", &
2537 default_l_val=.false., lone_keyword_l_val=.true.)
2538 CALL section_add_keyword(section, keyword)
2539 CALL keyword_release(keyword)
2540
2541 CALL keyword_create(keyword, __location__, name="ALLOW_O_FORMATION", &
2542 description=" The Siepmann-Sprik potential is actually designed for intact"// &
2543 " water molecules only. If water is treated at the QM level,"// &
2544 " water molecules can potentially dissociate, i.e."// &
2545 " some O-H bonds might be stretched leading temporarily"// &
2546 " to the formation of O^2- ions. This keyword allows the"// &
2547 " the formation of such ions. The T3 term (dipole term)"// &
2548 " is then switched off for evaluating the interaction"// &
2549 " between the O^2- ion and the metal.", &
2550 usage="ALLOW_O_FORMATION .TRUE.", &
2551 default_l_val=.false., lone_keyword_l_val=.true.)
2552 CALL section_add_keyword(section, keyword)
2553 CALL keyword_release(keyword)
2554
2555 END SUBROUTINE create_siepmann_section
2556
2557! **************************************************************************************************
2558!> \brief This section specifies the input parameters for GAL19
2559!> potential type
2560!> (??)
2561!> \param section ...
2562! **************************************************************************************************
2563 SUBROUTINE create_gal_section(section)
2564 TYPE(section_type), POINTER :: section
2565
2566 TYPE(keyword_type), POINTER :: keyword
2567 TYPE(section_type), POINTER :: subsection
2568
2569 cpassert(.NOT. ASSOCIATED(section))
2570 CALL section_create(section, __location__, name="GAL19", &
2571 description="Implementation of the GAL19 forcefield, see associated paper", &
2572 citations=[clabaut2020], n_keywords=1, n_subsections=1, repeats=.true.)
2573
2574 NULLIFY (keyword, subsection)
2575
2576 CALL keyword_create(keyword, __location__, name="ATOMS", &
2577 description="Defines the atomic kind involved in the nonbond potential", &
2578 usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
2579 n_var=2)
2580 CALL section_add_keyword(section, keyword)
2581 CALL keyword_release(keyword)
2582
2583 CALL keyword_create(keyword, __location__, name="METALS", &
2584 description="Defines the two atomic kinds to be considered as part of the metallic phase in the system", &
2585 usage="METALS {KIND1} {KIND2} ..", type_of_var=char_t, &
2586 n_var=2)
2587 CALL section_add_keyword(section, keyword)
2588 CALL keyword_release(keyword)
2589
2590 CALL keyword_create(keyword, __location__, name="epsilon", &
2591 description="Defines the epsilon_a parameter of GAL19 potential", &
2592 usage="epsilon {real}", type_of_var=real_t, &
2593 default_r_val=cp_unit_to_cp2k(value=0.6_dp, &
2594 unit_str="kcalmol"), &
2595 n_var=1, unit_str="kcalmol")
2596 CALL section_add_keyword(section, keyword)
2597 CALL keyword_release(keyword)
2598
2599 CALL keyword_create(keyword, __location__, name="bxy", &
2600 description="Defines the b perpendicular parameter of GAL19 potential", &
2601 usage="bxy {real}", type_of_var=real_t, &
2602 default_r_val=cp_unit_to_cp2k(value=3.688388_dp, &
2603 unit_str="internal_cp2k"), &
2604 n_var=1, unit_str="angstrom^-2")
2605 CALL section_add_keyword(section, keyword)
2606 CALL keyword_release(keyword)
2607
2608 CALL keyword_create(keyword, __location__, name="bz", &
2609 description="Defines the b parallel parameter of GAL19 potential", &
2610 usage="bz {real}", type_of_var=real_t, &
2611 default_r_val=cp_unit_to_cp2k(value=9.069025_dp, &
2612 unit_str="internal_cp2k"), &
2613 n_var=1, unit_str="angstrom^-2")
2614 CALL section_add_keyword(section, keyword)
2615 CALL keyword_release(keyword)
2616
2617 CALL keyword_create(keyword, __location__, name="r", &
2618 description="Defines the R_0 parameters of GAL19 potential for the two METALS. "// &
2619 "This is the only parameter that is shared between the two section of the "// &
2620 "forcefield in the case of two metals (alloy). "// &
2621 "If one metal only is present, a second number should be given but won't be read", &
2622 usage="r {real} {real}", type_of_var=real_t, n_var=2, unit_str="angstrom")
2623 CALL section_add_keyword(section, keyword)
2624 CALL keyword_release(keyword)
2625
2626 CALL keyword_create(keyword, __location__, name="a1", &
2627 description="Defines the a1 parameter of GAL19 potential", &
2628 usage="a1 {real}", type_of_var=real_t, &
2629 default_r_val=10.0_dp, n_var=1, unit_str="kcalmol")
2630 CALL section_add_keyword(section, keyword)
2631 CALL keyword_release(keyword)
2632
2633 CALL keyword_create(keyword, __location__, name="a2", &
2634 description="Defines the a2 parameter of GAL19 potential", &
2635 usage="a2 {real}", type_of_var=real_t, &
2636 default_r_val=10.0_dp, n_var=1, unit_str="kcalmol")
2637 CALL section_add_keyword(section, keyword)
2638 CALL keyword_release(keyword)
2639
2640 CALL keyword_create(keyword, __location__, name="a3", &
2641 description="Defines the a3 parameter of GAL19 potential", &
2642 usage="a3 {real}", type_of_var=real_t, &
2643 default_r_val=10.0_dp, n_var=1, unit_str="kcalmol")
2644 CALL section_add_keyword(section, keyword)
2645 CALL keyword_release(keyword)
2646
2647 CALL keyword_create(keyword, __location__, name="a4", &
2648 description="Defines the a4 parameter of GAL19 potential", &
2649 usage="a4 {real}", type_of_var=real_t, &
2650 default_r_val=10.0_dp, n_var=1, unit_str="kcalmol")
2651 CALL section_add_keyword(section, keyword)
2652 CALL keyword_release(keyword)
2653
2654 CALL keyword_create(keyword, __location__, name="A", &
2655 description="Defines the A parameter of GAL19 potential", &
2656 usage="A {real}", type_of_var=real_t, &
2657 default_r_val=10.0_dp, n_var=1, unit_str="kcalmol")
2658 CALL section_add_keyword(section, keyword)
2659 CALL keyword_release(keyword)
2660
2661 CALL keyword_create(keyword, __location__, name="B", &
2662 description="Defines the B parameter of GAL19 potential", &
2663 usage="B {real}", type_of_var=real_t, &
2664 default_r_val=10.0_dp, n_var=1, unit_str="angstrom^-1")
2665 CALL section_add_keyword(section, keyword)
2666 CALL keyword_release(keyword)
2667
2668 CALL keyword_create(keyword, __location__, name="C", &
2669 description="Defines the C parameter of GAL19 potential", &
2670 usage="C {real}", type_of_var=real_t, &
2671 default_r_val=10.0_dp, n_var=1, unit_str="angstrom^6*kcalmol")
2672 CALL section_add_keyword(section, keyword)
2673 CALL keyword_release(keyword)
2674
2675 CALL keyword_create(keyword, __location__, name="RCUT", &
2676 description="Defines the cutoff parameter of GAL19 potential", &
2677 usage="RCUT {real}", type_of_var=real_t, &
2678 default_r_val=cp_unit_to_cp2k(value=3.2_dp, &
2679 unit_str="angstrom"), &
2680 n_var=1, unit_str="angstrom")
2681 CALL section_add_keyword(section, keyword)
2682 CALL keyword_release(keyword)
2683 CALL keyword_create(keyword, __location__, name="Fit_express", &
2684 description="Demands the particular output needed to a least square fit", &
2685 usage="Fit_express TRUE", &
2686 default_l_val=.false., lone_keyword_l_val=.true.)
2687 CALL section_add_keyword(section, keyword)
2688 CALL keyword_release(keyword)
2689 CALL create_gcn_section(subsection)
2690 CALL section_add_subsection(section, subsection)
2691 CALL section_release(subsection)
2692
2693 END SUBROUTINE create_gal_section
2694
2695! **************************************************************************************************
2696!> \brief This section specifies the input parameters for GAL21
2697!> potential type
2698!> (??)
2699!> \param section ...
2700! **************************************************************************************************
2701 SUBROUTINE create_gal21_section(section)
2702 TYPE(section_type), POINTER :: section
2703
2704 TYPE(keyword_type), POINTER :: keyword
2705 TYPE(section_type), POINTER :: subsection
2706
2707 cpassert(.NOT. ASSOCIATED(section))
2708 CALL section_create(section, __location__, name="GAL21", &
2709 description="Implementation of the GAL21 forcefield, see associated paper", &
2710 citations=[clabaut2021], n_keywords=1, n_subsections=1, repeats=.true.)
2711
2712 NULLIFY (keyword, subsection)
2713
2714 CALL keyword_create(keyword, __location__, name="ATOMS", &
2715 description="Defines the atomic kind involved in the nonbond potential", &
2716 usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
2717 n_var=2)
2718 CALL section_add_keyword(section, keyword)
2719 CALL keyword_release(keyword)
2720
2721 CALL keyword_create(keyword, __location__, name="METALS", &
2722 description="Defines the two atomic kinds to be considered as part of the metallic phase in the system", &
2723 usage="METALS {KIND1} {KIND2} ..", type_of_var=char_t, &
2724 n_var=2)
2725 CALL section_add_keyword(section, keyword)
2726 CALL keyword_release(keyword)
2727
2728 CALL keyword_create(keyword, __location__, name="epsilon", &
2729 description="Defines the epsilon parameter of GAL21 potential", &
2730 usage="epsilon {real} {real} {real}", type_of_var=real_t, &
2731 n_var=3, unit_str="kcalmol")
2732 CALL section_add_keyword(section, keyword)
2733 CALL keyword_release(keyword)
2734
2735 CALL keyword_create(keyword, __location__, name="bxy", &
2736 description="Defines the b perpendicular parameter of GAL21 potential", &
2737 usage="bxy {real} {real}", type_of_var=real_t, &
2738 n_var=2, unit_str="angstrom^-2")
2739 CALL section_add_keyword(section, keyword)
2740 CALL keyword_release(keyword)
2741
2742 CALL keyword_create(keyword, __location__, name="bz", &
2743 description="Defines the b parallel parameter of GAL21 potential", &
2744 usage="bz {real} {real}", type_of_var=real_t, &
2745 n_var=2, unit_str="angstrom^-2")
2746 CALL section_add_keyword(section, keyword)
2747 CALL keyword_release(keyword)
2748
2749 CALL keyword_create(keyword, __location__, name="r", &
2750 description="Defines the R_0 parameters of GAL21 potential for the two METALS. "// &
2751 "This is the only parameter that is shared between the two section of "// &
2752 "the forcefield in the case of two metals (alloy). "// &
2753 "If one metal only is present, a second number should be given but won't be read", &
2754 usage="r {real} {real}", type_of_var=real_t, n_var=2, unit_str="angstrom")
2755 CALL section_add_keyword(section, keyword)
2756 CALL keyword_release(keyword)
2757
2758 CALL keyword_create(keyword, __location__, name="a1", &
2759 description="Defines the a1 parameter of GAL21 potential", &
2760 usage="a1 {real} {real} {real}", type_of_var=real_t, &
2761 n_var=3, unit_str="kcalmol")
2762 CALL section_add_keyword(section, keyword)
2763 CALL keyword_release(keyword)
2764
2765 CALL keyword_create(keyword, __location__, name="a2", &
2766 description="Defines the a2 parameter of GAL21 potential", &
2767 usage="a2 {real} {real} {real}", type_of_var=real_t, &
2768 n_var=3, unit_str="kcalmol")
2769 CALL section_add_keyword(section, keyword)
2770 CALL keyword_release(keyword)
2771
2772 CALL keyword_create(keyword, __location__, name="a3", &
2773 description="Defines the a3 parameter of GAL21 potential", &
2774 usage="a3 {real} {real} {real}", type_of_var=real_t, &
2775 n_var=3, unit_str="kcalmol")
2776 CALL section_add_keyword(section, keyword)
2777 CALL keyword_release(keyword)
2778
2779 CALL keyword_create(keyword, __location__, name="a4", &
2780 description="Defines the a4 parameter of GAL21 potential", &
2781 usage="a4 {real} {real} {real}", type_of_var=real_t, &
2782 n_var=3, unit_str="kcalmol")
2783 CALL section_add_keyword(section, keyword)
2784 CALL keyword_release(keyword)
2785
2786 CALL keyword_create(keyword, __location__, name="A", &
2787 description="Defines the A parameter of GAL21 potential", &
2788 usage="A {real} {real}", type_of_var=real_t, &
2789 n_var=2, unit_str="kcalmol")
2790 CALL section_add_keyword(section, keyword)
2791 CALL keyword_release(keyword)
2792
2793 CALL keyword_create(keyword, __location__, name="B", &
2794 description="Defines the B parameter of GAL21 potential", &
2795 usage="B {real} {real}", type_of_var=real_t, &
2796 n_var=2, unit_str="angstrom^-1")
2797 CALL section_add_keyword(section, keyword)
2798 CALL keyword_release(keyword)
2799
2800 CALL keyword_create(keyword, __location__, name="C", &
2801 description="Defines the C parameter of GAL21 potential", &
2802 usage="C {real}", type_of_var=real_t, &
2803 n_var=1, unit_str="angstrom^6*kcalmol")
2804 CALL section_add_keyword(section, keyword)
2805 CALL keyword_release(keyword)
2806
2807 CALL keyword_create(keyword, __location__, name="AH", &
2808 description="Defines the AH parameter of GAL21 potential", &
2809 usage="AH {real} {real}", type_of_var=real_t, &
2810 n_var=2, unit_str="kcalmol")
2811 CALL section_add_keyword(section, keyword)
2812 CALL keyword_release(keyword)
2813
2814 CALL keyword_create(keyword, __location__, name="BH", &
2815 description="Defines the BH parameter of GAL21 potential", &
2816 usage="BH {real} {real}", type_of_var=real_t, &
2817 n_var=2, unit_str="angstrom^-1")
2818 CALL section_add_keyword(section, keyword)
2819 CALL keyword_release(keyword)
2820
2821 CALL keyword_create(keyword, __location__, name="RCUT", &
2822 description="Defines the cutoff parameter of GAL21 potential", &
2823 usage="RCUT {real}", type_of_var=real_t, &
2824 default_r_val=cp_unit_to_cp2k(value=3.2_dp, &
2825 unit_str="angstrom"), &
2826 n_var=1, unit_str="angstrom")
2827 CALL section_add_keyword(section, keyword)
2828 CALL keyword_release(keyword)
2829
2830 CALL keyword_create(keyword, __location__, name="Fit_express", &
2831 description="Demands the particular output needed to a least square fit", &
2832 usage="Fit_express TRUE", &
2833 default_l_val=.false., lone_keyword_l_val=.true.)
2834 CALL section_add_keyword(section, keyword)
2835 CALL keyword_release(keyword)
2836
2837 CALL create_gcn_section(subsection)
2838 CALL section_add_subsection(section, subsection)
2839 CALL section_release(subsection)
2840
2841 END SUBROUTINE create_gal21_section
2842
2843! **************************************************************************************************
2844!> \brief This section specifies the input parameters for TABPOT potential type
2845!> \param section the section to create
2846!> \author teo, Alex Mironenko, Da Teng
2847! **************************************************************************************************
2848 SUBROUTINE create_tabpot_section(section)
2849
2850 TYPE(section_type), POINTER :: section
2851
2852 TYPE(keyword_type), POINTER :: keyword
2853
2854 cpassert(.NOT. ASSOCIATED(section))
2855
2856 CALL section_create(section, __location__, name="TABPOT", &
2857 description="This section specifies the input parameters for TABPOT potential type.", &
2858 n_keywords=1, n_subsections=0, repeats=.true.)
2859
2860 NULLIFY (keyword)
2861 CALL keyword_create(keyword, __location__, name="ATOMS", &
2862 description="Defines the atomic kind involved", &
2863 usage="ATOMS {KIND1} {KIND2}", type_of_var=char_t, &
2864 n_var=2)
2865 CALL section_add_keyword(section, keyword)
2866 CALL keyword_release(keyword)
2867
2868 CALL keyword_create(keyword, __location__, name="PARM_FILE_NAME", &
2869 variants=["PARMFILE"], &
2870 description="Specifies the filename that contains the tabulated NONBONDED potential. "// &
2871 "File structure: the third line of the potential file contains a title. "// &
2872 "The 4th line contains: 'N', number of data points, 'R', lower bound of distance, distance cutoff. "// &
2873 "Follow "// &
2874 "in order npoints lines for index, distance [A], energy [kcal/mol], and force [kcal/mol/A]", &
2875 usage="PARM_FILE_NAME {FILENAME}", default_lc_val="")
2876 CALL section_add_keyword(section, keyword)
2877 CALL keyword_release(keyword)
2878
2879 END SUBROUTINE create_tabpot_section
2880
2881! **************************************************************************************************
2882!> \brief This section specifies the input parameters for the subsection GCN of GAL19 and GAL21
2883!> potential type
2884!> (??)
2885!> \param section ...
2886! **************************************************************************************************
2887 SUBROUTINE create_gcn_section(section)
2888 TYPE(section_type), POINTER :: section
2889
2890 TYPE(keyword_type), POINTER :: keyword
2891
2892 cpassert(.NOT. ASSOCIATED(section))
2893 CALL section_create(section, __location__, name="GCN", &
2894 description="Allow to specify the generalized coordination number of the atoms. "// &
2895 "Those numbers msust be generated by another program ", &
2896 n_keywords=1, n_subsections=0, repeats=.false.)
2897
2898 NULLIFY (keyword)
2899 CALL keyword_create(keyword, __location__, name="_DEFAULT_KEYWORD_", &
2900 description="Value of the GCN for the individual atom. Order MUST reflect"// &
2901 " the one specified for the geometry.", repeats=.true., usage="{Real}", &
2902 default_r_val=0.0_dp, type_of_var=real_t)
2903 CALL section_add_keyword(section, keyword)
2904 CALL keyword_release(keyword)
2905
2906 END SUBROUTINE create_gcn_section
2907
2908! **************************************************************************************************
2909!> \brief creates the input section for the qs part
2910!> \param print_key ...
2911!> \param label ...
2912!> \param print_level ...
2913!> \author teo
2914! **************************************************************************************************
2915 SUBROUTINE create_dipoles_section(print_key, label, print_level)
2916 TYPE(section_type), POINTER :: print_key
2917 CHARACTER(LEN=*), INTENT(IN) :: label
2918 INTEGER, INTENT(IN) :: print_level
2919
2920 TYPE(keyword_type), POINTER :: keyword
2921
2922 cpassert(.NOT. ASSOCIATED(print_key))
2923 CALL cp_print_key_section_create(print_key, __location__, name=trim(label), &
2924 description="Section controlling the calculation of "//trim(label)//"."// &
2925 " Note that the result in the periodic case might be defined modulo a certain period,"// &
2926 " determined by the lattice vectors. During MD, this can lead to jumps.", &
2927 print_level=print_level, filename="__STD_OUT__")
2928
2929 NULLIFY (keyword)
2930 CALL keyword_create(keyword, __location__, &
2931 name="PERIODIC", &
2932 description="Use Berry phase formula (PERIODIC=T) or simple operator (PERIODIC=F). "// &
2933 "The latter normally requires that the CELL is periodic NONE.", &
2934 usage="PERIODIC {logical}", &
2935 repeats=.false., &
2936 n_var=1, &
2937 default_l_val=.true., lone_keyword_l_val=.true.)
2938 CALL section_add_keyword(print_key, keyword)
2939 CALL keyword_release(keyword)
2940
2941 CALL keyword_create(keyword, __location__, name="REFERENCE", &
2942 variants=s2a("REF"), &
2943 description="Define the reference point for the calculation of the electrostatic moment.", &
2944 usage="REFERENCE COM", &
2945 enum_c_vals=s2a("COM", "COAC", "USER_DEFINED", "ZERO"), &
2946 enum_desc=s2a("Use Center of Mass", &
2947 "Use Center of Atomic Charges", &
2948 "Use User Defined Point (Keyword:REF_POINT)", &
2949 "Use Origin of Coordinate System"), &
2950 enum_i_vals=[use_mom_ref_com, &
2954 default_i_val=use_mom_ref_zero)
2955 CALL section_add_keyword(print_key, keyword)
2956 CALL keyword_release(keyword)
2957
2958 CALL keyword_create(keyword, __location__, name="REFERENCE_POINT", &
2959 variants=s2a("REF_POINT"), &
2960 description="Fixed reference point for the calculations of the electrostatic moment.", &
2961 usage="REFERENCE_POINT x y z", &
2962 repeats=.false., &
2963 n_var=3, default_r_vals=[0._dp, 0._dp, 0._dp], &
2964 type_of_var=real_t, &
2965 unit_str='bohr')
2966 CALL section_add_keyword(print_key, keyword)
2967 CALL keyword_release(keyword)
2968 END SUBROUTINE create_dipoles_section
2969
2970END MODULE input_cp2k_mm
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public tosi1964b
integer, save, public drautz2019
integer, save, public batatia2022
integer, save, public lysogorskiy2021
integer, save, public tersoff1988
integer, save, public dick1958
integer, save, public foiles1986
integer, save, public devynck2012
integer, save, public tosi1964a
integer, save, public bochkarev2024
integer, save, public siepmann1995
integer, save, public zeng2023
integer, save, public yamada2000
integer, save, public tan2025
integer, save, public batzner2022
integer, save, public mitchell1993
integer, save, public musaelian2023
integer, save, public clabaut2021
integer, save, public wang2018
integer, save, public clabaut2020
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer, parameter, public debug_print_level
integer, parameter, public low_print_level
integer, parameter, public medium_print_level
integer, parameter, public high_print_level
integer, parameter, public silent_print_level
subroutine, public cp_print_key_section_create(print_key_section, location, name, description, print_level, each_iter_names, each_iter_values, add_last, filename, common_iter_levels, citations, unit_str)
creates a print_key section
unit conversion facility
Definition cp_units.F:30
real(kind=dp) function, public cp_unit_to_cp2k(value, unit_str, defaults, power)
converts to the internal cp2k units to the given unit
Definition cp_units.F:1222
Define all structure types related to force field kinds.
integer, parameter, public do_ff_legendre
integer, parameter, public do_ff_undef
integer, parameter, public do_ff_mm4
integer, parameter, public do_ff_charmm
integer, parameter, public do_ff_mm3
integer, parameter, public do_ff_g87
integer, parameter, public do_ff_g96
integer, parameter, public do_ff_morse
integer, parameter, public do_ff_mm2
integer, parameter, public do_ff_harmonic
integer, parameter, public do_ff_amber
integer, parameter, public do_ff_mixed_bend_stretch
integer, parameter, public do_ff_cubic
integer, parameter, public do_ff_quartic
integer, parameter, public do_ff_fues
integer, parameter, public do_ff_opls
This public domain function parser module is intended for applications where a set of mathematical ex...
Definition fparser.F:17
character(len=:) function, allocatable, public docf()
...
Definition fparser.F:1151
collects all constants needed in input so that they can be used without circular dependencies
integer, parameter, public use_mom_ref_coac
integer, parameter, public use_mom_ref_user
integer, parameter, public use_mom_ref_com
integer, parameter, public use_mom_ref_zero
function that build the field section of the input
subroutine, public create_per_efield_section(section)
creates the section for static periodic fields
creates the mm section of the input
subroutine, public create_genpot_section(section)
This section specifies the input parameters for a generic potential form.
subroutine, public create_williams_section(section)
This section specifies the input parameters for Williams potential type.
subroutine, public create_goodwin_section(section)
This section specifies the input parameters for Goodwin potential type.
subroutine, public create_dipoles_section(print_key, label, print_level)
creates the input section for the qs part
subroutine, public create_charge_section(section)
This section specifies the charge of the MM atoms.
subroutine, public create_nonbonded14_section(section)
This section specifies the input parameters for 1-4 NON-BONDED Interactions.
subroutine, public create_mm_section(section)
Create the input section for FIST.. Come on.. Let's get woohooo.
subroutine, public create_lj_section(section)
This section specifies the input parameters for Lennard-Jones potential type.
subroutine, public create_neighbor_lists_section(section)
This section specifies the input parameters for generation of neighbor lists.
subroutine, public create_tabpot_section(section)
This section specifies the input parameters for TABPOT potential type.
function that build the poisson section of the input
subroutine, public create_poisson_section(section)
Creates the Poisson section.
represents keywords in an input
subroutine, public keyword_release(keyword)
releases the given keyword (see doc/ReferenceCounting.html)
subroutine, public keyword_create(keyword, location, name, description, usage, type_of_var, n_var, repeats, variants, default_val, default_l_val, default_r_val, default_lc_val, default_c_val, default_i_val, default_l_vals, default_r_vals, default_c_vals, default_i_vals, lone_keyword_val, lone_keyword_l_val, lone_keyword_r_val, lone_keyword_c_val, lone_keyword_i_val, lone_keyword_l_vals, lone_keyword_r_vals, lone_keyword_c_vals, lone_keyword_i_vals, enum_c_vals, enum_i_vals, enum, enum_strict, enum_desc, unit_str, citations, deprecation_notice, removed)
creates a keyword object
objects that represent the structure of input sections and the data contained in an input section
subroutine, public section_create(section, location, name, description, n_keywords, n_subsections, repeats, citations, deprecation_notice)
creates a list of keywords
subroutine, public section_add_keyword(section, keyword)
adds a keyword to the given section
subroutine, public section_add_subsection(section, subsection)
adds a subsection to the given section
recursive subroutine, public section_release(section)
releases the given keyword list (see doc/ReferenceCounting.html)
a wrapper for basic fortran types.
integer, parameter, public real_t
integer, parameter, public lchar_t
integer, parameter, public char_t
integer, parameter, public integer_t
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
integer, parameter, public default_string_length
Definition kinds.F:57
Utilities for string manipulations.
character(len=1), parameter, public newline
represent a keyword in the input
represent a section of the input file