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