(git:5e7fe52)
Loading...
Searching...
No Matches
input_cp2k_colvar.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!> \par History
10!> - taken out of input_cp2k_motion
11!> \author teo & fawzi
12! **************************************************************************************************
14 USE bibliography, ONLY: branduardi2007,&
16 USE colvar_types, ONLY: &
23 USE cp_units, ONLY: cp_unit_to_cp2k
24 USE fparser, ONLY: docf
25 USE input_constants, ONLY: gaussian,&
26 numerical,&
27 rmsd_all,&
28 rmsd_list,&
38 USE input_val_types, ONLY: char_t,&
39 integer_t,&
40 lchar_t,&
41 real_t
42 USE kinds, ONLY: dp
43 USE string_utilities, ONLY: s2a
44#include "./base/base_uses.f90"
45
46 IMPLICIT NONE
47 PRIVATE
48
49 LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .false.
50 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_colvar'
51
52 PUBLIC :: create_colvar_section, &
55
56CONTAINS
57
58! **************************************************************************************************
59!> \brief creates the colvar section
60!> \param section the section to be created
61!> \param skip_recursive_colvar ...
62!> \author teo
63! **************************************************************************************************
64 RECURSIVE SUBROUTINE create_colvar_section(section, skip_recursive_colvar)
65 TYPE(section_type), POINTER :: section
66 LOGICAL, OPTIONAL :: skip_recursive_colvar
67
68 LOGICAL :: skip
69 TYPE(section_type), POINTER :: print_key, subsection
70
71 skip = .false.
72 IF (PRESENT(skip_recursive_colvar)) skip = skip_recursive_colvar
73 cpassert(.NOT. ASSOCIATED(section))
74 CALL section_create(section, __location__, name="COLVAR", &
75 description="This section specifies the nature of the collective variables.", &
76 n_keywords=1, n_subsections=1, repeats=.true.)
77 NULLIFY (subsection, print_key)
78
79 CALL create_colvar_var_section(subsection=subsection, &
80 section=section, skip_recursive_colvar=skip)
81
82 CALL section_create(subsection, __location__, name="PRINT", &
83 description="Controls the printing of the colvar specifications", &
84 n_keywords=0, n_subsections=1, repeats=.true.)
85 NULLIFY (print_key)
86 CALL cp_print_key_section_create(print_key, __location__, "PROGRAM_RUN_INFO", &
87 description="Controls the printing of basic information during colvar setup.", &
88 print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
89 CALL section_add_subsection(subsection, print_key)
90 CALL section_release(print_key)
91 CALL section_add_subsection(section, subsection)
92 CALL section_release(subsection)
93
94 CALL create_clv_info_section(subsection)
95 CALL section_add_subsection(section, subsection)
96 CALL section_release(subsection)
97
98 END SUBROUTINE create_colvar_section
99
100! **************************************************************************************************
101!> \brief Create the restart section for colvar restraints
102!> This section will be only used for restraint restarts.
103!> Constraints are handled automatically
104!> \param section the section to create
105!> \author Teodoro Laino 08.2006
106! **************************************************************************************************
107 SUBROUTINE create_clv_info_section(section)
108 TYPE(section_type), POINTER :: section
109
110 TYPE(keyword_type), POINTER :: keyword
111
112 cpassert(.NOT. ASSOCIATED(section))
113 NULLIFY (keyword)
114 CALL section_create(section, __location__, name="COLVAR_FUNC_INFO", &
115 description="Specify further data possibly used by colvars, depending "// &
116 "on the starting geometry, for computing the functions value.", &
117 n_subsections=0, repeats=.false.)
118
119 CALL keyword_create(keyword, __location__, name="_DEFAULT_KEYWORD_", &
120 description="Colvar function data."// &
121 " The order is an internal order. So if you decide to edit/modify/add these values by hand"// &
122 " you should know very well what you are doing.!", repeats=.true., &
123 usage="{Real} ...", type_of_var=real_t, n_var=-1)
124 CALL section_add_keyword(section, keyword)
125 CALL keyword_release(keyword)
126
127 END SUBROUTINE create_clv_info_section
128
129! **************************************************************************************************
130!> \brief creates the collective variables for the colvar section
131!> \param subsection ...
132!> \param section the section to be created
133!> \param skip_recursive_colvar ...
134!> \author teo
135! **************************************************************************************************
136 RECURSIVE SUBROUTINE create_colvar_var_section(subsection, section, skip_recursive_colvar)
137 TYPE(section_type), POINTER :: subsection, section
138 LOGICAL, INTENT(IN) :: skip_recursive_colvar
139
140 cpassert(.NOT. ASSOCIATED(subsection))
141 cpassert(ASSOCIATED(section))
142
143 CALL create_colvar_dist_section(subsection)
144 CALL section_add_subsection(section, subsection)
145 CALL section_release(subsection)
146
147 CALL create_colvar_angle_section(subsection)
148 CALL section_add_subsection(section, subsection)
149 CALL section_release(subsection)
150
151 CALL create_colvar_torsion_section(subsection)
152 CALL section_add_subsection(section, subsection)
153 CALL section_release(subsection)
154
155 CALL create_colvar_coord_section(subsection)
156 CALL section_add_subsection(section, subsection)
157 CALL section_release(subsection)
158
159 CALL create_colvar_pop_section(subsection)
160 CALL section_add_subsection(section, subsection)
161 CALL section_release(subsection)
162
163 CALL create_colvar_gyr_section(subsection)
164 CALL section_add_subsection(section, subsection)
165 CALL section_release(subsection)
166
167 CALL create_colvar_d_pl_section(subsection)
168 CALL section_add_subsection(section, subsection)
169 CALL section_release(subsection)
170
171 CALL create_colvar_a_pl_section(subsection)
172 CALL section_add_subsection(section, subsection)
173 CALL section_release(subsection)
174
175 CALL create_colvar_rot_section(subsection)
176 CALL section_add_subsection(section, subsection)
177 CALL section_release(subsection)
178
179 CALL create_colvar_dfunct_section(subsection)
180 CALL section_add_subsection(section, subsection)
181 CALL section_release(subsection)
182
183 CALL create_colvar_qparm_section(subsection)
184 CALL section_add_subsection(section, subsection)
185 CALL section_release(subsection)
186
187 CALL create_colvar_hydronium_shell_section(subsection)
188 CALL section_add_subsection(section, subsection)
189 CALL section_release(subsection)
190
191 CALL create_colvar_hydronium_dist_section(subsection)
192 CALL section_add_subsection(section, subsection)
193 CALL section_release(subsection)
194
195 CALL create_colvar_acid_hyd_dist_section(subsection)
196 CALL section_add_subsection(section, subsection)
197 CALL section_release(subsection)
198
199 CALL create_colvar_acid_hyd_shell_section(subsection)
200 CALL section_add_subsection(section, subsection)
201 CALL section_release(subsection)
202
203 CALL create_colvar_rmsd_section(subsection)
204 CALL section_add_subsection(section, subsection)
205 CALL section_release(subsection)
206
207 CALL create_colvar_xyz_d_section(subsection)
208 CALL section_add_subsection(section, subsection)
209 CALL section_release(subsection)
210
211 CALL create_colvar_xyz_od_section(subsection)
212 CALL section_add_subsection(section, subsection)
213 CALL section_release(subsection)
214
215 CALL create_colvar_u_section(subsection)
216 CALL section_add_subsection(section, subsection)
217 CALL section_release(subsection)
218
219 CALL create_colvar_wc_section(subsection)
220 CALL section_add_subsection(section, subsection)
221 CALL section_release(subsection)
222
223 CALL create_colvar_hbp_section(subsection)
224 CALL section_add_subsection(section, subsection)
225 CALL section_release(subsection)
226
227 CALL create_colvar_ring_puckering_section(subsection)
228 CALL section_add_subsection(section, subsection)
229 CALL section_release(subsection)
230
231 CALL create_colvar_cond_dist_section(subsection)
232 CALL section_add_subsection(section, subsection)
233 CALL section_release(subsection)
234
235 CALL create_voronoiipz_section(subsection)
236 CALL section_add_subsection(section, subsection)
237 CALL section_release(subsection)
238
239 IF (.NOT. skip_recursive_colvar) THEN
240 CALL create_colvar_rpath_section(subsection)
241 CALL section_add_subsection(section, subsection)
242 CALL section_release(subsection)
243
244 CALL create_colvar_dpath_section(subsection)
245 CALL section_add_subsection(section, subsection)
246 CALL section_release(subsection)
247
248 CALL create_colvar_comb_section(subsection)
249 CALL section_add_subsection(section, subsection)
250 CALL section_release(subsection)
251 END IF
252
253 END SUBROUTINE create_colvar_var_section
254
255! **************************************************************************************************
256!> \brief collective variables specifying coordination
257!> \param section the section to be created
258!> \author teo
259! **************************************************************************************************
260 SUBROUTINE create_colvar_coord_section(section)
261 TYPE(section_type), POINTER :: section
262
263 TYPE(keyword_type), POINTER :: keyword
264 TYPE(section_type), POINTER :: subsection
265
266 cpassert(.NOT. ASSOCIATED(section))
267 CALL section_create(section, __location__, name="coordination", &
268 description="Section to define the coordination number as a collective variable.", &
269 n_keywords=1, n_subsections=0, repeats=.false.)
270
271 NULLIFY (subsection, keyword)
272
273 CALL keyword_create(keyword, __location__, name="ATOMS_FROM", &
274 variants=["POINTS_FROM"], &
275 description="Specify indexes of atoms/points building the coordination variable. ", &
276 usage="ATOMS_FROM {integer} {integer} ..", repeats=.true., &
277 n_var=-1, type_of_var=integer_t)
278 CALL section_add_keyword(section, keyword)
279 CALL keyword_release(keyword)
280
281 CALL keyword_create(keyword, __location__, name="ATOMS_TO", &
282 variants=["POINTS_TO"], &
283 description="Specify indexes of atoms/points building the coordination variable. ", &
284 usage="ATOMS_TO {integer} {integer} ..", repeats=.true., &
285 n_var=-1, type_of_var=integer_t)
286 CALL section_add_keyword(section, keyword)
287 CALL keyword_release(keyword)
288
289 CALL keyword_create(keyword, __location__, name="ATOMS_TO_B", &
290 variants=["POINTS_TO_B"], &
291 description="For the CV given by the multiplication of two coorination numbers,"// &
292 " here specify indexes of the third set of atoms/points. ", &
293 usage="ATOMS_TO_B {integer} {integer} ..", repeats=.true., &
294 n_var=-1, type_of_var=integer_t)
295 CALL section_add_keyword(section, keyword)
296 CALL keyword_release(keyword)
297
298 CALL keyword_create(keyword, __location__, name="KINDS_FROM", &
299 description="Specify alternatively kinds of atoms building the coordination variable.", &
300 usage="KINDS_FROM {CHAR} {CHAR} ..", repeats=.true., &
301 n_var=-1, type_of_var=char_t)
302 CALL section_add_keyword(section, keyword)
303 CALL keyword_release(keyword)
304
305 CALL keyword_create(keyword, __location__, name="KINDS_TO", &
306 description="Specify alternatively kinds of atoms building the coordination variable.", &
307 usage="KINDS_TO {CHAR} {CHAR} ..", repeats=.true., &
308 n_var=-1, type_of_var=char_t)
309 CALL section_add_keyword(section, keyword)
310 CALL keyword_release(keyword)
311
312 CALL keyword_create(keyword, __location__, name="KINDS_TO_B", &
313 description="For the CV given by the multiplication of two coorination numbers,"// &
314 " here specify alternatively kinds of atoms building the coordination variable.", &
315 usage="KINDS_TO_B {CHAR} {CHAR} ..", repeats=.true., &
316 n_var=-1, type_of_var=char_t)
317 CALL section_add_keyword(section, keyword)
318 CALL keyword_release(keyword)
319
320 ! Must be present in each colvar and handled properly
321 CALL create_point_section(subsection)
322 CALL section_add_subsection(section, subsection)
323 CALL section_release(subsection)
324
325 CALL keyword_create(keyword, __location__, name="R0", &
326 variants=["R_0"], &
327 description="Specify the R0 parameter in the coordination function.", &
328 usage="R0 {real}", default_r_val=3.0_dp, &
329 unit_str="bohr", n_var=1)
330 CALL section_add_keyword(section, keyword)
331 CALL keyword_release(keyword)
332
333 CALL keyword_create(keyword, __location__, name="NN", &
334 variants=["EXPON_NUMERATOR"], &
335 description="Sets the value of the numerator of the exponential factor"// &
336 " in the coordination FUNCTION.", &
337 usage="NN {integer}", default_i_val=6, &
338 n_var=1)
339 CALL section_add_keyword(section, keyword)
340 CALL keyword_release(keyword)
341
342 CALL keyword_create(keyword, __location__, name="ND", &
343 variants=["EXPON_DENOMINATOR"], &
344 description="Sets the value of the denominator of the exponential factor"// &
345 " in the coordination FUNCTION.", &
346 usage="ND {integer}", default_i_val=12, &
347 n_var=1)
348 CALL section_add_keyword(section, keyword)
349 CALL keyword_release(keyword)
350
351 CALL keyword_create(keyword, __location__, name="R0_B", &
352 variants=["R_0_B"], &
353 description="For the CV given by the multiplication of two coorination numbers,"// &
354 " specify the R0 parameter in the second coordination function.", &
355 usage="R0_B {real}", default_r_val=3.0_dp, &
356 unit_str="bohr", n_var=1)
357 CALL section_add_keyword(section, keyword)
358 CALL keyword_release(keyword)
359
360 CALL keyword_create(keyword, __location__, name="NN_B", &
361 variants=["EXPON_NUMERATOR_B"], &
362 description="For the CV given by the multiplication of two coorination numbers,"// &
363 " Sets the value of the numerator of the exponential factor"// &
364 " in the coordination FUNCTION.", &
365 usage="NN_B {integer}", default_i_val=6, &
366 n_var=1)
367 CALL section_add_keyword(section, keyword)
368 CALL keyword_release(keyword)
369
370 CALL keyword_create(keyword, __location__, name="ND_B", &
371 variants=["EXPON_DENOMINATOR_B"], &
372 description="For the CV given by the multiplication of two coorination numbers,"// &
373 " Sets the value of the denominator of the exponential factor"// &
374 " in the coordination FUNCTION.", &
375 usage="ND_B {integer}", default_i_val=12, &
376 n_var=1)
377 CALL section_add_keyword(section, keyword)
378 CALL keyword_release(keyword)
379
380 END SUBROUTINE create_colvar_coord_section
381
382! **************************************************************************************************
383!> \brief ...
384!> \param section ...
385! **************************************************************************************************
386 SUBROUTINE create_colvar_cond_dist_section(section)
387 TYPE(section_type), POINTER :: section
388
389 TYPE(keyword_type), POINTER :: keyword
390 TYPE(section_type), POINTER :: subsection
391
392 cpassert(.NOT. ASSOCIATED(section))
393 CALL section_create(section, __location__, name="CONDITIONED_DISTANCE", &
394 description="Section to define the conditioned distance as a collective variable.", &
395 n_keywords=1, n_subsections=0, repeats=.false.)
396
397 NULLIFY (subsection, keyword)
398
399 CALL keyword_create(keyword, __location__, name="ATOMS_DISTANCE", &
400 description="Specify indexes of atoms/points from which the distance is computed. ", &
401 usage="ATOMS_DISTANCE {integer} {integer} ..", repeats=.true., &
402 n_var=-1, type_of_var=integer_t)
403 CALL section_add_keyword(section, keyword)
404 CALL keyword_release(keyword)
405
406 CALL keyword_create(keyword, __location__, name="ATOMS_FROM", &
407 variants=["POINTS_FROM"], &
408 description="Specify indexes of atoms/points building the coordination variable. ", &
409 usage="ATOMS_FROM {integer} {integer} ..", repeats=.true., &
410 n_var=-1, type_of_var=integer_t)
411 CALL section_add_keyword(section, keyword)
412 CALL keyword_release(keyword)
413
414 CALL keyword_create(keyword, __location__, name="ATOMS_TO", &
415 variants=["POINTS_TO"], &
416 description="Specify indexes of atoms/points building the coordination variable. ", &
417 usage="ATOMS_TO {integer} {integer} ..", repeats=.true., &
418 n_var=-1, type_of_var=integer_t)
419 CALL section_add_keyword(section, keyword)
420 CALL keyword_release(keyword)
421
422 CALL keyword_create(keyword, __location__, name="KINDS_FROM", &
423 description="Specify alternatively kinds of atoms building the coordination variable.", &
424 usage="KINDS_FROM {CHAR} {CHAR} ..", repeats=.true., &
425 n_var=-1, type_of_var=char_t)
426 CALL section_add_keyword(section, keyword)
427 CALL keyword_release(keyword)
428
429 CALL keyword_create(keyword, __location__, name="KINDS_TO", &
430 description="Specify alternatively kinds of atoms building the coordination variable.", &
431 usage="KINDS_TO {CHAR} {CHAR} ..", repeats=.true., &
432 n_var=-1, type_of_var=char_t)
433 CALL section_add_keyword(section, keyword)
434 CALL keyword_release(keyword)
435
436 ! Must be present in each colvar and handled properly
437 CALL create_point_section(subsection)
438 CALL section_add_subsection(section, subsection)
439 CALL section_release(subsection)
440
441 CALL keyword_create(keyword, __location__, name="R0", &
442 variants=["R_0"], &
443 description="Specify the R0 parameter in the coordination function.", &
444 usage="R0 {real}", default_r_val=3.0_dp, &
445 unit_str="bohr", n_var=1)
446 CALL section_add_keyword(section, keyword)
447 CALL keyword_release(keyword)
448
449 CALL keyword_create(keyword, __location__, name="NN", &
450 variants=["EXPON_NUMERATOR"], &
451 description="Sets the value of the numerator of the exponential factor"// &
452 " in the coordination FUNCTION.", &
453 usage="NN {integer}", default_i_val=6, &
454 n_var=1)
455 CALL section_add_keyword(section, keyword)
456 CALL keyword_release(keyword)
457
458 CALL keyword_create(keyword, __location__, name="ND", &
459 variants=["EXPON_DENOMINATOR"], &
460 description="Sets the value of the denominator of the exponential factor"// &
461 " in the coordination FUNCTION.", &
462 usage="ND {integer}", default_i_val=12, &
463 n_var=1)
464 CALL section_add_keyword(section, keyword)
465 CALL keyword_release(keyword)
466
467 CALL keyword_create(keyword, __location__, name="LAMBDA", &
468 description="Specify the lambda parameter at the exponent of the conditioned distance function.", &
469 usage="LAMBDA {real}", default_r_val=3.0_dp, &
470 unit_str="bohr", n_var=1)
471 CALL section_add_keyword(section, keyword)
472 CALL keyword_release(keyword)
473
474 END SUBROUTINE create_colvar_cond_dist_section
475
476! **************************************************************************************************
477!> \brief collective variables specifying population of a specie based on coordination
478!> \param section the section to be created
479!> \date 01.2009
480!> \author Fabio Sterpone
481! **************************************************************************************************
482 SUBROUTINE create_colvar_pop_section(section)
483 TYPE(section_type), POINTER :: section
484
485 TYPE(keyword_type), POINTER :: keyword
486 TYPE(section_type), POINTER :: subsection
487
488 cpassert(.NOT. ASSOCIATED(section))
489 CALL section_create(section, __location__, name="population", &
490 description="Section to define the population of specie as a collective variable. "// &
491 "See also <https://doi.org/10.1021/jp3019588>.", &
492 n_keywords=1, n_subsections=0, repeats=.false.)
493
494 NULLIFY (subsection, keyword)
495
496 CALL keyword_create(keyword, __location__, name="ATOMS_FROM", &
497 variants=["POINTS_FROM"], &
498 description="Specify indexes of atoms/points building the coordination variable. ", &
499 usage="ATOMS_FROM {integer} {integer} ..", repeats=.true., &
500 n_var=-1, type_of_var=integer_t)
501 CALL section_add_keyword(section, keyword)
502 CALL keyword_release(keyword)
503
504 CALL keyword_create(keyword, __location__, name="ATOMS_TO", &
505 variants=["POINTS_TO"], &
506 description="Specify indexes of atoms/points building the coordination variable. ", &
507 usage="ATOMS_TO {integer} {integer} ..", repeats=.true., &
508 n_var=-1, type_of_var=integer_t)
509 CALL section_add_keyword(section, keyword)
510 CALL keyword_release(keyword)
511
512 CALL keyword_create(keyword, __location__, name="KINDS_FROM", &
513 description="Specify alternatively kinds of atoms building the coordination variable.", &
514 usage="KINDS_FROM {CHAR} {CHAR} ..", repeats=.true., &
515 n_var=-1, type_of_var=char_t)
516 CALL section_add_keyword(section, keyword)
517 CALL keyword_release(keyword)
518
519 CALL keyword_create(keyword, __location__, name="KINDS_TO", &
520 description="Specify alternatively kinds of atoms building the coordination variable.", &
521 usage="KINDS_TO {CHAR} {CHAR} ..", repeats=.true., &
522 n_var=-1, type_of_var=char_t)
523 CALL section_add_keyword(section, keyword)
524 CALL keyword_release(keyword)
525
526 ! Must be present in each colvar and handled properly
527 CALL create_point_section(subsection)
528 CALL section_add_subsection(section, subsection)
529 CALL section_release(subsection)
530
531 CALL keyword_create(keyword, __location__, name="R0", &
532 variants=["R_0"], &
533 description="Specify the R0 parameter in the coordination function.", &
534 usage="R0 {real}", default_r_val=3.0_dp, &
535 n_var=1)
536 CALL section_add_keyword(section, keyword)
537 CALL keyword_release(keyword)
538
539 CALL keyword_create(keyword, __location__, name="NN", &
540 variants=["EXPON_NUMERATOR"], &
541 description="Sets the value of the numerator of the exponential factor"// &
542 " in the coordination FUNCTION.", &
543 usage="NN {integer}", default_i_val=6, &
544 n_var=1)
545 CALL section_add_keyword(section, keyword)
546 CALL keyword_release(keyword)
547
548 CALL keyword_create(keyword, __location__, name="ND", &
549 variants=["EXPON_DENOMINATOR"], &
550 description="Sets the value of the denominator of the exponential factor"// &
551 " in the coordination FUNCTION.", &
552 usage="ND {integer}", default_i_val=12, &
553 n_var=1)
554 CALL section_add_keyword(section, keyword)
555 CALL keyword_release(keyword)
556
557 CALL keyword_create(keyword, __location__, name="n0", &
558 variants=["n_0"], &
559 description="Specify the n0 parameter that sets the coordination of the species.", &
560 usage="n0 {integer}", default_i_val=4, &
561 n_var=1)
562 CALL section_add_keyword(section, keyword)
563 CALL keyword_release(keyword)
564
565 CALL keyword_create(keyword, __location__, name="SIGMA", &
566 description="Specify the gaussian width of used to build the population istogram.", &
567 usage="SIGMA {real}", default_r_val=0.5_dp, &
568 n_var=1)
569 CALL section_add_keyword(section, keyword)
570 CALL keyword_release(keyword)
571
572 END SUBROUTINE create_colvar_pop_section
573
574! **************************************************************************************************
575!> \brief ...
576!> \param section ...
577! **************************************************************************************************
578 SUBROUTINE create_colvar_gyr_section(section)
579 TYPE(section_type), POINTER :: section
580
581 TYPE(keyword_type), POINTER :: keyword
582 TYPE(section_type), POINTER :: subsection
583
584 cpassert(.NOT. ASSOCIATED(section))
585 CALL section_create(section, __location__, name="GYRATION_RADIUS", &
586 description="Section to define the gyration radius as a collective variable.", &
587 n_keywords=1, n_subsections=0, repeats=.false.)
588
589 NULLIFY (subsection, keyword)
590
591 CALL keyword_create(keyword, __location__, name="ATOMS", &
592 variants=["POINTS"], &
593 description="Specify indexes of atoms/points defyining the gyration radius variable. ", &
594 usage="ATOMS {integer} {integer} ..", repeats=.true., &
595 n_var=-1, type_of_var=integer_t)
596 CALL section_add_keyword(section, keyword)
597 CALL keyword_release(keyword)
598
599 CALL keyword_create(keyword, __location__, name="KINDS", &
600 description="Specify alternatively kinds of atoms defining the gyration radius.", &
601 usage="KINDS {CHAR} {CHAR} ..", repeats=.true., &
602 n_var=-1, type_of_var=char_t)
603 CALL section_add_keyword(section, keyword)
604 CALL keyword_release(keyword)
605
606 ! Must be present in each colvar and handled properly
607 CALL create_point_section(subsection)
608 CALL section_add_subsection(section, subsection)
609 CALL section_release(subsection)
610
611 END SUBROUTINE create_colvar_gyr_section
612
613! **************************************************************************************************
614!> \brief collective variables specifying torsion
615!> \param section the section to be created
616!> \author teo
617! **************************************************************************************************
618 SUBROUTINE create_colvar_dfunct_section(section)
619 TYPE(section_type), POINTER :: section
620
621 TYPE(keyword_type), POINTER :: keyword
622 TYPE(section_type), POINTER :: subsection
623
624 cpassert(.NOT. ASSOCIATED(section))
625 CALL section_create(section, __location__, name="DISTANCE_FUNCTION", &
626 description="Section to define functions between two distances as collective variables."// &
627 " The function is defined as d1+coeff*d2", &
628 n_keywords=1, n_subsections=0, repeats=.false.)
629
630 NULLIFY (keyword, subsection)
631
632 CALL keyword_create(keyword, __location__, name="ATOMS", &
633 variants=["POINTS"], &
634 description="Specifies the indexes of atoms/points for the two bonds d1=(1-2) d2=(3-4).", &
635 usage="ATOMS {integer} {integer} {integer} {integer}", &
636 n_var=4, type_of_var=integer_t)
637 CALL section_add_keyword(section, keyword)
638 CALL keyword_release(keyword)
639
640 CALL keyword_create(keyword, __location__, name="COEFFICIENT", &
641 description="Specifies the coefficient in the function for the constraint."// &
642 " -1.0 has to be used for distance difference, 1.0 for distance addition", &
643 usage="COEFFICIENT {real}", &
644 type_of_var=real_t)
645 CALL section_add_keyword(section, keyword)
646 CALL keyword_release(keyword)
647
648 CALL keyword_create(keyword, __location__, name="PBC", &
649 description="Whether periodic boundary conditions should be applied on the "// &
650 "atomic position before computing the colvar or not.", &
651 usage="PBC", &
652 default_l_val=.true., lone_keyword_l_val=.true.)
653 CALL section_add_keyword(section, keyword)
654 CALL keyword_release(keyword)
655
656 ! Must be present in each colvar and handled properly
657 CALL create_point_section(subsection)
658 CALL section_add_subsection(section, subsection)
659 CALL section_release(subsection)
660
661 END SUBROUTINE create_colvar_dfunct_section
662
663! **************************************************************************************************
664!> \brief collective variables specifying torsion
665!> \param section the section to be created
666!> \author teo
667! **************************************************************************************************
668 SUBROUTINE create_colvar_torsion_section(section)
669 TYPE(section_type), POINTER :: section
670
671 TYPE(keyword_type), POINTER :: keyword
672 TYPE(section_type), POINTER :: subsection
673
674 cpassert(.NOT. ASSOCIATED(section))
675 CALL section_create(section, __location__, name="torsion", &
676 description="Section to define the torsion as a collective variables.", &
677 n_keywords=1, n_subsections=0, repeats=.false.)
678
679 NULLIFY (keyword, subsection)
680
681 CALL keyword_create(keyword, __location__, name="ATOMS", &
682 variants=["POINTS"], &
683 description="Specifies the indexes of atoms/points defining the torsion.", &
684 usage="ATOMS {integer} {integer} {integer} {integer}", &
685 n_var=4, type_of_var=integer_t)
686 CALL section_add_keyword(section, keyword)
687 CALL keyword_release(keyword)
688
689 ! Must be present in each colvar and handled properly
690 CALL create_point_section(subsection)
691 CALL section_add_subsection(section, subsection)
692 CALL section_release(subsection)
693
694 END SUBROUTINE create_colvar_torsion_section
695
696! **************************************************************************************************
697!> \brief collective variables specifying torsion
698!> \param section the section to be created
699!> \author teo
700! **************************************************************************************************
701 SUBROUTINE create_colvar_rot_section(section)
702 TYPE(section_type), POINTER :: section
703
704 TYPE(keyword_type), POINTER :: keyword
705 TYPE(section_type), POINTER :: subsection
706
707 cpassert(.NOT. ASSOCIATED(section))
708 CALL section_create(section, __location__, name="bond_rotation", &
709 description="Section to define the rotation of a bond/line with respect to"// &
710 " another bond/line", &
711 n_keywords=1, n_subsections=0, repeats=.false.)
712
713 NULLIFY (keyword, subsection)
714
715 CALL keyword_create(keyword, __location__, name="P1_BOND1", &
716 description="Specifies the index of atom/point defining the first point"// &
717 " of the first bond/line.", &
718 usage="P1_BOND1 {integer}", &
719 n_var=1, type_of_var=integer_t)
720 CALL section_add_keyword(section, keyword)
721 CALL keyword_release(keyword)
722
723 CALL keyword_create(keyword, __location__, name="P2_BOND1", &
724 description="Specifies the index of atom/point defining the second point"// &
725 " of the first bond/line.", &
726 usage="P2_BOND1 {integer}", &
727 n_var=1, type_of_var=integer_t)
728 CALL section_add_keyword(section, keyword)
729 CALL keyword_release(keyword)
730
731 CALL keyword_create(keyword, __location__, name="P1_BOND2", &
732 description="Specifies the index of atom/point defining the first point"// &
733 " of the second bond/line.", &
734 usage="P1_BOND2 {integer}", &
735 n_var=1, type_of_var=integer_t)
736 CALL section_add_keyword(section, keyword)
737 CALL keyword_release(keyword)
738
739 CALL keyword_create(keyword, __location__, name="P2_BOND2", &
740 description="Specifies the index of atom/point defining the second point"// &
741 " of the second bond/line.", &
742 usage="P2_BOND2 {integer}", &
743 n_var=1, type_of_var=integer_t)
744 CALL section_add_keyword(section, keyword)
745 CALL keyword_release(keyword)
746
747 ! Must be present in each colvar and handled properly
748 CALL create_point_section(subsection)
749 CALL section_add_subsection(section, subsection)
750 CALL section_release(subsection)
751
752 END SUBROUTINE create_colvar_rot_section
753
754! **************************************************************************************************
755!> \brief collective variables specifying angles
756!> \param section the section to be created
757!> \author teo
758! **************************************************************************************************
759 SUBROUTINE create_colvar_angle_section(section)
760 TYPE(section_type), POINTER :: section
761
762 TYPE(keyword_type), POINTER :: keyword
763 TYPE(section_type), POINTER :: subsection
764
765 cpassert(.NOT. ASSOCIATED(section))
766 CALL section_create(section, __location__, name="angle", &
767 description="Section to define the angle as a collective variables.", &
768 n_keywords=1, n_subsections=0, repeats=.false.)
769 NULLIFY (keyword, subsection)
770
771 CALL keyword_create(keyword, __location__, name="ATOMS", &
772 variants=["POINTS"], &
773 description="Specifies the indexes of atoms/points defining the angle.", &
774 usage="ATOMS {integer} {integer} {integer}", &
775 n_var=3, type_of_var=integer_t)
776 CALL section_add_keyword(section, keyword)
777 CALL keyword_release(keyword)
778
779 ! Must be present in each colvar and handled properly
780 CALL create_point_section(subsection)
781 CALL section_add_subsection(section, subsection)
782 CALL section_release(subsection)
783
784 END SUBROUTINE create_colvar_angle_section
785
786! **************************************************************************************************
787!> \brief creates the colvar section regarded to the collective variables dist
788!> \param section the section to be created
789!> \author teo
790! **************************************************************************************************
791 SUBROUTINE create_colvar_dist_section(section)
792 TYPE(section_type), POINTER :: section
793
794 TYPE(keyword_type), POINTER :: keyword
795 TYPE(section_type), POINTER :: subsection
796
797 cpassert(.NOT. ASSOCIATED(section))
798 CALL section_create(section, __location__, name="distance", &
799 description="Section to define the distance as a collective variables.", &
800 n_keywords=1, n_subsections=0, repeats=.false.)
801 NULLIFY (keyword, subsection)
802
803 CALL keyword_create(keyword, __location__, name="ATOMS", &
804 variants=["POINTS"], &
805 description="Specifies the indexes of atoms/points defining the distance.", &
806 usage="ATOMS {integer} {integer}", &
807 n_var=2, type_of_var=integer_t)
808 CALL section_add_keyword(section, keyword)
809 CALL keyword_release(keyword)
810 CALL keyword_create(keyword, __location__, name="AXIS", &
811 description="Define the axes along which the colvar should be evaluated", &
812 usage="AXIS (XYZ | X | Y | Z | XY| XZ | YZ)", &
813 enum_c_vals=s2a("XYZ", "X", "Y", "Z", "XY", "XZ", "YZ"), &
815 default_i_val=do_clv_xyz)
816 CALL section_add_keyword(section, keyword)
817 CALL keyword_release(keyword)
818
819 CALL keyword_create(keyword, __location__, name="SIGN", &
820 description="Whether the distance along one Cartesian axis has to be considered with sign."// &
821 " This option is valid if only one dimension is selected.", &
822 usage="SIGN", &
823 default_l_val=.false., lone_keyword_l_val=.true.)
824 CALL section_add_keyword(section, keyword)
825 CALL keyword_release(keyword)
826
827 ! Must be present in each colvar and handled properly
828 CALL create_point_section(subsection)
829 CALL section_add_subsection(section, subsection)
830 CALL section_release(subsection)
831
832 END SUBROUTINE create_colvar_dist_section
833
834! **************************************************************************************************
835!> \brief creates the colvar section regarded to the collective variables dist
836!> \param section the section to be created
837!> \author teo
838! **************************************************************************************************
839 SUBROUTINE create_colvar_xyz_d_section(section)
840 TYPE(section_type), POINTER :: section
841
842 TYPE(keyword_type), POINTER :: keyword
843 TYPE(section_type), POINTER :: subsection
844
845 cpassert(.NOT. ASSOCIATED(section))
846 CALL section_create(section, __location__, name="XYZ_DIAG", &
847 description="Section to define the distance of an atom from its starting "// &
848 "position ((X-X(0))^2+(Y-Y(0))^2+(Z-Z(0))^2) or part of its components as a collective variable. "// &
849 "If absolute_position is specified, instead the CV is represented by the "// &
850 "instantaneous position of the atom (only available for X, Y or Z components).", &
851 n_keywords=1, n_subsections=0, repeats=.false.)
852 NULLIFY (keyword, subsection)
853
854 CALL keyword_create(keyword, __location__, name="ATOM", &
855 variants=["POINT"], &
856 description="Specifies the index of the atom/point.", &
857 usage="ATOM {integer}", &
858 n_var=1, type_of_var=integer_t)
859 CALL section_add_keyword(section, keyword)
860 CALL keyword_release(keyword)
861
862 CALL keyword_create(keyword, __location__, name="COMPONENT", &
863 description="Define the component of the position vector which will be used "// &
864 "as a colvar.", &
865 usage="COMPONENT (XYZ | X | Y | Z | XY| XZ | YZ)", &
866 enum_c_vals=s2a("XYZ", "X", "Y", "Z", "XY", "XZ", "YZ"), &
868 default_i_val=do_clv_xyz)
869 CALL section_add_keyword(section, keyword)
870 CALL keyword_release(keyword)
871
872 CALL keyword_create(keyword, __location__, name="PBC", &
873 description="Whether periodic boundary conditions should be applied on the "// &
874 "atomic position before computing the colvar or not.", &
875 usage="PBC", &
876 default_l_val=.true., lone_keyword_l_val=.true.)
877 CALL section_add_keyword(section, keyword)
878 CALL keyword_release(keyword)
879
880 CALL keyword_create(keyword, __location__, name="ABSOLUTE_POSITION", &
881 description="If enabled, the absolute position of the atoms will be used. ", &
882 usage="ABSOLUTE_POSITION", &
883 default_l_val=.false., lone_keyword_l_val=.true.)
884 CALL section_add_keyword(section, keyword)
885 CALL keyword_release(keyword)
886
887 ! Must be present in each colvar and handled properly
888 CALL create_point_section(subsection)
889 CALL section_add_subsection(section, subsection)
890 CALL section_release(subsection)
891
892 END SUBROUTINE create_colvar_xyz_d_section
893
894! **************************************************************************************************
895!> \brief creates the colvar section regarded to the collective variables dist
896!> \param section the section to be created
897!> \author teo
898! **************************************************************************************************
900 TYPE(section_type), POINTER :: section
901
902 TYPE(keyword_type), POINTER :: keyword
903 TYPE(section_type), POINTER :: subsection
904
905 cpassert(.NOT. ASSOCIATED(section))
906 CALL section_create(section, __location__, name="XYZ_OUTERDIAG", &
907 description="Section to define the cross term (XA-XA(0))*(XB-XB(0))+(XA-XA(0))*(YB-YB(0))"// &
908 " or part of its components as a collective variable. The final term is given by the product"// &
909 " of the components of A with the components of B.", &
910 n_keywords=1, n_subsections=0, repeats=.false.)
911 NULLIFY (keyword, subsection)
912
913 CALL keyword_create(keyword, __location__, name="ATOMS", &
914 variants=["POINTS"], &
915 description="Specifies the index of the atoms/points A and B.", &
916 usage="ATOMS {integer} {integer}", &
917 n_var=2, type_of_var=integer_t)
918 CALL section_add_keyword(section, keyword)
919 CALL keyword_release(keyword)
920
921 CALL keyword_create(keyword, __location__, name="COMPONENT_A", &
922 description="Define the component of the position vector which will be used "// &
923 "as a colvar for atom A.", &
924 usage="COMPONENT_A (XYZ | X | Y | Z | XY| XZ | YZ)", &
925 enum_c_vals=s2a("XYZ", "X", "Y", "Z", "XY", "XZ", "YZ"), &
927 default_i_val=do_clv_xyz)
928 CALL section_add_keyword(section, keyword)
929 CALL keyword_release(keyword)
930
931 CALL keyword_create(keyword, __location__, name="COMPONENT_B", &
932 description="Define the component of the position vector which will be used "// &
933 "as a colvar for atom B.", &
934 usage="COMPONENT_B (XYZ | X | Y | Z | XY| XZ | YZ)", &
935 enum_c_vals=s2a("XYZ", "X", "Y", "Z", "XY", "XZ", "YZ"), &
937 default_i_val=do_clv_xyz)
938 CALL section_add_keyword(section, keyword)
939 CALL keyword_release(keyword)
940
941 CALL keyword_create(keyword, __location__, name="PBC", &
942 description="Whether periodic boundary conditions should be applied on the "// &
943 "atomic position before computing the colvar or not.", &
944 usage="PBC", &
945 default_l_val=.true., lone_keyword_l_val=.true.)
946 CALL section_add_keyword(section, keyword)
947 CALL keyword_release(keyword)
948
949 ! Must be present in each colvar and handled properly
950 CALL create_point_section(subsection)
951 CALL section_add_subsection(section, subsection)
952 CALL section_release(subsection)
953
954 END SUBROUTINE create_colvar_xyz_od_section
955
956! **************************************************************************************************
957!> \brief energy as collective variable
958!> \param section the section to be created
959!> \author Sebastiano Caravati
960! **************************************************************************************************
961 SUBROUTINE create_colvar_u_section(section)
962 TYPE(section_type), POINTER :: section
963
964 TYPE(keyword_type), POINTER :: keyword
965 TYPE(section_type), POINTER :: subsection
966
967 cpassert(.NOT. ASSOCIATED(section))
968 CALL section_create(section, __location__, name="u", &
969 description="Section to define the energy as a generalized collective variable.", &
970 n_keywords=0, n_subsections=0, repeats=.false.)
971
972 NULLIFY (subsection, keyword)
973 CALL section_create(subsection, __location__, name="MIXED", &
974 description="This section allows to use any function of the energy subsystems"// &
975 " in a mixed_env calculation as a collective variable.", &
976 n_keywords=1, n_subsections=0, repeats=.false.)
977
978 CALL keyword_create(keyword, __location__, name="ENERGY_FUNCTION", &
979 description="Specifies the functional form of the collective variable in mathematical notation.", &
980 usage="ENERGY_FUNCTION (E1+E2-LOG(E1/E2))", type_of_var=lchar_t, &
981 n_var=1)
982 CALL section_add_keyword(subsection, keyword)
983 CALL keyword_release(keyword)
984
985 CALL keyword_create(keyword, __location__, name="VARIABLES", &
986 description="Defines the variables of the functional form. To allow an efficient"// &
987 " mapping the order of the energy variables will be considered identical to the"// &
988 " order of the force_eval in the force_eval_order list.", &
989 usage="VARIABLES x", type_of_var=char_t, &
990 n_var=-1)
991 CALL section_add_keyword(subsection, keyword)
992 CALL keyword_release(keyword)
993
994 CALL keyword_create(keyword, __location__, name="PARAMETERS", &
995 description="Defines the parameters of the functional form", &
996 usage="PARAMETERS a b D", type_of_var=char_t, &
997 n_var=-1, repeats=.true.)
998 CALL section_add_keyword(subsection, keyword)
999 CALL keyword_release(keyword)
1000
1001 CALL keyword_create(keyword, __location__, name="VALUES", &
1002 description="Defines the values of parameter of the functional form", &
1003 usage="VALUES ", type_of_var=real_t, &
1004 n_var=-1, repeats=.true., unit_str="internal_cp2k")
1005 CALL section_add_keyword(subsection, keyword)
1006 CALL keyword_release(keyword)
1007
1008 CALL keyword_create(keyword, __location__, name="UNITS", &
1009 description="Optionally, allows to define valid CP2K unit strings for each parameter value. "// &
1010 "It is assumed that the corresponding parameter value is specified in this unit.", &
1011 usage="UNITS angstrom eV*angstrom^-1 angstrom^1 K", type_of_var=char_t, &
1012 n_var=-1, repeats=.true.)
1013 CALL section_add_keyword(subsection, keyword)
1014 CALL keyword_release(keyword)
1015
1016 CALL keyword_create(keyword, __location__, name="DX", &
1017 description="Parameter used for computing the derivative with the Ridders' method.", &
1018 usage="DX <REAL>", default_r_val=0.1_dp, unit_str="bohr")
1019 CALL section_add_keyword(subsection, keyword)
1020 CALL keyword_release(keyword)
1021
1022 CALL keyword_create(keyword, __location__, name="ERROR_LIMIT", &
1023 description="Checks that the error in computing the derivative is not larger than "// &
1024 "the value set; in case error is larger a warning message is printed.", &
1025 usage="ERROR_LIMIT <REAL>", default_r_val=1.0e-12_dp)
1026 CALL section_add_keyword(subsection, keyword)
1027 CALL keyword_release(keyword)
1028
1029 CALL section_add_subsection(section, subsection)
1030 CALL section_release(subsection)
1031
1032 END SUBROUTINE create_colvar_u_section
1033
1034! **************************************************************************************************
1035!> \brief creates the colvar section regarded to the collective variables distance
1036!> of a point from a plane
1037!> \param section the section to be created
1038!> \author teo
1039! **************************************************************************************************
1040 SUBROUTINE create_colvar_d_pl_section(section)
1041 TYPE(section_type), POINTER :: section
1042
1043 TYPE(keyword_type), POINTER :: keyword
1044 TYPE(section_type), POINTER :: subsection
1045
1046 cpassert(.NOT. ASSOCIATED(section))
1047 CALL section_create(section, __location__, name="distance_point_plane", &
1048 description="Section to define the distance of a point from a plane "// &
1049 "as a collective variables.", &
1050 n_keywords=1, n_subsections=0, repeats=.false.)
1051 NULLIFY (keyword, subsection)
1052
1053 CALL keyword_create(keyword, __location__, name="PBC", &
1054 description="Whether periodic boundary conditions should be applied on the "// &
1055 "atomic position before computing the colvar or not.", &
1056 usage="PBC", &
1057 default_l_val=.true., lone_keyword_l_val=.true.)
1058 CALL section_add_keyword(section, keyword)
1059 CALL keyword_release(keyword)
1060
1061 CALL keyword_create(keyword, __location__, name="ATOMS_PLANE", &
1062 variants=["POINTS_PLANE"], &
1063 description="Specifies the indexes of atoms/points defining the plane.", &
1064 usage="ATOMS_PLANE <INTEGER> <INTEGER> <INTEGER>", &
1065 n_var=3, type_of_var=integer_t)
1066 CALL section_add_keyword(section, keyword)
1067 CALL keyword_release(keyword)
1068
1069 CALL keyword_create(keyword, __location__, name="ATOM_POINT", &
1070 variants=["POINT_POINT"], &
1071 description="Specifies the atom/point index defining the point.", &
1072 usage="ATOM_POINT <INTEGER>", &
1073 n_var=1, type_of_var=integer_t)
1074 CALL section_add_keyword(section, keyword)
1075 CALL keyword_release(keyword)
1076
1077 ! Must be present in each colvar and handled properly
1078 CALL create_point_section(subsection)
1079 CALL section_add_subsection(section, subsection)
1080 CALL section_release(subsection)
1081
1082 END SUBROUTINE create_colvar_d_pl_section
1083
1084! **************************************************************************************************
1085!> \brief creates the colvar section regarded to the collective variables
1086!> angles betweem two planes
1087!> \param section the section to be created
1088!> \author teo
1089! **************************************************************************************************
1090 SUBROUTINE create_colvar_a_pl_section(section)
1091 TYPE(section_type), POINTER :: section
1092
1093 TYPE(keyword_type), POINTER :: keyword
1094 TYPE(section_type), POINTER :: subsection
1095
1096 cpassert(.NOT. ASSOCIATED(section))
1097 CALL section_create(section, __location__, name="angle_plane_plane", &
1098 description="This section defines the angle between two planes "// &
1099 "as a collective variables.", &
1100 n_keywords=1, n_subsections=0, repeats=.false.)
1101 NULLIFY (keyword, subsection)
1102
1103 CALL section_create(subsection, __location__, name="PLANE", &
1104 description="This section defines the plane. When using this colvar, "// &
1105 "two plane section must be defined!", &
1106 n_keywords=1, n_subsections=0, repeats=.true.)
1107
1108 CALL keyword_create(keyword, __location__, name="DEF_TYPE", &
1109 description="Specify how the plane is defined: either by 3 atoms or by a fixed normal "// &
1110 "vector. At least one plane must be defined through atoms.", &
1111 usage="DEF_TYPE ATOMS", &
1112 default_i_val=plane_def_atoms, &
1113 enum_c_vals=s2a("ATOMS", "VECTOR"), &
1114 enum_desc=s2a("Plane defined by the position of 3 atoms", &
1115 "Plane defined by a fixed normal vector"), &
1116 enum_i_vals=[plane_def_atoms, plane_def_vec])
1117 CALL section_add_keyword(subsection, keyword)
1118 CALL keyword_release(keyword)
1119
1120 CALL keyword_create(keyword, __location__, name="ATOMS", &
1121 description="Specifies the indexes of 3 atoms/points defining the plane.", &
1122 usage="ATOMS <INTEGER> <INTEGER> <INTEGER>", &
1123 n_var=3, type_of_var=integer_t)
1124 CALL section_add_keyword(subsection, keyword)
1125 CALL keyword_release(keyword)
1126
1127 CALL keyword_create(keyword, __location__, name="NORMAL_VECTOR", &
1128 description="Alternatively to 3 atoms/points one can define one of the two, "// &
1129 "planes by defining its NORMAL vector.", &
1130 usage="NORMAL_VECTOR 0.0 1.0 0.0", &
1131 n_var=3, type_of_var=real_t)
1132 CALL section_add_keyword(subsection, keyword)
1133 CALL keyword_release(keyword)
1134 CALL section_add_subsection(section, subsection)
1135 CALL section_release(subsection)
1136
1137 ! Must be present in each colvar and handled properly
1138 CALL create_point_section(subsection)
1139 CALL section_add_subsection(section, subsection)
1140 CALL section_release(subsection)
1141 END SUBROUTINE create_colvar_a_pl_section
1142
1143! **************************************************************************************************
1144!> \brief create a geometrical point as a function of several atom coordinates
1145!> \param section the section to be created
1146!> \author teo
1147! **************************************************************************************************
1148 SUBROUTINE create_point_section(section)
1149 TYPE(section_type), POINTER :: section
1150
1151 TYPE(keyword_type), POINTER :: keyword
1152
1153 cpassert(.NOT. ASSOCIATED(section))
1154 CALL section_create(section, __location__, name="POINT", &
1155 description="Enables the possibility to use geometrical centers instead of single atoms"// &
1156 " to define colvars", &
1157 n_keywords=1, n_subsections=0, repeats=.true.)
1158
1159 NULLIFY (keyword)
1160
1161 CALL keyword_create(keyword, __location__, name="TYPE", &
1162 description="Chooses the type of geometrical point", &
1163 usage="type (GEO_CENTER|FIX_POINT)", &
1164 enum_c_vals=s2a("GEO_CENTER", "FIX_POINT"), &
1165 enum_desc=s2a("Computes the geometrical center of the listed atoms", &
1166 "Defines a fixed point in space"), &
1167 enum_i_vals=[do_clv_geo_center, do_clv_fix_point], &
1168 default_i_val=do_clv_geo_center)
1169 CALL section_add_keyword(section, keyword)
1170 CALL keyword_release(keyword)
1171
1172 CALL keyword_create(keyword, __location__, name="ATOMS", &
1173 description="Specifies the indexes of atoms defining the geometrical center", &
1174 usage="ATOMS {integer} {integer} {integer} {integer}", &
1175 n_var=-1, type_of_var=integer_t, repeats=.true.)
1176 CALL section_add_keyword(section, keyword)
1177 CALL keyword_release(keyword)
1178
1179 CALL keyword_create( &
1180 keyword, __location__, name="WEIGHTS", &
1181 description="Specifies the weights for a weighted geometrical center. Default is 1/natoms for every atom", &
1182 usage="WEIGHTS {real} {real} {real} {real}", &
1183 n_var=-1, type_of_var=real_t, repeats=.true.)
1184 CALL section_add_keyword(section, keyword)
1185 CALL keyword_release(keyword)
1186
1187 CALL keyword_create(keyword, __location__, name="XYZ", &
1188 description="Specifies the xyz of the fixed point (if the case)", &
1189 usage="XYZ {real} {real} {real}", &
1190 n_var=3, type_of_var=real_t, unit_str="bohr", &
1191 repeats=.false.)
1192 CALL section_add_keyword(section, keyword)
1193 CALL keyword_release(keyword)
1194
1195 END SUBROUTINE create_point_section
1196
1197! **************************************************************************************************
1198!> \brief collective variables specifying torsion
1199!> \param section the section to be created
1200!> \author teo
1201! **************************************************************************************************
1202 SUBROUTINE create_colvar_qparm_section(section)
1203 TYPE(section_type), POINTER :: section
1204
1205 TYPE(keyword_type), POINTER :: keyword
1206 TYPE(section_type), POINTER :: subsection
1207
1208 cpassert(.NOT. ASSOCIATED(section))
1209 CALL section_create(section, __location__, name="qparm", &
1210 description="Section to define the Q parameter (crystalline order parameter) as a collective variable.", &
1211 n_keywords=1, n_subsections=0, repeats=.false.)
1212
1213 NULLIFY (keyword, subsection)
1214
1215 CALL keyword_create(keyword, __location__, name="ATOMS_FROM", &
1216 variants=["POINTS_FROM"], &
1217 description="Specify indexes of atoms/points building the coordination variable. ", &
1218 usage="ATOMS_FROM {integer} {integer} ..", repeats=.true., &
1219 n_var=-1, type_of_var=integer_t)
1220 CALL section_add_keyword(section, keyword)
1221 CALL keyword_release(keyword)
1222
1223 CALL keyword_create(keyword, __location__, name="ATOMS_TO", &
1224 variants=["POINTS_TO"], &
1225 description="Specify indexes of atoms/points building the coordination variable. ", &
1226 usage="ATOMS_TO {integer} {integer} ..", repeats=.true., &
1227 n_var=-1, type_of_var=integer_t)
1228 CALL section_add_keyword(section, keyword)
1229 CALL keyword_release(keyword)
1230
1231 CALL keyword_create(keyword, __location__, name="RCUT", &
1232 description="Specifies the distance cutoff for neighbors. "// &
1233 "Cutoff function is exactly zero for all neighbors beyond RCUT.", &
1234 usage="RCUT {real}", &
1235 n_var=1, unit_str="angstrom", type_of_var=real_t)
1236 CALL section_add_keyword(section, keyword)
1237 CALL keyword_release(keyword)
1238
1239 CALL keyword_create(keyword, __location__, name="INCLUDE_IMAGES", &
1240 description="Whether to include periodic images of ATOMS_TO into the neighbor list.", &
1241 usage="INCLUDE_IMAGES", &
1242 default_l_val=.false., lone_keyword_l_val=.true.)
1243 CALL section_add_keyword(section, keyword)
1244 CALL keyword_release(keyword)
1245
1246 CALL keyword_create(keyword, __location__, name="RSTART", &
1247 description="Specifies the distance cutoff for neighbors. "// &
1248 "Cutoff function is exactly 1 for all neighbors closer than RSTART.", &
1249 usage="RSTART {real}", &
1250 n_var=1, unit_str="angstrom", type_of_var=real_t)
1251 CALL section_add_keyword(section, keyword)
1252 CALL keyword_release(keyword)
1253
1254 CALL keyword_create(keyword, __location__, name="L", &
1255 description="Specifies the L spherical harmonics from Ylm.", &
1256 usage="L {integer}", &
1257 n_var=1, type_of_var=integer_t)
1258 CALL section_add_keyword(section, keyword)
1259 CALL keyword_release(keyword)
1260
1261 !CALL keyword_create(keyword, __LOCATION__, name="ALPHA", &
1262 ! description="Specifies the width of the Fermi-Dirac style smearing around RCUT.", &
1263 ! usage="ALPHA {real}", unit_str="angstrom^-1", default_r_val=0.0_dp)
1264 !CALL section_add_keyword(section, keyword)
1265 !CALL keyword_release(keyword)
1266
1267 ! Must be present in each colvar and handled properly
1268 CALL create_point_section(subsection)
1269 CALL section_add_subsection(section, subsection)
1270 CALL section_release(subsection)
1271
1272 END SUBROUTINE create_colvar_qparm_section
1273
1274! **************************************************************************************************
1275!> \brief collective variables specifying hydronium solvation
1276!> \param section the section to be created
1277!> \author Marcel Baer
1278! **************************************************************************************************
1279 SUBROUTINE create_colvar_hydronium_shell_section(section)
1280 TYPE(section_type), POINTER :: section
1281
1282 TYPE(keyword_type), POINTER :: keyword
1283
1284 cpassert(.NOT. ASSOCIATED(section))
1285 CALL section_create(section, __location__, name="HYDRONIUM_SHELL", &
1286 description="Section to define the formation of a hydronium as a"// &
1287 " collective variable. Number of oxygens in the 1st shell of the"// &
1288 " hydronium. Adapted from Equation (3) in Supplementary Info of"// &
1289 " J. Am. Chem. Soc.,128, 2006, 11318, i.e. omitting the cutoff function"// &
1290 " and summing only over the oxygens of water.", &
1291 n_keywords=1, n_subsections=0, repeats=.false.)
1292
1293 NULLIFY (keyword)
1294
1295 CALL keyword_create(keyword, __location__, name="OXYGENS", &
1296 description="Specifies indexes of atoms building the coordination variable."// &
1297 " Oxygens of the water molecules.", &
1298 usage="OXYGENS {integer} {integer} ..", repeats=.true., &
1299 n_var=-1, type_of_var=integer_t)
1300 CALL section_add_keyword(section, keyword)
1301 CALL keyword_release(keyword)
1302
1303 CALL keyword_create(keyword, __location__, name="HYDROGENS", &
1304 description="Specifies indexes of atoms building the coordination variable."// &
1305 " Hydrogens of the water molecules.", &
1306 usage="HYDROGENS {integer} {integer} ..", repeats=.true., &
1307 n_var=-1, type_of_var=integer_t)
1308 CALL section_add_keyword(section, keyword)
1309 CALL keyword_release(keyword)
1310
1311 CALL keyword_create(keyword, __location__, name="ROO", &
1312 description="Specifies the rc parameter in the coordination function:"// &
1313 " number of oxygens per water oxygen.", &
1314 usage="ROO {real}", default_r_val=cp_unit_to_cp2k(value=3.0_dp, &
1315 unit_str="bohr"), unit_str="bohr", n_var=1)
1316 CALL section_add_keyword(section, keyword)
1317 CALL keyword_release(keyword)
1318
1319 CALL keyword_create(keyword, __location__, name="pOO", &
1320 variants=["EXPON_NUMERATORA"], &
1321 description="Sets the value of the numerator of the exponential factor"// &
1322 " in the coordination function: number of oxygens per water oxygen.", &
1323 usage="pOO {integer}", default_i_val=6, &
1324 n_var=1)
1325 CALL section_add_keyword(section, keyword)
1326 CALL keyword_release(keyword)
1327
1328 CALL keyword_create(keyword, __location__, name="qOO", &
1329 variants=["EXPON_DENOMINATORA"], &
1330 description="Sets the value of the denominator of the exponential factor"// &
1331 " in the coordination function: number of oxygens per water oxygen.", &
1332 usage="qOO {integer}", default_i_val=12, &
1333 n_var=1)
1334 CALL section_add_keyword(section, keyword)
1335 CALL keyword_release(keyword)
1336
1337 CALL keyword_create(keyword, __location__, name="ROH", &
1338 description="Specifies the rc parameter in the coordination function:"// &
1339 " number of hydrogens per water molecule.", &
1340 usage="ROH {real}", default_r_val=cp_unit_to_cp2k(value=3.0_dp, &
1341 unit_str="bohr"), unit_str="bohr", n_var=1)
1342 CALL section_add_keyword(section, keyword)
1343 CALL keyword_release(keyword)
1344
1345 CALL keyword_create(keyword, __location__, name="pOH", &
1346 variants=["EXPON_NUMERATORB"], &
1347 description="Sets the value of the numerator of the exponential factor"// &
1348 " in the coordination function: number of hydrogens per water molecule.", &
1349 usage="pOH {integer}", default_i_val=6, &
1350 n_var=1)
1351 CALL section_add_keyword(section, keyword)
1352 CALL keyword_release(keyword)
1353
1354 CALL keyword_create(keyword, __location__, name="qOH", &
1355 variants=["EXPON_DENOMINATORB"], &
1356 description="Sets the value of the denominator of the exponential factor"// &
1357 " in the coordination function: number of hydrogens per water molecule.", &
1358 usage="qOH {integer}", default_i_val=12, &
1359 n_var=1)
1360 CALL section_add_keyword(section, keyword)
1361 CALL keyword_release(keyword)
1362
1363 CALL keyword_create(keyword, __location__, name="NH", &
1364 description="Specifies the NH parameter in the M function.", &
1365 usage="NH {real}", default_r_val=3.0_dp, &
1366 n_var=1)
1367 CALL section_add_keyword(section, keyword)
1368 CALL keyword_release(keyword)
1369
1370 CALL keyword_create(keyword, __location__, name="pM", &
1371 variants=["EXPON_NUMERATOR"], &
1372 description="Sets the value of the numerator of the exponential factor"// &
1373 " in the M function.", &
1374 usage="pM {integer}", default_i_val=8, &
1375 n_var=1)
1376 CALL section_add_keyword(section, keyword)
1377 CALL keyword_release(keyword)
1378
1379 CALL keyword_create(keyword, __location__, name="qM", &
1380 variants=["EXPON_DENOMINATOR"], &
1381 description="Sets the value of the denominator of the exponential factor"// &
1382 " in the M function.", &
1383 usage="qM {integer}", default_i_val=16, &
1384 n_var=1)
1385 CALL section_add_keyword(section, keyword)
1386 CALL keyword_release(keyword)
1387
1388 CALL keyword_create(keyword, __location__, name="LAMBDA", &
1389 description="Specify the LAMBDA parameter in the hydronium function.", &
1390 usage="LAMBDA {real}", default_r_val=10.0_dp, &
1391 n_var=1)
1392 CALL section_add_keyword(section, keyword)
1393 CALL keyword_release(keyword)
1394
1395 END SUBROUTINE create_colvar_hydronium_shell_section
1396
1397! **************************************************************************************************
1398!> \brief collective variables specifying the distance between hydronium and hydroxide ion
1399!> \param section the section to be created
1400!> \author Dorothea Golze
1401! **************************************************************************************************
1402 SUBROUTINE create_colvar_hydronium_dist_section(section)
1403 TYPE(section_type), POINTER :: section
1404
1405 TYPE(keyword_type), POINTER :: keyword
1406
1407 cpassert(.NOT. ASSOCIATED(section))
1408 CALL section_create(section, __location__, name="HYDRONIUM_DISTANCE", &
1409 description="Section to define the formation of a hydronium as a"// &
1410 " collective variable. Distance between hydronium and hydroxide ion"// &
1411 " Experimental at this point, i.e. not proved to be an effective"// &
1412 " collective variable.", &
1413 n_keywords=1, n_subsections=0, repeats=.false.)
1414
1415 NULLIFY (keyword)
1416
1417 CALL keyword_create(keyword, __location__, name="OXYGENS", &
1418 description="Specifies indexes of atoms building the coordination variable."// &
1419 " Oxygens of the water molecules.", &
1420 usage="OXYGENS {integer} {integer} ..", repeats=.true., &
1421 n_var=-1, type_of_var=integer_t)
1422 CALL section_add_keyword(section, keyword)
1423 CALL keyword_release(keyword)
1424
1425 CALL keyword_create(keyword, __location__, name="HYDROGENS", &
1426 description="Specifies indexes of atoms building the coordination variable."// &
1427 " Hydrogens of the water molecules.", &
1428 usage="HYDROGENS {integer} {integer} ..", repeats=.true., &
1429 n_var=-1, type_of_var=integer_t)
1430 CALL section_add_keyword(section, keyword)
1431 CALL keyword_release(keyword)
1432
1433 CALL keyword_create(keyword, __location__, name="ROH", &
1434 description="Specifies the rc parameter in the coordination function:"// &
1435 " number of hydrogens per water molecule.", &
1436 usage="ROH {real}", default_r_val=cp_unit_to_cp2k(value=2.4_dp, &
1437 unit_str="bohr"), unit_str="bohr", n_var=1)
1438 CALL section_add_keyword(section, keyword)
1439 CALL keyword_release(keyword)
1440
1441 CALL keyword_create(keyword, __location__, name="pOH", &
1442 description="Sets the value of the numerator of the exponential factor"// &
1443 " in the coordination function: number of hydrogens per water molecule.", &
1444 usage="pOH {integer}", default_i_val=6, &
1445 n_var=1)
1446 CALL section_add_keyword(section, keyword)
1447 CALL keyword_release(keyword)
1448
1449 CALL keyword_create(keyword, __location__, name="qOH", &
1450 description="Sets the value of the denominator of the exponential factor"// &
1451 " in the coordination function: number of hydrogens per water molecule.", &
1452 usage="qOH {integer}", default_i_val=12, &
1453 n_var=1)
1454 CALL section_add_keyword(section, keyword)
1455 CALL keyword_release(keyword)
1456
1457 CALL keyword_create(keyword, __location__, name="NH", &
1458 description="Specifies the NH parameter in the M function.", &
1459 usage="NH {real}", default_r_val=2.2_dp, &
1460 n_var=1)
1461 CALL section_add_keyword(section, keyword)
1462 CALL keyword_release(keyword)
1463
1464 CALL keyword_create(keyword, __location__, name="pM", &
1465 description="Sets the value of the numerator of the exponential factor"// &
1466 " in the M function.", &
1467 usage="pM {integer}", default_i_val=8, &
1468 n_var=1)
1469 CALL section_add_keyword(section, keyword)
1470 CALL keyword_release(keyword)
1471
1472 CALL keyword_create(keyword, __location__, name="qM", &
1473 description="Sets the value of the denominator of the exponential factor"// &
1474 " in the M function.", &
1475 usage="qM {integer}", default_i_val=16, &
1476 n_var=1)
1477 CALL section_add_keyword(section, keyword)
1478 CALL keyword_release(keyword)
1479
1480 CALL keyword_create(keyword, __location__, name="NN", &
1481 description="Specifies the NN parameter in the F function.", &
1482 usage="NN {real}", default_r_val=1.5_dp, &
1483 n_var=1)
1484 CALL section_add_keyword(section, keyword)
1485 CALL keyword_release(keyword)
1486
1487 CALL keyword_create(keyword, __location__, name="pF", &
1488 description="Sets the value of the numerator of the exponential factor"// &
1489 " in the F function.", &
1490 usage="pF {integer}", default_i_val=8, &
1491 n_var=1)
1492 CALL section_add_keyword(section, keyword)
1493 CALL keyword_release(keyword)
1494
1495 CALL keyword_create(keyword, __location__, name="qF", &
1496 description="Sets the value of the denominator of the exponential factor"// &
1497 " in the F function.", &
1498 usage="qF {integer}", default_i_val=16, &
1499 n_var=1)
1500 CALL section_add_keyword(section, keyword)
1501 CALL keyword_release(keyword)
1502
1503 CALL keyword_create(keyword, __location__, name="LAMBDA", &
1504 description="Specify the LAMBDA parameter in the hydronium function.", &
1505 usage="LAMBDA {real}", default_r_val=20.0_dp, &
1506 n_var=1)
1507 CALL section_add_keyword(section, keyword)
1508 CALL keyword_release(keyword)
1509
1510 END SUBROUTINE create_colvar_hydronium_dist_section
1511
1512! **************************************************************************************************
1513!> \brief collective variables specifying the solvation of carboxylic acid;
1514!> distance between hydronium ion and acetate ion; Equation (2) in
1515!> Supplementary Information of J. Am. Chem. Soc.,128, 2006, 11318
1516!> \param section the section to be created
1517!> \author Dorothea Golze
1518! **************************************************************************************************
1519 SUBROUTINE create_colvar_acid_hyd_dist_section(section)
1520 TYPE(section_type), POINTER :: section
1521
1522 TYPE(keyword_type), POINTER :: keyword
1523
1524 cpassert(.NOT. ASSOCIATED(section))
1525 CALL section_create(section, __location__, name="ACID_HYDRONIUM_DISTANCE", &
1526 description="Section to define the dissociation of a carboxylic acid in"// &
1527 " water. Distance between hydronium ion and acetate ion. Equation (2)"// &
1528 " in Supplementary Info of J. Am. Chem. Soc.,128, 2006, 11318.", &
1529 n_keywords=1, n_subsections=0, repeats=.false.)
1530
1531 NULLIFY (keyword)
1532
1533 CALL keyword_create(keyword, __location__, name="OXYGENS_WATER", &
1534 description="Specifies indexes of atoms building the coordination variable."// &
1535 " Oxygens of the water molecules. ", &
1536 usage="OXYGENS_WATER {integer} {integer} ..", repeats=.true., &
1537 n_var=-1, type_of_var=integer_t)
1538 CALL section_add_keyword(section, keyword)
1539 CALL keyword_release(keyword)
1540
1541 CALL keyword_create(keyword, __location__, name="OXYGENS_ACID", &
1542 description="Specifies indexes of atoms building the coordination variable."// &
1543 " Oxygens of the carboxyl groups.", &
1544 usage="OXYGENS_ACID {integer} {integer} ..", repeats=.true., &
1545 n_var=-1, type_of_var=integer_t)
1546 CALL section_add_keyword(section, keyword)
1547 CALL keyword_release(keyword)
1548
1549 CALL keyword_create(keyword, __location__, name="HYDROGENS", &
1550 description="Specifies indexes of atoms building the coordination variable."// &
1551 " Hydrogens of the water molecules and of the carboxyl groups.", &
1552 usage="HYDROGENS {integer} {integer} ..", repeats=.true., &
1553 n_var=-1, type_of_var=integer_t)
1554 CALL section_add_keyword(section, keyword)
1555 CALL keyword_release(keyword)
1556
1557 CALL keyword_create(keyword, __location__, name="pWOH", &
1558 description="Sets the value of the numerator of the exponential factor"// &
1559 " in the coordination function: number of hydrogens per water molecule.", &
1560 usage="pWOH {integer}", default_i_val=8, &
1561 n_var=1)
1562 CALL section_add_keyword(section, keyword)
1563 CALL keyword_release(keyword)
1564
1565 CALL keyword_create(keyword, __location__, name="qWOH", &
1566 description="Sets the value of the denominator of the exponential factor"// &
1567 " in the coordination function: number of hydrogens per water molecule.", &
1568 usage="qWOH {integer}", default_i_val=16, &
1569 n_var=1)
1570 CALL section_add_keyword(section, keyword)
1571 CALL keyword_release(keyword)
1572
1573 CALL keyword_create(keyword, __location__, name="RWOH", &
1574 description="Specify the rc parameter in the coordination function:"// &
1575 " number of hydrogens per water molecule.", &
1576 usage="RWOH {real}", default_r_val=cp_unit_to_cp2k(value=2.4_dp, &
1577 unit_str="bohr"), unit_str="bohr", n_var=1)
1578 CALL section_add_keyword(section, keyword)
1579 CALL keyword_release(keyword)
1580
1581 CALL keyword_create(keyword, __location__, name="pAOH", &
1582 description="Sets the value of the numerator of the exponential factor"// &
1583 " in the coordination function: number of hydrogens per carboxyl group.", &
1584 usage="pAOH {integer}", default_i_val=6, &
1585 n_var=1)
1586 CALL section_add_keyword(section, keyword)
1587 CALL keyword_release(keyword)
1588
1589 CALL keyword_create(keyword, __location__, name="qAOH", &
1590 description="Sets the value of the denominator of the exponential factor"// &
1591 " in the coordination function: number of hydrogens per carboxyl group.", &
1592 usage="qAOH {integer}", default_i_val=14, &
1593 n_var=1)
1594 CALL section_add_keyword(section, keyword)
1595 CALL keyword_release(keyword)
1596
1597 CALL keyword_create(keyword, __location__, name="RAOH", &
1598 description="Specify the rc parameter in the coordination function:"// &
1599 " number of hydrogens per carboxyl group.", &
1600 usage="RAOH {real}", default_r_val=cp_unit_to_cp2k(value=2.4_dp, &
1601 unit_str="bohr"), unit_str="bohr", n_var=1)
1602 CALL section_add_keyword(section, keyword)
1603 CALL keyword_release(keyword)
1604
1605 CALL keyword_create(keyword, __location__, name="pCUT", &
1606 description="Sets the value of the numerator of the exponential factor"// &
1607 " in the cutoff function.", &
1608 usage="pCUT {integer}", default_i_val=6, &
1609 n_var=1)
1610 CALL section_add_keyword(section, keyword)
1611 CALL keyword_release(keyword)
1612
1613 CALL keyword_create(keyword, __location__, name="qCUT", &
1614 description="Sets the value of the denominator of the exponential factor"// &
1615 " in the cutoff function.", &
1616 usage="qCUT {integer}", default_i_val=12, &
1617 n_var=1)
1618 CALL section_add_keyword(section, keyword)
1619 CALL keyword_release(keyword)
1620
1621 CALL keyword_create(keyword, __location__, name="NC", &
1622 description="Specifies the NC parameter in the cutoff function.", &
1623 usage="NC {real}", default_r_val=0.56_dp, &
1624 n_var=1)
1625 CALL section_add_keyword(section, keyword)
1626 CALL keyword_release(keyword)
1627
1628 CALL keyword_create(keyword, __location__, name="LAMBDA", &
1629 variants=["LAMBDA"], &
1630 description="Specifies the LAMBDA parameter carboxylic acid function.", &
1631 usage="LAMBDA {real}", default_r_val=20.0_dp, &
1632 n_var=1)
1633 CALL section_add_keyword(section, keyword)
1634 CALL keyword_release(keyword)
1635
1636 END SUBROUTINE create_colvar_acid_hyd_dist_section
1637
1638! **************************************************************************************************
1639!> \brief collective variables specifying the solvation of carboxylic acid;
1640!> number of oxygens in the 1st shell of the hydronium; Equation (3) in
1641!> Supplementary Information of J. Am. Chem. Soc.,128, 2006, 11318
1642!> \param section the section to be created
1643!> \author Dorothea Golze
1644! **************************************************************************************************
1645 SUBROUTINE create_colvar_acid_hyd_shell_section(section)
1646 TYPE(section_type), POINTER :: section
1647
1648 TYPE(keyword_type), POINTER :: keyword
1649
1650 cpassert(.NOT. ASSOCIATED(section))
1651 CALL section_create(section, __location__, name="ACID_HYDRONIUM_SHELL", &
1652 description="Section to define the dissociation of a carboxylic acid in"// &
1653 " water. Number of oxygens in the 1st shell of the hydronium. Equation (3)"// &
1654 " in Supplementary Info of J. Am. Chem. Soc.,128, 2006, 11318. Similar to"// &
1655 " the HYDRONIUM colvar, but with modification for the acid.", &
1656 n_keywords=1, n_subsections=0, repeats=.false.)
1657
1658 NULLIFY (keyword)
1659
1660 CALL keyword_create(keyword, __location__, name="OXYGENS_WATER", &
1661 description="Specifies indexes of atoms building the coordination variable."// &
1662 " Oxygens of the water molecules. ", &
1663 usage="OXYGENS_WATER {integer} {integer} ..", repeats=.true., &
1664 n_var=-1, type_of_var=integer_t)
1665 CALL section_add_keyword(section, keyword)
1666 CALL keyword_release(keyword)
1667
1668 CALL keyword_create(keyword, __location__, name="OXYGENS_ACID", &
1669 description="Specifies indexes of atoms building the coordination variable."// &
1670 " Oxygens of the carboxyl groups.", &
1671 usage="OXYGENS_ACID {integer} {integer} ..", repeats=.true., &
1672 n_var=-1, type_of_var=integer_t)
1673 CALL section_add_keyword(section, keyword)
1674 CALL keyword_release(keyword)
1675
1676 CALL keyword_create(keyword, __location__, name="HYDROGENS", &
1677 description="Specifies indexes of atoms building the coordination variable."// &
1678 " Hydrogens of the water molecules and of the carboxyl groups.", &
1679 usage="HYDROGENS {integer} {integer} ..", repeats=.true., &
1680 n_var=-1, type_of_var=integer_t)
1681 CALL section_add_keyword(section, keyword)
1682 CALL keyword_release(keyword)
1683
1684 CALL keyword_create(keyword, __location__, name="pWOH", &
1685 description="Sets the value of the numerator of the exponential factor"// &
1686 " in the coordination function: number of hydrogens per water molecule.", &
1687 usage="pWOH {integer}", default_i_val=8, &
1688 n_var=1)
1689 CALL section_add_keyword(section, keyword)
1690 CALL keyword_release(keyword)
1691
1692 CALL keyword_create(keyword, __location__, name="qWOH", &
1693 description="Sets the value of the denominator of the exponential factor"// &
1694 " in the coordination function: number of hydrogens per water molecule.", &
1695 usage="qWOH {integer}", default_i_val=16, &
1696 n_var=1)
1697 CALL section_add_keyword(section, keyword)
1698 CALL keyword_release(keyword)
1699
1700 CALL keyword_create(keyword, __location__, name="RWOH", &
1701 description="Specifies the rc parameter in the coordination function:"// &
1702 " number of hydrogens per water molecule.", &
1703 usage="RWOH {real}", default_r_val=cp_unit_to_cp2k(value=2.4_dp, &
1704 unit_str="bohr"), unit_str="bohr", n_var=1)
1705 CALL section_add_keyword(section, keyword)
1706 CALL keyword_release(keyword)
1707
1708 CALL keyword_create(keyword, __location__, name="pAOH", &
1709 description="Sets the value of the numerator of the exponential factor"// &
1710 " in the coordination function: number of hydrogens per carboxyl group.", &
1711 usage="pAOH {integer}", default_i_val=6, &
1712 n_var=1)
1713 CALL section_add_keyword(section, keyword)
1714 CALL keyword_release(keyword)
1715
1716 CALL keyword_create(keyword, __location__, name="qAOH", &
1717 description="Sets the value of the denominator of the exponential factor"// &
1718 " in the coordination function: number of hydrogens per carboxyl group.", &
1719 usage="qAOH {integer}", default_i_val=14, &
1720 n_var=1)
1721 CALL section_add_keyword(section, keyword)
1722 CALL keyword_release(keyword)
1723
1724 CALL keyword_create(keyword, __location__, name="RAOH", &
1725 description="Specifies the rc parameter in the coordination function:"// &
1726 " number of hydrogens per carboxyl group.", &
1727 usage="RAOH {real}", default_r_val=cp_unit_to_cp2k(value=2.4_dp, &
1728 unit_str="bohr"), unit_str="bohr", n_var=1)
1729 CALL section_add_keyword(section, keyword)
1730 CALL keyword_release(keyword)
1731
1732 CALL keyword_create(keyword, __location__, name="pOO", &
1733 description="Sets the value of the numerator of the exponential factor"// &
1734 " in the coordination function: number of oxygens per water oxygen.", &
1735 usage="pOO {integer}", default_i_val=6, &
1736 n_var=1)
1737 CALL section_add_keyword(section, keyword)
1738 CALL keyword_release(keyword)
1739
1740 CALL keyword_create(keyword, __location__, name="qOO", &
1741 description="Sets the value of the denominator of the exponential factor"// &
1742 " in the coordination function: number of oxygens per water oxygen.", &
1743 usage="qOO {integer}", default_i_val=12, &
1744 n_var=1)
1745 CALL section_add_keyword(section, keyword)
1746 CALL keyword_release(keyword)
1747
1748 CALL keyword_create(keyword, __location__, name="ROO", &
1749 description="Specifies the rc parameter in the coordination function:"// &
1750 " number of oxygens per water oxygen.", &
1751 usage="ROO {real}", default_r_val=cp_unit_to_cp2k(value=5.5_dp, &
1752 unit_str="bohr"), unit_str="bohr", n_var=1)
1753 CALL section_add_keyword(section, keyword)
1754 CALL keyword_release(keyword)
1755
1756 CALL keyword_create(keyword, __location__, name="pM", &
1757 description="Sets the value of the numerator of the exponential factor"// &
1758 " in the M function.", &
1759 usage="pM {integer}", default_i_val=8, &
1760 n_var=1)
1761 CALL section_add_keyword(section, keyword)
1762 CALL keyword_release(keyword)
1763
1764 CALL keyword_create(keyword, __location__, name="qM", &
1765 description="Sets the value of the denominator of the exponential factor"// &
1766 " in the M function.", &
1767 usage="qM {integer}", default_i_val=16, &
1768 n_var=1)
1769 CALL section_add_keyword(section, keyword)
1770 CALL keyword_release(keyword)
1771
1772 CALL keyword_create(keyword, __location__, name="NH", &
1773 description="Specifies the NH parameter in the M function.", &
1774 usage="NH {real}", default_r_val=2.2_dp, &
1775 n_var=1)
1776 CALL section_add_keyword(section, keyword)
1777 CALL keyword_release(keyword)
1778
1779 CALL keyword_create(keyword, __location__, name="pCUT", &
1780 description="Sets the value of the numerator of the exponential factor"// &
1781 " in the cutoff function.", &
1782 usage="pCUT {integer}", default_i_val=6, &
1783 n_var=1)
1784 CALL section_add_keyword(section, keyword)
1785 CALL keyword_release(keyword)
1786
1787 CALL keyword_create(keyword, __location__, name="qCUT", &
1788 description="Sets the value of the denominator of the exponential factor"// &
1789 " in the cutoff function.", &
1790 usage="qCUT {integer}", default_i_val=12, &
1791 n_var=1)
1792 CALL section_add_keyword(section, keyword)
1793 CALL keyword_release(keyword)
1794
1795 CALL keyword_create(keyword, __location__, name="NC", &
1796 description="Specifies the NC parameter in the cutoff function.", &
1797 usage="NC {real}", default_r_val=0.9_dp, &
1798 n_var=1)
1799 CALL section_add_keyword(section, keyword)
1800 CALL keyword_release(keyword)
1801
1802 CALL keyword_create(keyword, __location__, name="LAMBDA", &
1803 variants=["LAMBDA"], &
1804 description="Specifies the LAMBDA parameter carboxylic acid function.", &
1805 usage="LAMBDA {real}", default_r_val=10.0_dp, &
1806 n_var=1)
1807 CALL section_add_keyword(section, keyword)
1808 CALL keyword_release(keyword)
1809
1810 END SUBROUTINE create_colvar_acid_hyd_shell_section
1811
1812! **************************************************************************************************
1813!> \brief ...
1814!> \param section ...
1815! **************************************************************************************************
1816 SUBROUTINE create_colvar_rmsd_section(section)
1817 TYPE(section_type), POINTER :: section
1818
1819 TYPE(keyword_type), POINTER :: keyword
1820 TYPE(section_type), POINTER :: subsection, subsubsection
1821
1822 cpassert(.NOT. ASSOCIATED(section))
1823 CALL section_create(section, __location__, name="rmsd", &
1824 description="Section to define a CV as function of RMSD computed with respect to"// &
1825 " given reference configurations. For 2 configurations the colvar is equal to:"// &
1826 " ss = (RMSDA-RMSDB)/(RMSDA+RMSDB), while if only 1 configuration is given, then the"// &
1827 " colvar is just the RMSD from that frame.", &
1828 n_keywords=1, n_subsections=0, repeats=.false.)
1829
1830 NULLIFY (keyword, subsection, subsubsection)
1831 CALL keyword_create(keyword, __location__, name="SUBSET_TYPE", &
1832 description="Define the subsytem used to compute the RMSD. With ALL the displacements"// &
1833 " are mass-weighted, with LIST all weights are set to 1,"// &
1834 " with WEIGHT_LIST a list of weights is expected from input.", &
1835 usage="SUBSET_TYPE ALL", &
1836 enum_c_vals=s2a("ALL", "LIST", "WEIGHT_LIST"), &
1837 enum_i_vals=[rmsd_all, rmsd_list, rmsd_weightlist], &
1838 default_i_val=rmsd_all)
1839 CALL section_add_keyword(section, keyword)
1840 CALL keyword_release(keyword)
1841
1842 CALL keyword_create(keyword, __location__, name="ALIGN_FRAMES", &
1843 description="Whether the reference frames should be aligned to minimize the RMSD", &
1844 usage="ALIGN_FRAMES", &
1845 default_l_val=.false., lone_keyword_l_val=.true.)
1846 CALL section_add_keyword(section, keyword)
1847 CALL keyword_release(keyword)
1848
1849 CALL keyword_create(keyword, __location__, name="ATOMS", &
1850 description="Specify indexes of atoms building the subset. ", &
1851 usage="ATOMS {integer} {integer} ..", repeats=.true., &
1852 n_var=-1, type_of_var=integer_t)
1853 CALL section_add_keyword(section, keyword)
1854 CALL keyword_release(keyword)
1855
1856 CALL keyword_create(keyword, __location__, name="WEIGHTS", &
1857 description="Specify weights of atoms building the subset. It is used only with WEIGHT_LIST ", &
1858 usage="weightS {real} {real} ..", repeats=.true., &
1859 n_var=-1, type_of_var=real_t)
1860 CALL section_add_keyword(section, keyword)
1861 CALL keyword_release(keyword)
1862
1863 CALL section_create(subsection, __location__, name="FRAME", &
1864 description="Specify coordinates of the frame (number of frames can be either 1 or 2)", &
1865 repeats=.true.)
1866
1867 CALL keyword_create(keyword, __location__, name="COORD_FILE_NAME", &
1868 description="Name of the xyz file with coordinates (alternative to &COORD section)", &
1869 usage="COORD_FILE_NAME <CHAR>", &
1870 default_lc_val="")
1871 CALL section_add_keyword(subsection, keyword)
1872 CALL keyword_release(keyword)
1873
1874 CALL create_coord_section_cv(subsubsection, "RMSD")
1875 CALL section_add_subsection(subsection, subsubsection)
1876 CALL section_release(subsubsection)
1877
1878 CALL section_add_subsection(section, subsection)
1879 CALL section_release(subsection)
1880
1881 END SUBROUTINE create_colvar_rmsd_section
1882
1883! **************************************************************************************************
1884!> \brief collective variables specifying the space orthogonal to the reaction path
1885!> in the space spanned by the involved collective coordinates
1886!> \param section the section to be created
1887!> \author fschiff
1888! **************************************************************************************************
1889 SUBROUTINE create_colvar_rpath_section(section)
1890 TYPE(section_type), POINTER :: section
1891
1892 cpassert(.NOT. ASSOCIATED(section))
1893 CALL section_create(section, __location__, name="REACTION_PATH", &
1894 description="Section defining a one dimensional reaction path in an Q-dimensional space of colvars. "// &
1895 "Constraining this colvar, allows to sample the space orthogonal to the reaction path, "// &
1896 "both in the Q-dimensional colvar and 3N-Q remaining coordinates. "// &
1897 "For the details of the function see cited literature.", &
1898 n_keywords=1, n_subsections=0, repeats=.false., &
1899 citations=[branduardi2007])
1900
1901 CALL keywords_colvar_path(section)
1902 END SUBROUTINE create_colvar_rpath_section
1903
1904! **************************************************************************************************
1905!> \brief Distance from reaction path
1906!> \param section the section to be created
1907!> \author 01.2010
1908! **************************************************************************************************
1909 SUBROUTINE create_colvar_dpath_section(section)
1910 TYPE(section_type), POINTER :: section
1911
1912 cpassert(.NOT. ASSOCIATED(section))
1913 CALL section_create(section, __location__, name="DISTANCE_FROM_PATH", &
1914 description="Section defining the distance from a one dimensional reaction "// &
1915 "path in an Q-dimensional space of colvars. "// &
1916 "Constraining this colvar, allows to sample the space equidistant to the reaction path, "// &
1917 "both in the Q-dimensional colvar and 3N-Q remaining coordinates. "// &
1918 "For the details of the function see cited literature.", &
1919 n_keywords=1, n_subsections=0, repeats=.false., &
1920 citations=[branduardi2007])
1921
1922 CALL keywords_colvar_path(section)
1923 END SUBROUTINE create_colvar_dpath_section
1924
1925! **************************************************************************************************
1926!> \brief Section describinf keywords for both reaction path and distance from reaction path
1927!> \param section the section to be created
1928!> \author 01.2010
1929! **************************************************************************************************
1930 SUBROUTINE keywords_colvar_path(section)
1931
1932 TYPE(section_type), POINTER :: section
1933
1934 TYPE(keyword_type), POINTER :: keyword
1935 TYPE(section_type), POINTER :: print_key, subsection, subsubsection
1936
1937 NULLIFY (keyword, subsection, subsubsection, print_key)
1938 CALL create_colvar_section(subsection, skip_recursive_colvar=.true.)
1939 CALL section_add_subsection(section, subsection)
1940 CALL section_release(subsection)
1941
1942 CALL keyword_create(keyword, __location__, name="DISTANCES_RMSD", &
1943 description=" ", &
1944 usage="DISTANCES_RMSD T", &
1945 default_l_val=.false., lone_keyword_l_val=.true.)
1946 CALL section_add_keyword(section, keyword)
1947 CALL keyword_release(keyword)
1948
1949 CALL keyword_create(keyword, __location__, name="RMSD", &
1950 description=" ", &
1951 usage="RMSD T", &
1952 default_l_val=.false., lone_keyword_l_val=.true.)
1953 CALL section_add_keyword(section, keyword)
1954 CALL keyword_release(keyword)
1955
1956 CALL keyword_create(keyword, __location__, name="SUBSET_TYPE", &
1957 description="Define the subsytem used to compute the RMSD", &
1958 usage="SUBSET_TYPE ALL", &
1959 enum_c_vals=s2a("ALL", "LIST"), &
1960 enum_i_vals=[rmsd_all, rmsd_list], &
1961 default_i_val=rmsd_all)
1962 CALL section_add_keyword(section, keyword)
1963 CALL keyword_release(keyword)
1964
1965 CALL keyword_create(keyword, __location__, name="ALIGN_FRAMES", &
1966 description="Whether the reference frames should be aligned to minimize the RMSD", &
1967 usage="ALIGN_FRAMES", &
1968 default_l_val=.false., lone_keyword_l_val=.true.)
1969 CALL section_add_keyword(section, keyword)
1970 CALL keyword_release(keyword)
1971
1972 CALL keyword_create(keyword, __location__, name="ATOMS", &
1973 description="Specify indexes of atoms building the subset. ", &
1974 usage="ATOMS {integer} {integer} ..", repeats=.true., &
1975 n_var=-1, type_of_var=integer_t)
1976 CALL section_add_keyword(section, keyword)
1977 CALL keyword_release(keyword)
1978
1979 CALL section_create(subsection, __location__, name="FRAME", &
1980 description="Specify coordinates of the frame", &
1981 repeats=.true.)
1982
1983 CALL keyword_create(keyword, __location__, name="COORD_FILE_NAME", &
1984 description="Name of the xyz file with coordinates (alternative to &COORD section)", &
1985 usage="COORD_FILE_NAME <CHAR>", &
1986 default_lc_val="")
1987 CALL section_add_keyword(subsection, keyword)
1988 CALL keyword_release(keyword)
1989
1990 CALL create_coord_section_cv(subsubsection, "RMSD")
1991 CALL section_add_subsection(subsection, subsubsection)
1992 CALL section_release(subsubsection)
1993
1994 CALL section_add_subsection(section, subsection)
1995 CALL section_release(subsection)
1996
1997 CALL keyword_create(keyword, __location__, name="FUNCTION", &
1998 description="Specifies the ith element of the vector valued function that defines the reaction path. "// &
1999 "This keyword needs to repeat exactly Q times, and the order must match the order of the colvars. "// &
2000 "The VARIABLE (e.g. T) which parametrises the curve can be used as the target of a constraint.", &
2001 usage="FUNCTION (sin(T+2)+2*T)", type_of_var=lchar_t, &
2002 n_var=1, default_lc_val="0", repeats=.true.)
2003 CALL section_add_keyword(section, keyword)
2004 CALL keyword_release(keyword)
2005
2006 CALL keyword_create(keyword, __location__, name="VARIABLE", &
2007 description="Specifies the name of the variable that parametrises the FUNCTION "// &
2008 "defining the reaction path.", &
2009 usage="VARIABLE T", type_of_var=char_t, &
2010 n_var=1, repeats=.false.)
2011 CALL section_add_keyword(section, keyword)
2012 CALL keyword_release(keyword)
2013
2014 CALL keyword_create( &
2015 keyword, __location__, name="LAMBDA", &
2016 description="Specifies the exponent of the Gaussian used in the integral representation of the colvar. "// &
2017 "The shape of the space orthogonal to the reaction path is defined by this choice. "// &
2018 "In the limit of large values, it is given by the plane orthogonal to the path. "// &
2019 "In practice, modest values are required for stable numerical integration.", &
2020 usage="LAMBDA {real}", &
2021 type_of_var=real_t, default_r_val=5.0_dp)
2022 CALL section_add_keyword(section, keyword)
2023 CALL keyword_release(keyword)
2024
2025 CALL keyword_create(keyword, __location__, name="STEP_SIZE", &
2026 description="Step size in the numerical integration, "// &
2027 "a few thousand points are common, and the proper number also depends on LAMBDA.", &
2028 usage="STEP_SIZE {real}", &
2029 type_of_var=real_t, default_r_val=0.01_dp)
2030 CALL section_add_keyword(section, keyword)
2031 CALL keyword_release(keyword)
2032
2033 CALL keyword_create(keyword, __location__, name="RANGE", &
2034 description="The range of VARIABLE used for the parametrisation.", &
2035 usage="RANGE <REAL> <REAL>", &
2036 n_var=2, type_of_var=real_t)
2037 CALL section_add_keyword(section, keyword)
2038 CALL keyword_release(keyword)
2039
2041 print_key, __location__, name="MAP", &
2042 description="Activating this print key will print once a file with the values of the FUNCTION on a grid "// &
2043 "of COLVAR values in a specified range. "// &
2044 "GRID_SPACING and RANGE for every COLVAR has to be specified again in the same order as they are in the input.", &
2045 print_level=high_print_level, filename="PATH")
2046
2047 CALL keyword_create(keyword, __location__, name="RANGE", &
2048 description="The range of of the grid of the COLVAR.", &
2049 usage="RANGE <REAL> <REAL>", &
2050 n_var=2, type_of_var=real_t, repeats=.true.)
2051 CALL section_add_keyword(print_key, keyword)
2052 CALL keyword_release(keyword)
2053
2054 CALL keyword_create(keyword, __location__, name="GRID_SPACING", &
2055 description="Distance between two gridpoints for the grid on the COLVAR", &
2056 usage="GRID_SPACING {real}", repeats=.true., &
2057 type_of_var=real_t, default_r_val=0.01_dp)
2058 CALL section_add_keyword(print_key, keyword)
2059 CALL keyword_release(keyword)
2060
2061 CALL section_add_subsection(section, print_key)
2062 CALL section_release(print_key)
2063
2064 END SUBROUTINE keywords_colvar_path
2065
2066! **************************************************************************************************
2067!> \brief Colvar allowing a combination of COLVARS
2068!> \param section the section to be created
2069!> \author Teodoro Laino [tlaino] - 12.2008
2070! **************************************************************************************************
2071 SUBROUTINE create_colvar_comb_section(section)
2072 TYPE(section_type), POINTER :: section
2073
2074 TYPE(keyword_type), POINTER :: keyword
2075 TYPE(section_type), POINTER :: subsection
2076
2077 cpassert(.NOT. ASSOCIATED(section))
2078 CALL section_create(section, __location__, name="COMBINE_COLVAR", &
2079 description="Allows the possibility to combine several COLVARs into one COLVAR "// &
2080 "with a generic function. "//docf(), &
2081 n_keywords=1, n_subsections=0, repeats=.false.)
2082
2083 NULLIFY (keyword, subsection)
2084 CALL create_colvar_section(subsection, skip_recursive_colvar=.true.)
2085 CALL section_add_subsection(section, subsection)
2086 CALL section_release(subsection)
2087
2088 CALL keyword_create(keyword, __location__, name="FUNCTION", &
2089 description="Specifies the function used to combine different COLVARs into one.", &
2090 ! **************************************************************************************************
2091 !> \brief ...
2092 !> \param CV1^2 ...
2093 !> \param CV2^2 ...
2094 !> \param " ...
2095 !> \param type_of_var=lchar_t ...
2096 !> \param n_var=1 ...
2097 !> \param error=error ...
2098 ! **************************************************************************************************
2099 usage="FUNCTION SQRT(CV1^2+CV2^2)", type_of_var=lchar_t, &
2100 n_var=1)
2101 CALL section_add_keyword(section, keyword)
2102 CALL keyword_release(keyword)
2103
2104 CALL keyword_create(keyword, __location__, name="VARIABLES", &
2105 description="Specifies the name of the variable that parametrises the FUNCTION "// &
2106 "defining how COLVARS should be combined. The matching follows the same order of the "// &
2107 "COLVARS definition in the input file.", &
2108 usage="VARIABLES CV1 CV2 CV3", type_of_var=char_t, n_var=-1, repeats=.false.)
2109 CALL section_add_keyword(section, keyword)
2110 CALL keyword_release(keyword)
2111
2112 CALL keyword_create(keyword, __location__, name="PARAMETERS", &
2113 description="Defines the parameters of the functional form", &
2114 usage="PARAMETERS a b D", type_of_var=char_t, &
2115 n_var=-1, repeats=.true.)
2116 CALL section_add_keyword(section, keyword)
2117 CALL keyword_release(keyword)
2118
2119 CALL keyword_create(keyword, __location__, name="VALUES", &
2120 description="Defines the values of parameter of the functional form", &
2121 usage="VALUES ", type_of_var=real_t, &
2122 n_var=-1, repeats=.true., unit_str="internal_cp2k")
2123 CALL section_add_keyword(section, keyword)
2124 CALL keyword_release(keyword)
2125
2126 CALL keyword_create(keyword, __location__, name="DX", &
2127 description="Parameter used for computing the derivative of the combination "// &
2128 "of COLVARs with the Ridders' method.", &
2129 usage="DX <REAL>", default_r_val=0.1_dp, unit_str="bohr")
2130 CALL section_add_keyword(section, keyword)
2131 CALL keyword_release(keyword)
2132
2133 CALL keyword_create(keyword, __location__, name="ERROR_LIMIT", &
2134 description="Checks that the error in computing the derivative is not larger than "// &
2135 "the value set; in case error is larger a warning message is printed.", &
2136 usage="ERROR_LIMIT <REAL>", default_r_val=1.0e-12_dp)
2137 CALL section_add_keyword(section, keyword)
2138 CALL keyword_release(keyword)
2139
2140 END SUBROUTINE create_colvar_comb_section
2141
2142! **************************************************************************************************
2143!> \brief Creates the coord section
2144!> \param section the section to create
2145!> \param name ...
2146!> \author teo
2147! **************************************************************************************************
2148 SUBROUTINE create_coord_section_cv(section, name)
2149 TYPE(section_type), POINTER :: section
2150 CHARACTER(LEN=*), INTENT(IN) :: name
2151
2152 TYPE(keyword_type), POINTER :: keyword
2153
2154 cpassert(.NOT. ASSOCIATED(section))
2155 CALL section_create(section, __location__, name="coord", &
2156 description="The positions for "//trim(name)//" used for restart", &
2157 n_keywords=1, n_subsections=0, repeats=.false.)
2158 NULLIFY (keyword)
2159
2160 CALL keyword_create(keyword, __location__, name="_DEFAULT_KEYWORD_", &
2161 description="Specify positions of the system", repeats=.true., &
2162 usage="{Real} ...", type_of_var=real_t, n_var=-1)
2163 CALL section_add_keyword(section, keyword)
2164 CALL keyword_release(keyword)
2165
2166 END SUBROUTINE create_coord_section_cv
2167
2168! **************************************************************************************************
2169!> \brief collective variables specifying h bonds
2170!> \param section the section to be created
2171!> \author alin m elena
2172! **************************************************************************************************
2173 SUBROUTINE create_colvar_wc_section(section)
2174 TYPE(section_type), POINTER :: section
2175
2176 TYPE(keyword_type), POINTER :: keyword
2177 TYPE(section_type), POINTER :: subsection
2178
2179 cpassert(.NOT. ASSOCIATED(section))
2180 CALL section_create(section, __location__, name="wc", &
2181 description="Section to define the hbond wannier centre as a collective variables.", &
2182 n_keywords=1, n_subsections=0, repeats=.false.)
2183 NULLIFY (keyword, subsection)
2184
2185 CALL keyword_create(keyword, __location__, name="RCUT", &
2186 description="Parameter used for computing the cutoff radius for searching "// &
2187 "the wannier centres around an atom", &
2188 usage="RCUT <REAL>", default_r_val=0.529177208590000_dp, unit_str="angstrom", &
2189 type_of_var=real_t, repeats=.false.)
2190 CALL section_add_keyword(section, keyword)
2191 CALL keyword_release(keyword)
2192
2193 CALL keyword_create(keyword, __location__, name="ATOMS", &
2194 variants=["POINTS"], &
2195 description="Specifies the indexes of atoms/points defining the bond (Od, H, Oa).", &
2196 usage="ATOMS {integer} {integer} {integer}", &
2197 n_var=3, type_of_var=integer_t, repeats=.true.)
2198 CALL section_add_keyword(section, keyword)
2199 CALL keyword_release(keyword)
2200
2201 ! Must be present in each colvar and handled properly
2202 CALL create_point_section(subsection)
2203 CALL section_add_subsection(section, subsection)
2204 CALL section_release(subsection)
2205
2206 END SUBROUTINE create_colvar_wc_section
2207
2208 ! **************************************************************************************************
2209!> \brief collective variables specifying h bonds= wire
2210!> \param section the section to be created
2211!> \author alin m elena
2212! **************************************************************************************************
2213 SUBROUTINE create_colvar_hbp_section(section)
2214 TYPE(section_type), POINTER :: section
2215
2216 TYPE(keyword_type), POINTER :: keyword
2217 TYPE(section_type), POINTER :: subsection
2218
2219 cpassert(.NOT. ASSOCIATED(section))
2220 CALL section_create(section, __location__, name="hbp", &
2221 description="Section to define the hbond wannier centre as a collective variables.", &
2222 n_keywords=1, n_subsections=0, repeats=.false.)
2223 NULLIFY (keyword, subsection)
2224
2225 CALL keyword_create(keyword, __location__, name="RCUT", &
2226 description="Parameter used for computing the cutoff radius for searching "// &
2227 "the wannier centres around an atom", &
2228 usage="RCUT <REAL>", default_r_val=0.529177208590000_dp, unit_str="angstrom", &
2229 type_of_var=real_t, repeats=.false.)
2230 CALL section_add_keyword(section, keyword)
2231 CALL keyword_release(keyword)
2232
2233 CALL keyword_create(keyword, __location__, name="SHIFT", &
2234 description="Parameter used for shifting each term in the sum ", &
2235 usage="SHIFT <REAL>", default_r_val=0.5_dp, &
2236 type_of_var=real_t, repeats=.false.)
2237 CALL section_add_keyword(section, keyword)
2238 CALL keyword_release(keyword)
2239
2240 CALL keyword_create(keyword, __location__, name="NPOINTS", &
2241 description="The number of points in the path", &
2242 usage="NPOINTS {integer}", default_i_val=-1, &
2243 n_var=1, type_of_var=integer_t, repeats=.false.)
2244 CALL section_add_keyword(section, keyword)
2245 CALL keyword_release(keyword)
2246
2247 CALL keyword_create(keyword, __location__, name="ATOMS", &
2248 variants=["POINTS"], &
2249 description="Specifies the indexes of atoms/points defining the bond (Od, H, Oa).", &
2250 usage="ATOMS {integer} {integer} {integer}", &
2251 n_var=3, type_of_var=integer_t, repeats=.true.)
2252 CALL section_add_keyword(section, keyword)
2253 CALL keyword_release(keyword)
2254
2255 ! Must be present in each colvar and handled properly
2256 CALL create_point_section(subsection)
2257 CALL section_add_subsection(section, subsection)
2258 CALL section_release(subsection)
2259
2260 END SUBROUTINE create_colvar_hbp_section
2261
2262! **************************************************************************************************
2263!> \brief collective variables specifying ring puckering
2264!> \brief D. Cremer and J.A. Pople, JACS 97 1354 (1975)
2265!> \param section the section to be created
2266!> \author Marcel Baer
2267! **************************************************************************************************
2268 SUBROUTINE create_colvar_ring_puckering_section(section)
2269 TYPE(section_type), POINTER :: section
2270
2271 TYPE(keyword_type), POINTER :: keyword
2272 TYPE(section_type), POINTER :: subsection
2273
2274 cpassert(.NOT. ASSOCIATED(section))
2275 CALL section_create(section, __location__, name="RING_PUCKERING", &
2276 description="Section to define general ring puckering collective variables.", &
2277 n_keywords=1, n_subsections=0, repeats=.false.)
2278
2279 NULLIFY (keyword, subsection)
2280
2281 CALL keyword_create(keyword, __location__, name="ATOMS", &
2282 variants=["POINTS"], &
2283 description="Specifies the indexes of atoms/points defining the ring. "// &
2284 "At least 4 Atoms are needed.", &
2285 usage="ATOMS {integer} {integer} {integer} ..", &
2286 n_var=-1, type_of_var=integer_t)
2287 CALL section_add_keyword(section, keyword)
2288 CALL keyword_release(keyword)
2289
2290 CALL keyword_create(keyword, __location__, name="COORDINATE", &
2291 description="Indicate the coordinate to be used. Follow the Cremer-Pople definition for a N ring. "// &
2292 "0 is the total puckering variable Q, "// &
2293 "2..[N/2] are puckering coordinates. "// &
2294 "-2..-[N/2-1] are puckering angles.", &
2295 usage="COORDINATE {integer}", default_i_val=0, &
2296 n_var=1)
2297 CALL section_add_keyword(section, keyword)
2298 CALL keyword_release(keyword)
2299
2300 ! Must be present in each colvar and handled properly
2301 CALL create_point_section(subsection)
2302 CALL section_add_subsection(section, subsection)
2303 CALL section_release(subsection)
2304
2305 END SUBROUTINE create_colvar_ring_puckering_section
2306
2307! **************************************************************************************************
2308!> \brief Creates the VORONOIIPZ collective variable input section
2309!> \param section the section to create
2310! **************************************************************************************************
2311 SUBROUTINE create_voronoiipz_section(section)
2312 TYPE(section_type), POINTER :: section
2313
2314 TYPE(keyword_type), POINTER :: keyword
2315
2316 cpassert(.NOT. ASSOCIATED(section))
2317 NULLIFY (keyword)
2318 CALL section_create(section, __location__, name="VORONOIIPZ", &
2319 description="Absolute location of a hydronium ion along a Cartesian axis, "// &
2320 "based on continuous Voronoi weights.", &
2321 citations=[zhang2025], n_subsections=0, repeats=.false.)
2322
2323 CALL keyword_create(keyword, __location__, name="LAMBDA", &
2324 description="Exponent in the Voronoi weight exp(LAMBDA*r). "// &
2325 "Negative values assign each hydrogen predominantly to nearby oxygen atoms.", &
2326 usage="LAMBDA [angstrom^-1] -8.0", type_of_var=real_t, &
2327 default_r_val=cp_unit_to_cp2k(value=-8.0_dp, unit_str="angstrom^-1"), &
2328 unit_str="angstrom^-1", n_var=1)
2329 CALL section_add_keyword(section, keyword)
2330 CALL keyword_release(keyword)
2331
2332 CALL keyword_create(keyword, __location__, name="ZMID", &
2333 description="Coordinate of the reference plane along the selected axis.", &
2334 usage="ZMID [angstrom] 0.0", type_of_var=real_t, default_r_val=0.0_dp, &
2335 unit_str="angstrom", n_var=1)
2336 CALL section_add_keyword(section, keyword)
2337 CALL keyword_release(keyword)
2338
2339 CALL keyword_create(keyword, __location__, name="ZIDX", &
2340 description="Cartesian direction used for the ion location: 1=X, 2=Y, 3=Z.", &
2341 usage="ZIDX 3", type_of_var=integer_t, default_i_val=3, n_var=1)
2342 CALL section_add_keyword(section, keyword)
2343 CALL keyword_release(keyword)
2344
2345 CALL keyword_create(keyword, __location__, name="D_0", &
2346 description="Reference coordination of the non-reactive GROUPA atoms.", &
2347 usage="D_0 2.0", type_of_var=real_t, default_r_val=2.0_dp, n_var=1)
2348 CALL section_add_keyword(section, keyword)
2349 CALL keyword_release(keyword)
2350
2351 CALL keyword_create(keyword, __location__, name="D_1", &
2352 description="Reference coordination of the first reactive GROUPA atom.", &
2353 usage="D_1 2.0", type_of_var=real_t, default_r_val=2.0_dp, n_var=1)
2354 CALL section_add_keyword(section, keyword)
2355 CALL keyword_release(keyword)
2356
2357 CALL keyword_create(keyword, __location__, name="D_2", &
2358 description="Reference coordination of the second reactive GROUPA atom.", &
2359 usage="D_2 2.0", type_of_var=real_t, default_r_val=2.0_dp, n_var=1)
2360 CALL section_add_keyword(section, keyword)
2361 CALL keyword_release(keyword)
2362
2363 CALL keyword_create(keyword, __location__, name="D_3", &
2364 description="Reference coordination of the third reactive GROUPA atom.", &
2365 usage="D_3 2.0", type_of_var=real_t, default_r_val=2.0_dp, n_var=1)
2366 CALL section_add_keyword(section, keyword)
2367 CALL keyword_release(keyword)
2368
2369 CALL keyword_create(keyword, __location__, name="NL_CUTOFF", &
2370 description="Maximum GROUPA-GROUPB distance included in the Voronoi weights.", &
2371 usage="NL_CUTOFF [angstrom] 2.4", &
2372 default_r_val=cp_unit_to_cp2k(value=2.4_dp, unit_str="angstrom"), &
2373 unit_str="angstrom", n_var=1)
2374 CALL section_add_keyword(section, keyword)
2375 CALL keyword_release(keyword)
2376
2377 CALL keyword_create(keyword, __location__, name="GROUPA", &
2378 description="Oxygen atoms used as Voronoi sites. Any reactive sites must "// &
2379 "be the final NRX entries.", &
2380 usage="GROUPA 1 4 7", n_var=-1, type_of_var=integer_t)
2381 CALL section_add_keyword(section, keyword)
2382 CALL keyword_release(keyword)
2383
2384 CALL keyword_create(keyword, __location__, name="GROUPB", &
2385 description="Hydrogen atoms assigned to the GROUPA sites.", &
2386 usage="GROUPB 2 3 5 6 8 9", n_var=-1, type_of_var=integer_t)
2387 CALL section_add_keyword(section, keyword)
2388 CALL keyword_release(keyword)
2389
2390 CALL keyword_create(keyword, __location__, name="NRX", &
2391 description="Number of reactive sites at the end of GROUPA (zero to three). "// &
2392 "Their reference coordinations are D_1 through D_3.", &
2393 usage="NRX 0", type_of_var=integer_t, default_i_val=0, n_var=1)
2394 CALL section_add_keyword(section, keyword)
2395 CALL keyword_release(keyword)
2396
2397 END SUBROUTINE create_voronoiipz_section
2398
2399END MODULE input_cp2k_colvar
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public branduardi2007
integer, save, public zhang2025
Initialize the collective variables types.
integer, parameter, public do_clv_geo_center
integer, parameter, public do_clv_xyz
integer, parameter, public do_clv_xz
integer, parameter, public do_clv_fix_point
integer, parameter, public do_clv_z
integer, parameter, public plane_def_atoms
integer, parameter, public do_clv_yz
integer, parameter, public do_clv_xy
integer, parameter, public do_clv_y
integer, parameter, public plane_def_vec
integer, parameter, public do_clv_x
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer, parameter, public low_print_level
integer, parameter, public high_print_level
integer, parameter, public add_last_numeric
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
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 rmsd_weightlist
integer, parameter, public rmsd_list
integer, parameter, public rmsd_all
integer, parameter, public gaussian
integer, parameter, public numerical
subroutine, public create_colvar_xyz_d_section(section)
creates the colvar section regarded to the collective variables dist
recursive subroutine, public create_colvar_section(section, skip_recursive_colvar)
creates the colvar section
subroutine, public create_colvar_xyz_od_section(section)
creates the colvar section regarded to the collective variables dist
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
Utilities for string manipulations.
represent a keyword in the input
represent a section of the input file