(git:3c69fd1)
Loading...
Searching...
No Matches
input_cp2k_motion.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!> 10.2005 split input_cp2k into smaller modules [fawzi]
11!> 01.2020 add keywords related to Space Groups [pcazade]
12!> \author teo & fawzi
13! **************************************************************************************************
15 USE bibliography, ONLY: brieuc2016, &
16 byrd1995, &
22 kapil2016, &
30 USE cp_units, ONLY: cp_unit_to_cp2k
31 USE input_constants, ONLY: &
52 USE input_cp2k_thermostats, ONLY: create_coord_section, &
54 create_velocity_section
64 USE input_val_types, ONLY: integer_t, &
65 lchar_t, &
66 logical_t, &
67 real_t, &
68 char_t
69 USE kinds, ONLY: dp
70 USE string_utilities, ONLY: newline, &
71 s2a
72#include "../base/base_uses.f90"
73
74 IMPLICIT NONE
75 PRIVATE
76
77 LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .true.
78 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_motion'
79
80 PUBLIC :: create_motion_section
81
82CONTAINS
83
84! **************************************************************************************************
85!> \brief creates the motion section
86!> \param section the section to be created
87!> \author teo
88! **************************************************************************************************
89 SUBROUTINE create_motion_section(section)
90 TYPE(section_type), POINTER :: section
91
92 TYPE(section_type), POINTER :: subsection
93
94 cpassert(.NOT. ASSOCIATED(section))
95 CALL section_create(section, __location__, name="motion", &
96 description="This section defines a set of tool connected with the motion of the nuclei.", &
97 n_keywords=1, n_subsections=1, repeats=.false.)
98
99 NULLIFY (subsection)
100
101 CALL create_geoopt_section(subsection, __location__, label="GEO_OPT", &
102 description="This section sets the environment of the geometry optimizer.", &
103 just_optimizers=.false., &
104 use_model_hessian=.true.)
105 CALL section_add_subsection(section, subsection)
106 CALL section_release(subsection)
107
108 CALL create_cell_opt_section(subsection)
109 CALL section_add_subsection(section, subsection)
110 CALL section_release(subsection)
111
112 CALL create_shellcore_opt_section(subsection)
113 CALL section_add_subsection(section, subsection)
114 CALL section_release(subsection)
115
116 CALL create_md_section(subsection)
117 CALL section_add_subsection(section, subsection)
118 CALL section_release(subsection)
119
120 CALL create_driver_section(subsection)
121 CALL section_add_subsection(section, subsection)
122 CALL section_release(subsection)
123
124 CALL create_fe_section(subsection)
125 CALL section_add_subsection(section, subsection)
126 CALL section_release(subsection)
127
128 CALL create_constraint_section(subsection)
129 CALL section_add_subsection(section, subsection)
130 CALL section_release(subsection)
131
132 CALL create_fp_section(subsection)
133 CALL section_add_subsection(section, subsection)
134 CALL section_release(subsection)
135
136 CALL create_mc_section(subsection)
137 CALL section_add_subsection(section, subsection)
138 CALL section_release(subsection)
139
140 CALL create_tmc_section(subsection)
141 CALL section_add_subsection(section, subsection)
142 CALL section_release(subsection)
143
144 CALL create_pint_section(subsection)
145 CALL section_add_subsection(section, subsection)
146 CALL section_release(subsection)
147
148 CALL create_band_section(subsection)
149 CALL section_add_subsection(section, subsection)
150 CALL section_release(subsection)
151
152 CALL create_motion_print_section(subsection)
153 CALL section_add_subsection(section, subsection)
154 CALL section_release(subsection)
155
156 END SUBROUTINE create_motion_section
157
158! **************************************************************************************************
159!> \brief creates the Monte Carlo section
160!> \param section the section to be created
161!> \author matt
162! **************************************************************************************************
163 SUBROUTINE create_mc_section(section)
164 TYPE(section_type), POINTER :: section
165
166 TYPE(keyword_type), POINTER :: keyword
167 TYPE(section_type), POINTER :: subsection
168
169 cpassert(.NOT. ASSOCIATED(section))
170 CALL section_create(section, __location__, name="mc", &
171 description="This section sets parameters to set up a MonteCarlo calculation.", &
172 n_keywords=10, n_subsections=2, repeats=.false.)
173
174 NULLIFY (keyword, subsection)
175
176 CALL keyword_create(keyword, __location__, name="NSTEP", &
177 description="Specifies the number of MC cycles.", &
178 usage="NSTEP {integer}", &
179 default_i_val=100)
180 CALL section_add_keyword(section, keyword)
181 CALL keyword_release(keyword)
182
183 CALL keyword_create(keyword, __location__, name="IPRINT", &
184 description="Prints coordinate/cell/etc information every IPRINT steps.", &
185 usage="IPRINT {integer}", &
186 default_i_val=1)
187 CALL section_add_keyword(section, keyword)
188 CALL keyword_release(keyword)
189
190 CALL keyword_create(keyword, __location__, name="NMOVES", &
191 description="Specifies the number of classical moves between energy evaluations. ", &
192 usage="NMOVES {integer}", &
193 default_i_val=4)
194 CALL section_add_keyword(section, keyword)
195 CALL keyword_release(keyword)
196
197 CALL keyword_create(keyword, __location__, name="NSWAPMOVES", &
198 description="How many insertions to try per swap move.", &
199 usage="NSWAPMOVES {integer}", &
200 default_i_val=16)
201 CALL section_add_keyword(section, keyword)
202 CALL keyword_release(keyword)
203
204 CALL keyword_create(keyword, __location__, name="LBIAS", &
205 description="Dictates if we presample moves with a different potential.", &
206 usage="LBIAS {logical}", &
207 default_l_val=.false.)
208 CALL section_add_keyword(section, keyword)
209 CALL keyword_release(keyword)
210
211 CALL keyword_create(keyword, __location__, name="LSTOP", &
212 description="Makes nstep in terms of steps, instead of cycles.", &
213 usage="LSTOP {logical}", &
214 default_l_val=.false.)
215 CALL section_add_keyword(section, keyword)
216 CALL keyword_release(keyword)
217
218 CALL keyword_create(keyword, __location__, name="LDISCRETE", &
219 description="Changes the volume of the box in discrete steps, one side at a time.", &
220 usage="LDISCRETE {logical}", &
221 default_l_val=.false.)
222 CALL section_add_keyword(section, keyword)
223 CALL keyword_release(keyword)
224
225 CALL keyword_create(keyword, __location__, name="RCLUS", &
226 description="The cluster cut off radius in angstroms.", &
227 usage="RCLUS {real}", &
228 default_r_val=1.0e0_dp)
229 CALL section_add_keyword(section, keyword)
230 CALL keyword_release(keyword)
231
232 CALL keyword_create(keyword, __location__, name="RESTART", &
233 description="Read initial configuration from restart file.", &
234 usage="RESTART {logical}", &
235 default_l_val=.false.)
236 CALL section_add_keyword(section, keyword)
237 CALL keyword_release(keyword)
238
239 CALL keyword_create( &
240 keyword, __location__, name="NVIRIAL", &
241 description="Use this many random orientations to compute the second virial coefficient (ENSEMBLE=VIRIAL)", &
242 usage="NVIRIAL {integer}", &
243 default_i_val=1000)
244 CALL section_add_keyword(section, keyword)
245 CALL keyword_release(keyword)
246
247 CALL keyword_create(keyword, __location__, name="ENSEMBLE", &
248 description="Specify the type of simulation", &
249 usage="ENSEMBLE (TRADITIONAL|GEMC_NVT|GEMC_NPT|VIRIAL)", &
250 enum_c_vals=s2a("TRADITIONAL", "GEMC_NVT", "GEMC_NPT", "VIRIAL"), &
252 default_i_val=do_mc_traditional)
253 CALL section_add_keyword(section, keyword)
254 CALL keyword_release(keyword)
255
256 CALL keyword_create(keyword, __location__, name="RESTART_FILE_NAME", &
257 description="Name of the restart file for MC information.", &
258 usage="RESTART_FILE_NAME {filename}", &
259 default_lc_val="")
260 CALL section_add_keyword(section, keyword)
261 CALL keyword_release(keyword)
262
263 CALL keyword_create(keyword, __location__, name="MOVES_FILE_NAME", &
264 description="The file to print the move statistics to.", &
265 usage="MOVES_FILE_NAME {filename}", &
266 default_lc_val="")
267 CALL section_add_keyword(section, keyword)
268 CALL keyword_release(keyword)
269
270 CALL keyword_create(keyword, __location__, name="MOLECULES_FILE_NAME", &
271 description="The file to print the number of molecules to.", &
272 usage="MOLECULES_FILE_NAME {filename}", &
273 default_lc_val="")
274 CALL section_add_keyword(section, keyword)
275 CALL keyword_release(keyword)
276
277 CALL keyword_create(keyword, __location__, name="COORDINATE_FILE_NAME", &
278 description="The file to print the current coordinates to.", &
279 usage="COORDINATE_FILE_NAME {filename}", &
280 default_lc_val="")
281 CALL section_add_keyword(section, keyword)
282 CALL keyword_release(keyword)
283
284 CALL keyword_create(keyword, __location__, name="ENERGY_FILE_NAME", &
285 description="The file to print current energies to.", &
286 usage="ENERGY_FILE_NAME {filename}", &
287 default_lc_val="")
288 CALL section_add_keyword(section, keyword)
289 CALL keyword_release(keyword)
290
291 CALL keyword_create(keyword, __location__, name="DATA_FILE_NAME", &
292 description="The file to print current configurational info to.", &
293 usage="DATA_FILE_NAME {filename}", &
294 default_lc_val="")
295 CALL section_add_keyword(section, keyword)
296 CALL keyword_release(keyword)
297
298 CALL keyword_create(keyword, __location__, name="CELL_FILE_NAME", &
299 description="The file to print current cell length info to.", &
300 usage="CELL_FILE_NAME {filename}", &
301 default_lc_val="")
302 CALL section_add_keyword(section, keyword)
303 CALL keyword_release(keyword)
304
305 CALL keyword_create(keyword, __location__, name="MAX_DISP_FILE_NAME", &
306 description="The file to print current maximum displacement info to.", &
307 usage="MAX_DISP_FILE_NAME {filename}", &
308 default_lc_val="")
309 CALL section_add_keyword(section, keyword)
310 CALL keyword_release(keyword)
311
312 CALL keyword_create(keyword, __location__, name="BOX2_FILE_NAME", &
313 description="For GEMC, the name of the input file for the other box.", &
314 usage="BOX2_FILE_NAME {filename}", &
315 default_lc_val="")
316 CALL section_add_keyword(section, keyword)
317 CALL keyword_release(keyword)
318
319 CALL keyword_create(keyword, __location__, name="PRESSURE", &
320 description="The pressure for NpT simulations, in bar.", &
321 usage="PRESSURE {real}", &
322 type_of_var=real_t)
323 CALL section_add_keyword(section, keyword)
324 CALL keyword_release(keyword)
325
326 CALL keyword_create(keyword, __location__, name="TEMPERATURE", &
327 description="The temperature of the simulation, in Kelvin.", &
328 usage="TEMPERATURE {real}", &
329 type_of_var=real_t)
330 CALL section_add_keyword(section, keyword)
331 CALL keyword_release(keyword)
332
333 CALL keyword_create( &
334 keyword, __location__, name="VIRIAL_TEMPS", &
335 description="The temperatures you wish to compute the virial coefficient for. Only used if ensemble=VIRIAL.", &
336 usage="VIRIAL_TEMPS {real} {real} ... ", &
337 n_var=-1, type_of_var=real_t)
338 CALL section_add_keyword(section, keyword)
339 CALL keyword_release(keyword)
340
341 CALL keyword_create(keyword, __location__, name="DISCRETE_STEP", &
342 description="The size of the discrete volume move step, in angstroms.", &
343 usage="DISCRETE_STEP {real}", &
344 default_r_val=1.0e0_dp)
345 CALL section_add_keyword(section, keyword)
346 CALL keyword_release(keyword)
347
348 CALL keyword_create(keyword, __location__, name="ETA", &
349 description="The free energy bias (in Kelvin) for swapping a molecule of each type into this box.", &
350 usage="ETA {real} {real} ... ", &
351 n_var=-1, type_of_var=real_t)
352 CALL section_add_keyword(section, keyword)
353 CALL keyword_release(keyword)
354
355 CALL keyword_create(keyword, __location__, name="RANDOMTOSKIP", &
356 description="Number of random numbers from the acceptance/rejection stream to skip", &
357 usage="RANDOMTOSKIP {integer}", &
358 default_i_val=0)
359 CALL section_add_keyword(section, keyword)
360 CALL keyword_release(keyword)
361
362 CALL create_avbmc_section(subsection)
363 CALL section_add_subsection(section, subsection)
364 CALL section_release(subsection)
365
366 CALL create_move_prob_section(subsection)
367 CALL section_add_subsection(section, subsection)
368 CALL section_release(subsection)
369
370 CALL create_update_section(subsection)
371 CALL section_add_subsection(section, subsection)
372 CALL section_release(subsection)
373
374 CALL create_max_disp_section(subsection)
375 CALL section_add_subsection(section, subsection)
376 CALL section_release(subsection)
377
378 END SUBROUTINE create_mc_section
379
380! **************************************************************************************************
381!> \brief ...
382!> \param section will contain the AVBMC parameters for MC
383!> \author matt
384! **************************************************************************************************
385 SUBROUTINE create_avbmc_section(section)
386 TYPE(section_type), POINTER :: section
387
388 TYPE(keyword_type), POINTER :: keyword
389
390 cpassert(.NOT. ASSOCIATED(section))
391
392 CALL section_create(section, __location__, name="avbmc", &
393 description="Parameters for Aggregation Volume Bias Monte Carlo (AVBMC) "// &
394 "which explores cluster formation and destruction. "// &
395 "Chen and Siepmann, J. Phys. Chem. B 105, 11275-11282 (2001).", &
396 n_keywords=5, n_subsections=0, repeats=.false.)
397
398 NULLIFY (keyword)
399
400 CALL keyword_create( &
401 keyword, __location__, name="PBIAS", &
402 description="The probability of swapping to an inner region in an AVBMC swap move for each molecule type.", &
403 usage="PBIAS {real} {real} ... ", &
404 n_var=-1, type_of_var=real_t)
405 CALL section_add_keyword(section, keyword)
406 CALL keyword_release(keyword)
407
408 CALL keyword_create(keyword, __location__, name="AVBMC_ATOM", &
409 description="The target atom for an AVBMC swap move for each molecule type.", &
410 usage="AVBMC_ATOM {integer} {integer} ... ", &
411 n_var=-1, type_of_var=integer_t)
412 CALL section_add_keyword(section, keyword)
413 CALL keyword_release(keyword)
414
415 CALL keyword_create(keyword, __location__, name="AVBMC_RMIN", &
416 description="The inner radius for an AVBMC swap move, in angstroms for every molecule type.", &
417 usage="AVBMC_RMIN {real} {real} ... ", &
418 n_var=-1, type_of_var=real_t)
419 CALL section_add_keyword(section, keyword)
420 CALL keyword_release(keyword)
421
422 CALL keyword_create(keyword, __location__, name="AVBMC_RMAX", &
423 description="The outer radius for an AVBMC swap move, in angstroms, for every molecule type.", &
424 usage="AVBMC_RMAX {real} {real} ... ", &
425 n_var=-1, type_of_var=real_t)
426 CALL section_add_keyword(section, keyword)
427 CALL keyword_release(keyword)
428
429 END SUBROUTINE create_avbmc_section
430
431! **************************************************************************************************
432!> \brief ...
433!> \param section will contain the probabilities for attempting each move
434!> type in Monte Carlo
435!> \author matt
436! **************************************************************************************************
437 SUBROUTINE create_move_prob_section(section)
438 TYPE(section_type), POINTER :: section
439
440 TYPE(keyword_type), POINTER :: keyword
441 TYPE(section_type), POINTER :: subsection
442
443 cpassert(.NOT. ASSOCIATED(section))
444
445 CALL section_create(section, __location__, name="move_probabilities", &
446 description="Parameters for fraction of moves performed for each move type.", &
447 n_keywords=5, n_subsections=2, repeats=.false.)
448
449 NULLIFY (keyword, subsection)
450
451 CALL keyword_create(keyword, __location__, name="PMHMC", &
452 description="The probability of attempting a hybrid MC move.", &
453 usage="PMHMC {real}", &
454 type_of_var=real_t, default_r_val=0.0e0_dp)
455 CALL section_add_keyword(section, keyword)
456 CALL keyword_release(keyword)
457
458 CALL keyword_create(keyword, __location__, name="PMTRANS", &
459 description="The probability of attempting a molecule translation.", &
460 usage="PMTRANS {real}", &
461 type_of_var=real_t)
462 CALL section_add_keyword(section, keyword)
463 CALL keyword_release(keyword)
464
465 CALL keyword_create(keyword, __location__, name="PMCLTRANS", &
466 description="The probability of attempting a cluster translation.", &
467 usage="PMCLTRANS {real}", &
468 type_of_var=real_t, default_r_val=0.0e0_dp)
469 CALL section_add_keyword(section, keyword)
470 CALL keyword_release(keyword)
471
472 CALL keyword_create(keyword, __location__, name="PMAVBMC", &
473 description="The probability of attempting an AVBMC swap move.", &
474 usage="PMAVBMC {real}", &
475 default_r_val=0.0e0_dp)
476 CALL section_add_keyword(section, keyword)
477 CALL keyword_release(keyword)
478
479 CALL keyword_create(keyword, __location__, name="PMTRAION", &
480 description="The probability of attempting a conformational change.", &
481 usage="PMTRAION {real}", &
482 type_of_var=real_t)
483 CALL section_add_keyword(section, keyword)
484 CALL keyword_release(keyword)
485
486 CALL keyword_create(keyword, __location__, name="PMSWAP", &
487 description="The probability of attempting a swap move.", &
488 usage="PMSWAP {real}", &
489 type_of_var=real_t, default_r_val=0.0e0_dp)
490 CALL section_add_keyword(section, keyword)
491 CALL keyword_release(keyword)
492
493 CALL keyword_create(keyword, __location__, name="PMVOLUME", &
494 description="The probability of attempting a volume move.", &
495 usage="PMVOLUME {real}", &
496 type_of_var=real_t, default_r_val=0.0e0_dp)
497 CALL section_add_keyword(section, keyword)
498 CALL keyword_release(keyword)
499
500 CALL create_mol_prob_section(subsection)
501 CALL section_add_subsection(section, subsection)
502 CALL section_release(subsection)
503
504 CALL create_box_prob_section(subsection)
505 CALL section_add_subsection(section, subsection)
506 CALL section_release(subsection)
507
508 END SUBROUTINE create_move_prob_section
509
510! **************************************************************************************************
511!> \brief ...
512!> \param section will contain the probabilities for attempting various moves
513!> on the various molecule types present in the system
514!> \author matt
515! **************************************************************************************************
516 SUBROUTINE create_mol_prob_section(section)
517 TYPE(section_type), POINTER :: section
518
519 TYPE(keyword_type), POINTER :: keyword
520
521 cpassert(.NOT. ASSOCIATED(section))
522
523 CALL section_create(section, __location__, name="mol_probabilities", &
524 description="Probabilities of attempting various moves types on "// &
525 "the various molecular types present in the simulation.", &
526 n_keywords=5, n_subsections=0, repeats=.false.)
527
528 NULLIFY (keyword)
529
530 CALL keyword_create(keyword, __location__, name="PMAVBMC_MOL", &
531 description="The probability of attempting an AVBMC swap move on each molecule type.", &
532 usage="PMAVBMC_MOL {real} {real} ... ", &
533 n_var=-1, type_of_var=real_t)
534 CALL section_add_keyword(section, keyword)
535 CALL keyword_release(keyword)
536
537 CALL keyword_create(keyword, __location__, name="PMSWAP_MOL", &
538 description="The probability of attempting a molecule swap of a given molecule type.", &
539 usage="PMSWAP_MOL {real} {real} ... ", &
540 n_var=-1, type_of_var=real_t)
541 CALL section_add_keyword(section, keyword)
542 CALL keyword_release(keyword)
543
544 CALL keyword_create(keyword, __location__, name="PMROT_MOL", &
545 description="The probability of attempting a molecule rotation of a given molecule type.", &
546 usage="PMROT_MOL {real} {real} ... ", &
547 n_var=-1, type_of_var=real_t)
548 CALL section_add_keyword(section, keyword)
549 CALL keyword_release(keyword)
550
551 CALL keyword_create(keyword, __location__, name="PMTRAION_MOL", &
552 description="The probability of attempting a conformational change of a given molecule type.", &
553 usage="PMTRAION_MOL {real} {real} ... ", &
554 n_var=-1, type_of_var=real_t)
555 CALL section_add_keyword(section, keyword)
556 CALL keyword_release(keyword)
557
558 CALL keyword_create(keyword, __location__, name="PMTRANS_MOL", &
559 description="The probability of attempting a molecule translation of a given molecule type.", &
560 usage="PMTRANS_MOL {real} {real} ... ", &
561 n_var=-1, type_of_var=real_t)
562 CALL section_add_keyword(section, keyword)
563 CALL keyword_release(keyword)
564
565 END SUBROUTINE create_mol_prob_section
566
567! **************************************************************************************************
568!> \brief ...
569!> \param section will contain the probabilities for attempting various moves
570!> on the box where the variable is present
571!> \author matt
572! **************************************************************************************************
573 SUBROUTINE create_box_prob_section(section)
574 TYPE(section_type), POINTER :: section
575
576 TYPE(keyword_type), POINTER :: keyword
577
578 cpassert(.NOT. ASSOCIATED(section))
579
580 CALL section_create(section, __location__, name="BOX_PROBABILITIES", &
581 description="Probabilities of attempting various moves types on "// &
582 "the box.", &
583 n_keywords=2, n_subsections=0, repeats=.false.)
584
585 NULLIFY (keyword)
586
587 CALL keyword_create(keyword, __location__, name="PMHMC_BOX", &
588 description="The probability of attempting a HMC move on this box.", &
589 usage="PMHMC_BOX {real}", &
590 type_of_var=real_t, default_r_val=1.0e0_dp)
591 CALL section_add_keyword(section, keyword)
592 CALL keyword_release(keyword)
593
594 CALL keyword_create(keyword, __location__, name="PMVOL_BOX", &
595 description="The probability of attempting a volume move on this box (GEMC_NpT).", &
596 usage="PMVOL_BOX {real}", &
597 type_of_var=real_t, default_r_val=1.0e0_dp)
598 CALL section_add_keyword(section, keyword)
599 CALL keyword_release(keyword)
600
601 CALL keyword_create(keyword, __location__, name="PMCLUS_BOX", &
602 description="The probability of attempting a cluster move in this box", &
603 usage="PMCLUS_BOX {real}", &
604 type_of_var=real_t, default_r_val=1.0e0_dp)
605 CALL section_add_keyword(section, keyword)
606 CALL keyword_release(keyword)
607
608 END SUBROUTINE create_box_prob_section
609
610! **************************************************************************************************
611!> \brief ...
612!> \param section will contain the frequency for updating maximum
613!> displacements for various moves
614!> \author matt
615! **************************************************************************************************
616 SUBROUTINE create_update_section(section)
617 TYPE(section_type), POINTER :: section
618
619 TYPE(keyword_type), POINTER :: keyword
620
621 cpassert(.NOT. ASSOCIATED(section))
622
623 CALL section_create(section, __location__, name="MOVE_UPDATES", &
624 description="Frequency for updating move maximum displacements.", &
625 n_keywords=2, n_subsections=0, repeats=.false.)
626
627 NULLIFY (keyword)
628
629 CALL keyword_create(keyword, __location__, name="IUPVOLUME", &
630 description="Every iupvolume steps update maximum volume displacement.", &
631 usage="IUPVOLUME {integer}", &
632 default_i_val=10000)
633 CALL section_add_keyword(section, keyword)
634 CALL keyword_release(keyword)
635
636 CALL keyword_create(keyword, __location__, name="IUPTRANS", &
637 description="Every iuptrans steps update maximum "// &
638 "translation/rotation/configurational changes.", &
639 usage="IUPTRANS {integer}", &
640 default_i_val=10000)
641 CALL section_add_keyword(section, keyword)
642 CALL keyword_release(keyword)
643
644 CALL keyword_create(keyword, __location__, name="IUPCLTRANS", &
645 description="Every iupcltrans steps update maximum cluster translation.", &
646 usage="IUPCLTRANS {integer}", &
647 default_i_val=10000)
648 CALL section_add_keyword(section, keyword)
649 CALL keyword_release(keyword)
650
651 END SUBROUTINE create_update_section
652
653! **************************************************************************************************
654!> \brief ...
655!> \param section will contain the maximum displacements for various moves
656!> \author matt
657! **************************************************************************************************
658 SUBROUTINE create_max_disp_section(section)
659 TYPE(section_type), POINTER :: section
660
661 TYPE(section_type), POINTER :: subsection
662
663 cpassert(.NOT. ASSOCIATED(section))
664
665 CALL section_create(section, __location__, name="max_displacements", &
666 description="The maximum displacements for all attempted moves.", &
667 n_keywords=1, n_subsections=2, repeats=.false.)
668
669 NULLIFY (subsection)
670
671 CALL create_mol_disp_section(subsection)
672 CALL section_add_subsection(section, subsection)
673 CALL section_release(subsection)
674
675 CALL create_box_disp_section(subsection)
676 CALL section_add_subsection(section, subsection)
677 CALL section_release(subsection)
678
679 END SUBROUTINE create_max_disp_section
680
681! **************************************************************************************************
682!> \brief ...
683!> \param section will contain the maximum displacements for all moves which
684!> require a value for each molecule type
685!> \author matt
686! **************************************************************************************************
687 SUBROUTINE create_mol_disp_section(section)
688 TYPE(section_type), POINTER :: section
689
690 TYPE(keyword_type), POINTER :: keyword
691
692 cpassert(.NOT. ASSOCIATED(section))
693
694 CALL section_create(section, __location__, name="mol_displacements", &
695 description="Maximum displacements for every move type that requires "// &
696 "a value for each molecular type in the simulation.", &
697 n_keywords=5, n_subsections=0, repeats=.false.)
698
699 NULLIFY (keyword)
700
701 CALL keyword_create(keyword, __location__, name="RMBOND", &
702 description="Maximum bond length displacement, in angstroms, for each molecule type.", &
703 usage="RMBOND {real} {real} ... ", &
704 n_var=-1, type_of_var=real_t)
705 CALL section_add_keyword(section, keyword)
706 CALL keyword_release(keyword)
707
708 CALL keyword_create(keyword, __location__, name="RMANGLE", &
709 description="Maximum bond angle displacement, in degrees, for each molecule type.", &
710 usage="RMANGLE {real} {real} ...", &
711 n_var=-1, type_of_var=real_t)
712 CALL section_add_keyword(section, keyword)
713 CALL keyword_release(keyword)
714
715 CALL keyword_create(keyword, __location__, name="RMDIHEDRAL", &
716 description="Maximum dihedral angle distplacement, in degrees, for each molecule type.", &
717 usage="RMDIHEDRAL {real} {real} ... ", &
718 n_var=-1, type_of_var=real_t)
719 CALL section_add_keyword(section, keyword)
720 CALL keyword_release(keyword)
721
722 CALL keyword_create(keyword, __location__, name="RMROT", &
723 description="Maximum rotational displacement, in degrees, for each molecule type.", &
724 usage="RMROT {real} {real} ... ", &
725 n_var=-1, type_of_var=real_t)
726 CALL section_add_keyword(section, keyword)
727 CALL keyword_release(keyword)
728
729 CALL keyword_create(keyword, __location__, name="RMTRANS", &
730 description="Maximum translational displacement, in angstroms, for each molecule type.", &
731 usage="RMTRANS {real} {real} ...", &
732 n_var=-1, type_of_var=real_t)
733 CALL section_add_keyword(section, keyword)
734 CALL keyword_release(keyword)
735
736 END SUBROUTINE create_mol_disp_section
737
738! **************************************************************************************************
739!> \brief ...
740!> \param section will contain the maximum displacements for any move that
741!> is done on each simulation box
742!> \author matt
743! **************************************************************************************************
744 SUBROUTINE create_box_disp_section(section)
745 TYPE(section_type), POINTER :: section
746
747 TYPE(keyword_type), POINTER :: keyword
748
749 cpassert(.NOT. ASSOCIATED(section))
750
751 CALL section_create(section, __location__, name="BOX_DISPLACEMENTS", &
752 description="Maximum displacements for any move that is performed on each"// &
753 " simulation box.", &
754 n_keywords=1, n_subsections=0, repeats=.false.)
755
756 NULLIFY (keyword)
757
758 CALL keyword_create(keyword, __location__, name="RMVOLUME", &
759 description="Maximum volume displacement, in angstrom**3.", &
760 usage="RMVOLUME {real}", &
761 type_of_var=real_t)
762 CALL section_add_keyword(section, keyword)
763 CALL keyword_release(keyword)
764
765 CALL keyword_create(keyword, __location__, name="RMCLTRANS", &
766 description="Maximum translational displacement, in angstroms, for each cluster.", &
767 usage="RMCLTRANS {real}", &
768 default_r_val=1.0e0_dp)
769 CALL section_add_keyword(section, keyword)
770 CALL keyword_release(keyword)
771
772 END SUBROUTINE create_box_disp_section
773
774! **************************************************************************************************
775!> \brief creates the geometry optimization section
776!> \param section the section to be created
777!> \param location ...
778!> \param label ...
779!> \param description ...
780!> \param just_optimizers ...
781!> \param use_model_hessian ...
782!> \par History
783!> 01.2020 keywords related to Space Group Symmetry added [pcazade]
784!> \author teo
785! **************************************************************************************************
786 RECURSIVE SUBROUTINE create_geoopt_section(section, location, label, description, just_optimizers, use_model_hessian)
787 TYPE(section_type), POINTER :: section
788 CHARACTER(LEN=*), INTENT(IN) :: location, label, description
789 LOGICAL, INTENT(IN) :: just_optimizers, use_model_hessian
790
791 TYPE(keyword_type), POINTER :: keyword
792 TYPE(section_type), POINTER :: print_key, subsection
793
794 cpassert(.NOT. ASSOCIATED(section))
795 CALL section_create(section, location=location, name=label, description=description, &
796 n_keywords=1, n_subsections=1, repeats=.false.)
797
798 NULLIFY (keyword)
799 IF (.NOT. just_optimizers) THEN
800 CALL keyword_create(keyword, __location__, name="TYPE", &
801 description="Specify which kind of geometry optimization to perform", &
802 usage="TYPE (MINIMIZATION|TRANSITION_STATE)", &
803 enum_c_vals=s2a("MINIMIZATION", "TRANSITION_STATE"), &
804 enum_desc=s2a("Performs a geometry minimization.", &
805 "Performs a transition state optimization."), &
807 default_i_val=default_minimization_method_id)
808 CALL section_add_keyword(section, keyword)
809 CALL keyword_release(keyword)
810 END IF
811
812 CALL keyword_create( &
813 keyword, __location__, name="OPTIMIZER", &
814 variants=["MINIMIZER"], &
815 citations=[byrd1995], &
816 description="Specify which method to use to perform a geometry optimization.", &
817 usage="OPTIMIZER {BFGS|LBFGS|CG}", &
818 enum_c_vals=s2a("BFGS", "LBFGS", "CG"), &
819 enum_desc=s2a("Most efficient minimizer, but only for 'small' systems, "// &
820 "as it relies on diagonalization of a full Hessian matrix", &
821 "Limited-memory variant of BFGS suitable for large systems. "// &
822 "Not as well fine-tuned but can be more robust.", &
823 "conjugate gradients, robust minimizer (depending on the line search) also OK for large systems"), &
825 default_i_val=default_bfgs_method_id)
826 CALL section_add_keyword(section, keyword)
827 CALL keyword_release(keyword)
828
829 CALL keyword_create(keyword, __location__, name="MAX_ITER", &
830 description="Specifies the maximum number of geometry optimization steps. "// &
831 "One step might imply several force evaluations for the CG and LBFGS optimizers.", &
832 usage="MAX_ITER {integer}", &
833 default_i_val=200)
834 CALL section_add_keyword(section, keyword)
835 CALL keyword_release(keyword)
836
837 CALL keyword_create(keyword, __location__, name="MAX_DR", &
838 description="Convergence criterion for the maximum geometry change "// &
839 "between the current and the last optimizer iteration.", &
840 usage="MAX_DR {real}", &
841 default_r_val=0.0030_dp, unit_str="bohr")
842 CALL section_add_keyword(section, keyword)
843 CALL keyword_release(keyword)
844
845 CALL keyword_create(keyword, __location__, name="MAX_FORCE", &
846 description="Convergence criterion for the maximum force component of the current configuration.", &
847 usage="MAX_FORCE {real}", &
848 default_r_val=0.00045_dp, unit_str="hartree/bohr")
849 CALL section_add_keyword(section, keyword)
850 CALL keyword_release(keyword)
851
852 CALL keyword_create(keyword, __location__, name="RMS_DR", &
853 description="Convergence criterion for the root mean square (RMS) geometry"// &
854 " change between the current and the last optimizer iteration.", &
855 usage="RMS_DR {real}", unit_str="bohr", &
856 default_r_val=0.0015_dp)
857 CALL section_add_keyword(section, keyword)
858 CALL keyword_release(keyword)
859
860 CALL keyword_create(keyword, __location__, name="RMS_FORCE", &
861 description="Convergence criterion for the root mean square (RMS) force of the current configuration.", &
862 usage="RMS_FORCE {real}", unit_str="hartree/bohr", &
863 default_r_val=0.00030_dp)
864 CALL section_add_keyword(section, keyword)
865 CALL keyword_release(keyword)
866
867 CALL keyword_create(keyword, __location__, name="step_start_val", &
868 description="The starting step value for the "//trim(label)//" module.", &
869 usage="step_start_val <integer>", default_i_val=0)
870 CALL section_add_keyword(section, keyword)
871 CALL keyword_release(keyword)
872
873 ! collects keywords related to Space Group Symmetry
874 CALL keyword_create( &
875 keyword, __location__, name="KEEP_SPACE_GROUP", &
876 description="Detect space group of the system and preserve it during optimization. "// &
877 "The space group symmetry is applied to coordinates, forces, and the stress tensor. "// &
878 "It works for supercell. It does not affect/reduce computational cost. "// &
879 "Use EPS_SYMMETRY to adjust the detection threshold.", &
880 usage="KEEP_SPACE_GROUP .TRUE.", &
881 default_l_val=.false., lone_keyword_l_val=.true., repeats=.false.)
882 CALL section_add_keyword(section, keyword)
883 CALL keyword_release(keyword)
884
885 ! collects keywords related to Space Group Symmetry analysis
886 CALL keyword_create( &
887 keyword, __location__, name="SHOW_SPACE_GROUP", &
888 description="Detect and show space group of the system after optimization. "// &
889 "It works for supercell. It does not affect/reduce computational cost. "// &
890 "Use EPS_SYMMETRY to adjust the detection threshold.", &
891 usage="SHOW_SPACE_GROUP .TRUE.", &
892 default_l_val=.false., lone_keyword_l_val=.true., repeats=.false.)
893 CALL section_add_keyword(section, keyword)
894 CALL keyword_release(keyword)
895
896 ! collects keywords related to precision for finding the space group
897 CALL keyword_create( &
898 keyword, __location__, name="EPS_SYMMETRY", &
899 description="Accuracy for space group determination. EPS_SYMMETRY is dimensionless. "// &
900 "Roughly speaking, two scaled (fractional) atomic positions v1, v2 are considered identical if |v1 - v2| < EPS_SYMMETRY. ", &
901 usage="EPS_SYMMETRY {REAL}", &
902 default_r_val=1.e-4_dp, repeats=.false.)
903 CALL section_add_keyword(section, keyword)
904 CALL keyword_release(keyword)
905
906 ! collects keywords related to reduction of symmetry due to an external field
907 CALL keyword_create( &
908 keyword, __location__, name="SYMM_REDUCTION", &
909 description="Direction of the external static electric field. "// &
910 "Some symmetry operations are not compatible with the direction of an electric field. "// &
911 "These operations are used when enforcing the space group.", &
912 usage="SYMM_REDUCTION 0.0 0.0 0.0", &
913 repeats=.false., n_var=3, &
914 type_of_var=real_t, default_r_vals=[0.0_dp, 0.0_dp, 0.0_dp])
915 CALL section_add_keyword(section, keyword)
916 CALL keyword_release(keyword)
917
918 ! collects keywords related to ranges of atoms to symmetrize
919 CALL keyword_create( &
920 keyword, __location__, name="SYMM_EXCLUDE_RANGE", &
921 description="Range of atoms to exclude from space group symmetry. "// &
922 "These atoms are excluded from both identification and enforcement. "// &
923 "This keyword can be repeated.", &
924 repeats=.true., usage="SYMM_EXCLUDE_RANGE {Int} {Int}", type_of_var=integer_t, n_var=2)
925 CALL section_add_keyword(section, keyword)
926 CALL keyword_release(keyword)
927
928 CALL keyword_create( &
929 keyword, __location__, name="SPGR_PRINT_ATOMS", &
930 description="Print equivalent atoms list for each space group symmetry operation.", &
931 default_l_val=.false., lone_keyword_l_val=.true.)
932 CALL section_add_keyword(section, keyword)
933 CALL keyword_release(keyword)
934
935 CALL create_lbfgs_section(subsection)
936 CALL section_add_subsection(section, subsection)
937 CALL section_release(subsection)
938
939 CALL create_cg_section(subsection)
940 CALL section_add_subsection(section, subsection)
941 CALL section_release(subsection)
942
943 CALL create_bfgs_section(subsection, use_model_hessian)
944 CALL section_add_subsection(section, subsection)
945 CALL section_release(subsection)
946
947 IF (.NOT. just_optimizers) THEN
948 ! Transition states section
949 CALL create_ts_section(subsection)
950 CALL section_add_subsection(section, subsection)
951 CALL section_release(subsection)
952
953 ! Create the PRINT subsection
954 NULLIFY (subsection)
955 CALL section_create(subsection, __location__, name="PRINT", &
956 description="Controls the printing properties during a geometry optimization run", &
957 n_keywords=0, n_subsections=1, repeats=.true.)
958 NULLIFY (print_key)
960 print_key, __location__, "program_run_info", &
961 description="Controls the printing of basic information during the Geometry Optimization", &
962 print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
963 CALL section_add_subsection(subsection, print_key)
964 CALL section_release(print_key)
965 CALL section_add_subsection(section, subsection)
966 CALL section_release(subsection)
967 END IF
968
969 END SUBROUTINE create_geoopt_section
970
971! **************************************************************************************************
972!> \brief creates the section for the shell-core optimization
973!> \param section the section to be created
974!> \author Caino
975! **************************************************************************************************
976 SUBROUTINE create_shellcore_opt_section(section)
977 TYPE(section_type), POINTER :: section
978
979 TYPE(section_type), POINTER :: print_key, subsection
980
981 CALL create_geoopt_section( &
982 section, __location__, label="SHELL_OPT", &
983 description="This section sets the environment for the optimization of the shell-core distances"// &
984 " that might turn to be necessary along a MD run using a shell-model potential."// &
985 " The optimization procedure is activated when at least one of the shell-core"// &
986 " pairs becomes too elongated, i.e. when the assumption of point dipole is not longer valid.", &
987 just_optimizers=.true., &
988 use_model_hessian=.false.)
989
990 NULLIFY (print_key, subsection)
991
992 ! Create the PRINT subsection
993 NULLIFY (subsection)
994 CALL section_create(subsection, __location__, name="PRINT", &
995 description="Controls the printing properties during a shell-core optimization procedure", &
996 n_keywords=0, n_subsections=1, repeats=.true.)
997 NULLIFY (print_key)
998 CALL cp_print_key_section_create(print_key, __location__, "program_run_info", &
999 description="Controls the printing of basic information during the Optimization", &
1000 print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
1001 CALL section_add_subsection(subsection, print_key)
1002 CALL section_release(print_key)
1003 CALL section_add_subsection(section, subsection)
1004 CALL section_release(subsection)
1005
1006 END SUBROUTINE create_shellcore_opt_section
1007
1008! **************************************************************************************************
1009!> \brief creates the section for the cell optimization
1010!> \param section the section to be created
1011!> \author Teodoro Laino [tlaino] - University of Zurich - 03.2008
1012! **************************************************************************************************
1013 SUBROUTINE create_cell_opt_section(section)
1014 TYPE(section_type), POINTER :: section
1015
1016 TYPE(keyword_type), POINTER :: keyword
1017 TYPE(section_type), POINTER :: print_key, subsection
1018
1019 CALL create_geoopt_section(section, __location__, label="CELL_OPT", &
1020 description="This section sets the environment for the optimization "// &
1021 "of the simulation cell. As is noted in FORCE_EVAL/SUBSYS/CELL, the "// &
1022 "program convention is that the first cell vector A lies along the "// &
1023 "X-axis and the second cell vector B is in the XY plane, such that "// &
1024 "the cell vector matrix is a lower triangle. There is no complete, "// &
1025 "official algorithm support and/or tests for updating the three "// &
1026 "upper triangular components during a cell optimization; please "// &
1027 "prepare input accordingly with these three components precisely 0 "// &
1028 "even for cases like the primitive rhombohedral cell of the FCC lattice.", &
1029 just_optimizers=.true., use_model_hessian=.false.)
1030
1031 NULLIFY (keyword, print_key, subsection)
1032 CALL keyword_create( &
1033 keyword, __location__, name="TYPE", removed=.true., description="", &
1034 deprecation_notice="The keyword MOTION/CELL_OPT/TYPE has been removed because "// &
1035 "cell optimizations now always use DIRECT_CELL_OPT.", &
1036 enum_c_vals=s2a("DIRECT_CELL_OPT", "GEO_OPT", "MD"), &
1037 enum_i_vals=[1, 2, 3], default_i_val=1)
1038 CALL section_add_keyword(section, keyword)
1039 CALL keyword_release(keyword)
1040
1041 CALL keyword_create( &
1042 keyword, __location__, name="EXTERNAL_PRESSURE", &
1043 description="Specifies the external pressure (1 value or the full 9 components of the pressure tensor) "// &
1044 "applied during the cell optimization.", &
1045 usage="EXTERNAL_PRESSURE {REAL} .. {REAL}", unit_str="bar", &
1046 default_r_vals=[cp_unit_to_cp2k(100.0_dp, "bar"), 0.0_dp, 0.0_dp, &
1047 0.0_dp, cp_unit_to_cp2k(100.0_dp, "bar"), 0.0_dp, &
1048 0.0_dp, 0.0_dp, cp_unit_to_cp2k(100.0_dp, "bar")], n_var=-1)
1049 CALL section_add_keyword(section, keyword)
1050 CALL keyword_release(keyword)
1051
1052 CALL keyword_create(keyword, __location__, name="KEEP_VOLUME", &
1053 description="Keep the volume of the cell constant during cell optimization. "// &
1054 "This is implemented by comparing the cell volumes and scaling the new "// &
1055 "cell vectors just before updating the cell information, and can be "// &
1056 "used together with KEEP_ANGLES or KEEP_SYMMETRY.", &
1057 usage="KEEP_VOLUME TRUE", default_l_val=.false., lone_keyword_l_val=.true.)
1058 CALL section_add_keyword(section, keyword)
1059 CALL keyword_release(keyword)
1060
1061 CALL keyword_create(keyword, __location__, name="KEEP_ANGLES", &
1062 description="Keep angles between the cell vectors constant, but "// &
1063 "allow the lengths of the cell vectors to change independently "// &
1064 "during cell optimization. This is implemented by projecting out "// &
1065 "the components of angles in the cell gradient before the cell "// &
1066 "is updated. Albeit general, this is most useful for triclinic "// &
1067 "cells; to enforce higher symmetry, see KEEP_SYMMETRY.", &
1068 usage="KEEP_ANGLES TRUE", default_l_val=.false., lone_keyword_l_val=.true.)
1069 CALL section_add_keyword(section, keyword)
1070 CALL keyword_release(keyword)
1071
1072 CALL keyword_create(keyword, __location__, name="KEEP_SYMMETRY", &
1073 description="Keep the requested initial cell symmetry as specified "// &
1074 "in the FORCE_EVAL/SUBSYS/CELL section during cell optimization. "// &
1075 "This is implemented by removing symmetry-breaking components and "// &
1076 "taking averages of components if necessary in the cell gradient "// &
1077 "before the cell is updated. To enforce the space group (which "// &
1078 "requires spglib package), see KEEP_SPACE_GROUP.", &
1079 usage="KEEP_SYMMETRY TRUE", default_l_val=.false., lone_keyword_l_val=.true.)
1080 CALL section_add_keyword(section, keyword)
1081 CALL keyword_release(keyword)
1082
1083 CALL keyword_create( &
1084 keyword, __location__, name="CONSTRAINT", &
1085 description="Imposes a constraint on the pressure tensor by fixing the specified cell components.", &
1086 usage="CONSTRAINT (none|x|y|z|xy|xz|yz)", &
1087 enum_desc=s2a("Fix nothing", &
1088 "Fix only x component", &
1089 "Fix only y component", &
1090 "Fix only z component", &
1091 "Fix x and y component", &
1092 "Fix x and z component", &
1093 "Fix y and z component"), &
1094 enum_c_vals=s2a("NONE", "X", "Y", "Z", "XY", "XZ", "YZ"), &
1095 enum_i_vals=[fix_none, fix_x, fix_y, fix_z, fix_xy, fix_xz, fix_yz], &
1096 default_i_val=fix_none)
1097 CALL section_add_keyword(section, keyword)
1098 CALL keyword_release(keyword)
1099
1100 CALL keyword_create(keyword, __location__, name="PRESSURE_TOLERANCE", &
1101 description="Specifies the Pressure tolerance (compared to the external pressure) to achieve "// &
1102 "during the cell optimization.", &
1103 usage="PRESSURE_TOLERANCE {REAL}", unit_str="bar", &
1104 default_r_val=cp_unit_to_cp2k(100.0_dp, "bar"))
1105 CALL section_add_keyword(section, keyword)
1106 CALL keyword_release(keyword)
1107
1108 ! Create the PRINT subsection
1109 NULLIFY (subsection)
1110 CALL section_create(subsection, __location__, name="PRINT", &
1111 description="Controls the printing properties during a geometry optimization run", &
1112 n_keywords=0, n_subsections=1, repeats=.true.)
1113 NULLIFY (print_key)
1114 CALL cp_print_key_section_create(print_key, __location__, "program_run_info", &
1115 description="Controls the printing of basic information during the Geometry Optimization", &
1116 print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
1117 CALL section_add_subsection(subsection, print_key)
1118 CALL section_release(print_key)
1119 CALL cp_print_key_section_create(print_key, __location__, "cell", &
1120 description="Controls the printing of the cell eveytime a calculation using a new cell is started.", &
1121 print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__", &
1122 unit_str="angstrom")
1123 CALL section_add_subsection(subsection, print_key)
1124 CALL section_release(print_key)
1125 CALL section_add_subsection(section, subsection)
1126 CALL section_release(subsection)
1127
1128 END SUBROUTINE create_cell_opt_section
1129
1130! **************************************************************************************************
1131!> \brief creates the section for tuning transition states search
1132!> \param section the section to be created
1133!> \author Teodoro Laino [tlaino] - University of Zurich - 01.2008
1134! **************************************************************************************************
1135 SUBROUTINE create_ts_section(section)
1136 TYPE(section_type), POINTER :: section
1137
1138 TYPE(keyword_type), POINTER :: keyword
1139 TYPE(section_type), POINTER :: print_key, subsection, subsection2, &
1140 subsection3
1141
1142! Create the Transition State subsection
1143
1144 NULLIFY (section, keyword, subsection, subsection2)
1145 CALL section_create(section, __location__, name="TRANSITION_STATE", &
1146 description="Specifies parameters to perform a transition state search", &
1147 n_keywords=0, n_subsections=1, repeats=.false.)
1148
1149 CALL keyword_create(keyword, __location__, name="METHOD", &
1150 description="Specify which kind of method to use for locating transition states", &
1151 citations=[henkelman1999], &
1152 usage="METHOD (DIMER)", &
1153 enum_c_vals=s2a("DIMER"), &
1154 enum_desc=s2a("Uses the dimer method to optimize transition states."), &
1155 enum_i_vals=[default_dimer_method_id], &
1156 default_i_val=default_dimer_method_id)
1157 CALL section_add_keyword(section, keyword)
1158 CALL keyword_release(keyword)
1159
1160 CALL section_create(subsection, __location__, name="DIMER", &
1161 description="Specifies parameters for Dimer Method", &
1162 n_keywords=0, n_subsections=1, repeats=.false.)
1163
1164 CALL keyword_create(keyword, __location__, name="DR", &
1165 description="This keyword sets the value for the DR parameter.", &
1166 usage="DR {real}", unit_str='angstrom', &
1167 default_r_val=cp_unit_to_cp2k(0.01_dp, "angstrom"))
1168 CALL section_add_keyword(subsection, keyword)
1169 CALL keyword_release(keyword)
1170
1171 CALL keyword_create(keyword, __location__, name="INITIALIZATION_METHOD", &
1172 description="Specify the initialization method of the dimer vector, "// &
1173 "which is crucial for converging to the desired transition state. "// &
1174 "If the DIMER_VECTOR section is defined explicitly, it will always "// &
1175 "be parsed directly (e.g. in restart files); INITIALIZATION_METHOD "// &
1176 "is only effective if the DIMER_VECTOR section is not explicit.", &
1177 usage="INITIALIZATION_METHOD (RANDOM|MOLDEN)", &
1178 enum_desc=s2a("Generate the initial dimer vector randomly. This is "// &
1179 "the default for backwards compatibility; in practice "// &
1180 "it may distort the structure and slow down convergence.", &
1181 "Generate the initial dimer vector from one or more "// &
1182 "vibrational normal modes as read from a MOLDEN file "// &
1183 "produced by `VIBRATIONAL_ANALYSIS%PRINT%MOLDEN_VIB` "// &
1184 "in a vibrational analysis task. Requires setting up "// &
1185 "keywords `VIB_MOLDEN_NAME`, `VIB_INDEX` and `VIB_WEIGHT`."), &
1186 enum_c_vals=s2a("RANDOM", "MOLDEN"), &
1187 enum_i_vals=[dimer_init_random, dimer_init_molden], &
1188 default_i_val=dimer_init_random)
1189 CALL section_add_keyword(subsection, keyword)
1190 CALL keyword_release(keyword)
1191
1192 CALL keyword_create(keyword, __location__, name="VIB_MOLDEN_NAME", &
1193 description="The external molden file containing vibrational "// &
1194 "normal modes for `INITIALIZATION_METHOD MOLDEN`.", &
1195 usage="VIB_MOLDEN_NAME <CHARACTER>", type_of_var=lchar_t)
1196 CALL section_add_keyword(subsection, keyword)
1197 CALL keyword_release(keyword)
1198
1199 CALL keyword_create(keyword, __location__, name="VIB_INDEX", &
1200 description="The index of one or more vibrational normal modes "// &
1201 "from the file whose linear combination will form the initial "// &
1202 "dimer vector.", &
1203 usage="VIB_INDEX {integer} {integer} .. {integer}", repeats=.true., &
1204 n_var=-1, default_i_vals=[1], type_of_var=integer_t)
1205 CALL section_add_keyword(subsection, keyword)
1206 CALL keyword_release(keyword)
1207
1208 CALL keyword_create(keyword, __location__, name="VIB_WEIGHT", &
1209 description="The weight of one or more vibrational normal modes "// &
1210 "from the file whose linear combination will form the initial "// &
1211 "dimer vector.", &
1212 usage="VIB_WEIGHT {real} {real} .. {real}", repeats=.true., &
1213 n_var=-1, default_r_vals=[1.0_dp], type_of_var=real_t)
1214 CALL section_add_keyword(subsection, keyword)
1215 CALL keyword_release(keyword)
1216
1217 CALL keyword_create(keyword, __location__, name="INTERPOLATE_GRADIENT", &
1218 description="This keyword controls the interpolation of the gradient whenever possible"// &
1219 " during the optimization of the Dimer. The use of this keywords saves 1 evaluation"// &
1220 " of energy/forces.", usage="INTERPOLATE_GRADIENT {logical}", default_l_val=.true., &
1221 lone_keyword_l_val=.true.)
1222 CALL section_add_keyword(subsection, keyword)
1223 CALL keyword_release(keyword)
1224
1225 CALL keyword_create(keyword, __location__, name="ANGLE_TOLERANCE", &
1226 description="This keyword sets the value of the tolerance angle for the line search"// &
1227 " performed to optimize the orientation of the dimer.", &
1228 usage="ANGLE_TOLERANCE {real}", unit_str='rad', &
1229 default_r_val=cp_unit_to_cp2k(5.0_dp, "deg"))
1230 CALL section_add_keyword(subsection, keyword)
1231 CALL keyword_release(keyword)
1232
1233 CALL keyword_create(keyword, __location__, name="K-DIMER", &
1234 description="This keyword activates the constrained k-dimer translation"// &
1235 " J. Chem. Phys. 141, 164111 (2014).", &
1236 citations=[henkelman2014], &
1237 usage="K-DIMER {logica}", &
1238 default_l_val=.false., &
1239 lone_keyword_l_val=.false.)
1240 CALL section_add_keyword(subsection, keyword)
1241 CALL keyword_release(keyword)
1242
1243 CALL keyword_create(keyword, __location__, name="BETA", &
1244 description="Exponential factor for the switching function used in K-DIMER", &
1245 usage="BETA {real}", &
1246 default_r_val=5.0_dp, &
1247 lone_keyword_r_val=5.0_dp)
1248 CALL section_add_keyword(subsection, keyword)
1249 CALL keyword_release(keyword)
1250
1251 CALL create_geoopt_section( &
1252 subsection2, __location__, label="ROT_OPT", &
1253 description="This section sets the environment for the optimization of the rotation of the Dimer.", &
1254 just_optimizers=.true., &
1255 use_model_hessian=.false.)
1256 NULLIFY (subsection3)
1257 CALL section_create(subsection3, __location__, name="PRINT", &
1258 description="Controls the printing properties during the dimer rotation optimization run", &
1259 n_keywords=0, n_subsections=1, repeats=.true.)
1260 NULLIFY (print_key)
1261
1262 CALL cp_print_key_section_create(print_key, __location__, "PROGRAM_RUN_INFO", &
1263 description="Controls the printing of basic information during the Geometry Optimization", &
1264 print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
1265 CALL section_add_subsection(subsection3, print_key)
1266 CALL section_release(print_key)
1267
1268 CALL cp_print_key_section_create(print_key, __location__, "ROTATIONAL_INFO", &
1269 description="Controls the printing basic info during the cleaning of the "// &
1270 "rotational degrees of freedom.", print_level=low_print_level, &
1271 add_last=add_last_numeric, filename="__STD_OUT__")
1272 CALL keyword_create(keyword, __location__, name="COORDINATES", &
1273 description="Prints atomic coordinates after rotation", &
1274 default_l_val=.false., lone_keyword_l_val=.true.)
1275 CALL section_add_keyword(print_key, keyword)
1276 CALL keyword_release(keyword)
1277 CALL section_add_subsection(subsection3, print_key)
1278 CALL section_release(print_key)
1279
1280 CALL section_add_subsection(subsection2, subsection3)
1281 CALL section_release(subsection3)
1282 CALL section_add_subsection(subsection, subsection2)
1283 CALL section_release(subsection2)
1284
1285 CALL section_create(subsection2, __location__, name="DIMER_VECTOR", &
1286 description="Specifies the initial dimer vector. This "// &
1287 "section overrides INITIALIZATION_METHOD, and will be "// &
1288 "updated on each step for producing the restart files.", &
1289 n_keywords=0, n_subsections=1, repeats=.false.)
1290 CALL keyword_create(keyword, __location__, name="_DEFAULT_KEYWORD_", &
1291 description="Specify on each line the components of the dimer vector.", repeats=.true., &
1292 usage="{Real} {Real} {Real}", type_of_var=real_t, n_var=-1)
1293 CALL section_add_keyword(subsection2, keyword)
1294 CALL keyword_release(keyword)
1295 CALL section_add_subsection(subsection, subsection2)
1296 CALL section_release(subsection2)
1297
1298 CALL section_add_subsection(section, subsection)
1299 CALL section_release(subsection)
1300
1301 END SUBROUTINE create_ts_section
1302
1303! **************************************************************************************************
1304!> \brief creates the BFGS section
1305!> \param section the section to be created
1306!> \param use_model_hessian ...
1307!> \author Teodoro Laino [tlaino] - University of Zurich - 01.2008
1308! **************************************************************************************************
1309 SUBROUTINE create_bfgs_section(section, use_model_hessian)
1310 TYPE(section_type), POINTER :: section
1311 LOGICAL, INTENT(IN) :: use_model_hessian
1312
1313 TYPE(keyword_type), POINTER :: keyword
1314 TYPE(section_type), POINTER :: print_key
1315
1316! create the BFGS subsection
1317
1318 NULLIFY (section, keyword, print_key)
1319 CALL section_create(section, __location__, name="BFGS", &
1320 description="Provides parameters to tune the BFGS optimization", &
1321 n_keywords=0, n_subsections=1, repeats=.false.)
1322
1323 CALL keyword_create(keyword, __location__, name="TRUST_RADIUS", &
1324 description="Trust radius used in BFGS. Previously set to 0.1. "// &
1325 "Large values can lead to instabilities", &
1326 usage="TRUST_RADIUS {real}", unit_str='angstrom', &
1327 default_r_val=cp_unit_to_cp2k(0.25_dp, "angstrom"))
1328 CALL section_add_keyword(section, keyword)
1329 CALL keyword_release(keyword)
1330
1331 CALL keyword_create(keyword, __location__, name="USE_MODEL_HESSIAN", &
1332 description="Uses a model Hessian as initial guess instead of a unit matrix."// &
1333 " Should lead in general to improved convergence might be switched off for exotic cases", &
1334 usage="USE_MODEL_HESSIAN", &
1335 citations=[lindh1995], &
1336 default_l_val=use_model_hessian, lone_keyword_l_val=.true.)
1337 CALL section_add_keyword(section, keyword)
1338 CALL keyword_release(keyword)
1339
1340 CALL keyword_create(keyword, __location__, name="USE_RAT_FUN_OPT", &
1341 description="Includes a rational function optimization to determine the step."// &
1342 " Previously default but did not improve convergence in many cases", &
1343 usage="USE_RAT_FUN_OPT", &
1344 default_l_val=.false., lone_keyword_l_val=.true.)
1345 CALL section_add_keyword(section, keyword)
1346 CALL keyword_release(keyword)
1347
1348 CALL keyword_create(keyword, __location__, name="RESTART_HESSIAN", &
1349 description="Controls the reading of the initial Hessian from file.", &
1350 usage="RESTART_HESSIAN", &
1351 default_l_val=.false., lone_keyword_l_val=.true.)
1352 CALL section_add_keyword(section, keyword)
1353 CALL keyword_release(keyword)
1354
1355 CALL keyword_create(keyword, __location__, name="RESTART_FILE_NAME", &
1356 description="Specifies the name of the file used to read the initial Hessian.", &
1357 usage="RESTART_FILE_NAME {filename}", &
1358 default_lc_val="")
1359 CALL section_add_keyword(section, keyword)
1360 CALL keyword_release(keyword)
1361
1362 CALL cp_print_key_section_create(print_key, __location__, "RESTART", &
1363 description="Controls the printing of Hessian Restart file", &
1364 print_level=low_print_level, add_last=add_last_numeric, filename="BFGS", &
1365 common_iter_levels=2)
1366 CALL section_add_subsection(section, print_key)
1367 CALL section_release(print_key)
1368
1369 END SUBROUTINE create_bfgs_section
1370
1371! **************************************************************************************************
1372!> \brief creates the CG section
1373!> \param section the section to be created
1374!> \author Teodoro Laino [tlaino] - University of Zurich - 01.2008
1375! **************************************************************************************************
1376 SUBROUTINE create_cg_section(section)
1377 TYPE(section_type), POINTER :: section
1378
1379 TYPE(keyword_type), POINTER :: keyword
1380 TYPE(section_type), POINTER :: subsection, subsubsection
1381
1382! create the CG subsection
1383
1384 NULLIFY (section, subsection, subsubsection, keyword)
1385 CALL section_create(section, __location__, name="CG", &
1386 description="Provides parameters to tune the conjugate gradient optimization", &
1387 n_keywords=0, n_subsections=1, repeats=.false.)
1388
1389 CALL keyword_create(keyword, __location__, name="MAX_STEEP_STEPS", &
1390 description="Maximum number of steepest descent steps before starting the"// &
1391 " conjugate gradients optimization.", &
1392 usage="MAX_STEEP_STEPS {integer}", &
1393 default_i_val=0)
1394 CALL section_add_keyword(section, keyword)
1395 CALL keyword_release(keyword)
1396
1397 CALL keyword_create(keyword, __location__, name="RESTART_LIMIT", &
1398 description="Cosine of the angle between two consecutive searching directions."// &
1399 " If the angle during a CG optimization is less than the one corresponding to"// &
1400 " to the RESTART_LIMIT the CG is reset and one step of steepest descent is"// &
1401 " performed.", &
1402 usage="RESTART_LIMIT {real}", &
1403 default_r_val=0.9_dp)
1404 CALL section_add_keyword(section, keyword)
1405 CALL keyword_release(keyword)
1406
1407 CALL keyword_create(keyword, __location__, name="FLETCHER_REEVES", &
1408 description="Uses FLETCHER-REEVES instead of POLAK-RIBIERE when using Conjugate Gradients", &
1409 usage="FLETCHER_REEVES", &
1410 default_l_val=.false., lone_keyword_l_val=.true.)
1411 CALL section_add_keyword(section, keyword)
1412 CALL keyword_release(keyword)
1413
1414 ! Line Search section
1415 CALL section_create(subsection, __location__, name="LINE_SEARCH", &
1416 description="Provides parameters to tune the line search during the conjugate gradient optimization", &
1417 n_keywords=0, n_subsections=1, repeats=.false.)
1418
1419 CALL keyword_create(keyword, __location__, name="TYPE", &
1420 description="1D line search algorithm to be used with the CG optimizer,"// &
1421 " in increasing order of robustness and cost. ", &
1422 usage="TYPE GOLD", &
1423 default_i_val=ls_gold, &
1424 enum_c_vals=s2a("2PNT", "GOLD", "FIT"), &
1425 enum_desc=s2a("extrapolate based on 2 points", &
1426 "perform 1D golden section search of the minimum (very expensive)", &
1427 "perform 1D fit of a parabola on several evaluation of energy "// &
1428 "(very expensive and more robust vs numerical noise)"), &
1429 enum_i_vals=[ls_2pnt, ls_gold, ls_fit])
1430 CALL section_add_keyword(subsection, keyword)
1431 CALL keyword_release(keyword)
1432
1433 ! 2PNT
1434 NULLIFY (subsubsection)
1435 CALL section_create(subsubsection, __location__, name="2PNT", &
1436 description="Provides parameters to tune the line search for the two point based line search.", &
1437 n_keywords=0, n_subsections=1, repeats=.false.)
1438
1439 CALL keyword_create(keyword, __location__, name="MAX_ALLOWED_STEP", &
1440 description="Max allowed value for the line search step.", &
1441 usage="MAX_ALLOWED_STEP {real}", unit_str="internal_cp2k", &
1442 default_r_val=0.25_dp)
1443 CALL section_add_keyword(subsubsection, keyword)
1444 CALL keyword_release(keyword)
1445
1446 CALL keyword_create( &
1447 keyword, __location__, name="LINMIN_GRAD_ONLY", &
1448 description="Use only the gradient, not the energy for line minimizations (e.g. in conjugate gradients).", &
1449 usage="LINMIN_GRAD_ONLY T", &
1450 default_l_val=.false., lone_keyword_l_val=.true.)
1451 CALL section_add_keyword(subsubsection, keyword)
1452 CALL keyword_release(keyword)
1453
1454 CALL section_add_subsection(subsection, subsubsection)
1455 CALL section_release(subsubsection)
1456
1457 ! GOLD
1458 NULLIFY (subsubsection)
1459 CALL section_create(subsubsection, __location__, name="GOLD", &
1460 description="Provides parameters to tune the line search for the gold search.", &
1461 n_keywords=0, n_subsections=1, repeats=.false.)
1462
1463 CALL keyword_create(keyword, __location__, name="INITIAL_STEP", &
1464 description="Initial step size used, e.g. for bracketing or minimizers. "// &
1465 "Might need to be reduced for systems with close contacts", &
1466 usage="INITIAL_STEP {real}", unit_str="internal_cp2k", &
1467 default_r_val=0.2_dp)
1468 CALL section_add_keyword(subsubsection, keyword)
1469 CALL keyword_release(keyword)
1470
1471 CALL keyword_create(keyword, __location__, name="BRACK_LIMIT", &
1472 description="Limit in 1D bracketing during line search in Conjugate Gradients Optimization.", &
1473 usage="BRACK_LIMIT {real}", unit_str="internal_cp2k", &
1474 default_r_val=100.0_dp)
1475 CALL section_add_keyword(subsubsection, keyword)
1476 CALL keyword_release(keyword)
1477
1478 CALL keyword_create(keyword, __location__, name="BRENT_TOL", &
1479 description="Tolerance requested during Brent line search in Conjugate Gradients Optimization.", &
1480 usage="BRENT_TOL {real}", unit_str="internal_cp2k", &
1481 default_r_val=0.01_dp)
1482 CALL section_add_keyword(subsubsection, keyword)
1483 CALL keyword_release(keyword)
1484
1485 CALL keyword_create(keyword, __location__, name="BRENT_MAX_ITER", &
1486 description="Maximum number of iterations in brent algorithm "// &
1487 "(used for the line search in Conjugated Gradients Optimization)", &
1488 usage="BRENT_MAX_ITER {integer}", &
1489 default_i_val=100)
1490 CALL section_add_keyword(subsubsection, keyword)
1491 CALL keyword_release(keyword)
1492 CALL section_add_subsection(subsection, subsubsection)
1493 CALL section_release(subsubsection)
1494
1495 CALL section_add_subsection(section, subsection)
1496 CALL section_release(subsection)
1497 END SUBROUTINE create_cg_section
1498
1499! **************************************************************************************************
1500!> \brief creates the LBFGS section
1501!> \param section the section to be created
1502!> \author Teodoro Laino [tlaino] - University of Zurich - 01.2008
1503! **************************************************************************************************
1504 SUBROUTINE create_lbfgs_section(section)
1505 TYPE(section_type), POINTER :: section
1506
1507 TYPE(keyword_type), POINTER :: keyword
1508
1509! create the LBFGS section
1510
1511 NULLIFY (section, keyword)
1512 CALL section_create(section, __location__, name="LBFGS", &
1513 description="Provides parameters to tune the limited memory BFGS (LBFGS) optimization", &
1514 n_keywords=0, n_subsections=1, repeats=.false., &
1515 citations=[byrd1995])
1516
1517 CALL keyword_create(keyword, __location__, name="MAX_H_RANK", &
1518 description="Maximum rank (and consequently size) of the "// &
1519 "approximate Hessian matrix used by the LBFGS optimizer. "// &
1520 "Larger values (e.g. 30) will accelerate the convergence behaviour "// &
1521 "at the cost of a larger memory consumption.", &
1522 usage="MAX_H_RANK {integer}", &
1523 default_i_val=5)
1524 CALL section_add_keyword(section, keyword)
1525 CALL keyword_release(keyword)
1526
1527 CALL keyword_create(keyword, __location__, name="MAX_F_PER_ITER", &
1528 description="Maximum number of force evaluations per iteration"// &
1529 " (used for the line search)", &
1530 usage="MAX_F_PER_ITER {integer}", &
1531 default_i_val=20)
1532 CALL section_add_keyword(section, keyword)
1533 CALL keyword_release(keyword)
1534
1535 CALL keyword_create(keyword, __location__, name="PRINT_LEVEL", &
1536 description="How much output is written out by the LBFGS algorithm. "// &
1537 "Currently this is independent of the &GLOBAL/PRINT_LEVEL setting.", &
1538 usage="PRINT_LEVEL MEDIUM", &
1539 enum_c_vals=s2a("SILENT", "LOW", "MEDIUM", "HIGH", "DEBUG"), &
1540 enum_desc=s2a("Almost no output", &
1541 "Little output about f and |proj g| every iteration", &
1542 "Quite some output about details every iteration", &
1543 "Lots of output about changes of active set and final x", &
1544 "Everything is written out, useful for debugging purposes only"), &
1545 enum_i_vals=[silent_lbfgs, low_lbfgs, medium_lbfgs, &
1547 default_i_val=low_print_level)
1548 CALL section_add_keyword(section, keyword)
1549 CALL keyword_release(keyword)
1550
1551 CALL keyword_create(keyword, __location__, name="WANTED_PROJ_GRADIENT", &
1552 description="Convergence criterion (overrides the general ones):"// &
1553 " Requested norm threshold of the gradient multiplied"// &
1554 " by the approximate Hessian.", &
1555 usage="WANTED_PROJ_GRADIENT {real}", unit_str="internal_cp2k", &
1556 default_r_val=1.0e-16_dp)
1557 CALL section_add_keyword(section, keyword)
1558 CALL keyword_release(keyword)
1559
1560 CALL keyword_create(keyword, __location__, name="WANTED_REL_F_ERROR", &
1561 description="Convergence criterion (overrides the general ones):"// &
1562 " Requested relative error on the objective function"// &
1563 " of the optimizer (the energy)", &
1564 usage="WANTED_REL_F_ERROR {real}", unit_str="internal_cp2k", &
1565 default_r_val=1.0e-16_dp)
1566 CALL section_add_keyword(section, keyword)
1567 CALL keyword_release(keyword)
1568
1569 CALL keyword_create( &
1570 keyword, __location__, name="TRUST_RADIUS", &
1571 description="Trust radius used in LBFGS. Not completely in depth tested. Negativ values means no trust radius is used.", &
1572 usage="TRUST_RADIUS {real}", unit_str='angstrom', &
1573 default_r_val=-1.0_dp)
1574 CALL section_add_keyword(section, keyword)
1575 CALL keyword_release(keyword)
1576
1577 CALL keyword_create(keyword, __location__, name="__CONTROL_VAL", &
1578 description="Hidden parameter that controls the printing behavior "// &
1579 "of the LBFGS optimizer for advanced debug purposes. This option "// &
1580 "overrides PRINT_LEVEL setting if explicit.", &
1581 default_i_val=-1)
1582 CALL section_add_keyword(section, keyword)
1583 CALL keyword_release(keyword)
1584
1585 END SUBROUTINE create_lbfgs_section
1586
1587! **************************************************************************************************
1588!> \brief creates the flexible_partitioning section
1589!> \param section the section to be created
1590!> \author Joost VandeVondele [04.2006]
1591! **************************************************************************************************
1592 SUBROUTINE create_fp_section(section)
1593 TYPE(section_type), POINTER :: section
1594
1595 TYPE(keyword_type), POINTER :: keyword
1596 TYPE(section_type), POINTER :: print_key
1597
1598 cpassert(.NOT. ASSOCIATED(section))
1599 CALL section_create(section, __location__, name="FLEXIBLE_PARTITIONING", &
1600 description="This section sets up flexible_partitioning", &
1601 n_keywords=1, n_subsections=1, repeats=.false.)
1602
1603 NULLIFY (keyword, print_key)
1604
1605 CALL keyword_create(keyword, __location__, name="CENTRAL_ATOM", &
1606 description="Specifies the central atom.", &
1607 usage="CENTRAL_ATOM {integer}", &
1608 n_var=1, type_of_var=integer_t)
1609 CALL section_add_keyword(section, keyword)
1610 CALL keyword_release(keyword)
1611
1612 CALL keyword_create(keyword, __location__, name="INNER_ATOMS", &
1613 description="Specifies the list of atoms that should remain close to the central atom.", &
1614 usage="INNER_ATOMS {integer} {integer} .. {integer}", &
1615 n_var=-1, type_of_var=integer_t)
1616 CALL section_add_keyword(section, keyword)
1617 CALL keyword_release(keyword)
1618
1619 CALL keyword_create(keyword, __location__, name="OUTER_ATOMS", &
1620 description="Specifies the list of atoms that should remain far from the central atom.", &
1621 usage="OUTER_ATOMS {integer} {integer} .. {integer}", &
1622 n_var=-1, type_of_var=integer_t)
1623 CALL section_add_keyword(section, keyword)
1624 CALL keyword_release(keyword)
1625
1626 CALL keyword_create(keyword, __location__, name="INNER_RADIUS", &
1627 description="radius of the inner wall", &
1628 usage="INNER_RADIUS {real} ", type_of_var=real_t, &
1629 n_var=1, unit_str="angstrom")
1630 CALL section_add_keyword(section, keyword)
1631 CALL keyword_release(keyword)
1632
1633 CALL keyword_create(keyword, __location__, name="OUTER_RADIUS", &
1634 description="radius of the outer wall", &
1635 usage="OUTER_RADIUS {real} ", type_of_var=real_t, &
1636 n_var=1, unit_str="angstrom")
1637 CALL section_add_keyword(section, keyword)
1638 CALL keyword_release(keyword)
1639
1640 CALL keyword_create(keyword, __location__, name="STRENGTH", &
1641 description="Sets the force constant of the repulsive harmonic potential", &
1642 usage="STRENGTH 1.0", default_r_val=1.0_dp)
1643 CALL section_add_keyword(section, keyword)
1644 CALL keyword_release(keyword)
1645
1646 CALL keyword_create(keyword, __location__, name="BIAS", &
1647 description="If a bias potential counter-acting the weight term should be applied (recommended).", &
1648 usage="BIAS F", default_l_val=.true., lone_keyword_l_val=.true.)
1649 CALL section_add_keyword(section, keyword)
1650 CALL keyword_release(keyword)
1651
1652 CALL keyword_create(keyword, __location__, name="TEMPERATURE", &
1653 description="Sets the temperature parameter that is used in the baising potential."// &
1654 " It is recommended to use the actual simulation temperature", &
1655 usage="TEMPERATURE 300", default_r_val=300.0_dp, unit_str='K')
1656 CALL section_add_keyword(section, keyword)
1657 CALL keyword_release(keyword)
1658
1659 CALL keyword_create(keyword, __location__, name="SMOOTH_WIDTH", &
1660 description="Sets the width of the smooth counting function.", &
1661 usage="SMOOTH_WIDTH 0.2", default_r_val=0.02_dp, unit_str='angstrom')
1662 CALL section_add_keyword(section, keyword)
1663 CALL keyword_release(keyword)
1664
1665 CALL cp_print_key_section_create(print_key, __location__, "WEIGHTS", &
1666 description="Controls the printing of FP info during flexible partitioning simulations.", &
1667 print_level=low_print_level, common_iter_levels=1, &
1668 filename="FLEXIBLE_PARTIONING")
1669 CALL section_add_subsection(section, print_key)
1670 CALL section_release(print_key)
1671
1672 CALL cp_print_key_section_create(print_key, __location__, "CONTROL", &
1673 description="Controls the printing of FP info at startup", &
1674 print_level=low_print_level, common_iter_levels=1, &
1675 filename="__STD_OUT__")
1676 CALL section_add_subsection(section, print_key)
1677 CALL section_release(print_key)
1678
1679 END SUBROUTINE create_fp_section
1680
1681! **************************************************************************************************
1682!> \brief ...
1683!> \param section will contain the driver section
1684!> \author mceriotti
1685! **************************************************************************************************
1686 SUBROUTINE create_driver_section(section)
1687 TYPE(section_type), POINTER :: section
1688
1689 TYPE(keyword_type), POINTER :: keyword
1690
1691 cpassert(.NOT. ASSOCIATED(section))
1692 CALL section_create(section, __location__, name="DRIVER", &
1693 description="This section defines the parameters needed to run in i-PI driver mode.", &
1694 citations=[ceriotti2014, kapil2016], &
1695 n_keywords=3, n_subsections=0, repeats=.false.)
1696
1697 NULLIFY (keyword)
1698 CALL keyword_create(keyword, __location__, name="unix", &
1699 description="Use a UNIX socket rather than an INET socket.", &
1700 usage="unix LOGICAL", &
1701 default_l_val=.false., lone_keyword_l_val=.true.)
1702 CALL section_add_keyword(section, keyword)
1703 CALL keyword_release(keyword)
1704
1705 CALL keyword_create(keyword, __location__, name="port", &
1706 description="Port number for the i-PI server.", &
1707 usage="port <INTEGER>", &
1708 default_i_val=12345)
1709 CALL section_add_keyword(section, keyword)
1710 CALL keyword_release(keyword)
1711
1712 CALL keyword_create(keyword, __location__, name="host", &
1713 description="Host name for the i-PI server.", &
1714 usage="host <HOSTNAME>", &
1715 default_c_val="localhost")
1716 CALL section_add_keyword(section, keyword)
1717 CALL keyword_release(keyword)
1718
1719 CALL keyword_create(keyword, __location__, name="SLEEP_TIME", &
1720 description="Sleeping time while waiting for for driver commands [s].", &
1721 usage="SLEEP_TIME 0.1", &
1722 default_r_val=0.01_dp)
1723 CALL section_add_keyword(section, keyword)
1724 CALL keyword_release(keyword)
1725
1726 END SUBROUTINE create_driver_section
1727
1728! **************************************************************************************************
1729!> \brief creates the section for a path integral run
1730!> \param section will contain the pint section
1731!> \author fawzi
1732! **************************************************************************************************
1733 SUBROUTINE create_pint_section(section)
1734 TYPE(section_type), POINTER :: section
1735
1736 TYPE(keyword_type), POINTER :: keyword
1737 TYPE(section_type), POINTER :: print_key, subsection, subsubsection
1738
1739 cpassert(.NOT. ASSOCIATED(section))
1740 CALL section_create(section, __location__, name="PINT", &
1741 description="The section that controls a path integral run", &
1742 n_keywords=13, n_subsections=9, repeats=.false.)
1743 NULLIFY (keyword)
1744
1745 CALL keyword_create(keyword, __location__, name="p", &
1746 description="Specify number beads to use", repeats=.false., &
1747 default_i_val=3)
1748 CALL section_add_keyword(section, keyword)
1749 CALL keyword_release(keyword)
1750 CALL keyword_create(keyword, __location__, name="proc_per_replica", &
1751 description="Specify number of processors to use for each replica", &
1752 repeats=.false., default_i_val=0)
1753 CALL section_add_keyword(section, keyword)
1754 CALL keyword_release(keyword)
1755 CALL keyword_create(keyword, __location__, name="num_steps", &
1756 description="Number of steps (if MAX_STEP is not explicitly given"// &
1757 " the program will perform this number of steps)", repeats=.false., &
1758 default_i_val=3)
1759 CALL section_add_keyword(section, keyword)
1760 CALL keyword_release(keyword)
1761 CALL keyword_create(keyword, __location__, name="MAX_STEP", &
1762 description="Maximum step number (the program will stop if"// &
1763 " ITERATION >= MAX_STEP even if NUM_STEPS has not been reached)", &
1764 repeats=.false., default_i_val=10)
1765 CALL section_add_keyword(section, keyword)
1766 CALL keyword_release(keyword)
1767 CALL keyword_create(keyword, __location__, name="iteration", &
1768 description="Specify the iteration number from which it should be "// &
1769 "counted", default_i_val=0)
1770 CALL section_add_keyword(section, keyword)
1771 CALL keyword_release(keyword)
1772 CALL keyword_create(keyword, __location__, name="Temp", &
1773 description="The temperature you want to simulate", &
1774 default_r_val=cp_unit_to_cp2k(300._dp, "K"), &
1775 unit_str="K")
1776 CALL section_add_keyword(section, keyword)
1777 CALL keyword_release(keyword)
1778 CALL keyword_create(keyword, __location__, name="kT_CORRECTION", &
1779 description="Corrects for the loss of temperature due to constrained "// &
1780 "degrees of freedom for Nose-Hover chains and numeric integration", &
1781 repeats=.false., default_l_val=.false.)
1782 CALL section_add_keyword(section, keyword)
1783 CALL keyword_release(keyword)
1784 CALL keyword_create(keyword, __location__, name="T_tol", variants=["temp_to"], &
1785 description="threshold for the oscillations of the temperature "// &
1786 "excedeed which the temperature is rescaled. 0 means no rescaling.", &
1787 default_r_val=0._dp, unit_str="K")
1788 CALL section_add_keyword(section, keyword)
1789 CALL keyword_release(keyword)
1790 CALL keyword_create(keyword, __location__, name="dt", &
1791 description="timestep (might be subdivised in nrespa subtimesteps", &
1792 repeats=.false., &
1793 default_r_val=cp_unit_to_cp2k(1.0_dp, "fs"), &
1794 usage="dt 1.0", unit_str="fs")
1795 CALL section_add_keyword(section, keyword)
1796 CALL keyword_release(keyword)
1797 CALL keyword_create(keyword, __location__, name="HARM_INT", &
1798 description="integrator scheme for integrating the harmonic bead springs.", &
1799 usage="HARM_INT (NUMERIC|EXACT)", &
1800 default_i_val=integrate_numeric, &
1801 enum_c_vals=s2a("NUMERIC", "EXACT"), &
1802 enum_i_vals=[integrate_numeric, integrate_exact])
1803 CALL section_add_keyword(section, keyword)
1804 CALL keyword_release(keyword)
1805 CALL keyword_create(keyword, __location__, name="nrespa", &
1806 description="number of respa steps for the bead for each md step", &
1807 repeats=.false., default_i_val=5)
1808 CALL section_add_keyword(section, keyword)
1809 CALL keyword_release(keyword)
1810
1811 CALL keyword_create(keyword, __location__, name="transformation", &
1812 description="Specifies the coordinate transformation to use", &
1813 usage="TRANSFORMATION (NORMAL|STAGE)", &
1814 default_i_val=transformation_normal, &
1815 enum_c_vals=s2a("NORMAL", "STAGE"), &
1817
1818 CALL section_add_keyword(section, keyword)
1819 CALL keyword_release(keyword)
1820 CALL keyword_create(keyword, __location__, name="propagator", &
1821 description="Specifies the real time propagator to use", &
1822 usage="PROPAGATOR (PIMD|RPMD|CMD|BCMD)", &
1823 default_i_val=propagator_pimd, &
1824 enum_c_vals=s2a("PIMD", "RPMD", "CMD", "BCMD"), &
1826 CALL section_add_keyword(section, keyword)
1827 CALL keyword_release(keyword)
1828 CALL keyword_create(keyword, __location__, name="FIX_CENTROID_POS", &
1829 description="Propagate all DOF but the centroid - "// &
1830 "useful for equilibration of the non-centroid modes "// &
1831 "(activated only if TRANSFORMATION==NORMAL)", &
1832 repeats=.false., default_l_val=.false., &
1833 lone_keyword_l_val=.true.)
1834 CALL section_add_keyword(section, keyword)
1835 CALL keyword_release(keyword)
1836
1837 NULLIFY (subsection, subsubsection)
1838 CALL section_create(subsection, __location__, name="NORMALMODE", &
1839 description="Controls the normal mode transformation", &
1840 n_keywords=3, n_subsections=0, repeats=.false.)
1841 CALL keyword_create(keyword, __location__, name="Q_CENTROID", &
1842 description="Value of the thermostat mass of centroid degree of freedom", &
1843 repeats=.false., default_r_val=-1.0_dp)
1844 CALL section_add_keyword(subsection, keyword)
1845 CALL keyword_release(keyword)
1846 CALL keyword_create(keyword, __location__, name="Q_BEAD", &
1847 description="Value of the thermostat mass of non-centroid degrees of freedom", &
1848 repeats=.false., default_r_val=-1.0_dp)
1849 CALL section_add_keyword(subsection, keyword)
1850 CALL keyword_release(keyword)
1851 CALL keyword_create(keyword, __location__, name="MODEFACTOR", &
1852 description="mass scale factor for non-centroid degrees of freedom", &
1853 repeats=.false., default_r_val=1.0_dp)
1854 CALL section_add_keyword(subsection, keyword)
1855 CALL keyword_release(keyword)
1856 CALL keyword_create(keyword, __location__, name="GAMMA", &
1857 description="mass scale factor for non-centroid degrees of freedom, &
1858& naming convention according to Witt, 2008, <https://doi.org/10.1063/1.3125009>.", &
1859 repeats=.false., default_r_val=8.0_dp)
1860 CALL section_add_keyword(subsection, keyword)
1861 CALL keyword_release(keyword)
1862
1863 CALL section_add_subsection(section, subsection)
1864 CALL section_release(subsection)
1865
1866 CALL section_create(subsection, __location__, name="staging", &
1867 description="The section that controls the staging transformation", &
1868 n_keywords=2, n_subsections=0, repeats=.false.)
1869 CALL keyword_create(keyword, __location__, name="j", &
1870 description="Value of the j parameter for the staging transformation", &
1871 repeats=.false., default_i_val=2)
1872 CALL section_add_keyword(subsection, keyword)
1873 CALL keyword_release(keyword)
1874 CALL keyword_create(keyword, __location__, name="Q_END", &
1875 description="Value of the nose-hoover mass for the endbead (Q_end)", &
1876 repeats=.false., default_i_val=2)
1877 CALL section_add_keyword(subsection, keyword)
1878 CALL keyword_release(keyword)
1879 CALL section_add_subsection(section, subsection)
1880 CALL section_release(subsection)
1881
1882 CALL section_create(subsection, __location__, name="BEADS", &
1883 description="Sets positions and velocities of the beads", &
1884 n_keywords=0, n_subsections=2, &
1885 repeats=.false.)
1886 CALL create_coord_section(subsubsection, "BEADS")
1887 CALL section_add_subsection(subsection, subsubsection)
1888 CALL section_release(subsubsection)
1889 CALL create_velocity_section(subsubsection, "BEADS")
1890 CALL section_add_subsection(subsection, subsubsection)
1891 CALL section_release(subsubsection)
1892 CALL section_add_subsection(section, subsection)
1893 CALL section_release(subsection)
1894
1895 CALL section_create(subsection, __location__, name="NOSE", &
1896 description="Controls the Nose-Hoover thermostats", &
1897 n_keywords=1, n_subsections=2, &
1898 repeats=.false.)
1899 CALL keyword_create(keyword, __location__, name="nnos", &
1900 description="length of nose-hoover chain. 0 means no thermostat", &
1901 repeats=.false., default_i_val=2)
1902 CALL section_add_keyword(subsection, keyword)
1903 CALL keyword_release(keyword)
1904 CALL create_coord_section(subsubsection, "NOSE")
1905 CALL section_add_subsection(subsection, subsubsection)
1906 CALL section_release(subsubsection)
1907 CALL create_velocity_section(subsubsection, "NOSE")
1908 CALL section_add_subsection(subsection, subsubsection)
1909 CALL section_release(subsubsection)
1910 CALL section_add_subsection(section, subsection)
1911 CALL section_release(subsection)
1912
1913 CALL create_gle_section(subsection)
1914 CALL section_add_subsection(section, subsection)
1915 CALL section_release(subsection)
1916
1917 CALL section_create(subsection, __location__, name="PILE", &
1918 description="Controls the PI Langevin Equation thermostat."// &
1919 " Needs the exact harmonic integrator."// &
1920 " May lead to unphysical motions if constraint e.g. FIXED_ATOMS, is applied."// &
1921 " RESTART_HELIUM section has to be .FALSE. when restarting the PIGLET job.", &
1922 citations=[ceriotti2010], &
1923 n_keywords=3, n_subsections=1, &
1924 repeats=.false.)
1925 CALL create_rng_section(subsubsection)
1926 CALL section_add_subsection(subsection, subsubsection)
1927 CALL section_release(subsubsection)
1928 CALL keyword_create(keyword, __location__, name="TAU", &
1929 description="Time constant for centroid motion. "// &
1930 "If zero or negative the centroid is not thermostated.", &
1931 usage="TAU {real}", type_of_var=real_t, &
1932 unit_str="fs", n_var=1, default_r_val=1000.0_dp)
1933 CALL section_add_keyword(subsection, keyword)
1934 CALL keyword_release(keyword)
1935 CALL keyword_create(keyword, __location__, name="LAMBDA", &
1936 description="Scaling of friction to mode coupling", &
1937 usage="LAMBDA {real}", type_of_var=real_t, &
1938 n_var=1, default_r_val=0.5_dp)
1939 CALL section_add_keyword(subsection, keyword)
1940 CALL keyword_release(keyword)
1941 CALL keyword_create(keyword, __location__, name="THERMOSTAT_ENERGY", &
1942 description="Thermostat energy for conserved quantity. "// &
1943 "Only useful in restart files.", &
1944 usage="THERMOSTAT_ENERGY {real}", type_of_var=real_t, &
1945 n_var=1, default_r_val=0.0_dp)
1946 CALL section_add_keyword(subsection, keyword)
1947 CALL keyword_release(keyword)
1948 CALL section_add_subsection(section, subsection)
1949 CALL section_release(subsection)
1950
1951 CALL section_create(subsection, __location__, name="PIGLET", &
1952 description="Controls the PI Generalized Langevin Equation thermostat."// &
1953 " Needs the exact harmonic integrator", &
1954 citations=[ceriotti2012], &
1955 n_keywords=4, n_subsections=2, &
1956 repeats=.false.)
1957 CALL create_rng_section(subsubsection)
1958 CALL section_add_subsection(subsection, subsubsection)
1959 CALL section_release(subsubsection)
1960 CALL section_create(subsubsection, __location__, name="EXTRA_DOF", &
1961 description="Additional degrees of freedom to ensure Markovian Dynamics.", &
1962 n_keywords=1, n_subsections=0, repeats=.false.)
1963 CALL keyword_create(keyword, __location__, name="_DEFAULT_KEYWORD_", &
1964 description="Restart values for additional degrees of freedom" &
1965 //" (only for restarts, do not set explicitly)", &
1966 repeats=.false., &
1967 type_of_var=real_t, n_var=-1)
1968 CALL section_add_keyword(subsubsection, keyword)
1969 CALL keyword_release(keyword)
1970 CALL section_add_subsection(subsection, subsubsection)
1971 CALL section_release(subsubsection)
1972 CALL keyword_create(keyword, __location__, name="NEXTRA_DOF", &
1973 description="Number of extra degrees of freedom to ensure markovian dynamics", &
1974 repeats=.false., default_i_val=8)
1975 CALL section_add_keyword(subsection, keyword)
1976 CALL keyword_release(keyword)
1977 CALL keyword_create(keyword, __location__, name="MATRICES_FILE_NAME", &
1978 description="Filename containig the raw matrices from "// &
1979 "<https://gle4md.org/index.html?page=matrix>.", &
1980 repeats=.false., default_lc_val="PIGLET.MAT")
1981 CALL section_add_keyword(subsection, keyword)
1982 CALL keyword_release(keyword)
1983 CALL keyword_create(keyword, __location__, name="SMATRIX_INIT", &
1984 description="Select algorithm to initialize piglet S-matrices", &
1985 usage="SMATRIX_INIT (CHOLESKY|DIAGONAL)", &
1986 default_i_val=matrix_init_cholesky, &
1987 enum_c_vals=s2a("CHOLESKY", "DIAGONAL"), &
1989 CALL section_add_keyword(subsection, keyword)
1990 CALL keyword_release(keyword)
1991 CALL keyword_create(keyword, __location__, name="THERMOSTAT_ENERGY", &
1992 description="Thermostat energy for conserved quantity. "// &
1993 "Only useful in restart files.", &
1994 usage="THERMOSTAT_ENERGY {real}", type_of_var=real_t, &
1995 n_var=1, default_r_val=0.0_dp)
1996 CALL section_add_keyword(subsection, keyword)
1997 CALL keyword_release(keyword)
1998 CALL section_add_subsection(section, subsection)
1999 CALL section_release(subsection)
2000
2001 CALL section_create(subsection, __location__, name="QTB", &
2002 description="Controls the QTB-PILE thermostat."// &
2003 " Needs the exact harmonic integrator", &
2004 citations=[brieuc2016], &
2005 n_keywords=7, n_subsections=1, &
2006 repeats=.false.)
2007 CALL create_rng_section(subsubsection)
2008 CALL section_add_subsection(subsection, subsubsection)
2009 CALL section_release(subsubsection)
2010 CALL keyword_create(keyword, __location__, name="TAU", &
2011 description="Time constant for centroid motion. ", &
2012 usage="TAU {real}", type_of_var=real_t, &
2013 unit_str="fs", n_var=1, default_r_val=1000.0_dp)
2014 CALL section_add_keyword(subsection, keyword)
2015 CALL keyword_release(keyword)
2016 CALL keyword_create(keyword, __location__, name="LAMBDA", &
2017 description="Scaling of friction to ring polymer NM freq.", &
2018 usage="LAMBDA {real}", type_of_var=real_t, &
2019 n_var=1, default_r_val=0.5_dp)
2020 CALL section_add_keyword(subsection, keyword)
2021 CALL keyword_release(keyword)
2022 CALL keyword_create(keyword, __location__, name="FP", &
2023 description="Defines which version to use "// &
2024 "0: f_P^(0), 1: f_P^(1)", &
2025 usage="FP {integer}", type_of_var=integer_t, &
2026 n_var=1, default_i_val=1)
2027 CALL section_add_keyword(subsection, keyword)
2028 CALL keyword_release(keyword)
2029 CALL keyword_create(keyword, __location__, name="TAUCUT", &
2030 description="Inverse of cutoff freq. for the centroid mode", &
2031 usage="TAUCUT {real}", type_of_var=real_t, &
2032 unit_str="fs", n_var=1, default_r_val=0.5_dp)
2033 CALL section_add_keyword(subsection, keyword)
2034 CALL keyword_release(keyword)
2035 CALL keyword_create(keyword, __location__, name="LAMBCUT", &
2036 description="Scaling of cutoff freq. to ring polymer NM freq.", &
2037 usage="LAMBCUT {real}", type_of_var=real_t, &
2038 n_var=1, default_r_val=2.0_dp)
2039 CALL section_add_keyword(subsection, keyword)
2040 CALL keyword_release(keyword)
2041 CALL keyword_create(keyword, __location__, name="NF", &
2042 description="Number of points used for the convolution product.", &
2043 usage="NF {integer}", type_of_var=integer_t, &
2044 n_var=1, default_i_val=128)
2045 CALL section_add_keyword(subsection, keyword)
2046 CALL keyword_release(keyword)
2047 CALL keyword_create(keyword, __location__, name="THERMOSTAT_ENERGY", &
2048 description="Thermostat energy for conserved quantity. "// &
2049 "Only useful in restart files.", &
2050 usage="THERMOSTAT_ENERGY {real}", type_of_var=real_t, &
2051 n_var=1, default_r_val=0.0_dp)
2052 CALL section_add_keyword(subsection, keyword)
2053 CALL keyword_release(keyword)
2054 CALL section_add_subsection(section, subsection)
2055 CALL section_release(subsection)
2056
2057 CALL section_create(subsection, __location__, name="INIT", &
2058 description="Controls the initialization if the beads are not present", &
2059 repeats=.false.)
2060
2061 CALL keyword_create(keyword, __location__, name="LEVY_POS_SAMPLE", &
2062 description="Sample bead positions assuming free particle "// &
2063 "behavior (performs a Levy random walk of length P around "// &
2064 "the classical position of each atom at the physical "// &
2065 "temperature defined in PINT%TEMP)", &
2066 repeats=.false., default_l_val=.false., &
2067 lone_keyword_l_val=.true.)
2068 CALL section_add_keyword(subsection, keyword)
2069 CALL keyword_release(keyword)
2070 CALL keyword_create(keyword, __location__, name="LEVY_CORRELATED", &
2071 description="Use the same Levy path for all atoms, though "// &
2072 "with mass-dependent variances (might help at very low T)", &
2073 repeats=.false., default_l_val=.false., &
2074 lone_keyword_l_val=.true.)
2075 CALL section_add_keyword(subsection, keyword)
2076 CALL keyword_release(keyword)
2077 CALL keyword_create(keyword, __location__, name="LEVY_TEMP_FACTOR", &
2078 description="Multiplicative correction factor for the "// &
2079 "temperature at which the Levy walk is performed "// &
2080 "(correction is due to the interactions that modify "// &
2081 "the spread of a free particle)", &
2082 repeats=.false., default_r_val=1.0_dp)
2083 CALL section_add_keyword(subsection, keyword)
2084 CALL keyword_release(keyword)
2085 CALL keyword_create(keyword, __location__, name="LEVY_SEED", &
2086 description="Initial seed for the (pseudo)random number "// &
2087 "generator that controls Levy walk for bead positions.", &
2088 usage="LEVY_SEED <INTEGER>", default_i_val=1234, &
2089 repeats=.false.)
2090 CALL section_add_keyword(subsection, keyword)
2091 CALL keyword_release(keyword)
2092 CALL keyword_create(keyword, __location__, name="THERMOSTAT_SEED", &
2093 description="Initial seed for the (pseudo)random number "// &
2094 "generator that controls the PILE and PIGLET thermostats.", &
2095 usage="THERMOSTAT_SEED <INTEGER>", default_i_val=12345, &
2096 repeats=.false.)
2097 CALL section_add_keyword(subsection, keyword)
2098 CALL keyword_release(keyword)
2099 CALL keyword_create(keyword, __location__, name="RANDOMIZE_POS", &
2100 description="add gaussian noise to the positions of the beads", &
2101 repeats=.false., default_l_val=.false., lone_keyword_l_val=.true.)
2102 CALL section_add_keyword(subsection, keyword)
2103 CALL keyword_release(keyword)
2104
2105 CALL keyword_create(keyword, __location__, name="CENTROID_SPEED", &
2106 description="adds random velocity component to the centroid modes "// &
2107 "(useful to correct for the averaging out of the speed of various beads)", &
2108 repeats=.false., default_l_val=.false., lone_keyword_l_val=.true.)
2109 CALL section_add_keyword(subsection, keyword)
2110 CALL keyword_release(keyword)
2111
2112 CALL keyword_create(keyword, __location__, name="VELOCITY_QUENCH", &
2113 description="set the initial velocities to zero", &
2114 repeats=.false., default_l_val=.false., lone_keyword_l_val=.true.)
2115 CALL section_add_keyword(subsection, keyword)
2116 CALL keyword_release(keyword)
2117 CALL keyword_create(keyword, __location__, name="VELOCITY_SCALE", &
2118 description="scale initial velocities to the temperature given in MOTION%PINT%TEMP", &
2119 repeats=.false., default_l_val=.false., lone_keyword_l_val=.true.)
2120 CALL section_add_keyword(subsection, keyword)
2121 CALL keyword_release(keyword)
2122
2123 CALL section_add_subsection(section, subsection)
2124 CALL section_release(subsection)
2125
2126 CALL create_helium_section(subsection)
2127 CALL section_add_subsection(section, subsection)
2128 CALL section_release(subsection)
2129
2130 CALL section_create(subsection, __location__, name="PRINT", &
2131 description="Controls the path integral-specific output", &
2132 n_keywords=2, n_subsections=0, repeats=.false.)
2133
2134 NULLIFY (print_key)
2135
2136 CALL cp_print_key_section_create(print_key, __location__, "ENERGY", &
2137 description="Controls the output of the path integral energies", &
2138 print_level=low_print_level, common_iter_levels=1)
2139 CALL section_add_subsection(subsection, print_key)
2140 CALL section_release(print_key)
2141
2142 CALL cp_print_key_section_create(print_key, __location__, "ACTION", &
2143 description="Controls the output of the path integral action", &
2144 print_level=medium_print_level, common_iter_levels=1)
2145 CALL section_add_subsection(subsection, print_key)
2146 CALL section_release(print_key)
2147
2148 CALL cp_print_key_section_create(print_key, __location__, "CENTROID_POS", &
2149 description="Controls the output of the centroid's position", &
2150 unit_str="angstrom", &
2151 print_level=low_print_level, common_iter_levels=1)
2152 CALL add_format_keyword(keyword, print_key, pos=.true., &
2153 description="Output file format for the positions of centroid")
2154 CALL section_add_subsection(subsection, print_key)
2155 CALL section_release(print_key)
2156
2157 CALL cp_print_key_section_create(print_key, __location__, "CENTROID_VEL", &
2158 description="Controls the output of the centroid's velocity", &
2159 unit_str="bohr*au_t^-1", &
2160 print_level=low_print_level, common_iter_levels=1)
2161 CALL add_format_keyword(keyword, print_key, pos=.false., &
2162 description="Output file format for the velocity of centroid")
2163 CALL section_add_subsection(subsection, print_key)
2164 CALL section_release(print_key)
2165
2166 CALL cp_print_key_section_create(print_key, __location__, "CENTROID_GYR", &
2167 description="Controls the output of the centroid's radii of gyration", &
2168 unit_str="angstrom", &
2169 print_level=low_print_level, common_iter_levels=1)
2170 CALL section_add_subsection(subsection, print_key)
2171 CALL section_release(print_key)
2172
2173 CALL cp_print_key_section_create(print_key, __location__, "COM", &
2174 description="Controls the output of the center of mass", &
2175 print_level=high_print_level, common_iter_levels=1)
2176 CALL section_add_subsection(subsection, print_key)
2177 CALL section_release(print_key)
2178
2179 CALL keyword_create(keyword, __location__, name="IMAGINARY_TIME_STRIDE", &
2180 description="Prints only every nth bead trajectory", &
2181 repeats=.false., default_i_val=1)
2182 CALL section_add_keyword(subsection, keyword)
2183 CALL keyword_release(keyword)
2184
2185 CALL section_add_subsection(section, subsection)
2186 CALL section_release(subsection)
2187
2188 END SUBROUTINE create_pint_section
2189
2190 ! ***************************************************************************
2191 !> \brief Create the input section for superfluid helium solvent.
2192 !> \author Lukasz Walewski
2193 ! ***************************************************************************
2194! **************************************************************************************************
2195!> \brief ...
2196!> \param section ...
2197! **************************************************************************************************
2198 SUBROUTINE create_helium_section(section)
2199 TYPE(section_type), POINTER :: section
2200
2201 TYPE(keyword_type), POINTER :: keyword
2202 TYPE(section_type), POINTER :: print_key, subsection, subsubsection
2203
2204 cpassert(.NOT. ASSOCIATED(section))
2205
2206 CALL section_create(section, __location__, name="HELIUM", &
2207 description="The section that controls optional helium solvent"// &
2208 " environment (highly experimental, not for general use yet)", &
2209 n_keywords=31, n_subsections=11, repeats=.false.)
2210
2211 NULLIFY (keyword)
2212 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
2213 description="Whether or not to actually use this section", &
2214 usage="silent", default_l_val=.false., lone_keyword_l_val=.true.)
2215 CALL section_add_keyword(section, keyword)
2216 CALL keyword_release(keyword)
2217
2218 CALL keyword_create(keyword, __location__, name="HELIUM_ONLY", &
2219 description="Simulate helium solvent only, "// &
2220 "disregard solute entirely", &
2221 repeats=.false., default_l_val=.false., &
2222 lone_keyword_l_val=.true.)
2223 CALL section_add_keyword(section, keyword)
2224 CALL keyword_release(keyword)
2225
2226 CALL keyword_create(keyword, __location__, name="INTERACTION_POT_SCAN", &
2227 description="Scan solute-helium interaction potential, "// &
2228 "cubefile parameters set in subsection RHO", &
2229 repeats=.false., default_l_val=.false., &
2230 lone_keyword_l_val=.true.)
2231 CALL section_add_keyword(section, keyword)
2232 CALL keyword_release(keyword)
2233
2234 CALL keyword_create(keyword, __location__, name="NUM_ENV", &
2235 description="Number of independent helium environments", &
2236 repeats=.false., default_i_val=1)
2237 CALL section_add_keyword(section, keyword)
2238 CALL keyword_release(keyword)
2239
2240 CALL keyword_create(keyword, __location__, name="POTENTIAL_FILE_NAME", &
2241 description="Name of the Helium interaction potential file", &
2242 repeats=.false., default_lc_val="HELIUM.POT")
2243 CALL section_add_keyword(section, keyword)
2244 CALL keyword_release(keyword)
2245
2246 CALL keyword_create(keyword, __location__, name="GET_FORCES", &
2247 description="Get average MC forces or last MC forces to propagate MD", &
2248 usage="GET_FORCES (AVERAGE|LAST)", &
2249 default_i_val=helium_forces_average, &
2250 enum_c_vals=s2a("AVERAGE", "LAST"), &
2252 CALL section_add_keyword(section, keyword)
2253 CALL keyword_release(keyword)
2254
2255 CALL keyword_create(keyword, __location__, name="SOLUTE_INTERACTION", &
2256 description="Interaction potential between helium and the solute", &
2257 usage="SOLUTE_INTERACTION (NONE | MWATER | NNP)", &
2258 default_i_val=helium_solute_intpot_none, &
2259 enum_c_vals=s2a("NONE", "MWATER", "NNP"), &
2260 enum_i_vals=[ &
2264 enum_desc=s2a( &
2265 "No interaction with solute", &
2266 "Test interaction with wrong Water", &
2267 "Interaction with NNP"))
2268 CALL section_add_keyword(section, keyword)
2269 CALL keyword_release(keyword)
2270
2271 CALL keyword_create(keyword, __location__, name="NATOMS", &
2272 description="Number of helium atoms", &
2273 repeats=.false., default_i_val=64)
2274 CALL section_add_keyword(section, keyword)
2275 CALL keyword_release(keyword)
2276
2277 CALL keyword_create(keyword, __location__, name="NBEADS", &
2278 description="Number of helium path integral beads", &
2279 repeats=.false., default_i_val=25)
2280 CALL section_add_keyword(section, keyword)
2281 CALL keyword_release(keyword)
2282
2283 CALL keyword_create(keyword, __location__, name="RNG_SEED", &
2284 description="Initial seed for the (pseudo)random number "// &
2285 "generator that controls helium coordinate generation and propagation.", &
2286 usage="RNG_SEED <INTEGER>", default_i_val=12345, &
2287 repeats=.false.)
2288 CALL section_add_keyword(section, keyword)
2289 CALL keyword_release(keyword)
2290
2291 CALL keyword_create(keyword, __location__, name="N_INNER", &
2292 variants=s2a("INOROT"), &
2293 description="Number of MC iterations at the same time slice(s) "// &
2294 "(number of inner MC loop iterations)", &
2295 repeats=.false., default_i_val=6600)
2296 CALL section_add_keyword(section, keyword)
2297 CALL keyword_release(keyword)
2298
2299 CALL keyword_create(keyword, __location__, name="N_OUTER", &
2300 variants=s2a("IROT"), &
2301 description="how often to reselect the time slice(s) to work on "// &
2302 "(number of outer MC loop iterations)", &
2303 repeats=.false., default_i_val=300)
2304 CALL section_add_keyword(section, keyword)
2305 CALL keyword_release(keyword)
2306
2307 CALL keyword_create(keyword, __location__, name="SAMPLING_METHOD", &
2308 description="Choose between Ceperley or the worm algorithm", &
2309 usage="SAMPLING_METHOD (CEPERLEY|WORM)", &
2310 default_i_val=helium_sampling_ceperley, &
2311 enum_c_vals=s2a("CEPERLEY", "WORM"), &
2313 CALL section_add_keyword(section, keyword)
2314 CALL keyword_release(keyword)
2315
2316 CALL keyword_create(keyword, __location__, name="COORD_INIT_TEMP", &
2317 description="Temperature for thermal gaussian initialization of the helium."// &
2318 " Negative values correspond to a hot start.", &
2319 default_r_val=cp_unit_to_cp2k(300._dp, "K"), &
2320 unit_str="K")
2321 CALL section_add_keyword(section, keyword)
2322 CALL keyword_release(keyword)
2323
2324 CALL keyword_create(keyword, __location__, name="SOLUTE_RADIUS", &
2325 description="Radius of the solute molecule for prevention of"// &
2326 " coordinate collision during initialization", &
2327 default_r_val=cp_unit_to_cp2k(0.0_dp, "angstrom"), &
2328 repeats=.false., type_of_var=real_t, unit_str="angstrom")
2329 CALL section_add_keyword(section, keyword)
2330 CALL keyword_release(keyword)
2331
2332 ! Helium-solute interaction NNP
2333 NULLIFY (subsection)
2334 CALL section_create(subsection, __location__, name="NNP", &
2335 description="This section contains all information to run an helium-solute "// &
2336 "interaction Neural Network Potential (NNP) calculation.", &
2337 n_keywords=2, n_subsections=3, repeats=.false.)
2338
2339 CALL keyword_create(keyword, __location__, name="NNP_INPUT_FILE_NAME", &
2340 description="File containing the input information for the setup "// &
2341 "of the NNP (n2p2/RuNNer format). ", &
2342 repeats=.false., default_lc_val="input.nn")
2343 CALL section_add_keyword(subsection, keyword)
2344 CALL keyword_release(keyword)
2345
2346 CALL keyword_create(keyword, __location__, name="SCALE_FILE_NAME", &
2347 description="File containing the scaling information for the symmetry "// &
2348 "functions of the NNP. ", &
2349 repeats=.false., default_lc_val="scaling.data")
2350 CALL section_add_keyword(subsection, keyword)
2351 CALL keyword_release(keyword)
2352
2353 NULLIFY (subsubsection)
2354 CALL section_create(subsubsection, __location__, name="SR_CUTOFF", &
2355 description="Section for failsafe short range cutoffs for the NNPs, "// &
2356 "if the distance between solvent and specified solute element becomes "// &
2357 "smaller than the given cutoff, an artifical repulsive potential is "// &
2358 "introduced. Note this is only meant to prevent such configurations, "// &
2359 "not to physically sample them.", &
2360 n_keywords=2, n_subsections=0, repeats=.true.)
2361
2362 CALL keyword_create(keyword, __location__, name="ELEMENT", &
2363 description="Solute element for which the short range cutoff is in effect", &
2364 repeats=.false., default_c_val="none")
2365 CALL section_add_keyword(subsubsection, keyword)
2366 CALL keyword_release(keyword)
2367
2368 CALL keyword_create(keyword, __location__, name="RADIUS", &
2369 description="Short range cutoff in Angstrom, below this cutoff, the energy "// &
2370 "is replaced by a sizable positive value plus a 1/r**2 term to guide particles "// &
2371 "away from each other.", &
2372 default_r_val=cp_unit_to_cp2k(0.0_dp, "angstrom"), &
2373 repeats=.false., type_of_var=real_t, unit_str="angstrom")
2374 CALL section_add_keyword(subsubsection, keyword)
2375 CALL keyword_release(keyword)
2376 CALL section_add_subsection(subsection, subsubsection)
2377 CALL section_release(subsubsection)
2378
2379 NULLIFY (subsubsection)
2380 CALL section_create(subsubsection, __location__, name="MODEL", &
2381 description="Section for a single NNP model. If this section is repeated, "// &
2382 "a committee model (C-NNP)is used where the NNP members share the same "// &
2383 "symmetry functions. ", &
2384 n_keywords=1, n_subsections=0, repeats=.true.)
2385
2386 CALL keyword_create(keyword, __location__, name="WEIGHTS", &
2387 description="File containing the weights for the artificial neural "// &
2388 "networks of the NNP. The specified name is extended by .XXX.data ", &
2389 repeats=.false., default_lc_val="weights")
2390 CALL section_add_keyword(subsubsection, keyword)
2391 CALL keyword_release(keyword)
2392 CALL section_add_subsection(subsection, subsubsection)
2393 CALL section_release(subsubsection)
2394
2395 ! Create the PRINT subsection
2396 NULLIFY (subsubsection)
2397 CALL section_create(subsubsection, __location__, name="PRINT", &
2398 description="Section of possible print options in NNP code.", &
2399 n_keywords=0, n_subsections=3, repeats=.false.)
2400 NULLIFY (print_key, keyword)
2401
2402 CALL cp_print_key_section_create(print_key, __location__, "ENERGIES", &
2403 description="Controls the printing of the NNP energies.", &
2404 print_level=medium_print_level, common_iter_levels=1)
2405 CALL section_add_subsection(subsubsection, print_key)
2406 CALL section_release(print_key)
2407
2408 CALL cp_print_key_section_create(print_key, __location__, "FORCES_SIGMA", &
2409 description="Controls the printing of the STD per atom of the NNP forces.", &
2410 print_level=medium_print_level, common_iter_levels=1)
2411 CALL section_add_subsection(subsubsection, print_key)
2412 CALL section_release(print_key)
2413
2414 CALL cp_print_key_section_create(print_key, __location__, "EXTRAPOLATION", &
2415 description="If activated, output structures with extrapolation "// &
2416 "warning in xyz-format", &
2417 print_level=medium_print_level, common_iter_levels=1)
2418 CALL section_add_subsection(subsubsection, print_key)
2419 CALL section_release(print_key)
2420 CALL section_add_subsection(subsection, subsubsection)
2421 CALL section_release(subsubsection)
2422
2423 CALL section_add_subsection(section, subsection)
2424 CALL section_release(subsection) ! release NNP subsection
2425
2426 ! Ceperley's sampling algorithm
2427 NULLIFY (subsection)
2428 CALL section_create(subsection, __location__, name="CEPERLEY", &
2429 description="Enables sampling with Ceperley's algorithm", &
2430 n_keywords=2, n_subsections=1, repeats=.false.)
2431
2432 CALL keyword_create(keyword, __location__, name="BISECTION", &
2433 description="how many time slices to change at once (+1). "// &
2434 "Must be a power of 2 currently", &
2435 repeats=.false., default_i_val=8)
2436 CALL section_add_keyword(subsection, keyword)
2437 CALL keyword_release(keyword)
2438
2439 CALL keyword_create(keyword, __location__, name="MAX_PERM_CYCLE", &
2440 description="how large cyclic permutations to try", &
2441 repeats=.false., default_i_val=6)
2442 CALL section_add_keyword(subsection, keyword)
2443 CALL keyword_release(keyword)
2444
2445 NULLIFY (subsubsection)
2446 CALL section_create(subsubsection, __location__, name="M-SAMPLING", &
2447 description="Permutation cycle length sampling settings", &
2448 n_keywords=3, n_subsections=0, repeats=.false.)
2449 CALL keyword_create(keyword, __location__, name="DISTRIBUTION-TYPE", &
2450 description="Distribution from which the cycle length m is sampled", &
2451 usage="DISTRIBUTION-TYPE (SINGLEV|UNIFORM|LINEAR|QUADRATIC|EXPONENTIAL|GAUSSIAN)", &
2452 default_i_val=helium_mdist_uniform, &
2453 enum_c_vals=s2a( &
2454 "SINGLEV", &
2455 "UNIFORM", &
2456 "LINEAR", &
2457 "QUADRATIC", &
2458 "EXPONENTIAL", &
2459 "GAUSSIAN"), &
2460 enum_i_vals=[ &
2467 CALL section_add_keyword(subsubsection, keyword)
2468 CALL keyword_release(keyword)
2469 CALL keyword_create(keyword, __location__, name="M-VALUE", &
2470 description="Value of m treated in a special way "// &
2471 "(specific behavior depends on the distribution type chosen)", &
2472 repeats=.false., &
2473 default_i_val=1)
2474 CALL section_add_keyword(subsubsection, keyword)
2475 CALL keyword_release(keyword)
2476 CALL keyword_create(keyword, __location__, name="M-RATIO", &
2477 description="Probability ratio betw M-VALUE and other cycle lengths", &
2478 repeats=.false., &
2479 default_r_val=1.0_dp)
2480 CALL section_add_keyword(subsubsection, keyword)
2481 CALL keyword_release(keyword)
2482 CALL section_add_subsection(subsection, subsubsection)
2483 CALL section_release(subsubsection)
2484 CALL section_add_subsection(section, subsection)
2485 CALL section_release(subsection) ! release CEPERLEY subsection
2486
2487! worm algorithm parameters:
2488 NULLIFY (subsection)
2489 CALL section_create(subsection, __location__, name="WORM", &
2490 description="Enables sampling via the canonical worm algorithm adapted from Bonisegni", &
2491 n_keywords=12, n_subsections=0, repeats=.false.)
2492
2493 CALL keyword_create(keyword, __location__, name="CENTROID_DRMAX", &
2494 description="Maximum displacement allowed for the centroid moves", &
2495 repeats=.false., default_r_val=0.5_dp)
2496 CALL section_add_keyword(subsection, keyword)
2497 CALL keyword_release(keyword)
2498
2499 CALL keyword_create(keyword, __location__, name="STAGING_L", &
2500 description="From 2 up to max. L-1 beads will be moved", &
2501 repeats=.false., default_i_val=5)
2502 CALL section_add_keyword(subsection, keyword)
2503 CALL keyword_release(keyword)
2504
2505 CALL keyword_create(keyword, __location__, name="OPEN_CLOSE_SCALE", &
2506 description="Open/Close acceptance adjustment parameter", &
2507 repeats=.false., default_r_val=0.01_dp)
2508 CALL section_add_keyword(subsection, keyword)
2509 CALL keyword_release(keyword)
2510
2511 CALL keyword_create(keyword, __location__, name="ALLOW_OPEN", &
2512 description="Enable bosonic exchange sampling", &
2513 repeats=.false., default_l_val=.true.)
2514 CALL section_add_keyword(subsection, keyword)
2515 CALL keyword_release(keyword)
2516
2517 CALL keyword_create(keyword, __location__, name="MAX_OPEN_CYCLES", &
2518 description="If > 0 then reset positions and permutations to the previous closed &
2519 & state if staying more than this amount of MC cycles in open state to avoid staying &
2520 & trapped in open state for too long. Use with caution as it can potentially introduce &
2521 & a bias in the sampling.", &
2522 repeats=.false., default_i_val=0)
2523 CALL section_add_keyword(subsection, keyword)
2524 CALL keyword_release(keyword)
2525
2526 CALL keyword_create(keyword, __location__, name="SHOW_STATISTICS", &
2527 description="Show sampling statistics in output", &
2528 repeats=.false., default_l_val=.true.)
2529 CALL section_add_keyword(subsection, keyword)
2530 CALL keyword_release(keyword)
2531
2532 CALL keyword_create(keyword, __location__, name="CENTROID_WEIGHT", &
2533 description="Absolute weight of the centroid move", &
2534 repeats=.false., default_i_val=10)
2535 CALL section_add_keyword(subsection, keyword)
2536 CALL keyword_release(keyword)
2537
2538 CALL keyword_create(keyword, __location__, name="STAGING_WEIGHT", &
2539 description="Absolute weight of the staging move", &
2540 repeats=.false., default_i_val=30)
2541 CALL section_add_keyword(subsection, keyword)
2542 CALL keyword_release(keyword)
2543
2544 CALL keyword_create(keyword, __location__, name="OPEN_CLOSE_WEIGHT", &
2545 description="Absolute weight of the open/close move", &
2546 repeats=.false., default_i_val=10)
2547 CALL section_add_keyword(subsection, keyword)
2548 CALL keyword_release(keyword)
2549
2550 CALL keyword_create(keyword, __location__, name="HEAD_TAIL_WEIGHT", &
2551 description="Absolute weight of the head/tail moves (both)", &
2552 repeats=.false., default_i_val=10)
2553 CALL section_add_keyword(subsection, keyword)
2554 CALL keyword_release(keyword)
2555
2556 CALL keyword_create(keyword, __location__, name="CRAWL_WEIGHT", &
2557 description="Absolute weight of the crawl bwd/fwd moves (both)", &
2558 repeats=.false., default_i_val=10)
2559 CALL section_add_keyword(subsection, keyword)
2560 CALL keyword_release(keyword)
2561
2562 CALL keyword_create(keyword, __location__, name="CRAWL_REPETITION", &
2563 description="Number of repeated crawl moves", &
2564 repeats=.false., default_i_val=4)
2565 CALL section_add_keyword(subsection, keyword)
2566 CALL keyword_release(keyword)
2567
2568 CALL keyword_create(keyword, __location__, name="SWAP_WEIGHT", &
2569 description="Absolute weight of the crawl move", &
2570 repeats=.false., default_i_val=10)
2571 CALL section_add_keyword(subsection, keyword)
2572 CALL keyword_release(keyword)
2573
2574 CALL section_add_subsection(section, subsection)
2575 CALL section_release(subsection) ! release WORM subsection
2576
2577! end of worm parameters
2578
2579 CALL keyword_create(keyword, __location__, name="PERIODIC", &
2580 description="Use periodic boundary conditions for helium", &
2581 repeats=.false., default_l_val=.false.)
2582 CALL section_add_keyword(section, keyword)
2583 CALL keyword_release(keyword)
2584
2585 CALL keyword_create(keyword, __location__, name="CELL_SIZE", &
2586 description="PBC unit cell size (NOTE 1: density, number of atoms"// &
2587 " and volume are interdependent - give only two of them; "// &
2588 "NOTE 2: for small cell sizes specify NATOMS instead)", &
2589 repeats=.false., type_of_var=real_t, unit_str="angstrom")
2590 CALL section_add_keyword(section, keyword)
2591 CALL keyword_release(keyword)
2592
2593 CALL keyword_create(keyword, __location__, name="CELL_SHAPE", &
2594 description="PBC unit cell shape for helium", &
2595 usage="CELL_SHAPE (CUBE|OCTAHEDRON)", &
2596 default_i_val=helium_cell_shape_cube, &
2597 enum_c_vals=s2a("CUBE", "OCTAHEDRON"), &
2599 CALL section_add_keyword(section, keyword)
2600 CALL keyword_release(keyword)
2601
2602 CALL keyword_create(keyword, __location__, name="DROPLET_RADIUS", &
2603 description="Reject a move if any of the new positions does not lie within"// &
2604 " this range from the center of gravity", &
2605 repeats=.false., type_of_var=real_t, default_r_val=huge(1.0_dp), &
2606 unit_str="angstrom")
2607 CALL section_add_keyword(section, keyword)
2608 CALL keyword_release(keyword)
2609
2610 CALL keyword_create(keyword, __location__, name="DENSITY", &
2611 description="trial density of helium for determining the helium "// &
2612 "box size", &
2613 repeats=.false., &
2614 default_r_val=cp_unit_to_cp2k(0.02186_dp, "angstrom^-3"), &
2615 unit_str="angstrom^-3")
2616 CALL section_add_keyword(section, keyword)
2617 CALL keyword_release(keyword)
2618
2619 CALL keyword_create(keyword, __location__, name="PRESAMPLE", &
2620 description="Presample He coordinates before first PIMD step", &
2621 repeats=.false., default_l_val=.false.)
2622 CALL section_add_keyword(section, keyword)
2623 CALL keyword_release(keyword)
2624
2625 CALL section_create(subsection, __location__, name="RDF", &
2626 description="Radial distribution settings", &
2627 n_keywords=5, n_subsections=0, repeats=.false.)
2628
2629 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
2630 description="Whether or not to actually calculate this property", &
2631 default_l_val=.false., lone_keyword_l_val=.true.)
2632 CALL section_add_keyword(subsection, keyword)
2633 CALL keyword_release(keyword)
2634
2635 CALL keyword_create(keyword, __location__, name="MAXR", &
2636 description="Maximum RDF range, defaults to unit cell size", &
2637 repeats=.false., type_of_var=real_t, &
2638 unit_str="angstrom")
2639 CALL section_add_keyword(subsection, keyword)
2640 CALL keyword_release(keyword)
2641
2642 CALL keyword_create(keyword, __location__, name="NBIN", &
2643 description="Number of bins", &
2644 repeats=.false., &
2645 default_i_val=250)
2646 CALL section_add_keyword(subsection, keyword)
2647 CALL keyword_release(keyword)
2648
2649 CALL keyword_create(keyword, __location__, name="SOLUTE_HE", &
2650 description="Whether or not to calculate solute-He RDFs (if solute is present)", &
2651 default_l_val=.true., lone_keyword_l_val=.true.)
2652 CALL section_add_keyword(subsection, keyword)
2653 CALL keyword_release(keyword)
2654
2655 CALL keyword_create(keyword, __location__, name="HE_HE", &
2656 description="Whether or not to calculate He-He RDFs", &
2657 default_l_val=.false., lone_keyword_l_val=.true.)
2658 CALL section_add_keyword(subsection, keyword)
2659 CALL keyword_release(keyword)
2660
2661 CALL section_add_subsection(section, subsection)
2662 CALL section_release(subsection)
2663
2664 NULLIFY (subsection)
2665 CALL section_create(subsection, __location__, name="RHO", &
2666 description="Spatial distribution settings", &
2667 n_keywords=10, n_subsections=0, repeats=.false.)
2668 CALL keyword_create(keyword, __location__, name="_SECTION_PARAMETERS_", &
2669 description="Whether or not to actually calculate densities "// &
2670 "(requires significant amount of memory, depending on the value of NBIN)", &
2671 default_l_val=.false., lone_keyword_l_val=.true.)
2672 CALL section_add_keyword(subsection, keyword)
2673 CALL keyword_release(keyword)
2674 CALL keyword_create(keyword, __location__, name="NBIN", &
2675 description="Number of grid points in each direction for density binning", &
2676 repeats=.false., &
2677 default_i_val=100)
2678 CALL section_add_keyword(subsection, keyword)
2679 CALL keyword_release(keyword)
2680 !
2681 CALL keyword_create(keyword, __location__, name="MIN_CYCLE_LENGTHS_WDG", &
2682 description="Density of winding paths "// &
2683 "not shorter than the given length", &
2684 repeats=.false., usage="MIN_CYCLE_LENGTHS_WDG <INT> <INT> .. <INT>", &
2685 type_of_var=integer_t, n_var=-1)
2686 CALL section_add_keyword(subsection, keyword)
2687 CALL keyword_release(keyword)
2688 !
2689 CALL keyword_create(keyword, __location__, name="MIN_CYCLE_LENGTHS_NON", &
2690 description="Density of non-winding paths "// &
2691 "not shorter than the given length", &
2692 repeats=.false., usage="MIN_CYCLE_LENGTHS_NON <INT> <INT> .. <INT>", &
2693 type_of_var=integer_t, n_var=-1)
2694 CALL section_add_keyword(subsection, keyword)
2695 CALL keyword_release(keyword)
2696 !
2697 CALL keyword_create(keyword, __location__, name="MIN_CYCLE_LENGTHS_ALL", &
2698 description="Density of all paths "// &
2699 "not shorter than the given length", &
2700 repeats=.false., usage="MIN_CYCLE_LENGTHS_ALL <INT> <INT> .. <INT>", &
2701 type_of_var=integer_t, n_var=-1)
2702 CALL section_add_keyword(subsection, keyword)
2703 CALL keyword_release(keyword)
2704 !
2705 CALL keyword_create(keyword, __location__, name="ATOM_NUMBER", &
2706 description="Atom number density", &
2707 repeats=.false., &
2708 type_of_var=logical_t, &
2709 default_l_val=.true., &
2710 lone_keyword_l_val=.true.)
2711 CALL section_add_keyword(subsection, keyword)
2712 CALL keyword_release(keyword)
2713 !
2714 CALL keyword_create(keyword, __location__, name="PROJECTED_AREA_2", &
2715 description="Projected area squared density, A*A(r)", &
2716 repeats=.false., &
2717 type_of_var=logical_t, &
2718 default_l_val=.false., &
2719 lone_keyword_l_val=.true.)
2720 CALL section_add_keyword(subsection, keyword)
2721 CALL keyword_release(keyword)
2722 !
2723 CALL keyword_create(keyword, __location__, name="WINDING_NUMBER_2", &
2724 description="Winding number squared density, W*W(r)", &
2725 repeats=.false., &
2726 type_of_var=logical_t, &
2727 default_l_val=.false., &
2728 lone_keyword_l_val=.true.)
2729 CALL section_add_keyword(subsection, keyword)
2730 CALL keyword_release(keyword)
2731 !
2732 CALL keyword_create(keyword, __location__, name="WINDING_CYCLE_2", &
2733 description="Winding number squared density, W^2(r)", &
2734 repeats=.false., &
2735 type_of_var=logical_t, &
2736 default_l_val=.false., &
2737 lone_keyword_l_val=.true.)
2738 CALL section_add_keyword(subsection, keyword)
2739 CALL keyword_release(keyword)
2740 !
2741 CALL keyword_create(keyword, __location__, name="MOMENT_OF_INERTIA", &
2742 description="Moment of inertia density", &
2743 repeats=.false., &
2744 type_of_var=logical_t, &
2745 default_l_val=.false., &
2746 lone_keyword_l_val=.true.)
2747 CALL section_add_keyword(subsection, keyword)
2748 CALL keyword_release(keyword)
2749
2750 CALL section_add_subsection(section, subsection)
2751 CALL section_release(subsection)
2752 ! end of subsection RHO
2753
2754 CALL create_coord_section(subsection, "HELIUM")
2755 CALL section_add_subsection(section, subsection)
2756 CALL section_release(subsection)
2757
2758 CALL section_create(subsection, __location__, name="PERM", &
2759 description="Permutation state used for restart", &
2760 n_keywords=1, n_subsections=0, repeats=.false.)
2761 CALL keyword_create(keyword, __location__, name="_DEFAULT_KEYWORD_", &
2762 description="Specify particle index permutation for every "// &
2763 "helium atom", repeats=.true., usage="<INT> <INT> .. <INT>", &
2764 type_of_var=integer_t, n_var=-1)
2765 CALL section_add_keyword(subsection, keyword)
2766 CALL keyword_release(keyword)
2767 CALL section_add_subsection(section, subsection)
2768 CALL section_release(subsection)
2769
2770 CALL section_create(subsection, __location__, name="AVERAGES", &
2771 description="Average properties (used for restarts)", &
2772 n_keywords=7, n_subsections=0, repeats=.false.)
2773 CALL keyword_create(keyword, __location__, name="PROJECTED_AREA", &
2774 description="Projected area vector for all environments", &
2775 repeats=.true., usage="PROJECTED_AREA <REAL> <REAL> .. <REAL>", &
2776 type_of_var=real_t, n_var=-1)
2777 CALL section_add_keyword(subsection, keyword)
2778 CALL keyword_release(keyword)
2779 CALL keyword_create(keyword, __location__, name="PROJECTED_AREA_2", &
2780 description="Projected area vector squared for all environments", &
2781 repeats=.true., usage="PROJECTED_AREA_2 <REAL> <REAL> .. <REAL>", &
2782 type_of_var=real_t, n_var=-1)
2783 CALL section_add_keyword(subsection, keyword)
2784 CALL keyword_release(keyword)
2785 CALL keyword_create(keyword, __location__, name="WINDING_NUMBER_2", &
2786 description="Winding number vector squared for all environments", &
2787 repeats=.true., usage="WINDING_NUMBER_2 <REAL> <REAL> .. <REAL>", &
2788 type_of_var=real_t, n_var=-1)
2789 CALL section_add_keyword(subsection, keyword)
2790 CALL keyword_release(keyword)
2791 CALL keyword_create(keyword, __location__, name="MOMENT_OF_INERTIA", &
2792 description="Moment of inertia vector for all environments", &
2793 repeats=.true., usage="MOMENT_OF_INERTIA <REAL> <REAL> .. <REAL>", &
2794 type_of_var=real_t, n_var=-1)
2795 CALL section_add_keyword(subsection, keyword)
2796 CALL keyword_release(keyword)
2797 CALL keyword_create(keyword, __location__, name="RDF", &
2798 description="Radial distributions averaged over all environments", &
2799 repeats=.true., usage="RDF <REAL> <REAL> .. <REAL>", &
2800 type_of_var=real_t, n_var=-1)
2801 CALL section_add_keyword(subsection, keyword)
2802 CALL keyword_release(keyword)
2803 CALL keyword_create(keyword, __location__, name="RHO", &
2804 description="Spatial distributions averaged over all environments", &
2805 repeats=.true., usage="RHO <REAL> <REAL> .. <REAL>", &
2806 type_of_var=real_t, n_var=-1)
2807 CALL section_add_keyword(subsection, keyword)
2808 CALL keyword_release(keyword)
2809 CALL keyword_create(keyword, __location__, name="IWEIGHT", &
2810 description="Weight for the restarted quantities "// &
2811 "(number of MC steps used to calculate the accumulated averages)", &
2812 repeats=.false., &
2813 default_i_val=0)
2814 CALL section_add_keyword(subsection, keyword)
2815 CALL keyword_release(keyword)
2816 CALL section_add_subsection(section, subsection)
2817 CALL section_release(subsection)
2818
2819 CALL section_create(subsection, __location__, name="FORCE", &
2820 description="Forces exerted by the helium on the solute system"// &
2821 " (used for restarts)", &
2822 n_keywords=1, n_subsections=0, repeats=.false.)
2823 CALL keyword_create(keyword, __location__, name="_DEFAULT_KEYWORD_", &
2824 description="Number of real values should be 3 * "// &
2825 "<num_solute_atoms> * <num_solute_beads>", repeats=.true., &
2826 usage="<REAL> <REAL> .. <REAL>", type_of_var=real_t, &
2827 n_var=-1)
2828 CALL section_add_keyword(subsection, keyword)
2829 CALL keyword_release(keyword)
2830 CALL section_add_subsection(section, subsection)
2831 CALL section_release(subsection)
2832
2833 CALL section_create(subsection, __location__, name="RNG_STATE", &
2834 description="Random number generator state for all processors", &
2835 n_keywords=1, n_subsections=0, repeats=.false.)
2836 CALL keyword_create(keyword, __location__, name="_DEFAULT_KEYWORD_", &
2837 description="Three real arrays of DIMENSION(3,2) times two RNG "// &
2838 "streams - 36 real values per processor", &
2839 repeats=.true., usage="automatically filled, do not edit by hand", &
2840 type_of_var=real_t, n_var=-1)
2841 CALL section_add_keyword(subsection, keyword)
2842 CALL keyword_release(keyword)
2843 CALL section_add_subsection(section, subsection)
2844 CALL section_release(subsection)
2845
2846 CALL section_create(subsection, __location__, name="PRINT", &
2847 description="The section that controls the output of the helium code", &
2848 n_keywords=16, n_subsections=0, repeats=.false.)
2849
2850 ! *************************************************************************
2851 !> Printkeys for properties output
2852 ! *************************************************************************
2853 NULLIFY (print_key)
2854
2855 ! Properties printed at SILENT print level
2856 !
2857
2858 ! Properties printed at LOW print level
2859 !
2860 CALL cp_print_key_section_create(print_key, __location__, "ENERGY", &
2861 description="Controls the output of helium energies"// &
2862 " (averaged over MC step)", &
2863 print_level=low_print_level, common_iter_levels=1)
2864 CALL section_add_subsection(subsection, print_key)
2865 CALL section_release(print_key)
2866 !
2867 CALL cp_print_key_section_create(print_key, __location__, "PROJECTED_AREA_2_AVG", &
2868 description="Controls the output of the average projected area squared vector", &
2869 print_level=low_print_level, common_iter_levels=1)
2870 CALL section_add_subsection(subsection, print_key)
2871 CALL section_release(print_key)
2872 !
2873 CALL cp_print_key_section_create(print_key, __location__, "WINDING_NUMBER_2_AVG", &
2874 description="Controls the output of the average winding number vector squared", &
2875 print_level=low_print_level, common_iter_levels=1)
2876 CALL section_add_subsection(subsection, print_key)
2877 CALL section_release(print_key)
2878 !
2879 CALL cp_print_key_section_create(print_key, __location__, "MOMENT_OF_INERTIA_AVG", &
2880 description="Controls the output of the average moment of inertia vector", &
2881 print_level=low_print_level, common_iter_levels=1)
2882 CALL section_add_subsection(subsection, print_key)
2883 CALL section_release(print_key)
2884
2885 ! Properties printed at MEDIUM print level
2886 !
2887 CALL cp_print_key_section_create(print_key, __location__, "RDF", &
2888 description="Controls the output of helium radial distribution functions", &
2889 print_level=medium_print_level, common_iter_levels=1)
2890 CALL section_add_subsection(subsection, print_key)
2891 CALL section_release(print_key)
2892
2893 CALL cp_print_key_section_create(print_key, __location__, "RHO", &
2894 description="Controls the output of the helium density "// &
2895 "(Gaussian cube file format)", &
2896 each_iter_names=s2a("PINT"), each_iter_values=[100], &
2897 print_level=medium_print_level, common_iter_levels=1, &
2898 add_last=add_last_numeric)
2899 CALL keyword_create(keyword, __location__, name="BACKUP_COPIES", &
2900 description="Specifies the maximum number of backup copies.", &
2901 usage="BACKUP_COPIES {int}", &
2902 default_i_val=1)
2903 CALL section_add_keyword(print_key, keyword)
2904 CALL keyword_release(keyword)
2905 CALL section_add_subsection(subsection, print_key)
2906 CALL section_release(print_key)
2907 !
2908 CALL cp_print_key_section_create(print_key, __location__, "PROJECTED_AREA", &
2909 description="Controls the output of the projected area vector", &
2910 print_level=medium_print_level, common_iter_levels=1)
2911 CALL section_add_subsection(subsection, print_key)
2912 CALL section_release(print_key)
2913 !
2914 CALL cp_print_key_section_create(print_key, __location__, "WINDING_NUMBER", &
2915 description="Controls the output of the winding number vector", &
2916 print_level=medium_print_level, common_iter_levels=1)
2917 CALL section_add_subsection(subsection, print_key)
2918 CALL section_release(print_key)
2919 !
2920 CALL cp_print_key_section_create(print_key, __location__, "MOMENT_OF_INERTIA", &
2921 description="Controls the output of the moment of inertia vector", &
2922 print_level=medium_print_level, common_iter_levels=1)
2923 CALL section_add_subsection(subsection, print_key)
2924 CALL section_release(print_key)
2925 !
2926 CALL cp_print_key_section_create(print_key, __location__, "PLENGTH", &
2927 description="Controls the output of the helium permutation length", &
2928 print_level=medium_print_level, common_iter_levels=1)
2929 CALL section_add_subsection(subsection, print_key)
2930 CALL section_release(print_key)
2931
2932 CALL cp_print_key_section_create(print_key, __location__, "ACTION", &
2933 description="Controls the output of the total helium action", &
2934 print_level=medium_print_level, common_iter_levels=1)
2935 CALL section_add_subsection(subsection, print_key)
2936 CALL section_release(print_key)
2937
2938 ! Properties printed at HIGH print level
2939 !
2940 CALL cp_print_key_section_create(print_key, __location__, "COORDINATES", &
2941 description="Controls the output of helium coordinates", &
2942 print_level=high_print_level, common_iter_levels=1)
2943 CALL keyword_create(keyword, __location__, name="FORMAT", &
2944 description="Output file format for the coordinates", &
2945 usage="FORMAT (PDB|XYZ)", &
2946 default_i_val=fmt_id_pdb, &
2947 enum_c_vals=s2a("PDB", "XYZ"), &
2948 enum_i_vals=[fmt_id_pdb, fmt_id_xyz], &
2949 enum_desc=s2a("Bead coordinates and connectivity is written in PDB format", &
2950 "Only bead coordinates are written in XYZ format"))
2951 CALL section_add_keyword(print_key, keyword)
2952 CALL keyword_release(keyword)
2953 CALL section_add_subsection(subsection, print_key)
2954 CALL section_release(print_key)
2955 !
2956 CALL cp_print_key_section_create(print_key, __location__, "PERM", &
2957 description="Controls the output of the helium permutation state", &
2958 print_level=high_print_level, common_iter_levels=1)
2959 CALL keyword_create(keyword, __location__, name="FORMAT", &
2960 description="Output format for the permutation", &
2961 usage="FORMAT (CYCLE|PLAIN)", &
2962 default_i_val=perm_cycle, &
2963 enum_c_vals=s2a("CYCLE", "PLAIN"), &
2964 enum_i_vals=[perm_cycle, perm_plain], &
2965 enum_desc=s2a( &
2966 "Cycle notation with winding cycles enclosed"// &
2967 " in '[...]' and non-winding ones enclosed in '(...)'", &
2968 "Plain permutation output, i.e. P(1) ... P(N)"))
2969 CALL section_add_keyword(print_key, keyword)
2970 CALL keyword_release(keyword)
2971 CALL section_add_subsection(subsection, print_key)
2972 CALL section_release(print_key)
2973
2974 CALL cp_print_key_section_create(print_key, __location__, "FORCES", &
2975 description="Controls the output of the helium forces on the solute", &
2976 print_level=high_print_level, common_iter_levels=1)
2977 CALL section_add_subsection(subsection, print_key)
2978 CALL section_release(print_key)
2979
2980 ! Properties printed at DEBUG print level
2981 !
2982 CALL cp_print_key_section_create(print_key, __location__, "ACCEPTS", &
2983 description="Controls the output of the helium acceptance data", &
2984 print_level=debug_print_level, common_iter_levels=1)
2985 CALL section_add_subsection(subsection, print_key)
2986 CALL section_release(print_key)
2987 !
2988 CALL cp_print_key_section_create(print_key, __location__, "FORCES_INST", &
2989 description="Controls the output of the instantaneous helium forces on the solute", &
2990 print_level=debug_print_level, common_iter_levels=1)
2991 CALL section_add_subsection(subsection, print_key)
2992 CALL section_release(print_key)
2993
2994 CALL section_add_subsection(section, subsection)
2995 CALL section_release(subsection)
2996
2997 RETURN
2998 END SUBROUTINE create_helium_section
2999
3000END MODULE input_cp2k_motion
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public kapil2016
integer, save, public ceriotti2012
integer, save, public lindh1995
integer, save, public henkelman1999
integer, save, public ceriotti2010
integer, save, public henkelman2014
integer, save, public byrd1995
integer, save, public brieuc2016
integer, save, public ceriotti2014
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer, parameter, public debug_print_level
integer, parameter, public low_print_level
integer, parameter, public medium_print_level
integer, parameter, public high_print_level
integer, parameter, public 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:1210
collects all constants needed in input so that they can be used without circular dependencies
integer, parameter, public propagator_cmd
integer, parameter, public helium_solute_intpot_mwater
integer, parameter, public do_mc_virial
integer, parameter, public fix_xz
integer, parameter, public helium_forces_average
integer, parameter, public do_mc_gemc_nvt
integer, parameter, public helium_mdist_exponential
integer, parameter, public debug_lbfgs
integer, parameter, public helium_sampling_ceperley
integer, parameter, public ls_3pnt
integer, parameter, public helium_cell_shape_octahedron
integer, parameter, public dimer_init_random
integer, parameter, public default_minimization_method_id
integer, parameter, public low_lbfgs
integer, parameter, public helium_solute_intpot_none
integer, parameter, public high_lbfgs
integer, parameter, public perm_cycle
integer, parameter, public propagator_rpmd
integer, parameter, public integrate_exact
integer, parameter, public default_ts_method_id
integer, parameter, public medium_lbfgs
integer, parameter, public default_lbfgs_method_id
integer, parameter, public dimer_init_molden
integer, parameter, public perm_plain
integer, parameter, public helium_forces_last
integer, parameter, public helium_mdist_gaussian
integer, parameter, public fix_y
integer, parameter, public fix_none
integer, parameter, public helium_mdist_quadratic
integer, parameter, public helium_mdist_uniform
integer, parameter, public fix_z
integer, parameter, public default_bfgs_method_id
integer, parameter, public default_cg_method_id
integer, parameter, public default_dimer_method_id
integer, parameter, public transformation_stage
integer, parameter, public helium_sampling_worm
integer, parameter, public matrix_init_cholesky
integer, parameter, public silent_lbfgs
integer, parameter, public ls_2pnt
integer, parameter, public ls_none
integer, parameter, public integrate_numeric
integer, parameter, public ls_fit
integer, parameter, public helium_mdist_singlev
integer, parameter, public ls_gold
integer, parameter, public propagator_pimd
integer, parameter, public do_mc_gemc_npt
integer, parameter, public helium_cell_shape_cube
integer, parameter, public fmt_id_pdb
integer, parameter, public gaussian
integer, parameter, public matrix_init_diagonal
integer, parameter, public fix_xy
integer, parameter, public do_mc_traditional
integer, parameter, public transformation_normal
integer, parameter, public helium_mdist_linear
integer, parameter, public helium_solute_intpot_nnp
integer, parameter, public propagator_bcmd
integer, parameter, public fix_yz
integer, parameter, public fix_x
integer, parameter, public fmt_id_xyz
integer, parameter, public numerical
subroutine, public create_constraint_section(section)
Create the constraint section. This section is useful to impose constraints.
subroutine, public create_fe_section(section)
creates the free energy section
subroutine, public create_md_section(section)
...
subroutine, public add_format_keyword(keyword, section, pos, description)
creates the FORMAT keyword
subroutine, public create_motion_print_section(section)
creates the motionprint section
subroutine, public create_motion_section(section)
creates the motion section
subroutine, public create_band_section(section)
creates the section for a BAND run
builds the subsystem section of the input
subroutine, public create_rng_section(section)
Creates the random number restart section.
subroutine, public create_gle_section(section)
...
subroutine, public create_tmc_section(section)
creates the TreeMonteCarlo subsection
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 logical_t
integer, parameter, public char_t
integer, parameter, public integer_t
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
Utilities for string manipulations.
character(len=1), parameter, public newline
represent a keyword in the input
represent a section of the input file