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