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