Line data Source code
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 : ! **************************************************************************************************
14 : MODULE input_cp2k_motion
15 : USE bibliography, ONLY: Brieuc2016, &
16 : Byrd1995, &
17 : Ceriotti2010, &
18 : Ceriotti2012, &
19 : Ceriotti2014, &
20 : Henkelman1999, &
21 : Henkelman2014, &
22 : Kapil2016, &
23 : Lindh1995
24 : USE cp_output_handling, ONLY: add_last_numeric, &
25 : cp_print_key_section_create, &
26 : debug_print_level, &
27 : high_print_level, &
28 : low_print_level, &
29 : medium_print_level
30 : USE cp_units, ONLY: cp_unit_to_cp2k
31 : USE input_constants, ONLY: &
32 : bfgs_direct, bfgs_inverse, debug_lbfgs, default_bfgs_method_id, default_cg_method_id, default_dimer_method_id, &
33 : default_lbfgs_method_id, default_minimization_method_id, default_ts_method_id, &
34 : dimer_init_molden, dimer_init_random, &
35 : do_mc_gemc_npt, do_mc_gemc_nvt, do_mc_traditional, do_mc_virial, fmt_id_pdb, fmt_id_xyz, &
36 : gaussian, helium_cell_shape_cube, &
37 : helium_cell_shape_octahedron, helium_forces_average, helium_forces_last, &
38 : helium_mdist_exponential, helium_mdist_gaussian, helium_mdist_linear, &
39 : helium_mdist_quadratic, helium_mdist_singlev, helium_mdist_uniform, &
40 : helium_sampling_ceperley, helium_sampling_worm, helium_solute_intpot_mwater, helium_solute_intpot_nnp, &
41 : helium_solute_intpot_none, high_lbfgs, integrate_exact, integrate_numeric, low_lbfgs, ls_2pnt, ls_3pnt, ls_fit, &
42 : ls_gold, ls_none, matrix_init_cholesky, matrix_init_diagonal, medium_lbfgs, numerical, perm_cycle, &
43 : perm_plain, propagator_pimd, propagator_rpmd, propagator_cmd, propagator_bcmd, silent_lbfgs, &
44 : transformation_normal, transformation_stage
45 : USE input_cp2k_constraints, ONLY: create_constraint_section
46 : USE input_cp2k_free_energy, ONLY: create_fe_section
47 : USE input_cp2k_md, ONLY: create_md_section
48 : USE input_cp2k_motion_print, ONLY: add_format_keyword, &
49 : create_motion_print_section
50 : USE input_cp2k_neb, ONLY: create_band_section
51 : USE input_cp2k_subsys, ONLY: create_rng_section
52 : USE input_cp2k_thermostats, ONLY: create_coord_section, &
53 : create_gle_section, &
54 : create_velocity_section
55 : USE input_cp2k_tmc, ONLY: create_TMC_section
56 : USE input_keyword_types, ONLY: keyword_create, &
57 : keyword_release, &
58 : keyword_type
59 : USE input_section_types, ONLY: section_add_keyword, &
60 : section_add_subsection, &
61 : section_create, &
62 : section_release, &
63 : section_type
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 :
82 : CONTAINS
83 :
84 : ! **************************************************************************************************
85 : !> \brief creates the motion section
86 : !> \param section the section to be created
87 : !> \author teo
88 : ! **************************************************************************************************
89 1480 : SUBROUTINE create_motion_section(section)
90 : TYPE(section_type), POINTER :: section
91 :
92 : TYPE(section_type), POINTER :: subsection
93 :
94 1480 : 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 1480 : n_keywords=1, n_subsections=1, repeats=.FALSE.)
98 :
99 1480 : 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 1480 : use_model_hessian=.TRUE.)
105 1480 : CALL section_add_subsection(section, subsection)
106 1480 : CALL section_release(subsection)
107 :
108 1480 : CALL create_cell_opt_section(subsection)
109 1480 : CALL section_add_subsection(section, subsection)
110 1480 : CALL section_release(subsection)
111 :
112 1480 : CALL create_shellcore_opt_section(subsection)
113 1480 : CALL section_add_subsection(section, subsection)
114 1480 : CALL section_release(subsection)
115 :
116 1480 : CALL create_md_section(subsection)
117 1480 : CALL section_add_subsection(section, subsection)
118 1480 : CALL section_release(subsection)
119 :
120 1480 : CALL create_driver_section(subsection)
121 1480 : CALL section_add_subsection(section, subsection)
122 1480 : CALL section_release(subsection)
123 :
124 1480 : CALL create_fe_section(subsection)
125 1480 : CALL section_add_subsection(section, subsection)
126 1480 : CALL section_release(subsection)
127 :
128 1480 : CALL create_constraint_section(subsection)
129 1480 : CALL section_add_subsection(section, subsection)
130 1480 : CALL section_release(subsection)
131 :
132 1480 : CALL create_fp_section(subsection)
133 1480 : CALL section_add_subsection(section, subsection)
134 1480 : CALL section_release(subsection)
135 :
136 1480 : CALL create_mc_section(subsection)
137 1480 : CALL section_add_subsection(section, subsection)
138 1480 : CALL section_release(subsection)
139 :
140 1480 : CALL create_TMC_section(subsection)
141 1480 : CALL section_add_subsection(section, subsection)
142 1480 : CALL section_release(subsection)
143 :
144 1480 : CALL create_pint_section(subsection)
145 1480 : CALL section_add_subsection(section, subsection)
146 1480 : CALL section_release(subsection)
147 :
148 1480 : CALL create_band_section(subsection)
149 1480 : CALL section_add_subsection(section, subsection)
150 1480 : CALL section_release(subsection)
151 :
152 1480 : CALL create_motion_print_section(subsection)
153 1480 : CALL section_add_subsection(section, subsection)
154 1480 : CALL section_release(subsection)
155 :
156 1480 : 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 1480 : 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 1480 : 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 1480 : n_keywords=10, n_subsections=2, repeats=.FALSE.)
173 :
174 1480 : 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 1480 : default_i_val=100)
180 1480 : CALL section_add_keyword(section, keyword)
181 1480 : 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 1480 : default_i_val=1)
187 1480 : CALL section_add_keyword(section, keyword)
188 1480 : 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 1480 : default_i_val=4)
194 1480 : CALL section_add_keyword(section, keyword)
195 1480 : 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 1480 : default_i_val=16)
201 1480 : CALL section_add_keyword(section, keyword)
202 1480 : 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 1480 : default_l_val=.FALSE.)
208 1480 : CALL section_add_keyword(section, keyword)
209 1480 : 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 1480 : default_l_val=.FALSE.)
215 1480 : CALL section_add_keyword(section, keyword)
216 1480 : 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 1480 : default_l_val=.FALSE.)
222 1480 : CALL section_add_keyword(section, keyword)
223 1480 : 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 1480 : default_r_val=1.0E0_dp)
229 1480 : CALL section_add_keyword(section, keyword)
230 1480 : 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 1480 : default_l_val=.FALSE.)
236 1480 : CALL section_add_keyword(section, keyword)
237 1480 : 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 1480 : default_i_val=1000)
244 1480 : CALL section_add_keyword(section, keyword)
245 1480 : 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"), &
251 : enum_i_vals=[do_mc_traditional, do_mc_gemc_nvt, do_mc_gemc_npt, do_mc_virial], &
252 1480 : default_i_val=do_mc_traditional)
253 1480 : CALL section_add_keyword(section, keyword)
254 1480 : 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 1480 : default_lc_val="")
260 1480 : CALL section_add_keyword(section, keyword)
261 1480 : 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 1480 : default_lc_val="")
267 1480 : CALL section_add_keyword(section, keyword)
268 1480 : 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 1480 : default_lc_val="")
274 1480 : CALL section_add_keyword(section, keyword)
275 1480 : 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 1480 : default_lc_val="")
281 1480 : CALL section_add_keyword(section, keyword)
282 1480 : 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 1480 : default_lc_val="")
288 1480 : CALL section_add_keyword(section, keyword)
289 1480 : 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 1480 : default_lc_val="")
295 1480 : CALL section_add_keyword(section, keyword)
296 1480 : 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 1480 : default_lc_val="")
302 1480 : CALL section_add_keyword(section, keyword)
303 1480 : 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 1480 : default_lc_val="")
309 1480 : CALL section_add_keyword(section, keyword)
310 1480 : 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 1480 : default_lc_val="")
316 1480 : CALL section_add_keyword(section, keyword)
317 1480 : 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 1480 : type_of_var=real_t)
323 1480 : CALL section_add_keyword(section, keyword)
324 1480 : 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 1480 : type_of_var=real_t)
330 1480 : CALL section_add_keyword(section, keyword)
331 1480 : 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 1480 : n_var=-1, type_of_var=real_t)
338 1480 : CALL section_add_keyword(section, keyword)
339 1480 : 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 1480 : default_r_val=1.0E0_dp)
345 1480 : CALL section_add_keyword(section, keyword)
346 1480 : 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 1480 : n_var=-1, type_of_var=real_t)
352 1480 : CALL section_add_keyword(section, keyword)
353 1480 : 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 1480 : default_i_val=0)
359 1480 : CALL section_add_keyword(section, keyword)
360 1480 : CALL keyword_release(keyword)
361 :
362 1480 : CALL create_avbmc_section(subsection)
363 1480 : CALL section_add_subsection(section, subsection)
364 1480 : CALL section_release(subsection)
365 :
366 1480 : CALL create_move_prob_section(subsection)
367 1480 : CALL section_add_subsection(section, subsection)
368 1480 : CALL section_release(subsection)
369 :
370 1480 : CALL create_update_section(subsection)
371 1480 : CALL section_add_subsection(section, subsection)
372 1480 : CALL section_release(subsection)
373 :
374 1480 : CALL create_max_disp_section(subsection)
375 1480 : CALL section_add_subsection(section, subsection)
376 1480 : CALL section_release(subsection)
377 :
378 1480 : END SUBROUTINE create_mc_section
379 :
380 : ! **************************************************************************************************
381 : !> \brief ...
382 : !> \param section will contain the AVBMC parameters for MC
383 : !> \author matt
384 : ! **************************************************************************************************
385 1480 : SUBROUTINE create_avbmc_section(section)
386 : TYPE(section_type), POINTER :: section
387 :
388 : TYPE(keyword_type), POINTER :: keyword
389 :
390 1480 : 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 1480 : n_keywords=5, n_subsections=0, repeats=.FALSE.)
397 :
398 1480 : 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 1480 : n_var=-1, type_of_var=real_t)
405 1480 : CALL section_add_keyword(section, keyword)
406 1480 : 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 1480 : n_var=-1, type_of_var=integer_t)
412 1480 : CALL section_add_keyword(section, keyword)
413 1480 : 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 1480 : n_var=-1, type_of_var=real_t)
419 1480 : CALL section_add_keyword(section, keyword)
420 1480 : 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 1480 : n_var=-1, type_of_var=real_t)
426 1480 : CALL section_add_keyword(section, keyword)
427 1480 : CALL keyword_release(keyword)
428 :
429 1480 : 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 1480 : 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 1480 : 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 1480 : n_keywords=5, n_subsections=2, repeats=.FALSE.)
448 :
449 1480 : 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 1480 : type_of_var=real_t, default_r_val=0.0E0_dp)
455 1480 : CALL section_add_keyword(section, keyword)
456 1480 : 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 1480 : type_of_var=real_t)
462 1480 : CALL section_add_keyword(section, keyword)
463 1480 : 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 1480 : type_of_var=real_t, default_r_val=0.0E0_dp)
469 1480 : CALL section_add_keyword(section, keyword)
470 1480 : 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 1480 : default_r_val=0.0E0_dp)
476 1480 : CALL section_add_keyword(section, keyword)
477 1480 : 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 1480 : type_of_var=real_t)
483 1480 : CALL section_add_keyword(section, keyword)
484 1480 : 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 1480 : type_of_var=real_t, default_r_val=0.0E0_dp)
490 1480 : CALL section_add_keyword(section, keyword)
491 1480 : 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 1480 : type_of_var=real_t, default_r_val=0.0E0_dp)
497 1480 : CALL section_add_keyword(section, keyword)
498 1480 : CALL keyword_release(keyword)
499 :
500 1480 : CALL create_mol_prob_section(subsection)
501 1480 : CALL section_add_subsection(section, subsection)
502 1480 : CALL section_release(subsection)
503 :
504 1480 : CALL create_box_prob_section(subsection)
505 1480 : CALL section_add_subsection(section, subsection)
506 1480 : CALL section_release(subsection)
507 :
508 1480 : 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 1480 : SUBROUTINE create_mol_prob_section(section)
517 : TYPE(section_type), POINTER :: section
518 :
519 : TYPE(keyword_type), POINTER :: keyword
520 :
521 1480 : 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 1480 : n_keywords=5, n_subsections=0, repeats=.FALSE.)
527 :
528 1480 : 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 1480 : n_var=-1, type_of_var=real_t)
534 1480 : CALL section_add_keyword(section, keyword)
535 1480 : 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 1480 : n_var=-1, type_of_var=real_t)
541 1480 : CALL section_add_keyword(section, keyword)
542 1480 : 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 1480 : n_var=-1, type_of_var=real_t)
548 1480 : CALL section_add_keyword(section, keyword)
549 1480 : 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 1480 : n_var=-1, type_of_var=real_t)
555 1480 : CALL section_add_keyword(section, keyword)
556 1480 : 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 1480 : n_var=-1, type_of_var=real_t)
562 1480 : CALL section_add_keyword(section, keyword)
563 1480 : CALL keyword_release(keyword)
564 :
565 1480 : 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 1480 : SUBROUTINE create_box_prob_section(section)
574 : TYPE(section_type), POINTER :: section
575 :
576 : TYPE(keyword_type), POINTER :: keyword
577 :
578 1480 : 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 1480 : n_keywords=2, n_subsections=0, repeats=.FALSE.)
584 :
585 1480 : 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 1480 : type_of_var=real_t, default_r_val=1.0E0_dp)
591 1480 : CALL section_add_keyword(section, keyword)
592 1480 : 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 1480 : type_of_var=real_t, default_r_val=1.0E0_dp)
598 1480 : CALL section_add_keyword(section, keyword)
599 1480 : 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 1480 : type_of_var=real_t, default_r_val=1.0E0_dp)
605 1480 : CALL section_add_keyword(section, keyword)
606 1480 : CALL keyword_release(keyword)
607 :
608 1480 : 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 1480 : SUBROUTINE create_update_section(section)
617 : TYPE(section_type), POINTER :: section
618 :
619 : TYPE(keyword_type), POINTER :: keyword
620 :
621 1480 : CPASSERT(.NOT. ASSOCIATED(section))
622 :
623 : CALL section_create(section, __LOCATION__, name="MOVE_UPDATES", &
624 : description="Frequency for updating move maximum displacements.", &
625 1480 : n_keywords=2, n_subsections=0, repeats=.FALSE.)
626 :
627 1480 : 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 1480 : default_i_val=10000)
633 1480 : CALL section_add_keyword(section, keyword)
634 1480 : 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 1480 : default_i_val=10000)
641 1480 : CALL section_add_keyword(section, keyword)
642 1480 : 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 1480 : default_i_val=10000)
648 1480 : CALL section_add_keyword(section, keyword)
649 1480 : CALL keyword_release(keyword)
650 :
651 1480 : 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 1480 : SUBROUTINE create_max_disp_section(section)
659 : TYPE(section_type), POINTER :: section
660 :
661 : TYPE(section_type), POINTER :: subsection
662 :
663 1480 : CPASSERT(.NOT. ASSOCIATED(section))
664 :
665 : CALL section_create(section, __LOCATION__, name="max_displacements", &
666 : description="The maximum displacements for all attempted moves.", &
667 1480 : n_keywords=1, n_subsections=2, repeats=.FALSE.)
668 :
669 1480 : NULLIFY (subsection)
670 :
671 1480 : CALL create_mol_disp_section(subsection)
672 1480 : CALL section_add_subsection(section, subsection)
673 1480 : CALL section_release(subsection)
674 :
675 1480 : CALL create_box_disp_section(subsection)
676 1480 : CALL section_add_subsection(section, subsection)
677 1480 : CALL section_release(subsection)
678 :
679 1480 : 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 1480 : SUBROUTINE create_mol_disp_section(section)
688 : TYPE(section_type), POINTER :: section
689 :
690 : TYPE(keyword_type), POINTER :: keyword
691 :
692 1480 : 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 1480 : n_keywords=5, n_subsections=0, repeats=.FALSE.)
698 :
699 1480 : 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 1480 : n_var=-1, type_of_var=real_t)
705 1480 : CALL section_add_keyword(section, keyword)
706 1480 : 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 1480 : n_var=-1, type_of_var=real_t)
712 1480 : CALL section_add_keyword(section, keyword)
713 1480 : 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 1480 : n_var=-1, type_of_var=real_t)
719 1480 : CALL section_add_keyword(section, keyword)
720 1480 : 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 1480 : n_var=-1, type_of_var=real_t)
726 1480 : CALL section_add_keyword(section, keyword)
727 1480 : 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 1480 : n_var=-1, type_of_var=real_t)
733 1480 : CALL section_add_keyword(section, keyword)
734 1480 : CALL keyword_release(keyword)
735 :
736 1480 : 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 1480 : SUBROUTINE create_box_disp_section(section)
745 : TYPE(section_type), POINTER :: section
746 :
747 : TYPE(keyword_type), POINTER :: keyword
748 :
749 1480 : 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 1480 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
755 :
756 1480 : NULLIFY (keyword)
757 :
758 : CALL keyword_create(keyword, __LOCATION__, name="RMVOLUME", &
759 : description="Maximum volume displacement, in angstrom**3.", &
760 : usage="RMVOLUME {real}", &
761 1480 : type_of_var=real_t)
762 1480 : CALL section_add_keyword(section, keyword)
763 1480 : 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 1480 : default_r_val=1.0E0_dp)
769 1480 : CALL section_add_keyword(section, keyword)
770 1480 : CALL keyword_release(keyword)
771 :
772 1480 : 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 5920 : 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 5920 : CPASSERT(.NOT. ASSOCIATED(section))
795 : CALL section_create(section, location=location, name=label, description=description, &
796 5920 : n_keywords=1, n_subsections=1, repeats=.FALSE.)
797 :
798 5920 : NULLIFY (keyword)
799 5920 : 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."), &
806 : enum_i_vals=[default_minimization_method_id, default_ts_method_id], &
807 1480 : default_i_val=default_minimization_method_id)
808 1480 : CALL section_add_keyword(section, keyword)
809 1480 : 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"), &
824 : enum_i_vals=[default_bfgs_method_id, default_lbfgs_method_id, default_cg_method_id], &
825 17760 : default_i_val=default_bfgs_method_id)
826 5920 : CALL section_add_keyword(section, keyword)
827 5920 : 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 5920 : default_i_val=200)
834 5920 : CALL section_add_keyword(section, keyword)
835 5920 : 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 5920 : default_r_val=0.0030_dp, unit_str="bohr")
842 5920 : CALL section_add_keyword(section, keyword)
843 5920 : 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 5920 : default_r_val=0.00045_dp, unit_str="hartree/bohr")
849 5920 : CALL section_add_keyword(section, keyword)
850 5920 : 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 5920 : default_r_val=0.0015_dp)
857 5920 : CALL section_add_keyword(section, keyword)
858 5920 : 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 5920 : default_r_val=0.00030_dp)
864 5920 : CALL section_add_keyword(section, keyword)
865 5920 : 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 5920 : usage="step_start_val <integer>", default_i_val=0)
870 5920 : CALL section_add_keyword(section, keyword)
871 5920 : 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, the stress tensor, and "// &
878 : "the CELL_OPT cell metric. "// &
879 : "It works for supercell. It does not affect/reduce computational cost. "// &
880 : "Use EPS_SYMMETRY to adjust the detection threshold.", &
881 : usage="KEEP_SPACE_GROUP .TRUE.", &
882 5920 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE., repeats=.FALSE.)
883 5920 : CALL section_add_keyword(section, keyword)
884 5920 : CALL keyword_release(keyword)
885 :
886 : ! collects keywords related to Space Group Symmetry analysis
887 : CALL keyword_create( &
888 : keyword, __LOCATION__, name="SHOW_SPACE_GROUP", &
889 : description="Detect and show space group of the system after optimization. "// &
890 : "It works for supercell. It does not affect/reduce computational cost. "// &
891 : "Use EPS_SYMMETRY to adjust the detection threshold.", &
892 : usage="SHOW_SPACE_GROUP .TRUE.", &
893 5920 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE., repeats=.FALSE.)
894 5920 : CALL section_add_keyword(section, keyword)
895 5920 : CALL keyword_release(keyword)
896 :
897 : ! collects keywords related to precision for finding the space group
898 : CALL keyword_create( &
899 : keyword, __LOCATION__, name="EPS_SYMMETRY", &
900 : description="Accuracy for space group determination. EPS_SYMMETRY is dimensionless. "// &
901 : "Roughly speaking, two scaled (fractional) atomic positions v1, v2 are considered identical if |v1 - v2| < EPS_SYMMETRY. ", &
902 : usage="EPS_SYMMETRY {REAL}", &
903 5920 : default_r_val=1.e-4_dp, repeats=.FALSE.)
904 5920 : CALL section_add_keyword(section, keyword)
905 5920 : CALL keyword_release(keyword)
906 :
907 : ! collects keywords related to reduction of symmetry due to an external field
908 : CALL keyword_create( &
909 : keyword, __LOCATION__, name="SYMM_REDUCTION", &
910 : description="Direction of the external static electric field. "// &
911 : "Some symmetry operations are not compatible with the direction of an electric field. "// &
912 : "These operations are used when enforcing the space group.", &
913 : usage="SYMM_REDUCTION 0.0 0.0 0.0", &
914 : repeats=.FALSE., n_var=3, &
915 5920 : type_of_var=real_t, default_r_vals=[0.0_dp, 0.0_dp, 0.0_dp])
916 5920 : CALL section_add_keyword(section, keyword)
917 5920 : CALL keyword_release(keyword)
918 :
919 : ! collects keywords related to ranges of atoms to symmetrize
920 : CALL keyword_create( &
921 : keyword, __LOCATION__, name="SYMM_EXCLUDE_RANGE", &
922 : description="Range of atoms to exclude from space group symmetry. "// &
923 : "These atoms are excluded from both identification and enforcement. "// &
924 : "This keyword can be repeated.", &
925 5920 : repeats=.TRUE., usage="SYMM_EXCLUDE_RANGE {Int} {Int}", type_of_var=integer_t, n_var=2)
926 5920 : CALL section_add_keyword(section, keyword)
927 5920 : CALL keyword_release(keyword)
928 :
929 : CALL keyword_create( &
930 : keyword, __LOCATION__, name="SPGR_PRINT_ATOMS", &
931 : description="Print equivalent atoms list for each space group symmetry operation.", &
932 5920 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
933 5920 : CALL section_add_keyword(section, keyword)
934 5920 : CALL keyword_release(keyword)
935 :
936 5920 : CALL create_lbfgs_section(subsection)
937 5920 : CALL section_add_subsection(section, subsection)
938 5920 : CALL section_release(subsection)
939 :
940 5920 : CALL create_cg_section(subsection)
941 5920 : CALL section_add_subsection(section, subsection)
942 5920 : CALL section_release(subsection)
943 :
944 5920 : CALL create_bfgs_section(subsection, use_model_hessian)
945 5920 : CALL section_add_subsection(section, subsection)
946 5920 : CALL section_release(subsection)
947 :
948 5920 : IF (.NOT. just_optimizers) THEN
949 : ! Transition states section
950 1480 : CALL create_ts_section(subsection)
951 1480 : CALL section_add_subsection(section, subsection)
952 1480 : CALL section_release(subsection)
953 :
954 : ! Create the PRINT subsection
955 1480 : NULLIFY (subsection)
956 : CALL section_create(subsection, __LOCATION__, name="PRINT", &
957 : description="Controls the printing properties during a geometry optimization run", &
958 1480 : n_keywords=0, n_subsections=1, repeats=.TRUE.)
959 1480 : NULLIFY (print_key)
960 : CALL cp_print_key_section_create( &
961 : print_key, __LOCATION__, "program_run_info", &
962 : description="Controls the printing of basic information during the Geometry Optimization", &
963 1480 : print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
964 1480 : CALL section_add_subsection(subsection, print_key)
965 1480 : CALL section_release(print_key)
966 1480 : CALL section_add_subsection(section, subsection)
967 1480 : CALL section_release(subsection)
968 : END IF
969 :
970 5920 : END SUBROUTINE create_geoopt_section
971 :
972 : ! **************************************************************************************************
973 : !> \brief creates the section for the shell-core optimization
974 : !> \param section the section to be created
975 : !> \author Caino
976 : ! **************************************************************************************************
977 1480 : SUBROUTINE create_shellcore_opt_section(section)
978 : TYPE(section_type), POINTER :: section
979 :
980 : TYPE(section_type), POINTER :: print_key, subsection
981 :
982 : CALL create_geoopt_section( &
983 : section, __LOCATION__, label="SHELL_OPT", &
984 : description="This section sets the environment for the optimization of the shell-core distances"// &
985 : " that might turn to be necessary along a MD run using a shell-model potential."// &
986 : " The optimization procedure is activated when at least one of the shell-core"// &
987 : " pairs becomes too elongated, i.e. when the assumption of point dipole is not longer valid.", &
988 : just_optimizers=.TRUE., &
989 1480 : use_model_hessian=.FALSE.)
990 :
991 1480 : NULLIFY (print_key, subsection)
992 :
993 : ! Create the PRINT subsection
994 : NULLIFY (subsection)
995 : CALL section_create(subsection, __LOCATION__, name="PRINT", &
996 : description="Controls the printing properties during a shell-core optimization procedure", &
997 1480 : n_keywords=0, n_subsections=1, repeats=.TRUE.)
998 1480 : NULLIFY (print_key)
999 : CALL cp_print_key_section_create(print_key, __LOCATION__, "program_run_info", &
1000 : description="Controls the printing of basic information during the Optimization", &
1001 1480 : print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
1002 1480 : CALL section_add_subsection(subsection, print_key)
1003 1480 : CALL section_release(print_key)
1004 1480 : CALL section_add_subsection(section, subsection)
1005 1480 : CALL section_release(subsection)
1006 :
1007 1480 : END SUBROUTINE create_shellcore_opt_section
1008 :
1009 : ! **************************************************************************************************
1010 : !> \brief creates the section for the cell optimization
1011 : !> \param section the section to be created
1012 : !> \author Teodoro Laino [tlaino] - University of Zurich - 03.2008
1013 : ! **************************************************************************************************
1014 1480 : SUBROUTINE create_cell_opt_section(section)
1015 : TYPE(section_type), POINTER :: section
1016 :
1017 : TYPE(keyword_type), POINTER :: keyword
1018 : TYPE(section_type), POINTER :: print_key, subsection
1019 :
1020 : CALL create_geoopt_section(section, __LOCATION__, label="CELL_OPT", &
1021 : description="This section sets the environment for the optimization "// &
1022 : "of the simulation cell. As is noted in FORCE_EVAL/SUBSYS/CELL, the "// &
1023 : "program convention is that the first cell vector A lies along the "// &
1024 : "X-axis and the second cell vector B is in the XY plane, such that "// &
1025 : "the cell vector matrix is a lower triangle. There is no complete, "// &
1026 : "official algorithm support and/or tests for updating the three "// &
1027 : "upper triangular components during a cell optimization; please "// &
1028 : "prepare input accordingly with these three components precisely 0 "// &
1029 : "even for cases like the primitive rhombohedral cell of the FCC lattice.", &
1030 1480 : just_optimizers=.TRUE., use_model_hessian=.FALSE.)
1031 :
1032 1480 : NULLIFY (keyword, print_key, subsection)
1033 : CALL keyword_create( &
1034 : keyword, __LOCATION__, name="TYPE", removed=.TRUE., description="", &
1035 : deprecation_notice="The keyword MOTION/CELL_OPT/TYPE has been removed because "// &
1036 : "cell optimizations now always use DIRECT_CELL_OPT.", &
1037 : enum_c_vals=s2a("DIRECT_CELL_OPT", "GEO_OPT", "MD"), &
1038 1480 : enum_i_vals=[1, 2, 3], default_i_val=1)
1039 1480 : CALL section_add_keyword(section, keyword)
1040 1480 : CALL keyword_release(keyword)
1041 :
1042 : CALL keyword_create( &
1043 : keyword, __LOCATION__, name="EXTERNAL_PRESSURE", &
1044 : description="Specifies the external pressure (1 value or the full 9 components of the pressure tensor) "// &
1045 : "applied during the cell optimization.", &
1046 : usage="EXTERNAL_PRESSURE {REAL} .. {REAL}", unit_str="bar", &
1047 : default_r_vals=[cp_unit_to_cp2k(100.0_dp, "bar"), 0.0_dp, 0.0_dp, &
1048 : 0.0_dp, cp_unit_to_cp2k(100.0_dp, "bar"), 0.0_dp, &
1049 14800 : 0.0_dp, 0.0_dp, cp_unit_to_cp2k(100.0_dp, "bar")], n_var=-1)
1050 1480 : CALL section_add_keyword(section, keyword)
1051 1480 : CALL keyword_release(keyword)
1052 :
1053 : CALL keyword_create(keyword, __LOCATION__, name="KEEP_VOLUME", &
1054 : description="Keep the volume of the cell constant during cell optimization. "// &
1055 : "This is implemented by comparing the cell volumes and scaling the new "// &
1056 : "cell vectors just before updating the cell information, and can be "// &
1057 : "used together with KEEP_ANGLES or KEEP_SYMMETRY.", &
1058 1480 : usage="KEEP_VOLUME TRUE", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1059 1480 : CALL section_add_keyword(section, keyword)
1060 1480 : CALL keyword_release(keyword)
1061 :
1062 : CALL keyword_create(keyword, __LOCATION__, name="KEEP_ANGLES", &
1063 : description="Keep angles between the cell vectors constant, but "// &
1064 : "allow the lengths of the cell vectors to change independently "// &
1065 : "during cell optimization. This is implemented by projecting out "// &
1066 : "the components of angles in the cell gradient before the cell "// &
1067 : "is updated. Albeit general, this is most useful for triclinic "// &
1068 : "cells; to enforce higher symmetry, see KEEP_SYMMETRY.", &
1069 1480 : usage="KEEP_ANGLES TRUE", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1070 1480 : CALL section_add_keyword(section, keyword)
1071 1480 : CALL keyword_release(keyword)
1072 :
1073 : CALL keyword_create(keyword, __LOCATION__, name="KEEP_SYMMETRY", &
1074 : description="Keep the requested initial cell symmetry as specified "// &
1075 : "in the FORCE_EVAL/SUBSYS/CELL section during cell optimization. "// &
1076 : "This is implemented by removing symmetry-breaking components and "// &
1077 : "taking averages of components if necessary in the cell gradient "// &
1078 : "before the cell is updated. To enforce the space group (which "// &
1079 : "requires spglib package), see KEEP_SPACE_GROUP.", &
1080 1480 : usage="KEEP_SYMMETRY TRUE", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1081 1480 : CALL section_add_keyword(section, keyword)
1082 1480 : CALL keyword_release(keyword)
1083 :
1084 : CALL keyword_create( &
1085 : keyword, __LOCATION__, name="CONSTRAINT", &
1086 : description="Imposes a constraint on the cell optimization by fixing the specified "// &
1087 : "cell components or angles. Cell convention: a lies along x, b lies in the xy plane. "// &
1088 : "The six independent components are AX, BX, BY, CX, CY, CZ. A, B and C fix a complete "// &
1089 : "cell vector: A = AX, B = BX and BY, C = CX, CY and CZ. X, Y and Z follow the legacy "// &
1090 : "direction tokens. X fixes every x component: AX, BX and CX. Y fixes the complete b "// &
1091 : "vector and the y component of c: BX, BY and CY. Z fixes the complete c vector, "// &
1092 : "because only c has a z component: Z equals C. ALPHA, BETA and GAMMA fix the "// &
1093 : "corresponding cell angles. Accepted tokens: NONE, A, B, C, X, Y, Z, XY, XZ, YZ, "// &
1094 : "AX, BX, BY, CX, CY, CZ, ALPHA, BETA, GAMMA. Several tokens may be given on one line. "// &
1095 : "Redundant tokens give a warning and NONE must stand alone.", &
1096 : usage="CONSTRAINT {NONE} | ({A|B|C|X|Y|Z|XY|XZ|YZ|AX|BX|BY|CX|CY|CZ|ALPHA|BETA|GAMMA} ...)", &
1097 2960 : type_of_var=char_t, n_var=-1, default_c_vals=["NONE"])
1098 1480 : CALL section_add_keyword(section, keyword)
1099 1480 : CALL keyword_release(keyword)
1100 :
1101 : CALL keyword_create(keyword, __LOCATION__, name="PRESSURE_TOLERANCE", &
1102 : description="Specifies the Pressure tolerance (compared to the external pressure) to achieve "// &
1103 : "during the cell optimization.", &
1104 : usage="PRESSURE_TOLERANCE {REAL}", unit_str="bar", &
1105 1480 : default_r_val=cp_unit_to_cp2k(100.0_dp, "bar"))
1106 1480 : CALL section_add_keyword(section, keyword)
1107 1480 : CALL keyword_release(keyword)
1108 :
1109 : ! Create the PRINT subsection
1110 1480 : NULLIFY (subsection)
1111 : CALL section_create(subsection, __LOCATION__, name="PRINT", &
1112 : description="Controls the printing properties during a geometry optimization run", &
1113 1480 : n_keywords=0, n_subsections=1, repeats=.TRUE.)
1114 1480 : NULLIFY (print_key)
1115 : CALL cp_print_key_section_create(print_key, __LOCATION__, "program_run_info", &
1116 : description="Controls the printing of basic information during the Geometry Optimization", &
1117 1480 : print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
1118 1480 : CALL section_add_subsection(subsection, print_key)
1119 1480 : CALL section_release(print_key)
1120 : CALL cp_print_key_section_create(print_key, __LOCATION__, "cell", &
1121 : description="Controls the printing of the cell eveytime a calculation using a new cell is started.", &
1122 : print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__", &
1123 1480 : unit_str="angstrom")
1124 1480 : CALL section_add_subsection(subsection, print_key)
1125 1480 : CALL section_release(print_key)
1126 1480 : CALL section_add_subsection(section, subsection)
1127 1480 : CALL section_release(subsection)
1128 :
1129 1480 : END SUBROUTINE create_cell_opt_section
1130 :
1131 : ! **************************************************************************************************
1132 : !> \brief creates the section for tuning transition states search
1133 : !> \param section the section to be created
1134 : !> \author Teodoro Laino [tlaino] - University of Zurich - 01.2008
1135 : ! **************************************************************************************************
1136 1480 : SUBROUTINE create_ts_section(section)
1137 : TYPE(section_type), POINTER :: section
1138 :
1139 : TYPE(keyword_type), POINTER :: keyword
1140 : TYPE(section_type), POINTER :: print_key, subsection, subsection2, &
1141 : subsection3
1142 :
1143 : ! Create the Transition State subsection
1144 :
1145 1480 : NULLIFY (section, keyword, subsection, subsection2)
1146 : CALL section_create(section, __LOCATION__, name="TRANSITION_STATE", &
1147 : description="Specifies parameters to perform a transition state search", &
1148 1480 : n_keywords=0, n_subsections=1, repeats=.FALSE.)
1149 :
1150 : CALL keyword_create(keyword, __LOCATION__, name="METHOD", &
1151 : description="Specify which kind of method to use for locating transition states", &
1152 : citations=[Henkelman1999], &
1153 : usage="METHOD (DIMER)", &
1154 : enum_c_vals=s2a("DIMER"), &
1155 : enum_desc=s2a("Uses the dimer method to optimize transition states."), &
1156 : enum_i_vals=[default_dimer_method_id], &
1157 2960 : default_i_val=default_dimer_method_id)
1158 1480 : CALL section_add_keyword(section, keyword)
1159 1480 : CALL keyword_release(keyword)
1160 :
1161 : CALL section_create(subsection, __LOCATION__, name="DIMER", &
1162 : description="Parameters for a dimer saddle search. Both GEO_OPT and ROT_OPT require OPTIMIZER CG.", &
1163 1480 : n_keywords=0, n_subsections=1, repeats=.FALSE.)
1164 :
1165 : CALL keyword_create(keyword, __LOCATION__, name="SOLID_STATE", &
1166 : description="Search for a saddle of E+pV in joint atomic and six cell coordinates. "// &
1167 : "Requires full periodicity and analytical stress. See DIMER_VECTOR for the component order.", &
1168 1480 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1169 1480 : CALL section_add_keyword(subsection, keyword)
1170 1480 : CALL keyword_release(keyword)
1171 :
1172 : CALL keyword_create(keyword, __LOCATION__, name="EXTERNAL_PRESSURE", &
1173 : description="Hydrostatic pressure for the solid-state enthalpy E+pV.", &
1174 1480 : unit_str="bar", default_r_val=0.0_dp)
1175 1480 : CALL section_add_keyword(subsection, keyword)
1176 1480 : CALL keyword_release(keyword)
1177 :
1178 : CALL keyword_create(keyword, __LOCATION__, name="CELL_WEIGHT", &
1179 : description="Relative weight of cell deformation in the solid-state metric. "// &
1180 : "The scale is this weight times the mean atomic spacing times sqrt(number of atoms).", &
1181 1480 : default_r_val=1.0_dp)
1182 1480 : CALL section_add_keyword(subsection, keyword)
1183 1480 : CALL keyword_release(keyword)
1184 :
1185 : CALL keyword_create(keyword, __LOCATION__, name="REFERENCE_CELL", &
1186 : description="Reference cell vectors A, B and C for the solid-state metric. "// &
1187 : "Defaults to the starting cell and is saved in the restart to preserve the dimer vector.", &
1188 1480 : type_of_var=real_t, n_var=9, unit_str="angstrom")
1189 1480 : CALL section_add_keyword(subsection, keyword)
1190 1480 : CALL keyword_release(keyword)
1191 :
1192 : CALL keyword_create(keyword, __LOCATION__, name="DR", &
1193 : description="This keyword sets the value for the DR parameter.", &
1194 : usage="DR {real}", unit_str='angstrom', &
1195 1480 : default_r_val=cp_unit_to_cp2k(0.01_dp, "angstrom"))
1196 1480 : CALL section_add_keyword(subsection, keyword)
1197 1480 : CALL keyword_release(keyword)
1198 :
1199 : CALL keyword_create(keyword, __LOCATION__, name="INITIALIZATION_METHOD", &
1200 : description="Specify the initialization method of the dimer vector, "// &
1201 : "which is crucial for converging to the desired transition state. "// &
1202 : "If the DIMER_VECTOR section is defined explicitly, it will always "// &
1203 : "be parsed directly (e.g. in restart files); INITIALIZATION_METHOD "// &
1204 : "is only effective if the DIMER_VECTOR section is not explicit.", &
1205 : usage="INITIALIZATION_METHOD (RANDOM|MOLDEN)", &
1206 : enum_desc=s2a("Generate the initial dimer vector randomly. This is "// &
1207 : "the default for backwards compatibility; in practice "// &
1208 : "it may distort the structure and slow down convergence.", &
1209 : "Generate the initial dimer vector from one or more "// &
1210 : "vibrational normal modes as read from a MOLDEN file "// &
1211 : "produced by `VIBRATIONAL_ANALYSIS%PRINT%MOLDEN_VIB` "// &
1212 : "in a vibrational analysis task. Requires setting up "// &
1213 : "keywords `VIB_MOLDEN_NAME`, `VIB_INDEX` and `VIB_WEIGHT`."), &
1214 : enum_c_vals=s2a("RANDOM", "MOLDEN"), &
1215 : enum_i_vals=[dimer_init_random, dimer_init_molden], &
1216 1480 : default_i_val=dimer_init_random)
1217 1480 : CALL section_add_keyword(subsection, keyword)
1218 1480 : CALL keyword_release(keyword)
1219 :
1220 : CALL keyword_create(keyword, __LOCATION__, name="VIB_MOLDEN_NAME", &
1221 : description="The external molden file containing vibrational "// &
1222 : "normal modes for `INITIALIZATION_METHOD MOLDEN`.", &
1223 1480 : usage="VIB_MOLDEN_NAME <CHARACTER>", type_of_var=lchar_t)
1224 1480 : CALL section_add_keyword(subsection, keyword)
1225 1480 : CALL keyword_release(keyword)
1226 :
1227 : CALL keyword_create(keyword, __LOCATION__, name="VIB_INDEX", &
1228 : description="The index of one or more vibrational normal modes "// &
1229 : "from the file whose linear combination will form the initial "// &
1230 : "dimer vector.", &
1231 : usage="VIB_INDEX {integer} {integer} .. {integer}", repeats=.TRUE., &
1232 1480 : n_var=-1, default_i_vals=[1], type_of_var=integer_t)
1233 1480 : CALL section_add_keyword(subsection, keyword)
1234 1480 : CALL keyword_release(keyword)
1235 :
1236 : CALL keyword_create(keyword, __LOCATION__, name="VIB_WEIGHT", &
1237 : description="The weight of one or more vibrational normal modes "// &
1238 : "from the file whose linear combination will form the initial "// &
1239 : "dimer vector.", &
1240 : usage="VIB_WEIGHT {real} {real} .. {real}", repeats=.TRUE., &
1241 1480 : n_var=-1, default_r_vals=[1.0_dp], type_of_var=real_t)
1242 1480 : CALL section_add_keyword(subsection, keyword)
1243 1480 : CALL keyword_release(keyword)
1244 :
1245 : CALL keyword_create(keyword, __LOCATION__, name="INTERPOLATE_GRADIENT", &
1246 : description="This keyword controls the interpolation of the gradient whenever possible"// &
1247 : " during the optimization of the Dimer. The use of this keywords saves 1 evaluation"// &
1248 : " of energy/forces.", usage="INTERPOLATE_GRADIENT {logical}", default_l_val=.TRUE., &
1249 1480 : lone_keyword_l_val=.TRUE.)
1250 1480 : CALL section_add_keyword(subsection, keyword)
1251 1480 : CALL keyword_release(keyword)
1252 :
1253 : CALL keyword_create(keyword, __LOCATION__, name="ANGLE_TOLERANCE", &
1254 : description="This keyword sets the value of the tolerance angle for the line search"// &
1255 : " performed to optimize the orientation of the dimer.", &
1256 : usage="ANGLE_TOLERANCE {real}", unit_str='rad', &
1257 1480 : default_r_val=cp_unit_to_cp2k(5.0_dp, "deg"))
1258 1480 : CALL section_add_keyword(subsection, keyword)
1259 1480 : CALL keyword_release(keyword)
1260 :
1261 : CALL keyword_create(keyword, __LOCATION__, name="K-DIMER", &
1262 : description="This keyword activates the constrained k-dimer translation"// &
1263 : " J. Chem. Phys. 141, 164111 (2014).", &
1264 : citations=[Henkelman2014], &
1265 : usage="K-DIMER {logica}", &
1266 : default_l_val=.FALSE., &
1267 2960 : lone_keyword_l_val=.FALSE.)
1268 1480 : CALL section_add_keyword(subsection, keyword)
1269 1480 : CALL keyword_release(keyword)
1270 :
1271 : CALL keyword_create(keyword, __LOCATION__, name="BETA", &
1272 : description="Exponential factor for the switching function used in K-DIMER", &
1273 : usage="BETA {real}", &
1274 : default_r_val=5.0_dp, &
1275 1480 : lone_keyword_r_val=5.0_dp)
1276 1480 : CALL section_add_keyword(subsection, keyword)
1277 1480 : CALL keyword_release(keyword)
1278 :
1279 : CALL create_geoopt_section( &
1280 : subsection2, __LOCATION__, label="ROT_OPT", &
1281 : description="This section sets the environment for the optimization of the rotation of the Dimer.", &
1282 : just_optimizers=.TRUE., &
1283 1480 : use_model_hessian=.FALSE.)
1284 1480 : NULLIFY (subsection3)
1285 : CALL section_create(subsection3, __LOCATION__, name="PRINT", &
1286 : description="Controls the printing properties during the dimer rotation optimization run", &
1287 1480 : n_keywords=0, n_subsections=1, repeats=.TRUE.)
1288 1480 : NULLIFY (print_key)
1289 :
1290 : CALL cp_print_key_section_create(print_key, __LOCATION__, "PROGRAM_RUN_INFO", &
1291 : description="Controls the printing of basic information during the Geometry Optimization", &
1292 1480 : print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
1293 1480 : CALL section_add_subsection(subsection3, print_key)
1294 1480 : CALL section_release(print_key)
1295 :
1296 : CALL cp_print_key_section_create(print_key, __LOCATION__, "ROTATIONAL_INFO", &
1297 : description="Controls the printing basic info during the cleaning of the "// &
1298 : "rotational degrees of freedom.", print_level=low_print_level, &
1299 1480 : add_last=add_last_numeric, filename="__STD_OUT__")
1300 : CALL keyword_create(keyword, __LOCATION__, name="COORDINATES", &
1301 : description="Prints atomic coordinates after rotation", &
1302 1480 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1303 1480 : CALL section_add_keyword(print_key, keyword)
1304 1480 : CALL keyword_release(keyword)
1305 1480 : CALL section_add_subsection(subsection3, print_key)
1306 1480 : CALL section_release(print_key)
1307 :
1308 1480 : CALL section_add_subsection(subsection2, subsection3)
1309 1480 : CALL section_release(subsection3)
1310 1480 : CALL section_add_subsection(subsection, subsection2)
1311 1480 : CALL section_release(subsection2)
1312 :
1313 : CALL section_create(subsection2, __LOCATION__, name="DIMER_VECTOR", &
1314 : description="Initial dimer direction, overriding INITIALIZATION_METHOD. For a molecular dimer "// &
1315 : "supply 3*N components: one Cartesian x, y, z triplet per atom in coordinate order. "// &
1316 : "With SOLID_STATE supply 3*N+6 components: the N atomic triplets in the reference frame, "// &
1317 : "then six scaled components of the relative cell deformation. These are the logarithmic "// &
1318 : "stretches AX, BY, CZ followed by the shears BX, CX, CY in that frame. "// &
1319 : "Restart files contain the updated direction.", &
1320 1480 : n_keywords=0, n_subsections=1, repeats=.FALSE.)
1321 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
1322 : description="Give one atomic triplet per line. For SOLID_STATE put the six cell components "// &
1323 : "on a final line.", repeats=.TRUE., &
1324 1480 : usage="{Real} ...", type_of_var=real_t, n_var=-1)
1325 1480 : CALL section_add_keyword(subsection2, keyword)
1326 1480 : CALL keyword_release(keyword)
1327 1480 : CALL section_add_subsection(subsection, subsection2)
1328 1480 : CALL section_release(subsection2)
1329 :
1330 1480 : CALL section_add_subsection(section, subsection)
1331 1480 : CALL section_release(subsection)
1332 :
1333 1480 : END SUBROUTINE create_ts_section
1334 :
1335 : ! **************************************************************************************************
1336 : !> \brief creates the BFGS section
1337 : !> \param section the section to be created
1338 : !> \param use_model_hessian ...
1339 : !> \author Teodoro Laino [tlaino] - University of Zurich - 01.2008
1340 : ! **************************************************************************************************
1341 5920 : SUBROUTINE create_bfgs_section(section, use_model_hessian)
1342 : TYPE(section_type), POINTER :: section
1343 : LOGICAL, INTENT(IN) :: use_model_hessian
1344 :
1345 : TYPE(keyword_type), POINTER :: keyword
1346 : TYPE(section_type), POINTER :: print_key
1347 :
1348 : ! create the BFGS subsection
1349 :
1350 5920 : NULLIFY (section, keyword, print_key)
1351 : CALL section_create(section, __LOCATION__, name="BFGS", &
1352 : description="Provides parameters to tune the BFGS optimization", &
1353 5920 : n_keywords=0, n_subsections=1, repeats=.FALSE.)
1354 :
1355 : CALL keyword_create(keyword, __LOCATION__, name="METHOD", &
1356 : description="Matrix updated by full-memory BFGS. DIRECT updates the Hessian; "// &
1357 : "INVERSE updates its inverse without a full diagonalization at each step. "// &
1358 : "If METHOD is omitted and USE_RAT_FUN_OPT is enabled, DIRECT is used instead.", &
1359 : usage="METHOD INVERSE", &
1360 : enum_c_vals=s2a("DIRECT", "INVERSE"), &
1361 5920 : enum_i_vals=[bfgs_direct, bfgs_inverse], default_i_val=bfgs_inverse)
1362 5920 : CALL section_add_keyword(section, keyword)
1363 5920 : CALL keyword_release(keyword)
1364 :
1365 : CALL keyword_create(keyword, __LOCATION__, name="TRUST_RADIUS", &
1366 : description="Trust radius used in BFGS. Previously set to 0.1. "// &
1367 : "Large values can lead to instabilities", &
1368 : usage="TRUST_RADIUS {real}", unit_str='angstrom', &
1369 5920 : default_r_val=cp_unit_to_cp2k(0.25_dp, "angstrom"))
1370 5920 : CALL section_add_keyword(section, keyword)
1371 5920 : CALL keyword_release(keyword)
1372 :
1373 : CALL keyword_create(keyword, __LOCATION__, name="USE_MODEL_HESSIAN", &
1374 : description="Uses a model Hessian as initial guess instead of a unit matrix."// &
1375 : " Should lead in general to improved convergence might be switched off for exotic cases", &
1376 : usage="USE_MODEL_HESSIAN", &
1377 : citations=[Lindh1995], &
1378 11840 : default_l_val=use_model_hessian, lone_keyword_l_val=.TRUE.)
1379 5920 : CALL section_add_keyword(section, keyword)
1380 5920 : CALL keyword_release(keyword)
1381 :
1382 : CALL keyword_create(keyword, __LOCATION__, name="USE_RAT_FUN_OPT", &
1383 : description="Includes a rational function optimization to determine the step. "// &
1384 : "Previously default but did not improve convergence in many cases. "// &
1385 : "Not supported by inverse-Hessian update method.", &
1386 : usage="USE_RAT_FUN_OPT", &
1387 5920 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1388 5920 : CALL section_add_keyword(section, keyword)
1389 5920 : CALL keyword_release(keyword)
1390 :
1391 : CALL keyword_create(keyword, __LOCATION__, name="RESTART_HESSIAN", &
1392 : description="Reads the initial BFGS matrix from file. Hessian and inverse-Hessian "// &
1393 : "restarts are converted to the selected METHOD when necessary.", &
1394 : usage="RESTART_HESSIAN", &
1395 5920 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1396 5920 : CALL section_add_keyword(section, keyword)
1397 5920 : CALL keyword_release(keyword)
1398 :
1399 : CALL keyword_create(keyword, __LOCATION__, name="RESTART_FILE_NAME", &
1400 : description="Specifies the name of the file used to read the initial Hessian.", &
1401 : usage="RESTART_FILE_NAME {filename}", &
1402 5920 : default_lc_val="")
1403 5920 : CALL section_add_keyword(section, keyword)
1404 5920 : CALL keyword_release(keyword)
1405 :
1406 : CALL cp_print_key_section_create(print_key, __LOCATION__, "RESTART", &
1407 : description="Controls the printing of Hessian Restart file", &
1408 : print_level=low_print_level, add_last=add_last_numeric, filename="BFGS", &
1409 5920 : common_iter_levels=2)
1410 5920 : CALL section_add_subsection(section, print_key)
1411 5920 : CALL section_release(print_key)
1412 :
1413 5920 : END SUBROUTINE create_bfgs_section
1414 :
1415 : ! **************************************************************************************************
1416 : !> \brief creates the CG section
1417 : !> \param section the section to be created
1418 : !> \author Teodoro Laino [tlaino] - University of Zurich - 01.2008
1419 : ! **************************************************************************************************
1420 5920 : SUBROUTINE create_cg_section(section)
1421 : TYPE(section_type), POINTER :: section
1422 :
1423 : TYPE(keyword_type), POINTER :: keyword
1424 : TYPE(section_type), POINTER :: subsection, subsubsection
1425 :
1426 : ! create the CG subsection
1427 :
1428 5920 : NULLIFY (section, subsection, subsubsection, keyword)
1429 : CALL section_create(section, __LOCATION__, name="CG", &
1430 : description="Provides parameters to tune the conjugate gradient optimization", &
1431 5920 : n_keywords=0, n_subsections=1, repeats=.FALSE.)
1432 :
1433 : CALL keyword_create(keyword, __LOCATION__, name="MAX_STEEP_STEPS", &
1434 : description="Maximum number of steepest descent steps before starting the"// &
1435 : " conjugate gradients optimization.", &
1436 : usage="MAX_STEEP_STEPS {integer}", &
1437 5920 : default_i_val=0)
1438 5920 : CALL section_add_keyword(section, keyword)
1439 5920 : CALL keyword_release(keyword)
1440 :
1441 : CALL keyword_create(keyword, __LOCATION__, name="RESTART_LIMIT", &
1442 : description="Cosine of the angle between two consecutive searching directions."// &
1443 : " If the angle during a CG optimization is less than the one corresponding to"// &
1444 : " to the RESTART_LIMIT the CG is reset and one step of steepest descent is"// &
1445 : " performed.", &
1446 : usage="RESTART_LIMIT {real}", &
1447 5920 : default_r_val=0.9_dp)
1448 5920 : CALL section_add_keyword(section, keyword)
1449 5920 : CALL keyword_release(keyword)
1450 :
1451 : CALL keyword_create(keyword, __LOCATION__, name="FLETCHER_REEVES", &
1452 : description="Uses FLETCHER-REEVES instead of POLAK-RIBIERE when using Conjugate Gradients", &
1453 : usage="FLETCHER_REEVES", &
1454 5920 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1455 5920 : CALL section_add_keyword(section, keyword)
1456 5920 : CALL keyword_release(keyword)
1457 :
1458 : ! Line Search section
1459 : CALL section_create(subsection, __LOCATION__, name="LINE_SEARCH", &
1460 : description="Provides parameters to tune the line search during the conjugate gradient optimization", &
1461 5920 : n_keywords=0, n_subsections=1, repeats=.FALSE.)
1462 :
1463 : CALL keyword_create(keyword, __LOCATION__, name="TYPE", &
1464 : description="1D line search algorithm to be used with the CG optimizer,"// &
1465 : " in increasing order of robustness and cost. ", &
1466 : usage="TYPE GOLD", &
1467 : default_i_val=ls_gold, &
1468 : enum_c_vals=s2a("2PNT", "GOLD", "FIT"), &
1469 : enum_desc=s2a("extrapolate based on 2 points", &
1470 : "perform 1D golden section search of the minimum (very expensive)", &
1471 : "perform 1D fit of a parabola on several evaluation of energy "// &
1472 : "(very expensive and more robust vs numerical noise)"), &
1473 5920 : enum_i_vals=[ls_2pnt, ls_gold, ls_fit])
1474 5920 : CALL section_add_keyword(subsection, keyword)
1475 5920 : CALL keyword_release(keyword)
1476 :
1477 : ! 2PNT
1478 5920 : NULLIFY (subsubsection)
1479 : CALL section_create(subsubsection, __LOCATION__, name="2PNT", &
1480 : description="Provides parameters to tune the line search for the two point based line search.", &
1481 5920 : n_keywords=0, n_subsections=1, repeats=.FALSE.)
1482 :
1483 : CALL keyword_create(keyword, __LOCATION__, name="MAX_ALLOWED_STEP", &
1484 : description="Max allowed value for the line search step.", &
1485 : usage="MAX_ALLOWED_STEP {real}", unit_str="internal_cp2k", &
1486 5920 : default_r_val=0.25_dp)
1487 5920 : CALL section_add_keyword(subsubsection, keyword)
1488 5920 : CALL keyword_release(keyword)
1489 :
1490 : CALL keyword_create( &
1491 : keyword, __LOCATION__, name="LINMIN_GRAD_ONLY", &
1492 : description="Use only the gradient, not the energy for line minimizations (e.g. in conjugate gradients).", &
1493 : usage="LINMIN_GRAD_ONLY T", &
1494 5920 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1495 5920 : CALL section_add_keyword(subsubsection, keyword)
1496 5920 : CALL keyword_release(keyword)
1497 :
1498 5920 : CALL section_add_subsection(subsection, subsubsection)
1499 5920 : CALL section_release(subsubsection)
1500 :
1501 : ! GOLD
1502 5920 : NULLIFY (subsubsection)
1503 : CALL section_create(subsubsection, __LOCATION__, name="GOLD", &
1504 : description="Provides parameters to tune the line search for the gold search.", &
1505 5920 : n_keywords=0, n_subsections=1, repeats=.FALSE.)
1506 :
1507 : CALL keyword_create(keyword, __LOCATION__, name="INITIAL_STEP", &
1508 : description="Initial step size used, e.g. for bracketing or minimizers. "// &
1509 : "Might need to be reduced for systems with close contacts", &
1510 : usage="INITIAL_STEP {real}", unit_str="internal_cp2k", &
1511 5920 : default_r_val=0.2_dp)
1512 5920 : CALL section_add_keyword(subsubsection, keyword)
1513 5920 : CALL keyword_release(keyword)
1514 :
1515 : CALL keyword_create(keyword, __LOCATION__, name="BRACK_LIMIT", &
1516 : description="Limit in 1D bracketing during line search in Conjugate Gradients Optimization.", &
1517 : usage="BRACK_LIMIT {real}", unit_str="internal_cp2k", &
1518 5920 : default_r_val=100.0_dp)
1519 5920 : CALL section_add_keyword(subsubsection, keyword)
1520 5920 : CALL keyword_release(keyword)
1521 :
1522 : CALL keyword_create(keyword, __LOCATION__, name="BRENT_TOL", &
1523 : description="Tolerance requested during Brent line search in Conjugate Gradients Optimization.", &
1524 : usage="BRENT_TOL {real}", unit_str="internal_cp2k", &
1525 5920 : default_r_val=0.01_dp)
1526 5920 : CALL section_add_keyword(subsubsection, keyword)
1527 5920 : CALL keyword_release(keyword)
1528 :
1529 : CALL keyword_create(keyword, __LOCATION__, name="BRENT_MAX_ITER", &
1530 : description="Maximum number of iterations in brent algorithm "// &
1531 : "(used for the line search in Conjugated Gradients Optimization)", &
1532 : usage="BRENT_MAX_ITER {integer}", &
1533 5920 : default_i_val=100)
1534 5920 : CALL section_add_keyword(subsubsection, keyword)
1535 5920 : CALL keyword_release(keyword)
1536 5920 : CALL section_add_subsection(subsection, subsubsection)
1537 5920 : CALL section_release(subsubsection)
1538 :
1539 5920 : CALL section_add_subsection(section, subsection)
1540 5920 : CALL section_release(subsection)
1541 5920 : END SUBROUTINE create_cg_section
1542 :
1543 : ! **************************************************************************************************
1544 : !> \brief creates the LBFGS section
1545 : !> \param section the section to be created
1546 : !> \author Teodoro Laino [tlaino] - University of Zurich - 01.2008
1547 : ! **************************************************************************************************
1548 5920 : SUBROUTINE create_lbfgs_section(section)
1549 : TYPE(section_type), POINTER :: section
1550 :
1551 : TYPE(keyword_type), POINTER :: keyword
1552 :
1553 : ! create the LBFGS section
1554 :
1555 5920 : NULLIFY (section, keyword)
1556 : CALL section_create(section, __LOCATION__, name="LBFGS", &
1557 : description="Provides parameters to tune the limited memory BFGS (LBFGS) optimization", &
1558 : n_keywords=0, n_subsections=1, repeats=.FALSE., &
1559 11840 : citations=[Byrd1995])
1560 :
1561 : CALL keyword_create(keyword, __LOCATION__, name="MAX_H_RANK", &
1562 : description="Maximum rank (and consequently size) of the "// &
1563 : "approximate Hessian matrix used by the LBFGS optimizer. "// &
1564 : "Larger values (e.g. 30) will accelerate the convergence behaviour "// &
1565 : "at the cost of a larger memory consumption.", &
1566 : usage="MAX_H_RANK {integer}", &
1567 5920 : default_i_val=5)
1568 5920 : CALL section_add_keyword(section, keyword)
1569 5920 : CALL keyword_release(keyword)
1570 :
1571 : CALL keyword_create(keyword, __LOCATION__, name="MAX_F_PER_ITER", &
1572 : description="Maximum number of force evaluations per iteration"// &
1573 : " (used for the line search)", &
1574 : usage="MAX_F_PER_ITER {integer}", &
1575 5920 : default_i_val=20)
1576 5920 : CALL section_add_keyword(section, keyword)
1577 5920 : CALL keyword_release(keyword)
1578 :
1579 : CALL keyword_create(keyword, __LOCATION__, name="PRINT_LEVEL", &
1580 : description="How much output is written out by the LBFGS algorithm. "// &
1581 : "Currently this is independent of the &GLOBAL/PRINT_LEVEL setting.", &
1582 : usage="PRINT_LEVEL MEDIUM", &
1583 : enum_c_vals=s2a("SILENT", "LOW", "MEDIUM", "HIGH", "DEBUG"), &
1584 : enum_desc=s2a("Almost no output", &
1585 : "Little output about f and |proj g| every iteration", &
1586 : "Quite some output about details every iteration", &
1587 : "Lots of output about changes of active set and final x", &
1588 : "Everything is written out, useful for debugging purposes only"), &
1589 : enum_i_vals=[silent_lbfgs, low_lbfgs, medium_lbfgs, &
1590 : high_lbfgs, debug_lbfgs], &
1591 5920 : default_i_val=low_print_level)
1592 5920 : CALL section_add_keyword(section, keyword)
1593 5920 : CALL keyword_release(keyword)
1594 :
1595 : CALL keyword_create(keyword, __LOCATION__, name="WANTED_PROJ_GRADIENT", &
1596 : description="Convergence criterion (overrides the general ones):"// &
1597 : " Requested norm threshold of the gradient multiplied"// &
1598 : " by the approximate Hessian.", &
1599 : usage="WANTED_PROJ_GRADIENT {real}", unit_str="internal_cp2k", &
1600 5920 : default_r_val=1.0E-16_dp)
1601 5920 : CALL section_add_keyword(section, keyword)
1602 5920 : CALL keyword_release(keyword)
1603 :
1604 : CALL keyword_create(keyword, __LOCATION__, name="WANTED_REL_F_ERROR", &
1605 : description="Convergence criterion (overrides the general ones):"// &
1606 : " Requested relative error on the objective function"// &
1607 : " of the optimizer (the energy)", &
1608 : usage="WANTED_REL_F_ERROR {real}", unit_str="internal_cp2k", &
1609 5920 : default_r_val=1.0E-16_dp)
1610 5920 : CALL section_add_keyword(section, keyword)
1611 5920 : CALL keyword_release(keyword)
1612 :
1613 : CALL keyword_create( &
1614 : keyword, __LOCATION__, name="TRUST_RADIUS", &
1615 : description="Trust radius used in LBFGS. Not completely in depth tested. Negativ values means no trust radius is used.", &
1616 : usage="TRUST_RADIUS {real}", unit_str='angstrom', &
1617 5920 : default_r_val=-1.0_dp)
1618 5920 : CALL section_add_keyword(section, keyword)
1619 5920 : CALL keyword_release(keyword)
1620 :
1621 : CALL keyword_create(keyword, __LOCATION__, name="__CONTROL_VAL", &
1622 : description="Hidden parameter that controls the printing behavior "// &
1623 : "of the LBFGS optimizer for advanced debug purposes. This option "// &
1624 : "overrides PRINT_LEVEL setting if explicit.", &
1625 5920 : default_i_val=-1)
1626 5920 : CALL section_add_keyword(section, keyword)
1627 5920 : CALL keyword_release(keyword)
1628 :
1629 5920 : END SUBROUTINE create_lbfgs_section
1630 :
1631 : ! **************************************************************************************************
1632 : !> \brief creates the flexible_partitioning section
1633 : !> \param section the section to be created
1634 : !> \author Joost VandeVondele [04.2006]
1635 : ! **************************************************************************************************
1636 1480 : SUBROUTINE create_fp_section(section)
1637 : TYPE(section_type), POINTER :: section
1638 :
1639 : TYPE(keyword_type), POINTER :: keyword
1640 : TYPE(section_type), POINTER :: print_key
1641 :
1642 1480 : CPASSERT(.NOT. ASSOCIATED(section))
1643 : CALL section_create(section, __LOCATION__, name="FLEXIBLE_PARTITIONING", &
1644 : description="This section sets up flexible_partitioning", &
1645 1480 : n_keywords=1, n_subsections=1, repeats=.FALSE.)
1646 :
1647 1480 : NULLIFY (keyword, print_key)
1648 :
1649 : CALL keyword_create(keyword, __LOCATION__, name="CENTRAL_ATOM", &
1650 : description="Specifies the central atom.", &
1651 : usage="CENTRAL_ATOM {integer}", &
1652 1480 : n_var=1, type_of_var=integer_t)
1653 1480 : CALL section_add_keyword(section, keyword)
1654 1480 : CALL keyword_release(keyword)
1655 :
1656 : CALL keyword_create(keyword, __LOCATION__, name="INNER_ATOMS", &
1657 : description="Specifies the list of atoms that should remain close to the central atom.", &
1658 : usage="INNER_ATOMS {integer} {integer} .. {integer}", &
1659 1480 : n_var=-1, type_of_var=integer_t)
1660 1480 : CALL section_add_keyword(section, keyword)
1661 1480 : CALL keyword_release(keyword)
1662 :
1663 : CALL keyword_create(keyword, __LOCATION__, name="OUTER_ATOMS", &
1664 : description="Specifies the list of atoms that should remain far from the central atom.", &
1665 : usage="OUTER_ATOMS {integer} {integer} .. {integer}", &
1666 1480 : n_var=-1, type_of_var=integer_t)
1667 1480 : CALL section_add_keyword(section, keyword)
1668 1480 : CALL keyword_release(keyword)
1669 :
1670 : CALL keyword_create(keyword, __LOCATION__, name="INNER_RADIUS", &
1671 : description="radius of the inner wall", &
1672 : usage="INNER_RADIUS {real} ", type_of_var=real_t, &
1673 1480 : n_var=1, unit_str="angstrom")
1674 1480 : CALL section_add_keyword(section, keyword)
1675 1480 : CALL keyword_release(keyword)
1676 :
1677 : CALL keyword_create(keyword, __LOCATION__, name="OUTER_RADIUS", &
1678 : description="radius of the outer wall", &
1679 : usage="OUTER_RADIUS {real} ", type_of_var=real_t, &
1680 1480 : n_var=1, unit_str="angstrom")
1681 1480 : CALL section_add_keyword(section, keyword)
1682 1480 : CALL keyword_release(keyword)
1683 :
1684 : CALL keyword_create(keyword, __LOCATION__, name="STRENGTH", &
1685 : description="Sets the force constant of the repulsive harmonic potential", &
1686 1480 : usage="STRENGTH 1.0", default_r_val=1.0_dp)
1687 1480 : CALL section_add_keyword(section, keyword)
1688 1480 : CALL keyword_release(keyword)
1689 :
1690 : CALL keyword_create(keyword, __LOCATION__, name="BIAS", &
1691 : description="If a bias potential counter-acting the weight term should be applied (recommended).", &
1692 1480 : usage="BIAS F", default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
1693 1480 : CALL section_add_keyword(section, keyword)
1694 1480 : CALL keyword_release(keyword)
1695 :
1696 : CALL keyword_create(keyword, __LOCATION__, name="TEMPERATURE", &
1697 : description="Sets the temperature parameter that is used in the baising potential."// &
1698 : " It is recommended to use the actual simulation temperature", &
1699 1480 : usage="TEMPERATURE 300", default_r_val=300.0_dp, unit_str='K')
1700 1480 : CALL section_add_keyword(section, keyword)
1701 1480 : CALL keyword_release(keyword)
1702 :
1703 : CALL keyword_create(keyword, __LOCATION__, name="SMOOTH_WIDTH", &
1704 : description="Sets the width of the smooth counting function.", &
1705 1480 : usage="SMOOTH_WIDTH 0.2", default_r_val=0.02_dp, unit_str='angstrom')
1706 1480 : CALL section_add_keyword(section, keyword)
1707 1480 : CALL keyword_release(keyword)
1708 :
1709 : CALL cp_print_key_section_create(print_key, __LOCATION__, "WEIGHTS", &
1710 : description="Controls the printing of FP info during flexible partitioning simulations.", &
1711 : print_level=low_print_level, common_iter_levels=1, &
1712 1480 : filename="FLEXIBLE_PARTIONING")
1713 1480 : CALL section_add_subsection(section, print_key)
1714 1480 : CALL section_release(print_key)
1715 :
1716 : CALL cp_print_key_section_create(print_key, __LOCATION__, "CONTROL", &
1717 : description="Controls the printing of FP info at startup", &
1718 : print_level=low_print_level, common_iter_levels=1, &
1719 1480 : filename="__STD_OUT__")
1720 1480 : CALL section_add_subsection(section, print_key)
1721 1480 : CALL section_release(print_key)
1722 :
1723 1480 : END SUBROUTINE create_fp_section
1724 :
1725 : ! **************************************************************************************************
1726 : !> \brief ...
1727 : !> \param section will contain the driver section
1728 : !> \author mceriotti
1729 : ! **************************************************************************************************
1730 1480 : SUBROUTINE create_driver_section(section)
1731 : TYPE(section_type), POINTER :: section
1732 :
1733 : TYPE(keyword_type), POINTER :: keyword
1734 :
1735 1480 : CPASSERT(.NOT. ASSOCIATED(section))
1736 : CALL section_create(section, __LOCATION__, name="DRIVER", &
1737 : description="This section defines the parameters needed to run in i-PI driver mode.", &
1738 : citations=[Ceriotti2014, Kapil2016], &
1739 4440 : n_keywords=4, n_subsections=0, repeats=.FALSE.)
1740 :
1741 1480 : NULLIFY (keyword)
1742 : CALL keyword_create(keyword, __LOCATION__, name="unix", &
1743 : description="Use a UNIX socket rather than an INET socket.", &
1744 : usage="unix LOGICAL", &
1745 1480 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1746 1480 : CALL section_add_keyword(section, keyword)
1747 1480 : CALL keyword_release(keyword)
1748 :
1749 : CALL keyword_create(keyword, __LOCATION__, name="port", &
1750 : description="Port number for the i-PI server.", &
1751 : usage="port <INTEGER>", &
1752 1480 : default_i_val=12345)
1753 1480 : CALL section_add_keyword(section, keyword)
1754 1480 : CALL keyword_release(keyword)
1755 :
1756 : CALL keyword_create(keyword, __LOCATION__, name="host", &
1757 : description="Host name for the i-PI server.", &
1758 : usage="host <HOSTNAME>", &
1759 1480 : default_c_val="localhost")
1760 1480 : CALL section_add_keyword(section, keyword)
1761 1480 : CALL keyword_release(keyword)
1762 :
1763 : CALL keyword_create(keyword, __LOCATION__, name="PREFIX", &
1764 : description="Prefix used to build the path of the UNIX socket file, "// &
1765 : "as /tmp/<PREFIX>_<HOST>. Only relevant if UNIX is set to true.", &
1766 : usage="PREFIX ipi", &
1767 1480 : default_c_val="ipi")
1768 1480 : CALL section_add_keyword(section, keyword)
1769 1480 : CALL keyword_release(keyword)
1770 :
1771 : CALL keyword_create(keyword, __LOCATION__, name="SLEEP_TIME", &
1772 : description="Sleeping time while waiting for for driver commands [s].", &
1773 : usage="SLEEP_TIME 0.1", &
1774 1480 : default_r_val=0.01_dp)
1775 1480 : CALL section_add_keyword(section, keyword)
1776 1480 : CALL keyword_release(keyword)
1777 :
1778 1480 : END SUBROUTINE create_driver_section
1779 :
1780 : ! **************************************************************************************************
1781 : !> \brief creates the section for a path integral run
1782 : !> \param section will contain the pint section
1783 : !> \author fawzi
1784 : ! **************************************************************************************************
1785 1480 : SUBROUTINE create_pint_section(section)
1786 : TYPE(section_type), POINTER :: section
1787 :
1788 : TYPE(keyword_type), POINTER :: keyword
1789 : TYPE(section_type), POINTER :: print_key, subsection, subsubsection
1790 :
1791 1480 : CPASSERT(.NOT. ASSOCIATED(section))
1792 : CALL section_create(section, __LOCATION__, name="PINT", &
1793 : description="The section that controls a path integral run", &
1794 1480 : n_keywords=13, n_subsections=9, repeats=.FALSE.)
1795 1480 : NULLIFY (keyword)
1796 :
1797 : CALL keyword_create(keyword, __LOCATION__, name="p", &
1798 : description="Specify number beads to use", repeats=.FALSE., &
1799 1480 : default_i_val=3)
1800 1480 : CALL section_add_keyword(section, keyword)
1801 1480 : CALL keyword_release(keyword)
1802 : CALL keyword_create(keyword, __LOCATION__, name="proc_per_replica", &
1803 : description="Specify number of processors to use for each replica", &
1804 1480 : repeats=.FALSE., default_i_val=0)
1805 1480 : CALL section_add_keyword(section, keyword)
1806 1480 : CALL keyword_release(keyword)
1807 : CALL keyword_create(keyword, __LOCATION__, name="num_steps", &
1808 : description="Number of steps (if MAX_STEP is not explicitly given"// &
1809 : " the program will perform this number of steps)", repeats=.FALSE., &
1810 1480 : default_i_val=3)
1811 1480 : CALL section_add_keyword(section, keyword)
1812 1480 : CALL keyword_release(keyword)
1813 : CALL keyword_create(keyword, __LOCATION__, name="MAX_STEP", &
1814 : description="Maximum step number (the program will stop if"// &
1815 : " ITERATION >= MAX_STEP even if NUM_STEPS has not been reached)", &
1816 1480 : repeats=.FALSE., default_i_val=10)
1817 1480 : CALL section_add_keyword(section, keyword)
1818 1480 : CALL keyword_release(keyword)
1819 : CALL keyword_create(keyword, __LOCATION__, name="iteration", &
1820 : description="Specify the iteration number from which it should be "// &
1821 1480 : "counted", default_i_val=0)
1822 1480 : CALL section_add_keyword(section, keyword)
1823 1480 : CALL keyword_release(keyword)
1824 : CALL keyword_create(keyword, __LOCATION__, name="Temp", &
1825 : description="The temperature you want to simulate", &
1826 : default_r_val=cp_unit_to_cp2k(300._dp, "K"), &
1827 1480 : unit_str="K")
1828 1480 : CALL section_add_keyword(section, keyword)
1829 1480 : CALL keyword_release(keyword)
1830 : CALL keyword_create(keyword, __LOCATION__, name="kT_CORRECTION", &
1831 : description="Corrects for the loss of temperature due to constrained "// &
1832 : "degrees of freedom for Nose-Hover chains and numeric integration", &
1833 1480 : repeats=.FALSE., default_l_val=.FALSE.)
1834 1480 : CALL section_add_keyword(section, keyword)
1835 1480 : CALL keyword_release(keyword)
1836 : CALL keyword_create(keyword, __LOCATION__, name="T_tol", variants=["temp_to"], &
1837 : description="threshold for the oscillations of the temperature "// &
1838 : "excedeed which the temperature is rescaled. 0 means no rescaling.", &
1839 2960 : default_r_val=0._dp, unit_str="K")
1840 1480 : CALL section_add_keyword(section, keyword)
1841 1480 : CALL keyword_release(keyword)
1842 : CALL keyword_create(keyword, __LOCATION__, name="dt", &
1843 : description="timestep (might be subdivised in nrespa subtimesteps", &
1844 : repeats=.FALSE., &
1845 : default_r_val=cp_unit_to_cp2k(1.0_dp, "fs"), &
1846 1480 : usage="dt 1.0", unit_str="fs")
1847 1480 : CALL section_add_keyword(section, keyword)
1848 1480 : CALL keyword_release(keyword)
1849 : CALL keyword_create(keyword, __LOCATION__, name="HARM_INT", &
1850 : description="integrator scheme for integrating the harmonic bead springs.", &
1851 : usage="HARM_INT (NUMERIC|EXACT)", &
1852 : default_i_val=integrate_numeric, &
1853 : enum_c_vals=s2a("NUMERIC", "EXACT"), &
1854 1480 : enum_i_vals=[integrate_numeric, integrate_exact])
1855 1480 : CALL section_add_keyword(section, keyword)
1856 1480 : CALL keyword_release(keyword)
1857 : CALL keyword_create(keyword, __LOCATION__, name="nrespa", &
1858 : description="number of respa steps for the bead for each md step", &
1859 1480 : repeats=.FALSE., default_i_val=5)
1860 1480 : CALL section_add_keyword(section, keyword)
1861 1480 : CALL keyword_release(keyword)
1862 :
1863 : CALL keyword_create(keyword, __LOCATION__, name="transformation", &
1864 : description="Specifies the coordinate transformation to use", &
1865 : usage="TRANSFORMATION (NORMAL|STAGE)", &
1866 : default_i_val=transformation_normal, &
1867 : enum_c_vals=s2a("NORMAL", "STAGE"), &
1868 1480 : enum_i_vals=[transformation_normal, transformation_stage])
1869 :
1870 1480 : CALL section_add_keyword(section, keyword)
1871 1480 : CALL keyword_release(keyword)
1872 : CALL keyword_create(keyword, __LOCATION__, name="propagator", &
1873 : description="Specifies the real time propagator to use", &
1874 : usage="PROPAGATOR (PIMD|RPMD|CMD|BCMD)", &
1875 : default_i_val=propagator_pimd, &
1876 : enum_c_vals=s2a("PIMD", "RPMD", "CMD", "BCMD"), &
1877 1480 : enum_i_vals=[propagator_pimd, propagator_rpmd, propagator_cmd, propagator_bcmd])
1878 1480 : CALL section_add_keyword(section, keyword)
1879 1480 : CALL keyword_release(keyword)
1880 : CALL keyword_create(keyword, __LOCATION__, name="FIX_CENTROID_POS", &
1881 : description="Propagate all DOF but the centroid - "// &
1882 : "useful for equilibration of the non-centroid modes "// &
1883 : "(activated only if TRANSFORMATION==NORMAL)", &
1884 : repeats=.FALSE., default_l_val=.FALSE., &
1885 1480 : lone_keyword_l_val=.TRUE.)
1886 1480 : CALL section_add_keyword(section, keyword)
1887 1480 : CALL keyword_release(keyword)
1888 :
1889 1480 : NULLIFY (subsection, subsubsection)
1890 : CALL section_create(subsection, __LOCATION__, name="NORMALMODE", &
1891 : description="Controls the normal mode transformation", &
1892 1480 : n_keywords=3, n_subsections=0, repeats=.FALSE.)
1893 : CALL keyword_create(keyword, __LOCATION__, name="Q_CENTROID", &
1894 : description="Value of the thermostat mass of centroid degree of freedom", &
1895 1480 : repeats=.FALSE., default_r_val=-1.0_dp)
1896 1480 : CALL section_add_keyword(subsection, keyword)
1897 1480 : CALL keyword_release(keyword)
1898 : CALL keyword_create(keyword, __LOCATION__, name="Q_BEAD", &
1899 : description="Value of the thermostat mass of non-centroid degrees of freedom", &
1900 1480 : repeats=.FALSE., default_r_val=-1.0_dp)
1901 1480 : CALL section_add_keyword(subsection, keyword)
1902 1480 : CALL keyword_release(keyword)
1903 : CALL keyword_create(keyword, __LOCATION__, name="MODEFACTOR", &
1904 : description="mass scale factor for non-centroid degrees of freedom", &
1905 1480 : repeats=.FALSE., default_r_val=1.0_dp)
1906 1480 : CALL section_add_keyword(subsection, keyword)
1907 1480 : CALL keyword_release(keyword)
1908 : CALL keyword_create(keyword, __LOCATION__, name="GAMMA", &
1909 : description="mass scale factor for non-centroid degrees of freedom, &
1910 : & naming convention according to Witt, 2008, <https://doi.org/10.1063/1.3125009>.", &
1911 1480 : repeats=.FALSE., default_r_val=8.0_dp)
1912 1480 : CALL section_add_keyword(subsection, keyword)
1913 1480 : CALL keyword_release(keyword)
1914 :
1915 1480 : CALL section_add_subsection(section, subsection)
1916 1480 : CALL section_release(subsection)
1917 :
1918 : CALL section_create(subsection, __LOCATION__, name="staging", &
1919 : description="The section that controls the staging transformation", &
1920 1480 : n_keywords=2, n_subsections=0, repeats=.FALSE.)
1921 : CALL keyword_create(keyword, __LOCATION__, name="j", &
1922 : description="Value of the j parameter for the staging transformation", &
1923 1480 : repeats=.FALSE., default_i_val=2)
1924 1480 : CALL section_add_keyword(subsection, keyword)
1925 1480 : CALL keyword_release(keyword)
1926 : CALL keyword_create(keyword, __LOCATION__, name="Q_END", &
1927 : description="Value of the nose-hoover mass for the endbead (Q_end)", &
1928 1480 : repeats=.FALSE., default_i_val=2)
1929 1480 : CALL section_add_keyword(subsection, keyword)
1930 1480 : CALL keyword_release(keyword)
1931 1480 : CALL section_add_subsection(section, subsection)
1932 1480 : CALL section_release(subsection)
1933 :
1934 : CALL section_create(subsection, __LOCATION__, name="BEADS", &
1935 : description="Sets positions and velocities of the beads", &
1936 : n_keywords=0, n_subsections=2, &
1937 1480 : repeats=.FALSE.)
1938 1480 : CALL create_coord_section(subsubsection, "BEADS")
1939 1480 : CALL section_add_subsection(subsection, subsubsection)
1940 1480 : CALL section_release(subsubsection)
1941 1480 : CALL create_velocity_section(subsubsection, "BEADS")
1942 1480 : CALL section_add_subsection(subsection, subsubsection)
1943 1480 : CALL section_release(subsubsection)
1944 1480 : CALL section_add_subsection(section, subsection)
1945 1480 : CALL section_release(subsection)
1946 :
1947 : CALL section_create(subsection, __LOCATION__, name="NOSE", &
1948 : description="Controls the Nose-Hoover thermostats", &
1949 : n_keywords=1, n_subsections=2, &
1950 1480 : repeats=.FALSE.)
1951 : CALL keyword_create(keyword, __LOCATION__, name="nnos", &
1952 : description="length of nose-hoover chain. 0 means no thermostat", &
1953 1480 : repeats=.FALSE., default_i_val=2)
1954 1480 : CALL section_add_keyword(subsection, keyword)
1955 1480 : CALL keyword_release(keyword)
1956 1480 : CALL create_coord_section(subsubsection, "NOSE")
1957 1480 : CALL section_add_subsection(subsection, subsubsection)
1958 1480 : CALL section_release(subsubsection)
1959 1480 : CALL create_velocity_section(subsubsection, "NOSE")
1960 1480 : CALL section_add_subsection(subsection, subsubsection)
1961 1480 : CALL section_release(subsubsection)
1962 1480 : CALL section_add_subsection(section, subsection)
1963 1480 : CALL section_release(subsection)
1964 :
1965 1480 : CALL create_gle_section(subsection)
1966 1480 : CALL section_add_subsection(section, subsection)
1967 1480 : CALL section_release(subsection)
1968 :
1969 : CALL section_create(subsection, __LOCATION__, name="PILE", &
1970 : description="Controls the PI Langevin Equation thermostat."// &
1971 : " Needs the exact harmonic integrator."// &
1972 : " May lead to unphysical motions if constraint e.g. FIXED_ATOMS, is applied."// &
1973 : " RESTART_HELIUM section has to be .FALSE. when restarting the PIGLET job.", &
1974 : citations=[Ceriotti2010], &
1975 : n_keywords=3, n_subsections=1, &
1976 2960 : repeats=.FALSE.)
1977 1480 : CALL create_rng_section(subsubsection)
1978 1480 : CALL section_add_subsection(subsection, subsubsection)
1979 1480 : CALL section_release(subsubsection)
1980 : CALL keyword_create(keyword, __LOCATION__, name="TAU", &
1981 : description="Time constant for centroid motion. "// &
1982 : "If zero or negative the centroid is not thermostated.", &
1983 : usage="TAU {real}", type_of_var=real_t, &
1984 1480 : unit_str="fs", n_var=1, default_r_val=1000.0_dp)
1985 1480 : CALL section_add_keyword(subsection, keyword)
1986 1480 : CALL keyword_release(keyword)
1987 : CALL keyword_create(keyword, __LOCATION__, name="LAMBDA", &
1988 : description="Scaling of friction to mode coupling", &
1989 : usage="LAMBDA {real}", type_of_var=real_t, &
1990 1480 : n_var=1, default_r_val=0.5_dp)
1991 1480 : CALL section_add_keyword(subsection, keyword)
1992 1480 : CALL keyword_release(keyword)
1993 : CALL keyword_create(keyword, __LOCATION__, name="THERMOSTAT_ENERGY", &
1994 : description="Thermostat energy for conserved quantity. "// &
1995 : "Only useful in restart files.", &
1996 : usage="THERMOSTAT_ENERGY {real}", type_of_var=real_t, &
1997 1480 : n_var=1, default_r_val=0.0_dp)
1998 1480 : CALL section_add_keyword(subsection, keyword)
1999 1480 : CALL keyword_release(keyword)
2000 1480 : CALL section_add_subsection(section, subsection)
2001 1480 : CALL section_release(subsection)
2002 :
2003 : CALL section_create(subsection, __LOCATION__, name="PIGLET", &
2004 : description="Controls the PI Generalized Langevin Equation thermostat."// &
2005 : " Needs the exact harmonic integrator", &
2006 : citations=[Ceriotti2012], &
2007 : n_keywords=4, n_subsections=2, &
2008 2960 : repeats=.FALSE.)
2009 1480 : CALL create_rng_section(subsubsection)
2010 1480 : CALL section_add_subsection(subsection, subsubsection)
2011 1480 : CALL section_release(subsubsection)
2012 : CALL section_create(subsubsection, __LOCATION__, name="EXTRA_DOF", &
2013 : description="Additional degrees of freedom to ensure Markovian Dynamics.", &
2014 1480 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
2015 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
2016 : description="Restart values for additional degrees of freedom" &
2017 : //" (only for restarts, do not set explicitly)", &
2018 : repeats=.FALSE., &
2019 1480 : type_of_var=real_t, n_var=-1)
2020 1480 : CALL section_add_keyword(subsubsection, keyword)
2021 1480 : CALL keyword_release(keyword)
2022 1480 : CALL section_add_subsection(subsection, subsubsection)
2023 1480 : CALL section_release(subsubsection)
2024 : CALL keyword_create(keyword, __LOCATION__, name="NEXTRA_DOF", &
2025 : description="Number of extra degrees of freedom to ensure markovian dynamics", &
2026 1480 : repeats=.FALSE., default_i_val=8)
2027 1480 : CALL section_add_keyword(subsection, keyword)
2028 1480 : CALL keyword_release(keyword)
2029 : CALL keyword_create(keyword, __LOCATION__, name="MATRICES_FILE_NAME", &
2030 : description="Filename containig the raw matrices from "// &
2031 : "<https://gle4md.org/index.html?page=matrix>.", &
2032 1480 : repeats=.FALSE., default_lc_val="PIGLET.MAT")
2033 1480 : CALL section_add_keyword(subsection, keyword)
2034 1480 : CALL keyword_release(keyword)
2035 : CALL keyword_create(keyword, __LOCATION__, name="SMATRIX_INIT", &
2036 : description="Select algorithm to initialize piglet S-matrices", &
2037 : usage="SMATRIX_INIT (CHOLESKY|DIAGONAL)", &
2038 : default_i_val=matrix_init_cholesky, &
2039 : enum_c_vals=s2a("CHOLESKY", "DIAGONAL"), &
2040 1480 : enum_i_vals=[matrix_init_cholesky, matrix_init_diagonal])
2041 1480 : CALL section_add_keyword(subsection, keyword)
2042 1480 : CALL keyword_release(keyword)
2043 : CALL keyword_create(keyword, __LOCATION__, name="THERMOSTAT_ENERGY", &
2044 : description="Thermostat energy for conserved quantity. "// &
2045 : "Only useful in restart files.", &
2046 : usage="THERMOSTAT_ENERGY {real}", type_of_var=real_t, &
2047 1480 : n_var=1, default_r_val=0.0_dp)
2048 1480 : CALL section_add_keyword(subsection, keyword)
2049 1480 : CALL keyword_release(keyword)
2050 1480 : CALL section_add_subsection(section, subsection)
2051 1480 : CALL section_release(subsection)
2052 :
2053 : CALL section_create(subsection, __LOCATION__, name="QTB", &
2054 : description="Controls the QTB-PILE thermostat."// &
2055 : " Needs the exact harmonic integrator", &
2056 : citations=[Brieuc2016], &
2057 : n_keywords=7, n_subsections=1, &
2058 2960 : repeats=.FALSE.)
2059 1480 : CALL create_rng_section(subsubsection)
2060 1480 : CALL section_add_subsection(subsection, subsubsection)
2061 1480 : CALL section_release(subsubsection)
2062 : CALL keyword_create(keyword, __LOCATION__, name="TAU", &
2063 : description="Time constant for centroid motion. ", &
2064 : usage="TAU {real}", type_of_var=real_t, &
2065 1480 : unit_str="fs", n_var=1, default_r_val=1000.0_dp)
2066 1480 : CALL section_add_keyword(subsection, keyword)
2067 1480 : CALL keyword_release(keyword)
2068 : CALL keyword_create(keyword, __LOCATION__, name="LAMBDA", &
2069 : description="Scaling of friction to ring polymer NM freq.", &
2070 : usage="LAMBDA {real}", type_of_var=real_t, &
2071 1480 : n_var=1, default_r_val=0.5_dp)
2072 1480 : CALL section_add_keyword(subsection, keyword)
2073 1480 : CALL keyword_release(keyword)
2074 : CALL keyword_create(keyword, __LOCATION__, name="FP", &
2075 : description="Defines which version to use "// &
2076 : "0: f_P^(0), 1: f_P^(1)", &
2077 : usage="FP {integer}", type_of_var=integer_t, &
2078 1480 : n_var=1, default_i_val=1)
2079 1480 : CALL section_add_keyword(subsection, keyword)
2080 1480 : CALL keyword_release(keyword)
2081 : CALL keyword_create(keyword, __LOCATION__, name="TAUCUT", &
2082 : description="Inverse of cutoff freq. for the centroid mode", &
2083 : usage="TAUCUT {real}", type_of_var=real_t, &
2084 1480 : unit_str="fs", n_var=1, default_r_val=0.5_dp)
2085 1480 : CALL section_add_keyword(subsection, keyword)
2086 1480 : CALL keyword_release(keyword)
2087 : CALL keyword_create(keyword, __LOCATION__, name="LAMBCUT", &
2088 : description="Scaling of cutoff freq. to ring polymer NM freq.", &
2089 : usage="LAMBCUT {real}", type_of_var=real_t, &
2090 1480 : n_var=1, default_r_val=2.0_dp)
2091 1480 : CALL section_add_keyword(subsection, keyword)
2092 1480 : CALL keyword_release(keyword)
2093 : CALL keyword_create(keyword, __LOCATION__, name="NF", &
2094 : description="Number of points used for the convolution product.", &
2095 : usage="NF {integer}", type_of_var=integer_t, &
2096 1480 : n_var=1, default_i_val=128)
2097 1480 : CALL section_add_keyword(subsection, keyword)
2098 1480 : CALL keyword_release(keyword)
2099 : CALL keyword_create(keyword, __LOCATION__, name="THERMOSTAT_ENERGY", &
2100 : description="Thermostat energy for conserved quantity. "// &
2101 : "Only useful in restart files.", &
2102 : usage="THERMOSTAT_ENERGY {real}", type_of_var=real_t, &
2103 1480 : n_var=1, default_r_val=0.0_dp)
2104 1480 : CALL section_add_keyword(subsection, keyword)
2105 1480 : CALL keyword_release(keyword)
2106 1480 : CALL section_add_subsection(section, subsection)
2107 1480 : CALL section_release(subsection)
2108 :
2109 : CALL section_create(subsection, __LOCATION__, name="INIT", &
2110 : description="Controls the initialization if the beads are not present", &
2111 1480 : repeats=.FALSE.)
2112 :
2113 : CALL keyword_create(keyword, __LOCATION__, name="LEVY_POS_SAMPLE", &
2114 : description="Sample bead positions assuming free particle "// &
2115 : "behavior (performs a Levy random walk of length P around "// &
2116 : "the classical position of each atom at the physical "// &
2117 : "temperature defined in PINT%TEMP)", &
2118 : repeats=.FALSE., default_l_val=.FALSE., &
2119 1480 : lone_keyword_l_val=.TRUE.)
2120 1480 : CALL section_add_keyword(subsection, keyword)
2121 1480 : CALL keyword_release(keyword)
2122 : CALL keyword_create(keyword, __LOCATION__, name="LEVY_CORRELATED", &
2123 : description="Use the same Levy path for all atoms, though "// &
2124 : "with mass-dependent variances (might help at very low T)", &
2125 : repeats=.FALSE., default_l_val=.FALSE., &
2126 1480 : lone_keyword_l_val=.TRUE.)
2127 1480 : CALL section_add_keyword(subsection, keyword)
2128 1480 : CALL keyword_release(keyword)
2129 : CALL keyword_create(keyword, __LOCATION__, name="LEVY_TEMP_FACTOR", &
2130 : description="Multiplicative correction factor for the "// &
2131 : "temperature at which the Levy walk is performed "// &
2132 : "(correction is due to the interactions that modify "// &
2133 : "the spread of a free particle)", &
2134 1480 : repeats=.FALSE., default_r_val=1.0_dp)
2135 1480 : CALL section_add_keyword(subsection, keyword)
2136 1480 : CALL keyword_release(keyword)
2137 : CALL keyword_create(keyword, __LOCATION__, name="LEVY_SEED", &
2138 : description="Initial seed for the (pseudo)random number "// &
2139 : "generator that controls Levy walk for bead positions.", &
2140 : usage="LEVY_SEED <INTEGER>", default_i_val=1234, &
2141 1480 : repeats=.FALSE.)
2142 1480 : CALL section_add_keyword(subsection, keyword)
2143 1480 : CALL keyword_release(keyword)
2144 : CALL keyword_create(keyword, __LOCATION__, name="THERMOSTAT_SEED", &
2145 : description="Initial seed for the (pseudo)random number "// &
2146 : "generator that controls the PILE and PIGLET thermostats.", &
2147 : usage="THERMOSTAT_SEED <INTEGER>", default_i_val=12345, &
2148 1480 : repeats=.FALSE.)
2149 1480 : CALL section_add_keyword(subsection, keyword)
2150 1480 : CALL keyword_release(keyword)
2151 : CALL keyword_create(keyword, __LOCATION__, name="RANDOMIZE_POS", &
2152 : description="add gaussian noise to the positions of the beads", &
2153 1480 : repeats=.FALSE., default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2154 1480 : CALL section_add_keyword(subsection, keyword)
2155 1480 : CALL keyword_release(keyword)
2156 :
2157 : CALL keyword_create(keyword, __LOCATION__, name="CENTROID_SPEED", &
2158 : description="adds random velocity component to the centroid modes "// &
2159 : "(useful to correct for the averaging out of the speed of various beads)", &
2160 1480 : repeats=.FALSE., default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2161 1480 : CALL section_add_keyword(subsection, keyword)
2162 1480 : CALL keyword_release(keyword)
2163 :
2164 : CALL keyword_create(keyword, __LOCATION__, name="VELOCITY_QUENCH", &
2165 : description="set the initial velocities to zero", &
2166 1480 : repeats=.FALSE., default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2167 1480 : CALL section_add_keyword(subsection, keyword)
2168 1480 : CALL keyword_release(keyword)
2169 : CALL keyword_create(keyword, __LOCATION__, name="VELOCITY_SCALE", &
2170 : description="scale initial velocities to the temperature given in MOTION%PINT%TEMP", &
2171 1480 : repeats=.FALSE., default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2172 1480 : CALL section_add_keyword(subsection, keyword)
2173 1480 : CALL keyword_release(keyword)
2174 :
2175 1480 : CALL section_add_subsection(section, subsection)
2176 1480 : CALL section_release(subsection)
2177 :
2178 1480 : CALL create_helium_section(subsection)
2179 1480 : CALL section_add_subsection(section, subsection)
2180 1480 : CALL section_release(subsection)
2181 :
2182 : CALL section_create(subsection, __LOCATION__, name="PRINT", &
2183 : description="Controls the path integral-specific output", &
2184 1480 : n_keywords=2, n_subsections=0, repeats=.FALSE.)
2185 :
2186 1480 : NULLIFY (print_key)
2187 :
2188 : CALL cp_print_key_section_create(print_key, __LOCATION__, "ENERGY", &
2189 : description="Controls the output of the path integral energies", &
2190 1480 : print_level=low_print_level, common_iter_levels=1)
2191 1480 : CALL section_add_subsection(subsection, print_key)
2192 1480 : CALL section_release(print_key)
2193 :
2194 : CALL cp_print_key_section_create(print_key, __LOCATION__, "ACTION", &
2195 : description="Controls the output of the path integral action", &
2196 1480 : print_level=medium_print_level, common_iter_levels=1)
2197 1480 : CALL section_add_subsection(subsection, print_key)
2198 1480 : CALL section_release(print_key)
2199 :
2200 : CALL cp_print_key_section_create(print_key, __LOCATION__, "CENTROID_POS", &
2201 : description="Controls the output of the centroid's position", &
2202 : unit_str="angstrom", &
2203 1480 : print_level=low_print_level, common_iter_levels=1)
2204 : CALL add_format_keyword(keyword, print_key, pos=.TRUE., &
2205 1480 : description="Output file format for the positions of centroid")
2206 1480 : CALL section_add_subsection(subsection, print_key)
2207 1480 : CALL section_release(print_key)
2208 :
2209 : CALL cp_print_key_section_create(print_key, __LOCATION__, "CENTROID_VEL", &
2210 : description="Controls the output of the centroid's velocity", &
2211 : unit_str="bohr*au_t^-1", &
2212 1480 : print_level=low_print_level, common_iter_levels=1)
2213 : CALL add_format_keyword(keyword, print_key, pos=.FALSE., &
2214 1480 : description="Output file format for the velocity of centroid")
2215 1480 : CALL section_add_subsection(subsection, print_key)
2216 1480 : CALL section_release(print_key)
2217 :
2218 : CALL cp_print_key_section_create(print_key, __LOCATION__, "CENTROID_GYR", &
2219 : description="Controls the output of the centroid's radii of gyration", &
2220 : unit_str="angstrom", &
2221 1480 : print_level=low_print_level, common_iter_levels=1)
2222 1480 : CALL section_add_subsection(subsection, print_key)
2223 1480 : CALL section_release(print_key)
2224 :
2225 : CALL cp_print_key_section_create(print_key, __LOCATION__, "COM", &
2226 : description="Controls the output of the center of mass", &
2227 1480 : print_level=high_print_level, common_iter_levels=1)
2228 1480 : CALL section_add_subsection(subsection, print_key)
2229 1480 : CALL section_release(print_key)
2230 :
2231 : CALL keyword_create(keyword, __LOCATION__, name="IMAGINARY_TIME_STRIDE", &
2232 : description="Prints only every nth bead trajectory", &
2233 1480 : repeats=.FALSE., default_i_val=1)
2234 1480 : CALL section_add_keyword(subsection, keyword)
2235 1480 : CALL keyword_release(keyword)
2236 :
2237 1480 : CALL section_add_subsection(section, subsection)
2238 1480 : CALL section_release(subsection)
2239 :
2240 1480 : END SUBROUTINE create_pint_section
2241 :
2242 : ! ***************************************************************************
2243 : !> \brief Create the input section for superfluid helium solvent.
2244 : !> \author Lukasz Walewski
2245 : ! ***************************************************************************
2246 : ! **************************************************************************************************
2247 : !> \brief ...
2248 : !> \param section ...
2249 : ! **************************************************************************************************
2250 1480 : SUBROUTINE create_helium_section(section)
2251 : TYPE(section_type), POINTER :: section
2252 :
2253 : TYPE(keyword_type), POINTER :: keyword
2254 : TYPE(section_type), POINTER :: print_key, subsection, subsubsection
2255 :
2256 1480 : CPASSERT(.NOT. ASSOCIATED(section))
2257 :
2258 : CALL section_create(section, __LOCATION__, name="HELIUM", &
2259 : description="The section that controls optional helium solvent"// &
2260 : " environment (highly experimental, not for general use yet)", &
2261 1480 : n_keywords=31, n_subsections=11, repeats=.FALSE.)
2262 :
2263 1480 : NULLIFY (keyword)
2264 : CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
2265 : description="Whether or not to actually use this section", &
2266 1480 : usage="silent", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2267 1480 : CALL section_add_keyword(section, keyword)
2268 1480 : CALL keyword_release(keyword)
2269 :
2270 : CALL keyword_create(keyword, __LOCATION__, name="HELIUM_ONLY", &
2271 : description="Simulate helium solvent only, "// &
2272 : "disregard solute entirely", &
2273 : repeats=.FALSE., default_l_val=.FALSE., &
2274 1480 : lone_keyword_l_val=.TRUE.)
2275 1480 : CALL section_add_keyword(section, keyword)
2276 1480 : CALL keyword_release(keyword)
2277 :
2278 : CALL keyword_create(keyword, __LOCATION__, name="INTERACTION_POT_SCAN", &
2279 : description="Scan solute-helium interaction potential, "// &
2280 : "cubefile parameters set in subsection RHO", &
2281 : repeats=.FALSE., default_l_val=.FALSE., &
2282 1480 : lone_keyword_l_val=.TRUE.)
2283 1480 : CALL section_add_keyword(section, keyword)
2284 1480 : CALL keyword_release(keyword)
2285 :
2286 : CALL keyword_create(keyword, __LOCATION__, name="NUM_ENV", &
2287 : description="Number of independent helium environments", &
2288 1480 : repeats=.FALSE., default_i_val=1)
2289 1480 : CALL section_add_keyword(section, keyword)
2290 1480 : CALL keyword_release(keyword)
2291 :
2292 : CALL keyword_create(keyword, __LOCATION__, name="POTENTIAL_FILE_NAME", &
2293 : description="Name of the Helium interaction potential file", &
2294 1480 : repeats=.FALSE., default_lc_val="HELIUM.POT")
2295 1480 : CALL section_add_keyword(section, keyword)
2296 1480 : CALL keyword_release(keyword)
2297 :
2298 : CALL keyword_create(keyword, __LOCATION__, name="GET_FORCES", &
2299 : description="Get average MC forces or last MC forces to propagate MD", &
2300 : usage="GET_FORCES (AVERAGE|LAST)", &
2301 : default_i_val=helium_forces_average, &
2302 : enum_c_vals=s2a("AVERAGE", "LAST"), &
2303 1480 : enum_i_vals=[helium_forces_average, helium_forces_last])
2304 1480 : CALL section_add_keyword(section, keyword)
2305 1480 : CALL keyword_release(keyword)
2306 :
2307 : CALL keyword_create(keyword, __LOCATION__, name="SOLUTE_INTERACTION", &
2308 : description="Interaction potential between helium and the solute", &
2309 : usage="SOLUTE_INTERACTION (NONE | MWATER | NNP)", &
2310 : default_i_val=helium_solute_intpot_none, &
2311 : enum_c_vals=s2a("NONE", "MWATER", "NNP"), &
2312 : enum_i_vals=[ &
2313 : helium_solute_intpot_none, &
2314 : helium_solute_intpot_mwater, &
2315 : helium_solute_intpot_nnp], &
2316 : enum_desc=s2a( &
2317 : "No interaction with solute", &
2318 : "Test interaction with wrong Water", &
2319 1480 : "Interaction with NNP"))
2320 1480 : CALL section_add_keyword(section, keyword)
2321 1480 : CALL keyword_release(keyword)
2322 :
2323 : CALL keyword_create(keyword, __LOCATION__, name="NATOMS", &
2324 : description="Number of helium atoms", &
2325 1480 : repeats=.FALSE., default_i_val=64)
2326 1480 : CALL section_add_keyword(section, keyword)
2327 1480 : CALL keyword_release(keyword)
2328 :
2329 : CALL keyword_create(keyword, __LOCATION__, name="NBEADS", &
2330 : description="Number of helium path integral beads", &
2331 1480 : repeats=.FALSE., default_i_val=25)
2332 1480 : CALL section_add_keyword(section, keyword)
2333 1480 : CALL keyword_release(keyword)
2334 :
2335 : CALL keyword_create(keyword, __LOCATION__, name="RNG_SEED", &
2336 : description="Initial seed for the (pseudo)random number "// &
2337 : "generator that controls helium coordinate generation and propagation.", &
2338 : usage="RNG_SEED <INTEGER>", default_i_val=12345, &
2339 1480 : repeats=.FALSE.)
2340 1480 : CALL section_add_keyword(section, keyword)
2341 1480 : CALL keyword_release(keyword)
2342 :
2343 : CALL keyword_create(keyword, __LOCATION__, name="N_INNER", &
2344 : variants=s2a("INOROT"), &
2345 : description="Number of MC iterations at the same time slice(s) "// &
2346 : "(number of inner MC loop iterations)", &
2347 1480 : repeats=.FALSE., default_i_val=6600)
2348 1480 : CALL section_add_keyword(section, keyword)
2349 1480 : CALL keyword_release(keyword)
2350 :
2351 : CALL keyword_create(keyword, __LOCATION__, name="N_OUTER", &
2352 : variants=s2a("IROT"), &
2353 : description="how often to reselect the time slice(s) to work on "// &
2354 : "(number of outer MC loop iterations)", &
2355 1480 : repeats=.FALSE., default_i_val=300)
2356 1480 : CALL section_add_keyword(section, keyword)
2357 1480 : CALL keyword_release(keyword)
2358 :
2359 : CALL keyword_create(keyword, __LOCATION__, name="SAMPLING_METHOD", &
2360 : description="Choose between Ceperley or the worm algorithm", &
2361 : usage="SAMPLING_METHOD (CEPERLEY|WORM)", &
2362 : default_i_val=helium_sampling_ceperley, &
2363 : enum_c_vals=s2a("CEPERLEY", "WORM"), &
2364 1480 : enum_i_vals=[helium_sampling_ceperley, helium_sampling_worm])
2365 1480 : CALL section_add_keyword(section, keyword)
2366 1480 : CALL keyword_release(keyword)
2367 :
2368 : CALL keyword_create(keyword, __LOCATION__, name="COORD_INIT_TEMP", &
2369 : description="Temperature for thermal gaussian initialization of the helium."// &
2370 : " Negative values correspond to a hot start.", &
2371 : default_r_val=cp_unit_to_cp2k(300._dp, "K"), &
2372 1480 : unit_str="K")
2373 1480 : CALL section_add_keyword(section, keyword)
2374 1480 : CALL keyword_release(keyword)
2375 :
2376 : CALL keyword_create(keyword, __LOCATION__, name="SOLUTE_RADIUS", &
2377 : description="Radius of the solute molecule for prevention of"// &
2378 : " coordinate collision during initialization", &
2379 : default_r_val=cp_unit_to_cp2k(0.0_dp, "angstrom"), &
2380 1480 : repeats=.FALSE., type_of_var=real_t, unit_str="angstrom")
2381 1480 : CALL section_add_keyword(section, keyword)
2382 1480 : CALL keyword_release(keyword)
2383 :
2384 : ! Helium-solute interaction NNP
2385 1480 : NULLIFY (subsection)
2386 : CALL section_create(subsection, __LOCATION__, name="NNP", &
2387 : description="This section contains all information to run an helium-solute "// &
2388 : "interaction Neural Network Potential (NNP) calculation.", &
2389 1480 : n_keywords=4, n_subsections=3, repeats=.FALSE.)
2390 :
2391 : CALL keyword_create(keyword, __LOCATION__, name="NNP_INPUT_FILE_NAME", &
2392 : description="File containing the input information for the setup "// &
2393 : "of the NNP (n2p2/RuNNer format). ", &
2394 1480 : repeats=.FALSE., default_lc_val="input.nn")
2395 1480 : CALL section_add_keyword(subsection, keyword)
2396 1480 : CALL keyword_release(keyword)
2397 :
2398 : CALL keyword_create(keyword, __LOCATION__, name="SCALE_FILE_NAME", &
2399 : description="File containing the scaling information for the symmetry "// &
2400 : "functions of the NNP. ", &
2401 1480 : repeats=.FALSE., default_lc_val="scaling.data")
2402 1480 : CALL section_add_keyword(subsection, keyword)
2403 1480 : CALL keyword_release(keyword)
2404 :
2405 : CALL keyword_create(keyword, __LOCATION__, name="RAD_SPLINE_N", &
2406 : description="Number of knots per radial group in the cubic-Hermite "// &
2407 : "spline tables that tabulate the radial symmetry-function product "// &
2408 : "y(r) = exp(-eta*(r-rs)^2) * fcut(r). Cubic-Hermite per-evaluation "// &
2409 : "error scales as O(1/n^4); the default keeps the spline residual "// &
2410 : "inside the NNP regression tolerance for a radial cutoff of "// &
2411 : "~12 bohr. Models with larger cutoffs or stricter tolerances may "// &
2412 : "need a larger n. Memory cost scales linearly in n per radial group.", &
2413 : repeats=.FALSE., &
2414 : n_var=1, &
2415 : type_of_var=integer_t, &
2416 : default_i_val=8192, &
2417 1480 : usage="RAD_SPLINE_N 8192")
2418 1480 : CALL section_add_keyword(subsection, keyword)
2419 1480 : CALL keyword_release(keyword)
2420 :
2421 : CALL keyword_create(keyword, __LOCATION__, name="VERLET_SKIN", &
2422 : description="Verlet skin distance for the NNP descriptor neighbour "// &
2423 : "cell-list. The neighbour-list cutoff is (symmetry-function cutoff "// &
2424 : "+ skin); the cell-list chain is rebuilt only when an atom drifts "// &
2425 : "more than skin/2 from its rebuild-time position, analogous to the "// &
2426 : "LAMMPS 'neighbor <skin> bin' command. Larger skin reduces the "// &
2427 : "rebuild rate but enlarges the per-atom neighbour list. A negative "// &
2428 : "value (default) selects the automatic heuristic "// &
2429 : "MIN(0.5 bohr, 0.1*cutoff). Useful upper bound is half the smallest "// &
2430 : "perpendicular cell width.", &
2431 : repeats=.FALSE., &
2432 : n_var=1, &
2433 : type_of_var=real_t, &
2434 : default_r_val=-1.0_dp, &
2435 : unit_str="bohr", &
2436 1480 : usage="VERLET_SKIN [bohr] 0.5")
2437 1480 : CALL section_add_keyword(subsection, keyword)
2438 1480 : CALL keyword_release(keyword)
2439 :
2440 1480 : NULLIFY (subsubsection)
2441 : CALL section_create(subsubsection, __LOCATION__, name="SR_CUTOFF", &
2442 : description="Section for failsafe short range cutoffs for the NNPs, "// &
2443 : "if the distance between solvent and specified solute element becomes "// &
2444 : "smaller than the given cutoff, an artifical repulsive potential is "// &
2445 : "introduced. Note this is only meant to prevent such configurations, "// &
2446 : "not to physically sample them.", &
2447 1480 : n_keywords=2, n_subsections=0, repeats=.TRUE.)
2448 :
2449 : CALL keyword_create(keyword, __LOCATION__, name="ELEMENT", &
2450 : description="Solute element for which the short range cutoff is in effect", &
2451 1480 : repeats=.FALSE., default_c_val="none")
2452 1480 : CALL section_add_keyword(subsubsection, keyword)
2453 1480 : CALL keyword_release(keyword)
2454 :
2455 : CALL keyword_create(keyword, __LOCATION__, name="RADIUS", &
2456 : description="Short range cutoff in Angstrom, below this cutoff, the energy "// &
2457 : "is replaced by a sizable positive value plus a 1/r**2 term to guide particles "// &
2458 : "away from each other.", &
2459 : default_r_val=cp_unit_to_cp2k(0.0_dp, "angstrom"), &
2460 1480 : repeats=.FALSE., type_of_var=real_t, unit_str="angstrom")
2461 1480 : CALL section_add_keyword(subsubsection, keyword)
2462 1480 : CALL keyword_release(keyword)
2463 1480 : CALL section_add_subsection(subsection, subsubsection)
2464 1480 : CALL section_release(subsubsection)
2465 :
2466 1480 : NULLIFY (subsubsection)
2467 : CALL section_create(subsubsection, __LOCATION__, name="MODEL", &
2468 : description="Section for a single NNP model. If this section is repeated, "// &
2469 : "a committee model (C-NNP)is used where the NNP members share the same "// &
2470 : "symmetry functions. ", &
2471 1480 : n_keywords=1, n_subsections=0, repeats=.TRUE.)
2472 :
2473 : CALL keyword_create(keyword, __LOCATION__, name="WEIGHTS", &
2474 : description="File containing the weights for the artificial neural "// &
2475 : "networks of the NNP. The specified name is extended by .XXX.data ", &
2476 1480 : repeats=.FALSE., default_lc_val="weights")
2477 1480 : CALL section_add_keyword(subsubsection, keyword)
2478 1480 : CALL keyword_release(keyword)
2479 1480 : CALL section_add_subsection(subsection, subsubsection)
2480 1480 : CALL section_release(subsubsection)
2481 :
2482 : ! Create the PRINT subsection
2483 1480 : NULLIFY (subsubsection)
2484 : CALL section_create(subsubsection, __LOCATION__, name="PRINT", &
2485 : description="Section of possible print options in NNP code.", &
2486 1480 : n_keywords=0, n_subsections=3, repeats=.FALSE.)
2487 1480 : NULLIFY (print_key, keyword)
2488 :
2489 : CALL cp_print_key_section_create(print_key, __LOCATION__, "ENERGIES", &
2490 : description="Controls the printing of the NNP energies.", &
2491 1480 : print_level=medium_print_level, common_iter_levels=1)
2492 1480 : CALL section_add_subsection(subsubsection, print_key)
2493 1480 : CALL section_release(print_key)
2494 :
2495 : CALL cp_print_key_section_create(print_key, __LOCATION__, "FORCES_SIGMA", &
2496 : description="Controls the printing of the STD per atom of the NNP forces.", &
2497 1480 : print_level=medium_print_level, common_iter_levels=1)
2498 1480 : CALL section_add_subsection(subsubsection, print_key)
2499 1480 : CALL section_release(print_key)
2500 :
2501 : CALL cp_print_key_section_create(print_key, __LOCATION__, "EXTRAPOLATION", &
2502 : description="If activated, output structures with extrapolation "// &
2503 : "warning in xyz-format", &
2504 1480 : print_level=medium_print_level, common_iter_levels=1)
2505 1480 : CALL section_add_subsection(subsubsection, print_key)
2506 1480 : CALL section_release(print_key)
2507 1480 : CALL section_add_subsection(subsection, subsubsection)
2508 1480 : CALL section_release(subsubsection)
2509 :
2510 1480 : CALL section_add_subsection(section, subsection)
2511 1480 : CALL section_release(subsection) ! release NNP subsection
2512 :
2513 : ! Ceperley's sampling algorithm
2514 1480 : NULLIFY (subsection)
2515 : CALL section_create(subsection, __LOCATION__, name="CEPERLEY", &
2516 : description="Enables sampling with Ceperley's algorithm", &
2517 1480 : n_keywords=2, n_subsections=1, repeats=.FALSE.)
2518 :
2519 : CALL keyword_create(keyword, __LOCATION__, name="BISECTION", &
2520 : description="how many time slices to change at once (+1). "// &
2521 : "Must be a power of 2 currently", &
2522 1480 : repeats=.FALSE., default_i_val=8)
2523 1480 : CALL section_add_keyword(subsection, keyword)
2524 1480 : CALL keyword_release(keyword)
2525 :
2526 : CALL keyword_create(keyword, __LOCATION__, name="MAX_PERM_CYCLE", &
2527 : description="how large cyclic permutations to try", &
2528 1480 : repeats=.FALSE., default_i_val=6)
2529 1480 : CALL section_add_keyword(subsection, keyword)
2530 1480 : CALL keyword_release(keyword)
2531 :
2532 1480 : NULLIFY (subsubsection)
2533 : CALL section_create(subsubsection, __LOCATION__, name="M-SAMPLING", &
2534 : description="Permutation cycle length sampling settings", &
2535 1480 : n_keywords=3, n_subsections=0, repeats=.FALSE.)
2536 : CALL keyword_create(keyword, __LOCATION__, name="DISTRIBUTION-TYPE", &
2537 : description="Distribution from which the cycle length m is sampled", &
2538 : usage="DISTRIBUTION-TYPE (SINGLEV|UNIFORM|LINEAR|QUADRATIC|EXPONENTIAL|GAUSSIAN)", &
2539 : default_i_val=helium_mdist_uniform, &
2540 : enum_c_vals=s2a( &
2541 : "SINGLEV", &
2542 : "UNIFORM", &
2543 : "LINEAR", &
2544 : "QUADRATIC", &
2545 : "EXPONENTIAL", &
2546 : "GAUSSIAN"), &
2547 : enum_i_vals=[ &
2548 : helium_mdist_singlev, &
2549 : helium_mdist_uniform, &
2550 : helium_mdist_linear, &
2551 : helium_mdist_quadratic, &
2552 : helium_mdist_exponential, &
2553 1480 : helium_mdist_gaussian])
2554 1480 : CALL section_add_keyword(subsubsection, keyword)
2555 1480 : CALL keyword_release(keyword)
2556 : CALL keyword_create(keyword, __LOCATION__, name="M-VALUE", &
2557 : description="Value of m treated in a special way "// &
2558 : "(specific behavior depends on the distribution type chosen)", &
2559 : repeats=.FALSE., &
2560 1480 : default_i_val=1)
2561 1480 : CALL section_add_keyword(subsubsection, keyword)
2562 1480 : CALL keyword_release(keyword)
2563 : CALL keyword_create(keyword, __LOCATION__, name="M-RATIO", &
2564 : description="Probability ratio betw M-VALUE and other cycle lengths", &
2565 : repeats=.FALSE., &
2566 1480 : default_r_val=1.0_dp)
2567 1480 : CALL section_add_keyword(subsubsection, keyword)
2568 1480 : CALL keyword_release(keyword)
2569 1480 : CALL section_add_subsection(subsection, subsubsection)
2570 1480 : CALL section_release(subsubsection)
2571 1480 : CALL section_add_subsection(section, subsection)
2572 1480 : CALL section_release(subsection) ! release CEPERLEY subsection
2573 :
2574 : ! worm algorithm parameters:
2575 1480 : NULLIFY (subsection)
2576 : CALL section_create(subsection, __LOCATION__, name="WORM", &
2577 : description="Enables sampling via the canonical worm algorithm adapted from Bonisegni", &
2578 1480 : n_keywords=12, n_subsections=0, repeats=.FALSE.)
2579 :
2580 : CALL keyword_create(keyword, __LOCATION__, name="CENTROID_DRMAX", &
2581 : description="Maximum displacement allowed for the centroid moves", &
2582 1480 : repeats=.FALSE., default_r_val=0.5_dp)
2583 1480 : CALL section_add_keyword(subsection, keyword)
2584 1480 : CALL keyword_release(keyword)
2585 :
2586 : CALL keyword_create(keyword, __LOCATION__, name="STAGING_L", &
2587 : description="From 2 up to max. L-1 beads will be moved", &
2588 1480 : repeats=.FALSE., default_i_val=5)
2589 1480 : CALL section_add_keyword(subsection, keyword)
2590 1480 : CALL keyword_release(keyword)
2591 :
2592 : CALL keyword_create(keyword, __LOCATION__, name="OPEN_CLOSE_SCALE", &
2593 : description="Open/Close acceptance adjustment parameter", &
2594 1480 : repeats=.FALSE., default_r_val=0.01_dp)
2595 1480 : CALL section_add_keyword(subsection, keyword)
2596 1480 : CALL keyword_release(keyword)
2597 :
2598 : CALL keyword_create(keyword, __LOCATION__, name="ALLOW_OPEN", &
2599 : description="Enable bosonic exchange sampling", &
2600 1480 : repeats=.FALSE., default_l_val=.TRUE.)
2601 1480 : CALL section_add_keyword(subsection, keyword)
2602 1480 : CALL keyword_release(keyword)
2603 :
2604 : CALL keyword_create(keyword, __LOCATION__, name="MAX_OPEN_CYCLES", &
2605 : description="If > 0 then reset positions and permutations to the previous closed &
2606 : & state if staying more than this amount of MC cycles in open state to avoid staying &
2607 : & trapped in open state for too long. Use with caution as it can potentially introduce &
2608 : & a bias in the sampling.", &
2609 1480 : repeats=.FALSE., default_i_val=0)
2610 1480 : CALL section_add_keyword(subsection, keyword)
2611 1480 : CALL keyword_release(keyword)
2612 :
2613 : CALL keyword_create(keyword, __LOCATION__, name="SHOW_STATISTICS", &
2614 : description="Show sampling statistics in output", &
2615 1480 : repeats=.FALSE., default_l_val=.TRUE.)
2616 1480 : CALL section_add_keyword(subsection, keyword)
2617 1480 : CALL keyword_release(keyword)
2618 :
2619 : CALL keyword_create(keyword, __LOCATION__, name="CENTROID_WEIGHT", &
2620 : description="Absolute weight of the centroid move", &
2621 1480 : repeats=.FALSE., default_i_val=10)
2622 1480 : CALL section_add_keyword(subsection, keyword)
2623 1480 : CALL keyword_release(keyword)
2624 :
2625 : CALL keyword_create(keyword, __LOCATION__, name="STAGING_WEIGHT", &
2626 : description="Absolute weight of the staging move", &
2627 1480 : repeats=.FALSE., default_i_val=30)
2628 1480 : CALL section_add_keyword(subsection, keyword)
2629 1480 : CALL keyword_release(keyword)
2630 :
2631 : CALL keyword_create(keyword, __LOCATION__, name="OPEN_CLOSE_WEIGHT", &
2632 : description="Absolute weight of the open/close move", &
2633 1480 : repeats=.FALSE., default_i_val=10)
2634 1480 : CALL section_add_keyword(subsection, keyword)
2635 1480 : CALL keyword_release(keyword)
2636 :
2637 : CALL keyword_create(keyword, __LOCATION__, name="HEAD_TAIL_WEIGHT", &
2638 : description="Absolute weight of the head/tail moves (both)", &
2639 1480 : repeats=.FALSE., default_i_val=10)
2640 1480 : CALL section_add_keyword(subsection, keyword)
2641 1480 : CALL keyword_release(keyword)
2642 :
2643 : CALL keyword_create(keyword, __LOCATION__, name="CRAWL_WEIGHT", &
2644 : description="Absolute weight of the crawl bwd/fwd moves (both)", &
2645 1480 : repeats=.FALSE., default_i_val=10)
2646 1480 : CALL section_add_keyword(subsection, keyword)
2647 1480 : CALL keyword_release(keyword)
2648 :
2649 : CALL keyword_create(keyword, __LOCATION__, name="CRAWL_REPETITION", &
2650 : description="Number of repeated crawl moves", &
2651 1480 : repeats=.FALSE., default_i_val=4)
2652 1480 : CALL section_add_keyword(subsection, keyword)
2653 1480 : CALL keyword_release(keyword)
2654 :
2655 : CALL keyword_create(keyword, __LOCATION__, name="SWAP_WEIGHT", &
2656 : description="Absolute weight of the crawl move", &
2657 1480 : repeats=.FALSE., default_i_val=10)
2658 1480 : CALL section_add_keyword(subsection, keyword)
2659 1480 : CALL keyword_release(keyword)
2660 :
2661 1480 : CALL section_add_subsection(section, subsection)
2662 1480 : CALL section_release(subsection) ! release WORM subsection
2663 :
2664 : ! end of worm parameters
2665 :
2666 : CALL keyword_create(keyword, __LOCATION__, name="PERIODIC", &
2667 : description="Use periodic boundary conditions for helium", &
2668 1480 : repeats=.FALSE., default_l_val=.FALSE.)
2669 1480 : CALL section_add_keyword(section, keyword)
2670 1480 : CALL keyword_release(keyword)
2671 :
2672 : CALL keyword_create(keyword, __LOCATION__, name="CELL_SIZE", &
2673 : description="PBC unit cell size (NOTE 1: density, number of atoms"// &
2674 : " and volume are interdependent - give only two of them; "// &
2675 : "NOTE 2: for small cell sizes specify NATOMS instead)", &
2676 1480 : repeats=.FALSE., type_of_var=real_t, unit_str="angstrom")
2677 1480 : CALL section_add_keyword(section, keyword)
2678 1480 : CALL keyword_release(keyword)
2679 :
2680 : CALL keyword_create(keyword, __LOCATION__, name="CELL_SHAPE", &
2681 : description="PBC unit cell shape for helium", &
2682 : usage="CELL_SHAPE (CUBE|OCTAHEDRON)", &
2683 : default_i_val=helium_cell_shape_cube, &
2684 : enum_c_vals=s2a("CUBE", "OCTAHEDRON"), &
2685 1480 : enum_i_vals=[helium_cell_shape_cube, helium_cell_shape_octahedron])
2686 1480 : CALL section_add_keyword(section, keyword)
2687 1480 : CALL keyword_release(keyword)
2688 :
2689 : CALL keyword_create(keyword, __LOCATION__, name="DROPLET_RADIUS", &
2690 : description="Reject a move if any of the new positions does not lie within"// &
2691 : " this range from the center of gravity", &
2692 : repeats=.FALSE., type_of_var=real_t, default_r_val=HUGE(1.0_dp), &
2693 1480 : unit_str="angstrom")
2694 1480 : CALL section_add_keyword(section, keyword)
2695 1480 : CALL keyword_release(keyword)
2696 :
2697 : CALL keyword_create(keyword, __LOCATION__, name="DENSITY", &
2698 : description="trial density of helium for determining the helium "// &
2699 : "box size", &
2700 : repeats=.FALSE., &
2701 : default_r_val=cp_unit_to_cp2k(0.02186_dp, "angstrom^-3"), &
2702 1480 : unit_str="angstrom^-3")
2703 1480 : CALL section_add_keyword(section, keyword)
2704 1480 : CALL keyword_release(keyword)
2705 :
2706 : CALL keyword_create(keyword, __LOCATION__, name="PRESAMPLE", &
2707 : description="Presample He coordinates before first PIMD step", &
2708 1480 : repeats=.FALSE., default_l_val=.FALSE.)
2709 1480 : CALL section_add_keyword(section, keyword)
2710 1480 : CALL keyword_release(keyword)
2711 :
2712 : CALL section_create(subsection, __LOCATION__, name="RDF", &
2713 : description="Radial distribution settings", &
2714 1480 : n_keywords=5, n_subsections=0, repeats=.FALSE.)
2715 :
2716 : CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
2717 : description="Whether or not to actually calculate this property", &
2718 1480 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2719 1480 : CALL section_add_keyword(subsection, keyword)
2720 1480 : CALL keyword_release(keyword)
2721 :
2722 : CALL keyword_create(keyword, __LOCATION__, name="MAXR", &
2723 : description="Maximum RDF range, defaults to unit cell size", &
2724 : repeats=.FALSE., type_of_var=real_t, &
2725 1480 : unit_str="angstrom")
2726 1480 : CALL section_add_keyword(subsection, keyword)
2727 1480 : CALL keyword_release(keyword)
2728 :
2729 : CALL keyword_create(keyword, __LOCATION__, name="NBIN", &
2730 : description="Number of bins", &
2731 : repeats=.FALSE., &
2732 1480 : default_i_val=250)
2733 1480 : CALL section_add_keyword(subsection, keyword)
2734 1480 : CALL keyword_release(keyword)
2735 :
2736 : CALL keyword_create(keyword, __LOCATION__, name="SOLUTE_HE", &
2737 : description="Whether or not to calculate solute-He RDFs (if solute is present)", &
2738 1480 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
2739 1480 : CALL section_add_keyword(subsection, keyword)
2740 1480 : CALL keyword_release(keyword)
2741 :
2742 : CALL keyword_create(keyword, __LOCATION__, name="HE_HE", &
2743 : description="Whether or not to calculate He-He RDFs", &
2744 1480 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2745 1480 : CALL section_add_keyword(subsection, keyword)
2746 1480 : CALL keyword_release(keyword)
2747 :
2748 1480 : CALL section_add_subsection(section, subsection)
2749 1480 : CALL section_release(subsection)
2750 :
2751 1480 : NULLIFY (subsection)
2752 : CALL section_create(subsection, __LOCATION__, name="RHO", &
2753 : description="Spatial distribution settings", &
2754 1480 : n_keywords=10, n_subsections=0, repeats=.FALSE.)
2755 : CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
2756 : description="Whether or not to actually calculate densities "// &
2757 : "(requires significant amount of memory, depending on the value of NBIN)", &
2758 1480 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2759 1480 : CALL section_add_keyword(subsection, keyword)
2760 1480 : CALL keyword_release(keyword)
2761 : CALL keyword_create(keyword, __LOCATION__, name="NBIN", &
2762 : description="Number of grid points in each direction for density binning", &
2763 : repeats=.FALSE., &
2764 1480 : default_i_val=100)
2765 1480 : CALL section_add_keyword(subsection, keyword)
2766 1480 : CALL keyword_release(keyword)
2767 : !
2768 : CALL keyword_create(keyword, __LOCATION__, name="MIN_CYCLE_LENGTHS_WDG", &
2769 : description="Density of winding paths "// &
2770 : "not shorter than the given length", &
2771 : repeats=.FALSE., usage="MIN_CYCLE_LENGTHS_WDG <INT> <INT> .. <INT>", &
2772 1480 : type_of_var=integer_t, n_var=-1)
2773 1480 : CALL section_add_keyword(subsection, keyword)
2774 1480 : CALL keyword_release(keyword)
2775 : !
2776 : CALL keyword_create(keyword, __LOCATION__, name="MIN_CYCLE_LENGTHS_NON", &
2777 : description="Density of non-winding paths "// &
2778 : "not shorter than the given length", &
2779 : repeats=.FALSE., usage="MIN_CYCLE_LENGTHS_NON <INT> <INT> .. <INT>", &
2780 1480 : type_of_var=integer_t, n_var=-1)
2781 1480 : CALL section_add_keyword(subsection, keyword)
2782 1480 : CALL keyword_release(keyword)
2783 : !
2784 : CALL keyword_create(keyword, __LOCATION__, name="MIN_CYCLE_LENGTHS_ALL", &
2785 : description="Density of all paths "// &
2786 : "not shorter than the given length", &
2787 : repeats=.FALSE., usage="MIN_CYCLE_LENGTHS_ALL <INT> <INT> .. <INT>", &
2788 1480 : type_of_var=integer_t, n_var=-1)
2789 1480 : CALL section_add_keyword(subsection, keyword)
2790 1480 : CALL keyword_release(keyword)
2791 : !
2792 : CALL keyword_create(keyword, __LOCATION__, name="ATOM_NUMBER", &
2793 : description="Atom number density", &
2794 : repeats=.FALSE., &
2795 : type_of_var=logical_t, &
2796 : default_l_val=.TRUE., &
2797 1480 : lone_keyword_l_val=.TRUE.)
2798 1480 : CALL section_add_keyword(subsection, keyword)
2799 1480 : CALL keyword_release(keyword)
2800 : !
2801 : CALL keyword_create(keyword, __LOCATION__, name="PROJECTED_AREA_2", &
2802 : description="Projected area squared density, A*A(r)", &
2803 : repeats=.FALSE., &
2804 : type_of_var=logical_t, &
2805 : default_l_val=.FALSE., &
2806 1480 : lone_keyword_l_val=.TRUE.)
2807 1480 : CALL section_add_keyword(subsection, keyword)
2808 1480 : CALL keyword_release(keyword)
2809 : !
2810 : CALL keyword_create(keyword, __LOCATION__, name="WINDING_NUMBER_2", &
2811 : description="Winding number squared density, W*W(r)", &
2812 : repeats=.FALSE., &
2813 : type_of_var=logical_t, &
2814 : default_l_val=.FALSE., &
2815 1480 : lone_keyword_l_val=.TRUE.)
2816 1480 : CALL section_add_keyword(subsection, keyword)
2817 1480 : CALL keyword_release(keyword)
2818 : !
2819 : CALL keyword_create(keyword, __LOCATION__, name="WINDING_CYCLE_2", &
2820 : description="Winding number squared density, W^2(r)", &
2821 : repeats=.FALSE., &
2822 : type_of_var=logical_t, &
2823 : default_l_val=.FALSE., &
2824 1480 : lone_keyword_l_val=.TRUE.)
2825 1480 : CALL section_add_keyword(subsection, keyword)
2826 1480 : CALL keyword_release(keyword)
2827 : !
2828 : CALL keyword_create(keyword, __LOCATION__, name="MOMENT_OF_INERTIA", &
2829 : description="Moment of inertia density", &
2830 : repeats=.FALSE., &
2831 : type_of_var=logical_t, &
2832 : default_l_val=.FALSE., &
2833 1480 : lone_keyword_l_val=.TRUE.)
2834 1480 : CALL section_add_keyword(subsection, keyword)
2835 1480 : CALL keyword_release(keyword)
2836 :
2837 1480 : CALL section_add_subsection(section, subsection)
2838 1480 : CALL section_release(subsection)
2839 : ! end of subsection RHO
2840 :
2841 1480 : CALL create_coord_section(subsection, "HELIUM")
2842 1480 : CALL section_add_subsection(section, subsection)
2843 1480 : CALL section_release(subsection)
2844 :
2845 : CALL section_create(subsection, __LOCATION__, name="PERM", &
2846 : description="Permutation state used for restart", &
2847 1480 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
2848 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
2849 : description="Specify particle index permutation for every "// &
2850 : "helium atom", repeats=.TRUE., usage="<INT> <INT> .. <INT>", &
2851 1480 : type_of_var=integer_t, n_var=-1)
2852 1480 : CALL section_add_keyword(subsection, keyword)
2853 1480 : CALL keyword_release(keyword)
2854 1480 : CALL section_add_subsection(section, subsection)
2855 1480 : CALL section_release(subsection)
2856 :
2857 : CALL section_create(subsection, __LOCATION__, name="AVERAGES", &
2858 : description="Average properties (used for restarts)", &
2859 1480 : n_keywords=7, n_subsections=0, repeats=.FALSE.)
2860 : CALL keyword_create(keyword, __LOCATION__, name="PROJECTED_AREA", &
2861 : description="Projected area vector for all environments", &
2862 : repeats=.TRUE., usage="PROJECTED_AREA <REAL> <REAL> .. <REAL>", &
2863 1480 : type_of_var=real_t, n_var=-1)
2864 1480 : CALL section_add_keyword(subsection, keyword)
2865 1480 : CALL keyword_release(keyword)
2866 : CALL keyword_create(keyword, __LOCATION__, name="PROJECTED_AREA_2", &
2867 : description="Projected area vector squared for all environments", &
2868 : repeats=.TRUE., usage="PROJECTED_AREA_2 <REAL> <REAL> .. <REAL>", &
2869 1480 : type_of_var=real_t, n_var=-1)
2870 1480 : CALL section_add_keyword(subsection, keyword)
2871 1480 : CALL keyword_release(keyword)
2872 : CALL keyword_create(keyword, __LOCATION__, name="WINDING_NUMBER_2", &
2873 : description="Winding number vector squared for all environments", &
2874 : repeats=.TRUE., usage="WINDING_NUMBER_2 <REAL> <REAL> .. <REAL>", &
2875 1480 : type_of_var=real_t, n_var=-1)
2876 1480 : CALL section_add_keyword(subsection, keyword)
2877 1480 : CALL keyword_release(keyword)
2878 : CALL keyword_create(keyword, __LOCATION__, name="MOMENT_OF_INERTIA", &
2879 : description="Moment of inertia vector for all environments", &
2880 : repeats=.TRUE., usage="MOMENT_OF_INERTIA <REAL> <REAL> .. <REAL>", &
2881 1480 : type_of_var=real_t, n_var=-1)
2882 1480 : CALL section_add_keyword(subsection, keyword)
2883 1480 : CALL keyword_release(keyword)
2884 : CALL keyword_create(keyword, __LOCATION__, name="RDF", &
2885 : description="Radial distributions averaged over all environments", &
2886 : repeats=.TRUE., usage="RDF <REAL> <REAL> .. <REAL>", &
2887 1480 : type_of_var=real_t, n_var=-1)
2888 1480 : CALL section_add_keyword(subsection, keyword)
2889 1480 : CALL keyword_release(keyword)
2890 : CALL keyword_create(keyword, __LOCATION__, name="RHO", &
2891 : description="Spatial distributions averaged over all environments", &
2892 : repeats=.TRUE., usage="RHO <REAL> <REAL> .. <REAL>", &
2893 1480 : type_of_var=real_t, n_var=-1)
2894 1480 : CALL section_add_keyword(subsection, keyword)
2895 1480 : CALL keyword_release(keyword)
2896 : CALL keyword_create(keyword, __LOCATION__, name="IWEIGHT", &
2897 : description="Weight for the restarted quantities "// &
2898 : "(number of MC steps used to calculate the accumulated averages)", &
2899 : repeats=.FALSE., &
2900 1480 : default_i_val=0)
2901 1480 : CALL section_add_keyword(subsection, keyword)
2902 1480 : CALL keyword_release(keyword)
2903 1480 : CALL section_add_subsection(section, subsection)
2904 1480 : CALL section_release(subsection)
2905 :
2906 : CALL section_create(subsection, __LOCATION__, name="FORCE", &
2907 : description="Forces exerted by the helium on the solute system"// &
2908 : " (used for restarts)", &
2909 1480 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
2910 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
2911 : description="Number of real values should be 3 * "// &
2912 : "<num_solute_atoms> * <num_solute_beads>", repeats=.TRUE., &
2913 : usage="<REAL> <REAL> .. <REAL>", type_of_var=real_t, &
2914 1480 : n_var=-1)
2915 1480 : CALL section_add_keyword(subsection, keyword)
2916 1480 : CALL keyword_release(keyword)
2917 1480 : CALL section_add_subsection(section, subsection)
2918 1480 : CALL section_release(subsection)
2919 :
2920 : CALL section_create(subsection, __LOCATION__, name="RNG_STATE", &
2921 : description="Random number generator state for all processors", &
2922 1480 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
2923 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
2924 : description="Three real arrays of DIMENSION(3,2) times two RNG "// &
2925 : "streams - 36 real values per processor", &
2926 : repeats=.TRUE., usage="automatically filled, do not edit by hand", &
2927 1480 : type_of_var=real_t, n_var=-1)
2928 1480 : CALL section_add_keyword(subsection, keyword)
2929 1480 : CALL keyword_release(keyword)
2930 1480 : CALL section_add_subsection(section, subsection)
2931 1480 : CALL section_release(subsection)
2932 :
2933 : CALL section_create(subsection, __LOCATION__, name="PRINT", &
2934 : description="The section that controls the output of the helium code", &
2935 1480 : n_keywords=16, n_subsections=0, repeats=.FALSE.)
2936 :
2937 : ! *************************************************************************
2938 : !> Printkeys for properties output
2939 : ! *************************************************************************
2940 1480 : NULLIFY (print_key)
2941 :
2942 : ! Properties printed at SILENT print level
2943 : !
2944 :
2945 : ! Properties printed at LOW print level
2946 : !
2947 : CALL cp_print_key_section_create(print_key, __LOCATION__, "ENERGY", &
2948 : description="Controls the output of helium energies"// &
2949 : " (averaged over MC step)", &
2950 1480 : print_level=low_print_level, common_iter_levels=1)
2951 1480 : CALL section_add_subsection(subsection, print_key)
2952 1480 : CALL section_release(print_key)
2953 : !
2954 : CALL cp_print_key_section_create(print_key, __LOCATION__, "PROJECTED_AREA_2_AVG", &
2955 : description="Controls the output of the average projected area squared vector", &
2956 1480 : print_level=low_print_level, common_iter_levels=1)
2957 1480 : CALL section_add_subsection(subsection, print_key)
2958 1480 : CALL section_release(print_key)
2959 : !
2960 : CALL cp_print_key_section_create(print_key, __LOCATION__, "WINDING_NUMBER_2_AVG", &
2961 : description="Controls the output of the average winding number vector squared", &
2962 1480 : print_level=low_print_level, common_iter_levels=1)
2963 1480 : CALL section_add_subsection(subsection, print_key)
2964 1480 : CALL section_release(print_key)
2965 : !
2966 : CALL cp_print_key_section_create(print_key, __LOCATION__, "MOMENT_OF_INERTIA_AVG", &
2967 : description="Controls the output of the average moment of inertia vector", &
2968 1480 : print_level=low_print_level, common_iter_levels=1)
2969 1480 : CALL section_add_subsection(subsection, print_key)
2970 1480 : CALL section_release(print_key)
2971 :
2972 : ! Properties printed at MEDIUM print level
2973 : !
2974 : CALL cp_print_key_section_create(print_key, __LOCATION__, "RDF", &
2975 : description="Controls the output of helium radial distribution functions", &
2976 1480 : print_level=medium_print_level, common_iter_levels=1)
2977 1480 : CALL section_add_subsection(subsection, print_key)
2978 1480 : CALL section_release(print_key)
2979 :
2980 : CALL cp_print_key_section_create(print_key, __LOCATION__, "RHO", &
2981 : description="Controls the output of the helium density "// &
2982 : "(Gaussian cube file format)", &
2983 : each_iter_names=s2a("PINT"), each_iter_values=[100], &
2984 : print_level=medium_print_level, common_iter_levels=1, &
2985 1480 : add_last=add_last_numeric, do_backup=.TRUE.)
2986 1480 : CALL section_add_subsection(subsection, print_key)
2987 1480 : CALL section_release(print_key)
2988 : !
2989 : CALL cp_print_key_section_create(print_key, __LOCATION__, "PROJECTED_AREA", &
2990 : description="Controls the output of the projected area vector", &
2991 1480 : print_level=medium_print_level, common_iter_levels=1)
2992 1480 : CALL section_add_subsection(subsection, print_key)
2993 1480 : CALL section_release(print_key)
2994 : !
2995 : CALL cp_print_key_section_create(print_key, __LOCATION__, "WINDING_NUMBER", &
2996 : description="Controls the output of the winding number vector", &
2997 1480 : print_level=medium_print_level, common_iter_levels=1)
2998 1480 : CALL section_add_subsection(subsection, print_key)
2999 1480 : CALL section_release(print_key)
3000 : !
3001 : CALL cp_print_key_section_create(print_key, __LOCATION__, "MOMENT_OF_INERTIA", &
3002 : description="Controls the output of the moment of inertia vector", &
3003 1480 : print_level=medium_print_level, common_iter_levels=1)
3004 1480 : CALL section_add_subsection(subsection, print_key)
3005 1480 : CALL section_release(print_key)
3006 : !
3007 : CALL cp_print_key_section_create(print_key, __LOCATION__, "PLENGTH", &
3008 : description="Controls the output of the helium permutation length", &
3009 1480 : print_level=medium_print_level, common_iter_levels=1)
3010 1480 : CALL section_add_subsection(subsection, print_key)
3011 1480 : CALL section_release(print_key)
3012 :
3013 : CALL cp_print_key_section_create(print_key, __LOCATION__, "ACTION", &
3014 : description="Controls the output of the total helium action", &
3015 1480 : print_level=medium_print_level, common_iter_levels=1)
3016 1480 : CALL section_add_subsection(subsection, print_key)
3017 1480 : CALL section_release(print_key)
3018 :
3019 : ! Properties printed at HIGH print level
3020 : !
3021 : CALL cp_print_key_section_create(print_key, __LOCATION__, "COORDINATES", &
3022 : description="Controls the output of helium coordinates", &
3023 1480 : print_level=high_print_level, common_iter_levels=1)
3024 : CALL keyword_create(keyword, __LOCATION__, name="FORMAT", &
3025 : description="Output file format for the coordinates", &
3026 : usage="FORMAT (PDB|XYZ)", &
3027 : default_i_val=fmt_id_pdb, &
3028 : enum_c_vals=s2a("PDB", "XYZ"), &
3029 : enum_i_vals=[fmt_id_pdb, fmt_id_xyz], &
3030 : enum_desc=s2a("Bead coordinates and connectivity is written in PDB format", &
3031 1480 : "Only bead coordinates are written in XYZ format"))
3032 1480 : CALL section_add_keyword(print_key, keyword)
3033 1480 : CALL keyword_release(keyword)
3034 1480 : CALL section_add_subsection(subsection, print_key)
3035 1480 : CALL section_release(print_key)
3036 : !
3037 : CALL cp_print_key_section_create(print_key, __LOCATION__, "PERM", &
3038 : description="Controls the output of the helium permutation state", &
3039 1480 : print_level=high_print_level, common_iter_levels=1)
3040 : CALL keyword_create(keyword, __LOCATION__, name="FORMAT", &
3041 : description="Output format for the permutation", &
3042 : usage="FORMAT (CYCLE|PLAIN)", &
3043 : default_i_val=perm_cycle, &
3044 : enum_c_vals=s2a("CYCLE", "PLAIN"), &
3045 : enum_i_vals=[perm_cycle, perm_plain], &
3046 : enum_desc=s2a( &
3047 : "Cycle notation with winding cycles enclosed"// &
3048 : " in '[...]' and non-winding ones enclosed in '(...)'", &
3049 1480 : "Plain permutation output, i.e. P(1) ... P(N)"))
3050 1480 : CALL section_add_keyword(print_key, keyword)
3051 1480 : CALL keyword_release(keyword)
3052 1480 : CALL section_add_subsection(subsection, print_key)
3053 1480 : CALL section_release(print_key)
3054 :
3055 : CALL cp_print_key_section_create(print_key, __LOCATION__, "FORCES", &
3056 : description="Controls the output of the helium forces on the solute", &
3057 1480 : print_level=high_print_level, common_iter_levels=1)
3058 1480 : CALL section_add_subsection(subsection, print_key)
3059 1480 : CALL section_release(print_key)
3060 :
3061 : ! Properties printed at DEBUG print level
3062 : !
3063 : CALL cp_print_key_section_create(print_key, __LOCATION__, "ACCEPTS", &
3064 : description="Controls the output of the helium acceptance data", &
3065 1480 : print_level=debug_print_level, common_iter_levels=1)
3066 1480 : CALL section_add_subsection(subsection, print_key)
3067 1480 : CALL section_release(print_key)
3068 : !
3069 : CALL cp_print_key_section_create(print_key, __LOCATION__, "FORCES_INST", &
3070 : description="Controls the output of the instantaneous helium forces on the solute", &
3071 1480 : print_level=debug_print_level, common_iter_levels=1)
3072 1480 : CALL section_add_subsection(subsection, print_key)
3073 1480 : CALL section_release(print_key)
3074 :
3075 1480 : CALL section_add_subsection(section, subsection)
3076 1480 : CALL section_release(subsection)
3077 :
3078 1480 : RETURN
3079 : END SUBROUTINE create_helium_section
3080 :
3081 : END MODULE input_cp2k_motion
|