Line data Source code
1 : !--------------------------------------------------------------------------------------------------!
2 : ! CP2K: A general program to perform molecular dynamics simulations !
3 : ! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
4 : ! !
5 : ! SPDX-License-Identifier: GPL-2.0-or-later !
6 : !--------------------------------------------------------------------------------------------------!
7 :
8 : ! **************************************************************************************************
9 : !> \par History
10 : !> 10.2005 split input_cp2k into smaller modules [fawzi]
11 : !> 01.2020 add keywords related to Space Groups [pcazade]
12 : !> \author teo & fawzi
13 : ! **************************************************************************************************
14 : MODULE input_cp2k_motion
15 : USE bibliography, ONLY: Brieuc2016, &
16 : Byrd1995, &
17 : Ceriotti2010, &
18 : Ceriotti2012, &
19 : Ceriotti2014, &
20 : Henkelman1999, &
21 : Henkelman2014, &
22 : Kapil2016
23 : 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 9582 : SUBROUTINE create_motion_section(section)
86 : TYPE(section_type), POINTER :: section
87 :
88 : TYPE(section_type), POINTER :: subsection
89 :
90 9582 : 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 9582 : n_keywords=1, n_subsections=1, repeats=.FALSE.)
94 :
95 9582 : 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 9582 : use_model_hessian=.TRUE.)
101 9582 : CALL section_add_subsection(section, subsection)
102 9582 : CALL section_release(subsection)
103 :
104 9582 : CALL create_cell_opt_section(subsection)
105 9582 : CALL section_add_subsection(section, subsection)
106 9582 : CALL section_release(subsection)
107 :
108 9582 : CALL create_shellcore_opt_section(subsection)
109 9582 : CALL section_add_subsection(section, subsection)
110 9582 : CALL section_release(subsection)
111 :
112 9582 : CALL create_md_section(subsection)
113 9582 : CALL section_add_subsection(section, subsection)
114 9582 : CALL section_release(subsection)
115 :
116 9582 : CALL create_driver_section(subsection)
117 9582 : CALL section_add_subsection(section, subsection)
118 9582 : CALL section_release(subsection)
119 :
120 9582 : CALL create_fe_section(subsection)
121 9582 : CALL section_add_subsection(section, subsection)
122 9582 : CALL section_release(subsection)
123 :
124 9582 : CALL create_constraint_section(subsection)
125 9582 : CALL section_add_subsection(section, subsection)
126 9582 : CALL section_release(subsection)
127 :
128 9582 : CALL create_fp_section(subsection)
129 9582 : CALL section_add_subsection(section, subsection)
130 9582 : CALL section_release(subsection)
131 :
132 9582 : CALL create_mc_section(subsection)
133 9582 : CALL section_add_subsection(section, subsection)
134 9582 : CALL section_release(subsection)
135 :
136 9582 : CALL create_TMC_section(subsection)
137 9582 : CALL section_add_subsection(section, subsection)
138 9582 : CALL section_release(subsection)
139 :
140 9582 : CALL create_pint_section(subsection)
141 9582 : CALL section_add_subsection(section, subsection)
142 9582 : CALL section_release(subsection)
143 :
144 9582 : CALL create_band_section(subsection)
145 9582 : CALL section_add_subsection(section, subsection)
146 9582 : CALL section_release(subsection)
147 :
148 9582 : CALL create_motion_print_section(subsection)
149 9582 : CALL section_add_subsection(section, subsection)
150 9582 : CALL section_release(subsection)
151 :
152 9582 : 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 9582 : 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 9582 : 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 9582 : n_keywords=10, n_subsections=2, repeats=.FALSE.)
169 :
170 9582 : 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 9582 : default_i_val=100)
176 9582 : CALL section_add_keyword(section, keyword)
177 9582 : 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 9582 : default_i_val=1)
183 9582 : CALL section_add_keyword(section, keyword)
184 9582 : 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 9582 : default_i_val=4)
190 9582 : CALL section_add_keyword(section, keyword)
191 9582 : 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 9582 : default_i_val=16)
197 9582 : CALL section_add_keyword(section, keyword)
198 9582 : 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 9582 : default_l_val=.FALSE.)
204 9582 : CALL section_add_keyword(section, keyword)
205 9582 : 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 9582 : default_l_val=.FALSE.)
211 9582 : CALL section_add_keyword(section, keyword)
212 9582 : 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 9582 : default_l_val=.FALSE.)
218 9582 : CALL section_add_keyword(section, keyword)
219 9582 : 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 9582 : default_r_val=1.0E0_dp)
225 9582 : CALL section_add_keyword(section, keyword)
226 9582 : 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 9582 : default_l_val=.FALSE.)
232 9582 : CALL section_add_keyword(section, keyword)
233 9582 : 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 9582 : default_i_val=1000)
240 9582 : CALL section_add_keyword(section, keyword)
241 9582 : 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 9582 : default_i_val=do_mc_traditional)
249 9582 : CALL section_add_keyword(section, keyword)
250 9582 : 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 9582 : default_lc_val="")
256 9582 : CALL section_add_keyword(section, keyword)
257 9582 : 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 9582 : default_lc_val="")
263 9582 : CALL section_add_keyword(section, keyword)
264 9582 : 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 9582 : default_lc_val="")
270 9582 : CALL section_add_keyword(section, keyword)
271 9582 : 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 9582 : default_lc_val="")
277 9582 : CALL section_add_keyword(section, keyword)
278 9582 : 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 9582 : default_lc_val="")
284 9582 : CALL section_add_keyword(section, keyword)
285 9582 : 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 9582 : default_lc_val="")
291 9582 : CALL section_add_keyword(section, keyword)
292 9582 : 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 9582 : default_lc_val="")
298 9582 : CALL section_add_keyword(section, keyword)
299 9582 : 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 9582 : default_lc_val="")
305 9582 : CALL section_add_keyword(section, keyword)
306 9582 : 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 9582 : default_lc_val="")
312 9582 : CALL section_add_keyword(section, keyword)
313 9582 : 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 9582 : type_of_var=real_t)
319 9582 : CALL section_add_keyword(section, keyword)
320 9582 : 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 9582 : type_of_var=real_t)
326 9582 : CALL section_add_keyword(section, keyword)
327 9582 : 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 9582 : n_var=-1, type_of_var=real_t)
334 9582 : CALL section_add_keyword(section, keyword)
335 9582 : 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 9582 : default_r_val=1.0E0_dp)
341 9582 : CALL section_add_keyword(section, keyword)
342 9582 : 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 9582 : n_var=-1, type_of_var=real_t)
348 9582 : CALL section_add_keyword(section, keyword)
349 9582 : 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 9582 : default_i_val=0)
355 9582 : CALL section_add_keyword(section, keyword)
356 9582 : CALL keyword_release(keyword)
357 :
358 9582 : CALL create_avbmc_section(subsection)
359 9582 : CALL section_add_subsection(section, subsection)
360 9582 : CALL section_release(subsection)
361 :
362 9582 : CALL create_move_prob_section(subsection)
363 9582 : CALL section_add_subsection(section, subsection)
364 9582 : CALL section_release(subsection)
365 :
366 9582 : CALL create_update_section(subsection)
367 9582 : CALL section_add_subsection(section, subsection)
368 9582 : CALL section_release(subsection)
369 :
370 9582 : CALL create_max_disp_section(subsection)
371 9582 : CALL section_add_subsection(section, subsection)
372 9582 : CALL section_release(subsection)
373 :
374 9582 : END SUBROUTINE create_mc_section
375 :
376 : ! **************************************************************************************************
377 : !> \brief ...
378 : !> \param section will contain the AVBMC parameters for MC
379 : !> \author matt
380 : ! **************************************************************************************************
381 9582 : SUBROUTINE create_avbmc_section(section)
382 : TYPE(section_type), POINTER :: section
383 :
384 : TYPE(keyword_type), POINTER :: keyword
385 :
386 9582 : 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 9582 : n_keywords=5, n_subsections=0, repeats=.FALSE.)
393 :
394 9582 : 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 9582 : n_var=-1, type_of_var=real_t)
401 9582 : CALL section_add_keyword(section, keyword)
402 9582 : 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 9582 : n_var=-1, type_of_var=integer_t)
408 9582 : CALL section_add_keyword(section, keyword)
409 9582 : 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 9582 : n_var=-1, type_of_var=real_t)
415 9582 : CALL section_add_keyword(section, keyword)
416 9582 : 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 9582 : n_var=-1, type_of_var=real_t)
422 9582 : CALL section_add_keyword(section, keyword)
423 9582 : CALL keyword_release(keyword)
424 :
425 9582 : 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 9582 : 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 9582 : 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 9582 : n_keywords=5, n_subsections=2, repeats=.FALSE.)
444 :
445 9582 : 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 9582 : type_of_var=real_t, default_r_val=0.0E0_dp)
451 9582 : CALL section_add_keyword(section, keyword)
452 9582 : 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 9582 : type_of_var=real_t)
458 9582 : CALL section_add_keyword(section, keyword)
459 9582 : 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 9582 : type_of_var=real_t, default_r_val=0.0E0_dp)
465 9582 : CALL section_add_keyword(section, keyword)
466 9582 : 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 9582 : default_r_val=0.0E0_dp)
472 9582 : CALL section_add_keyword(section, keyword)
473 9582 : 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 9582 : type_of_var=real_t)
479 9582 : CALL section_add_keyword(section, keyword)
480 9582 : 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 9582 : type_of_var=real_t, default_r_val=0.0E0_dp)
486 9582 : CALL section_add_keyword(section, keyword)
487 9582 : 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 9582 : type_of_var=real_t, default_r_val=0.0E0_dp)
493 9582 : CALL section_add_keyword(section, keyword)
494 9582 : CALL keyword_release(keyword)
495 :
496 9582 : CALL create_mol_prob_section(subsection)
497 9582 : CALL section_add_subsection(section, subsection)
498 9582 : CALL section_release(subsection)
499 :
500 9582 : CALL create_box_prob_section(subsection)
501 9582 : CALL section_add_subsection(section, subsection)
502 9582 : CALL section_release(subsection)
503 :
504 9582 : 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 9582 : SUBROUTINE create_mol_prob_section(section)
513 : TYPE(section_type), POINTER :: section
514 :
515 : TYPE(keyword_type), POINTER :: keyword
516 :
517 9582 : 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 9582 : n_keywords=5, n_subsections=0, repeats=.FALSE.)
523 :
524 9582 : 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 9582 : n_var=-1, type_of_var=real_t)
530 9582 : CALL section_add_keyword(section, keyword)
531 9582 : 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 9582 : n_var=-1, type_of_var=real_t)
537 9582 : CALL section_add_keyword(section, keyword)
538 9582 : 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 9582 : n_var=-1, type_of_var=real_t)
544 9582 : CALL section_add_keyword(section, keyword)
545 9582 : 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 9582 : n_var=-1, type_of_var=real_t)
551 9582 : CALL section_add_keyword(section, keyword)
552 9582 : 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 9582 : n_var=-1, type_of_var=real_t)
558 9582 : CALL section_add_keyword(section, keyword)
559 9582 : CALL keyword_release(keyword)
560 :
561 9582 : 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 9582 : SUBROUTINE create_box_prob_section(section)
570 : TYPE(section_type), POINTER :: section
571 :
572 : TYPE(keyword_type), POINTER :: keyword
573 :
574 9582 : 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 9582 : n_keywords=2, n_subsections=0, repeats=.FALSE.)
580 :
581 9582 : 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 9582 : type_of_var=real_t, default_r_val=1.0E0_dp)
587 9582 : CALL section_add_keyword(section, keyword)
588 9582 : 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 9582 : type_of_var=real_t, default_r_val=1.0E0_dp)
594 9582 : CALL section_add_keyword(section, keyword)
595 9582 : 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 9582 : type_of_var=real_t, default_r_val=1.0E0_dp)
601 9582 : CALL section_add_keyword(section, keyword)
602 9582 : CALL keyword_release(keyword)
603 :
604 9582 : 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 9582 : SUBROUTINE create_update_section(section)
613 : TYPE(section_type), POINTER :: section
614 :
615 : TYPE(keyword_type), POINTER :: keyword
616 :
617 9582 : CPASSERT(.NOT. ASSOCIATED(section))
618 :
619 : CALL section_create(section, __LOCATION__, name="MOVE_UPDATES", &
620 : description="Frequency for updating move maximum displacements.", &
621 9582 : n_keywords=2, n_subsections=0, repeats=.FALSE.)
622 :
623 9582 : 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 9582 : default_i_val=10000)
629 9582 : CALL section_add_keyword(section, keyword)
630 9582 : 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 9582 : default_i_val=10000)
637 9582 : CALL section_add_keyword(section, keyword)
638 9582 : 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 9582 : default_i_val=10000)
644 9582 : CALL section_add_keyword(section, keyword)
645 9582 : CALL keyword_release(keyword)
646 :
647 9582 : 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 9582 : SUBROUTINE create_max_disp_section(section)
655 : TYPE(section_type), POINTER :: section
656 :
657 : TYPE(section_type), POINTER :: subsection
658 :
659 9582 : CPASSERT(.NOT. ASSOCIATED(section))
660 :
661 : CALL section_create(section, __LOCATION__, name="max_displacements", &
662 : description="The maximum displacements for all attempted moves.", &
663 9582 : n_keywords=1, n_subsections=2, repeats=.FALSE.)
664 :
665 9582 : NULLIFY (subsection)
666 :
667 9582 : CALL create_mol_disp_section(subsection)
668 9582 : CALL section_add_subsection(section, subsection)
669 9582 : CALL section_release(subsection)
670 :
671 9582 : CALL create_box_disp_section(subsection)
672 9582 : CALL section_add_subsection(section, subsection)
673 9582 : CALL section_release(subsection)
674 :
675 9582 : 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 9582 : SUBROUTINE create_mol_disp_section(section)
684 : TYPE(section_type), POINTER :: section
685 :
686 : TYPE(keyword_type), POINTER :: keyword
687 :
688 9582 : 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 9582 : n_keywords=5, n_subsections=0, repeats=.FALSE.)
694 :
695 9582 : 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 9582 : n_var=-1, type_of_var=real_t)
701 9582 : CALL section_add_keyword(section, keyword)
702 9582 : 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 9582 : n_var=-1, type_of_var=real_t)
708 9582 : CALL section_add_keyword(section, keyword)
709 9582 : 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 9582 : n_var=-1, type_of_var=real_t)
715 9582 : CALL section_add_keyword(section, keyword)
716 9582 : 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 9582 : n_var=-1, type_of_var=real_t)
722 9582 : CALL section_add_keyword(section, keyword)
723 9582 : 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 9582 : n_var=-1, type_of_var=real_t)
729 9582 : CALL section_add_keyword(section, keyword)
730 9582 : CALL keyword_release(keyword)
731 :
732 9582 : 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 9582 : SUBROUTINE create_box_disp_section(section)
741 : TYPE(section_type), POINTER :: section
742 :
743 : TYPE(keyword_type), POINTER :: keyword
744 :
745 9582 : 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 9582 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
751 :
752 9582 : NULLIFY (keyword)
753 :
754 : CALL keyword_create(keyword, __LOCATION__, name="RMVOLUME", &
755 : description="Maximum volume displacement, in angstrom**3.", &
756 : usage="RMVOLUME {real}", &
757 9582 : type_of_var=real_t)
758 9582 : CALL section_add_keyword(section, keyword)
759 9582 : 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 9582 : default_r_val=1.0E0_dp)
765 9582 : CALL section_add_keyword(section, keyword)
766 9582 : CALL keyword_release(keyword)
767 :
768 9582 : 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 38328 : 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 38328 : CPASSERT(.NOT. ASSOCIATED(section))
791 : CALL section_create(section, location=location, name=label, description=description, &
792 38328 : n_keywords=1, n_subsections=1, repeats=.FALSE.)
793 :
794 38328 : NULLIFY (keyword)
795 38328 : 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 9582 : default_i_val=default_minimization_method_id)
804 9582 : CALL section_add_keyword(section, keyword)
805 9582 : 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 114984 : default_i_val=default_bfgs_method_id)
822 38328 : CALL section_add_keyword(section, keyword)
823 38328 : 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 38328 : default_i_val=200)
830 38328 : CALL section_add_keyword(section, keyword)
831 38328 : 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 38328 : default_r_val=0.0030_dp, unit_str="bohr")
838 38328 : CALL section_add_keyword(section, keyword)
839 38328 : 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 38328 : default_r_val=0.00045_dp, unit_str="hartree/bohr")
845 38328 : CALL section_add_keyword(section, keyword)
846 38328 : 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 38328 : default_r_val=0.0015_dp)
853 38328 : CALL section_add_keyword(section, keyword)
854 38328 : 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 38328 : default_r_val=0.00030_dp)
860 38328 : CALL section_add_keyword(section, keyword)
861 38328 : 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 38328 : usage="step_start_val <integer>", default_i_val=0)
866 38328 : CALL section_add_keyword(section, keyword)
867 38328 : 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 38328 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE., repeats=.FALSE.)
878 38328 : CALL section_add_keyword(section, keyword)
879 38328 : 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 38328 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE., repeats=.FALSE.)
889 38328 : CALL section_add_keyword(section, keyword)
890 38328 : 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 38328 : default_r_val=1.e-4_dp, repeats=.FALSE.)
899 38328 : CALL section_add_keyword(section, keyword)
900 38328 : 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 38328 : type_of_var=real_t, default_r_vals=[0.0_dp, 0.0_dp, 0.0_dp])
911 38328 : CALL section_add_keyword(section, keyword)
912 38328 : 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 38328 : repeats=.TRUE., usage="SYMM_EXCLUDE_RANGE {Int} {Int}", type_of_var=integer_t, n_var=2)
921 38328 : CALL section_add_keyword(section, keyword)
922 38328 : 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 38328 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
928 38328 : CALL section_add_keyword(section, keyword)
929 38328 : CALL keyword_release(keyword)
930 :
931 38328 : CALL create_lbfgs_section(subsection)
932 38328 : CALL section_add_subsection(section, subsection)
933 38328 : CALL section_release(subsection)
934 :
935 38328 : CALL create_cg_section(subsection)
936 38328 : CALL section_add_subsection(section, subsection)
937 38328 : CALL section_release(subsection)
938 :
939 38328 : CALL create_bfgs_section(subsection, use_model_hessian)
940 38328 : CALL section_add_subsection(section, subsection)
941 38328 : CALL section_release(subsection)
942 :
943 38328 : IF (.NOT. just_optimizers) THEN
944 : ! Transition states section
945 9582 : CALL create_ts_section(subsection)
946 9582 : CALL section_add_subsection(section, subsection)
947 9582 : CALL section_release(subsection)
948 :
949 : ! Create the PRINT subsection
950 9582 : NULLIFY (subsection)
951 : CALL section_create(subsection, __LOCATION__, name="PRINT", &
952 : description="Controls the printing properties during a geometry optimization run", &
953 9582 : n_keywords=0, n_subsections=1, repeats=.TRUE.)
954 9582 : 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 9582 : print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
959 9582 : CALL section_add_subsection(subsection, print_key)
960 9582 : CALL section_release(print_key)
961 9582 : CALL section_add_subsection(section, subsection)
962 9582 : CALL section_release(subsection)
963 : END IF
964 :
965 38328 : 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 9582 : 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 9582 : use_model_hessian=.FALSE.)
985 :
986 9582 : 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 9582 : n_keywords=0, n_subsections=1, repeats=.TRUE.)
993 9582 : 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 9582 : print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
997 9582 : CALL section_add_subsection(subsection, print_key)
998 9582 : CALL section_release(print_key)
999 9582 : CALL section_add_subsection(section, subsection)
1000 9582 : CALL section_release(subsection)
1001 :
1002 9582 : 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 9582 : 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 "// &
1017 : "of the simulation cell. As is noted in FORCE_EVAL/SUBSYS/CELL, the "// &
1018 : "program convention is that the first cell vector A lies along the "// &
1019 : "X-axis and the second cell vector B is in the XY plane, such that "// &
1020 : "the cell vector matrix is a lower triangle. The algorithm support "// &
1021 : "for updating the three upper triangular components during a cell "// &
1022 : "optimization is not complete or tested, so the input structure has "// &
1023 : "to be prepared accordingly with these three components precisely 0 "// &
1024 : "even for cases like the primitive rhombohedral cell of the FCC lattice.", &
1025 9582 : just_optimizers=.TRUE., use_model_hessian=.FALSE.)
1026 :
1027 9582 : NULLIFY (keyword, print_key, subsection)
1028 : CALL keyword_create( &
1029 : keyword, __LOCATION__, name="TYPE", &
1030 : description="Specify which kind of method to use for the optimization of the simulation cell", &
1031 : usage="TYPE (DIRECT_CELL_OPT|GEO_OPT|MD)", &
1032 : enum_c_vals=s2a("DIRECT_CELL_OPT", "GEO_OPT", "MD"), &
1033 : enum_desc=s2a( &
1034 : "Performs a geometry and cell optimization at the same time. "// &
1035 : "The stress tensor is computed at every step", &
1036 : "Performs a geometry optimization between cell optimization steps. "// &
1037 : "The MOTION/GEO_OPT section must be defined. "// &
1038 : "The stress tensor is computed at the optimized geometry.", &
1039 : "Performs a molecular dynamics run for computing the stress tensor "// &
1040 : "used for the cell optimization. The MOTION/MD section must be defined."), &
1041 : enum_i_vals=[default_cell_direct_id, default_cell_geo_opt_id, default_cell_md_id], &
1042 9582 : default_i_val=default_cell_direct_id)
1043 9582 : CALL section_add_keyword(section, keyword)
1044 9582 : CALL keyword_release(keyword)
1045 :
1046 : CALL keyword_create( &
1047 : keyword, __LOCATION__, name="EXTERNAL_PRESSURE", &
1048 : description="Specifies the external pressure (1 value or the full 9 components of the pressure tensor) "// &
1049 : "applied during the cell optimization.", &
1050 : usage="EXTERNAL_PRESSURE {REAL} .. {REAL}", unit_str="bar", &
1051 : default_r_vals=[cp_unit_to_cp2k(100.0_dp, "bar"), 0.0_dp, 0.0_dp, &
1052 : 0.0_dp, cp_unit_to_cp2k(100.0_dp, "bar"), 0.0_dp, &
1053 95820 : 0.0_dp, 0.0_dp, cp_unit_to_cp2k(100.0_dp, "bar")], n_var=-1)
1054 9582 : CALL section_add_keyword(section, keyword)
1055 9582 : CALL keyword_release(keyword)
1056 :
1057 : CALL keyword_create(keyword, __LOCATION__, name="KEEP_VOLUME", &
1058 : description="Keep the volume of the cell constant during cell optimization. "// &
1059 : "This is implemented by comparing the cell volumes and scaling the new "// &
1060 : "cell vectors just before updating the cell information, and can be "// &
1061 : "used together with KEEP_ANGLES or KEEP_SYMMETRY.", &
1062 9582 : usage="KEEP_VOLUME TRUE", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1063 9582 : CALL section_add_keyword(section, keyword)
1064 9582 : CALL keyword_release(keyword)
1065 :
1066 : CALL keyword_create(keyword, __LOCATION__, name="KEEP_ANGLES", &
1067 : description="Keep angles between the cell vectors constant, but "// &
1068 : "allow the lengths of the cell vectors to change independently "// &
1069 : "during cell optimization. This is implemented by projecting out "// &
1070 : "the components of angles in the cell gradient before the cell "// &
1071 : "is updated. Albeit general, this is most useful for triclinic "// &
1072 : "cells; to enforce higher symmetry, see KEEP_SYMMETRY.", &
1073 9582 : usage="KEEP_ANGLES TRUE", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1074 9582 : CALL section_add_keyword(section, keyword)
1075 9582 : CALL keyword_release(keyword)
1076 :
1077 : CALL keyword_create(keyword, __LOCATION__, name="KEEP_SYMMETRY", &
1078 : description="Keep the requested initial cell symmetry as specified "// &
1079 : "in the FORCE_EVAL/SUBSYS/CELL section during cell optimization. "// &
1080 : "This is implemented by removing symmetry-breaking components and "// &
1081 : "taking averages of components if necessary in the cell gradient "// &
1082 : "before the cell is updated. To enforce the space group (which "// &
1083 : "requires spglib package), see KEEP_SPACE_GROUP.", &
1084 9582 : usage="KEEP_SYMMETRY TRUE", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1085 9582 : CALL section_add_keyword(section, keyword)
1086 9582 : CALL keyword_release(keyword)
1087 :
1088 : CALL keyword_create( &
1089 : keyword, __LOCATION__, name="CONSTRAINT", &
1090 : description="Imposes a constraint on the pressure tensor by fixing the specified cell components.", &
1091 : usage="CONSTRAINT (none|x|y|z|xy|xz|yz)", &
1092 : enum_desc=s2a("Fix nothing", &
1093 : "Fix only x component", &
1094 : "Fix only y component", &
1095 : "Fix only z component", &
1096 : "Fix x and y component", &
1097 : "Fix x and z component", &
1098 : "Fix y and z component"), &
1099 : enum_c_vals=s2a("NONE", "X", "Y", "Z", "XY", "XZ", "YZ"), &
1100 : enum_i_vals=[fix_none, fix_x, fix_y, fix_z, fix_xy, fix_xz, fix_yz], &
1101 9582 : default_i_val=fix_none)
1102 9582 : CALL section_add_keyword(section, keyword)
1103 9582 : CALL keyword_release(keyword)
1104 :
1105 : CALL keyword_create(keyword, __LOCATION__, name="PRESSURE_TOLERANCE", &
1106 : description="Specifies the Pressure tolerance (compared to the external pressure) to achieve "// &
1107 : "during the cell optimization.", &
1108 : usage="PRESSURE_TOLERANCE {REAL}", unit_str="bar", &
1109 9582 : default_r_val=cp_unit_to_cp2k(100.0_dp, "bar"))
1110 9582 : CALL section_add_keyword(section, keyword)
1111 9582 : CALL keyword_release(keyword)
1112 :
1113 : ! Create the PRINT subsection
1114 9582 : NULLIFY (subsection)
1115 : CALL section_create(subsection, __LOCATION__, name="PRINT", &
1116 : description="Controls the printing properties during a geometry optimization run", &
1117 9582 : n_keywords=0, n_subsections=1, repeats=.TRUE.)
1118 9582 : NULLIFY (print_key)
1119 : CALL cp_print_key_section_create(print_key, __LOCATION__, "program_run_info", &
1120 : description="Controls the printing of basic information during the Geometry Optimization", &
1121 9582 : print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
1122 9582 : CALL section_add_subsection(subsection, print_key)
1123 9582 : CALL section_release(print_key)
1124 : CALL cp_print_key_section_create(print_key, __LOCATION__, "cell", &
1125 : description="Controls the printing of the cell eveytime a calculation using a new cell is started.", &
1126 : print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__", &
1127 9582 : unit_str="angstrom")
1128 9582 : CALL section_add_subsection(subsection, print_key)
1129 9582 : CALL section_release(print_key)
1130 9582 : CALL section_add_subsection(section, subsection)
1131 9582 : CALL section_release(subsection)
1132 :
1133 9582 : END SUBROUTINE create_cell_opt_section
1134 :
1135 : ! **************************************************************************************************
1136 : !> \brief creates the section for tuning transition states search
1137 : !> \param section the section to be created
1138 : !> \author Teodoro Laino [tlaino] - University of Zurich - 01.2008
1139 : ! **************************************************************************************************
1140 9582 : SUBROUTINE create_ts_section(section)
1141 : TYPE(section_type), POINTER :: section
1142 :
1143 : TYPE(keyword_type), POINTER :: keyword
1144 : TYPE(section_type), POINTER :: print_key, subsection, subsection2, &
1145 : subsection3
1146 :
1147 : ! Create the Transition State subsection
1148 :
1149 9582 : NULLIFY (section, keyword, subsection, subsection2)
1150 : CALL section_create(section, __LOCATION__, name="TRANSITION_STATE", &
1151 : description="Specifies parameters to perform a transition state search", &
1152 9582 : n_keywords=0, n_subsections=1, repeats=.FALSE.)
1153 :
1154 : CALL keyword_create(keyword, __LOCATION__, name="METHOD", &
1155 : description="Specify which kind of method to use for locating transition states", &
1156 : citations=[Henkelman1999], &
1157 : usage="METHOD (DIMER)", &
1158 : enum_c_vals=s2a("DIMER"), &
1159 : enum_desc=s2a("Uses the dimer method to optimize transition states."), &
1160 : enum_i_vals=[default_dimer_method_id], &
1161 19164 : default_i_val=default_dimer_method_id)
1162 9582 : CALL section_add_keyword(section, keyword)
1163 9582 : CALL keyword_release(keyword)
1164 :
1165 : CALL section_create(subsection, __LOCATION__, name="DIMER", &
1166 : description="Specifies parameters for Dimer Method", &
1167 9582 : n_keywords=0, n_subsections=1, repeats=.FALSE.)
1168 :
1169 : CALL keyword_create(keyword, __LOCATION__, name="DR", &
1170 : description="This keyword sets the value for the DR parameter.", &
1171 : usage="DR {real}", unit_str='angstrom', &
1172 9582 : default_r_val=cp_unit_to_cp2k(0.01_dp, "angstrom"))
1173 9582 : CALL section_add_keyword(subsection, keyword)
1174 9582 : CALL keyword_release(keyword)
1175 :
1176 : CALL keyword_create(keyword, __LOCATION__, name="INTERPOLATE_GRADIENT", &
1177 : description="This keyword controls the interpolation of the gradient whenever possible"// &
1178 : " during the optimization of the Dimer. The use of this keywords saves 1 evaluation"// &
1179 : " of energy/forces.", usage="INTERPOLATE_GRADIENT {logical}", default_l_val=.TRUE., &
1180 9582 : lone_keyword_l_val=.TRUE.)
1181 9582 : CALL section_add_keyword(subsection, keyword)
1182 9582 : CALL keyword_release(keyword)
1183 :
1184 : CALL keyword_create(keyword, __LOCATION__, name="ANGLE_TOLERANCE", &
1185 : description="This keyword sets the value of the tolerance angle for the line search"// &
1186 : " performed to optimize the orientation of the dimer.", &
1187 : usage="ANGLE_TOLERANCE {real}", unit_str='rad', &
1188 9582 : default_r_val=cp_unit_to_cp2k(5.0_dp, "deg"))
1189 9582 : CALL section_add_keyword(subsection, keyword)
1190 9582 : CALL keyword_release(keyword)
1191 :
1192 : CALL keyword_create(keyword, __LOCATION__, name="K-DIMER", &
1193 : description="This keyword activates the constrained k-dimer translation"// &
1194 : " J. Chem. Phys. 141, 164111 (2014).", &
1195 : citations=[Henkelman2014], &
1196 : usage="K-DIMER {logica}", &
1197 : default_l_val=.FALSE., &
1198 19164 : lone_keyword_l_val=.FALSE.)
1199 9582 : CALL section_add_keyword(subsection, keyword)
1200 9582 : CALL keyword_release(keyword)
1201 :
1202 : CALL keyword_create(keyword, __LOCATION__, name="BETA", &
1203 : description="Exponential factor for the switching function used in K-DIMER", &
1204 : usage="BETA {real}", &
1205 : default_r_val=5.0_dp, &
1206 9582 : lone_keyword_r_val=5.0_dp)
1207 9582 : CALL section_add_keyword(subsection, keyword)
1208 9582 : CALL keyword_release(keyword)
1209 :
1210 : CALL create_geoopt_section( &
1211 : subsection2, __LOCATION__, label="ROT_OPT", &
1212 : description="This section sets the environment for the optimization of the rotation of the Dimer.", &
1213 : just_optimizers=.TRUE., &
1214 9582 : use_model_hessian=.FALSE.)
1215 9582 : NULLIFY (subsection3)
1216 : CALL section_create(subsection3, __LOCATION__, name="PRINT", &
1217 : description="Controls the printing properties during the dimer rotation optimization run", &
1218 9582 : n_keywords=0, n_subsections=1, repeats=.TRUE.)
1219 9582 : NULLIFY (print_key)
1220 :
1221 : CALL cp_print_key_section_create(print_key, __LOCATION__, "PROGRAM_RUN_INFO", &
1222 : description="Controls the printing of basic information during the Geometry Optimization", &
1223 9582 : print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
1224 9582 : CALL section_add_subsection(subsection3, print_key)
1225 9582 : CALL section_release(print_key)
1226 :
1227 : CALL cp_print_key_section_create(print_key, __LOCATION__, "ROTATIONAL_INFO", &
1228 : description="Controls the printing basic info during the cleaning of the "// &
1229 : "rotational degrees of freedom.", print_level=low_print_level, &
1230 9582 : add_last=add_last_numeric, filename="__STD_OUT__")
1231 : CALL keyword_create(keyword, __LOCATION__, name="COORDINATES", &
1232 : description="Prints atomic coordinates after rotation", &
1233 9582 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1234 9582 : CALL section_add_keyword(print_key, keyword)
1235 9582 : CALL keyword_release(keyword)
1236 9582 : CALL section_add_subsection(subsection3, print_key)
1237 9582 : CALL section_release(print_key)
1238 :
1239 9582 : CALL section_add_subsection(subsection2, subsection3)
1240 9582 : CALL section_release(subsection3)
1241 9582 : CALL section_add_subsection(subsection, subsection2)
1242 9582 : CALL section_release(subsection2)
1243 :
1244 : CALL section_create(subsection2, __LOCATION__, name="DIMER_VECTOR", &
1245 : description="Specifies the initial dimer vector (used frequently to restart DIMER calculations)."// &
1246 : " If not provided the starting orientation of the dimer is chosen randomly.", &
1247 9582 : n_keywords=0, n_subsections=1, repeats=.FALSE.)
1248 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
1249 : description="Specify on each line the components of the dimer vector.", repeats=.TRUE., &
1250 9582 : usage="{Real} {Real} {Real}", type_of_var=real_t, n_var=-1)
1251 9582 : CALL section_add_keyword(subsection2, keyword)
1252 9582 : CALL keyword_release(keyword)
1253 9582 : CALL section_add_subsection(subsection, subsection2)
1254 9582 : CALL section_release(subsection2)
1255 :
1256 9582 : CALL section_add_subsection(section, subsection)
1257 9582 : CALL section_release(subsection)
1258 :
1259 9582 : END SUBROUTINE create_ts_section
1260 :
1261 : ! **************************************************************************************************
1262 : !> \brief creates the BFGS section
1263 : !> \param section the section to be created
1264 : !> \param use_model_hessian ...
1265 : !> \author Teodoro Laino [tlaino] - University of Zurich - 01.2008
1266 : ! **************************************************************************************************
1267 38328 : SUBROUTINE create_bfgs_section(section, use_model_hessian)
1268 : TYPE(section_type), POINTER :: section
1269 : LOGICAL, INTENT(IN) :: use_model_hessian
1270 :
1271 : TYPE(keyword_type), POINTER :: keyword
1272 : TYPE(section_type), POINTER :: print_key
1273 :
1274 : ! create the BFGS subsection
1275 :
1276 38328 : NULLIFY (section, keyword, print_key)
1277 : CALL section_create(section, __LOCATION__, name="BFGS", &
1278 : description="Provides parameters to tune the BFGS optimization", &
1279 38328 : n_keywords=0, n_subsections=1, repeats=.FALSE.)
1280 :
1281 : CALL keyword_create(keyword, __LOCATION__, name="TRUST_RADIUS", &
1282 : description="Trust radius used in BFGS. Previously set to 0.1. "// &
1283 : "Large values can lead to instabilities", &
1284 : usage="TRUST_RADIUS {real}", unit_str='angstrom', &
1285 38328 : default_r_val=cp_unit_to_cp2k(0.25_dp, "angstrom"))
1286 38328 : CALL section_add_keyword(section, keyword)
1287 38328 : CALL keyword_release(keyword)
1288 :
1289 : CALL keyword_create(keyword, __LOCATION__, name="USE_MODEL_HESSIAN", &
1290 : description="Uses a model Hessian as initial guess instead of a unit matrix."// &
1291 : " Should lead in general to improved convergence might be switched off for exotic cases", &
1292 : usage="USE_MODEL_HESSIAN", &
1293 38328 : default_l_val=use_model_hessian, lone_keyword_l_val=.TRUE.)
1294 38328 : CALL section_add_keyword(section, keyword)
1295 38328 : CALL keyword_release(keyword)
1296 :
1297 : CALL keyword_create(keyword, __LOCATION__, name="USE_RAT_FUN_OPT", &
1298 : description="Includes a rational function optimization to determine the step."// &
1299 : " Previously default but did not improve convergence in many cases", &
1300 : usage="USE_RAT_FUN_OPT", &
1301 38328 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1302 38328 : CALL section_add_keyword(section, keyword)
1303 38328 : CALL keyword_release(keyword)
1304 :
1305 : CALL keyword_create(keyword, __LOCATION__, name="RESTART_HESSIAN", &
1306 : description="Controls the reading of the initial Hessian from file.", &
1307 : usage="RESTART_HESSIAN", &
1308 38328 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1309 38328 : CALL section_add_keyword(section, keyword)
1310 38328 : CALL keyword_release(keyword)
1311 :
1312 : CALL keyword_create(keyword, __LOCATION__, name="RESTART_FILE_NAME", &
1313 : description="Specifies the name of the file used to read the initial Hessian.", &
1314 : usage="RESTART_FILE_NAME {filename}", &
1315 38328 : default_lc_val="")
1316 38328 : CALL section_add_keyword(section, keyword)
1317 38328 : CALL keyword_release(keyword)
1318 :
1319 : CALL cp_print_key_section_create(print_key, __LOCATION__, "RESTART", &
1320 : description="Controls the printing of Hessian Restart file", &
1321 : print_level=low_print_level, add_last=add_last_numeric, filename="BFGS", &
1322 38328 : common_iter_levels=2)
1323 38328 : CALL section_add_subsection(section, print_key)
1324 38328 : CALL section_release(print_key)
1325 :
1326 38328 : END SUBROUTINE create_bfgs_section
1327 :
1328 : ! **************************************************************************************************
1329 : !> \brief creates the CG section
1330 : !> \param section the section to be created
1331 : !> \author Teodoro Laino [tlaino] - University of Zurich - 01.2008
1332 : ! **************************************************************************************************
1333 38328 : SUBROUTINE create_cg_section(section)
1334 : TYPE(section_type), POINTER :: section
1335 :
1336 : TYPE(keyword_type), POINTER :: keyword
1337 : TYPE(section_type), POINTER :: subsection, subsubsection
1338 :
1339 : ! create the CG subsection
1340 :
1341 38328 : NULLIFY (section, subsection, subsubsection, keyword)
1342 : CALL section_create(section, __LOCATION__, name="CG", &
1343 : description="Provides parameters to tune the conjugate gradient optimization", &
1344 38328 : n_keywords=0, n_subsections=1, repeats=.FALSE.)
1345 :
1346 : CALL keyword_create(keyword, __LOCATION__, name="MAX_STEEP_STEPS", &
1347 : description="Maximum number of steepest descent steps before starting the"// &
1348 : " conjugate gradients optimization.", &
1349 : usage="MAX_STEEP_STEPS {integer}", &
1350 38328 : default_i_val=0)
1351 38328 : CALL section_add_keyword(section, keyword)
1352 38328 : CALL keyword_release(keyword)
1353 :
1354 : CALL keyword_create(keyword, __LOCATION__, name="RESTART_LIMIT", &
1355 : description="Cosine of the angle between two consecutive searching directions."// &
1356 : " If the angle during a CG optimization is less than the one corresponding to"// &
1357 : " to the RESTART_LIMIT the CG is reset and one step of steepest descent is"// &
1358 : " performed.", &
1359 : usage="RESTART_LIMIT {real}", &
1360 38328 : default_r_val=0.9_dp)
1361 38328 : CALL section_add_keyword(section, keyword)
1362 38328 : CALL keyword_release(keyword)
1363 :
1364 : CALL keyword_create(keyword, __LOCATION__, name="FLETCHER_REEVES", &
1365 : description="Uses FLETCHER-REEVES instead of POLAK-RIBIERE when using Conjugate Gradients", &
1366 : usage="FLETCHER_REEVES", &
1367 38328 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1368 38328 : CALL section_add_keyword(section, keyword)
1369 38328 : CALL keyword_release(keyword)
1370 :
1371 : ! Line Search section
1372 : CALL section_create(subsection, __LOCATION__, name="LINE_SEARCH", &
1373 : description="Provides parameters to tune the line search during the conjugate gradient optimization", &
1374 38328 : n_keywords=0, n_subsections=1, repeats=.FALSE.)
1375 :
1376 : CALL keyword_create(keyword, __LOCATION__, name="TYPE", &
1377 : description="1D line search algorithm to be used with the CG optimizer,"// &
1378 : " in increasing order of robustness and cost. ", &
1379 : usage="TYPE GOLD", &
1380 : default_i_val=ls_gold, &
1381 : enum_c_vals=s2a("2PNT", "GOLD", "FIT"), &
1382 : enum_desc=s2a("extrapolate based on 2 points", &
1383 : "perform 1D golden section search of the minimum (very expensive)", &
1384 : "perform 1D fit of a parabola on several evaluation of energy "// &
1385 : "(very expensive and more robust vs numerical noise)"), &
1386 38328 : enum_i_vals=[ls_2pnt, ls_gold, ls_fit])
1387 38328 : CALL section_add_keyword(subsection, keyword)
1388 38328 : CALL keyword_release(keyword)
1389 :
1390 : ! 2PNT
1391 38328 : NULLIFY (subsubsection)
1392 : CALL section_create(subsubsection, __LOCATION__, name="2PNT", &
1393 : description="Provides parameters to tune the line search for the two point based line search.", &
1394 38328 : n_keywords=0, n_subsections=1, repeats=.FALSE.)
1395 :
1396 : CALL keyword_create(keyword, __LOCATION__, name="MAX_ALLOWED_STEP", &
1397 : description="Max allowed value for the line search step.", &
1398 : usage="MAX_ALLOWED_STEP {real}", unit_str="internal_cp2k", &
1399 38328 : default_r_val=0.25_dp)
1400 38328 : CALL section_add_keyword(subsubsection, keyword)
1401 38328 : CALL keyword_release(keyword)
1402 :
1403 : CALL keyword_create( &
1404 : keyword, __LOCATION__, name="LINMIN_GRAD_ONLY", &
1405 : description="Use only the gradient, not the energy for line minimizations (e.g. in conjugate gradients).", &
1406 : usage="LINMIN_GRAD_ONLY T", &
1407 38328 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1408 38328 : CALL section_add_keyword(subsubsection, keyword)
1409 38328 : CALL keyword_release(keyword)
1410 :
1411 38328 : CALL section_add_subsection(subsection, subsubsection)
1412 38328 : CALL section_release(subsubsection)
1413 :
1414 : ! GOLD
1415 38328 : NULLIFY (subsubsection)
1416 : CALL section_create(subsubsection, __LOCATION__, name="GOLD", &
1417 : description="Provides parameters to tune the line search for the gold search.", &
1418 38328 : n_keywords=0, n_subsections=1, repeats=.FALSE.)
1419 :
1420 : CALL keyword_create(keyword, __LOCATION__, name="INITIAL_STEP", &
1421 : description="Initial step size used, e.g. for bracketing or minimizers. "// &
1422 : "Might need to be reduced for systems with close contacts", &
1423 : usage="INITIAL_STEP {real}", unit_str="internal_cp2k", &
1424 38328 : default_r_val=0.2_dp)
1425 38328 : CALL section_add_keyword(subsubsection, keyword)
1426 38328 : CALL keyword_release(keyword)
1427 :
1428 : CALL keyword_create(keyword, __LOCATION__, name="BRACK_LIMIT", &
1429 : description="Limit in 1D bracketing during line search in Conjugate Gradients Optimization.", &
1430 : usage="BRACK_LIMIT {real}", unit_str="internal_cp2k", &
1431 38328 : default_r_val=100.0_dp)
1432 38328 : CALL section_add_keyword(subsubsection, keyword)
1433 38328 : CALL keyword_release(keyword)
1434 :
1435 : CALL keyword_create(keyword, __LOCATION__, name="BRENT_TOL", &
1436 : description="Tolerance requested during Brent line search in Conjugate Gradients Optimization.", &
1437 : usage="BRENT_TOL {real}", unit_str="internal_cp2k", &
1438 38328 : default_r_val=0.01_dp)
1439 38328 : CALL section_add_keyword(subsubsection, keyword)
1440 38328 : CALL keyword_release(keyword)
1441 :
1442 : CALL keyword_create(keyword, __LOCATION__, name="BRENT_MAX_ITER", &
1443 : description="Maximum number of iterations in brent algorithm "// &
1444 : "(used for the line search in Conjugated Gradients Optimization)", &
1445 : usage="BRENT_MAX_ITER {integer}", &
1446 38328 : default_i_val=100)
1447 38328 : CALL section_add_keyword(subsubsection, keyword)
1448 38328 : CALL keyword_release(keyword)
1449 38328 : CALL section_add_subsection(subsection, subsubsection)
1450 38328 : CALL section_release(subsubsection)
1451 :
1452 38328 : CALL section_add_subsection(section, subsection)
1453 38328 : CALL section_release(subsection)
1454 38328 : END SUBROUTINE create_cg_section
1455 :
1456 : ! **************************************************************************************************
1457 : !> \brief creates the LBFGS section
1458 : !> \param section the section to be created
1459 : !> \author Teodoro Laino [tlaino] - University of Zurich - 01.2008
1460 : ! **************************************************************************************************
1461 38328 : SUBROUTINE create_lbfgs_section(section)
1462 : TYPE(section_type), POINTER :: section
1463 :
1464 : TYPE(keyword_type), POINTER :: keyword
1465 :
1466 : ! create the LBFGS section
1467 :
1468 38328 : NULLIFY (section, keyword)
1469 : CALL section_create(section, __LOCATION__, name="LBFGS", &
1470 : description="Provides parameters to tune the limited memory BFGS (LBFGS) optimization", &
1471 : n_keywords=0, n_subsections=1, repeats=.FALSE., &
1472 76656 : citations=[Byrd1995])
1473 :
1474 : CALL keyword_create(keyword, __LOCATION__, name="MAX_H_RANK", &
1475 : description="Maximum rank (and consequently size) of the "// &
1476 : "approximate Hessian matrix used by the LBFGS optimizer. "// &
1477 : "Larger values (e.g. 30) will accelerate the convergence behaviour "// &
1478 : "at the cost of a larger memory consumption.", &
1479 : usage="MAX_H_RANK {integer}", &
1480 38328 : default_i_val=5)
1481 38328 : CALL section_add_keyword(section, keyword)
1482 38328 : CALL keyword_release(keyword)
1483 :
1484 : CALL keyword_create(keyword, __LOCATION__, name="MAX_F_PER_ITER", &
1485 : description="Maximum number of force evaluations per iteration"// &
1486 : " (used for the line search)", &
1487 : usage="MAX_F_PER_ITER {integer}", &
1488 38328 : default_i_val=20)
1489 38328 : CALL section_add_keyword(section, keyword)
1490 38328 : CALL keyword_release(keyword)
1491 :
1492 : CALL keyword_create(keyword, __LOCATION__, name="WANTED_PROJ_GRADIENT", &
1493 : description="Convergence criterion (overrides the general ones):"// &
1494 : " Requested norm threshold of the gradient multiplied"// &
1495 : " by the approximate Hessian.", &
1496 : usage="WANTED_PROJ_GRADIENT {real}", unit_str="internal_cp2k", &
1497 38328 : default_r_val=1.0E-16_dp)
1498 38328 : CALL section_add_keyword(section, keyword)
1499 38328 : CALL keyword_release(keyword)
1500 :
1501 : CALL keyword_create(keyword, __LOCATION__, name="WANTED_REL_F_ERROR", &
1502 : description="Convergence criterion (overrides the general ones):"// &
1503 : " Requested relative error on the objective function"// &
1504 : " of the optimizer (the energy)", &
1505 : usage="WANTED_REL_F_ERROR {real}", unit_str="internal_cp2k", &
1506 38328 : default_r_val=1.0E-16_dp)
1507 38328 : CALL section_add_keyword(section, keyword)
1508 38328 : CALL keyword_release(keyword)
1509 :
1510 : CALL keyword_create( &
1511 : keyword, __LOCATION__, name="TRUST_RADIUS", &
1512 : description="Trust radius used in LBFGS. Not completely in depth tested. Negativ values means no trust radius is used.", &
1513 : usage="TRUST_RADIUS {real}", unit_str='angstrom', &
1514 38328 : default_r_val=-1.0_dp)
1515 38328 : CALL section_add_keyword(section, keyword)
1516 38328 : CALL keyword_release(keyword)
1517 :
1518 38328 : END SUBROUTINE create_lbfgs_section
1519 :
1520 : ! **************************************************************************************************
1521 : !> \brief creates the flexible_partitioning section
1522 : !> \param section the section to be created
1523 : !> \author Joost VandeVondele [04.2006]
1524 : ! **************************************************************************************************
1525 9582 : SUBROUTINE create_fp_section(section)
1526 : TYPE(section_type), POINTER :: section
1527 :
1528 : TYPE(keyword_type), POINTER :: keyword
1529 : TYPE(section_type), POINTER :: print_key
1530 :
1531 9582 : CPASSERT(.NOT. ASSOCIATED(section))
1532 : CALL section_create(section, __LOCATION__, name="FLEXIBLE_PARTITIONING", &
1533 : description="This section sets up flexible_partitioning", &
1534 9582 : n_keywords=1, n_subsections=1, repeats=.FALSE.)
1535 :
1536 9582 : NULLIFY (keyword, print_key)
1537 :
1538 : CALL keyword_create(keyword, __LOCATION__, name="CENTRAL_ATOM", &
1539 : description="Specifies the central atom.", &
1540 : usage="CENTRAL_ATOM {integer}", &
1541 9582 : n_var=1, type_of_var=integer_t)
1542 9582 : CALL section_add_keyword(section, keyword)
1543 9582 : CALL keyword_release(keyword)
1544 :
1545 : CALL keyword_create(keyword, __LOCATION__, name="INNER_ATOMS", &
1546 : description="Specifies the list of atoms that should remain close to the central atom.", &
1547 : usage="INNER_ATOMS {integer} {integer} .. {integer}", &
1548 9582 : n_var=-1, type_of_var=integer_t)
1549 9582 : CALL section_add_keyword(section, keyword)
1550 9582 : CALL keyword_release(keyword)
1551 :
1552 : CALL keyword_create(keyword, __LOCATION__, name="OUTER_ATOMS", &
1553 : description="Specifies the list of atoms that should remain far from the central atom.", &
1554 : usage="OUTER_ATOMS {integer} {integer} .. {integer}", &
1555 9582 : n_var=-1, type_of_var=integer_t)
1556 9582 : CALL section_add_keyword(section, keyword)
1557 9582 : CALL keyword_release(keyword)
1558 :
1559 : CALL keyword_create(keyword, __LOCATION__, name="INNER_RADIUS", &
1560 : description="radius of the inner wall", &
1561 : usage="INNER_RADIUS {real} ", type_of_var=real_t, &
1562 9582 : n_var=1, unit_str="angstrom")
1563 9582 : CALL section_add_keyword(section, keyword)
1564 9582 : CALL keyword_release(keyword)
1565 :
1566 : CALL keyword_create(keyword, __LOCATION__, name="OUTER_RADIUS", &
1567 : description="radius of the outer wall", &
1568 : usage="OUTER_RADIUS {real} ", type_of_var=real_t, &
1569 9582 : n_var=1, unit_str="angstrom")
1570 9582 : CALL section_add_keyword(section, keyword)
1571 9582 : CALL keyword_release(keyword)
1572 :
1573 : CALL keyword_create(keyword, __LOCATION__, name="STRENGTH", &
1574 : description="Sets the force constant of the repulsive harmonic potential", &
1575 9582 : usage="STRENGTH 1.0", default_r_val=1.0_dp)
1576 9582 : CALL section_add_keyword(section, keyword)
1577 9582 : CALL keyword_release(keyword)
1578 :
1579 : CALL keyword_create(keyword, __LOCATION__, name="BIAS", &
1580 : description="If a bias potential counter-acting the weight term should be applied (recommended).", &
1581 9582 : usage="BIAS F", default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
1582 9582 : CALL section_add_keyword(section, keyword)
1583 9582 : CALL keyword_release(keyword)
1584 :
1585 : CALL keyword_create(keyword, __LOCATION__, name="TEMPERATURE", &
1586 : description="Sets the temperature parameter that is used in the baising potential."// &
1587 : " It is recommended to use the actual simulation temperature", &
1588 9582 : usage="TEMPERATURE 300", default_r_val=300.0_dp, unit_str='K')
1589 9582 : CALL section_add_keyword(section, keyword)
1590 9582 : CALL keyword_release(keyword)
1591 :
1592 : CALL keyword_create(keyword, __LOCATION__, name="SMOOTH_WIDTH", &
1593 : description="Sets the width of the smooth counting function.", &
1594 9582 : usage="SMOOTH_WIDTH 0.2", default_r_val=0.02_dp, unit_str='angstrom')
1595 9582 : CALL section_add_keyword(section, keyword)
1596 9582 : CALL keyword_release(keyword)
1597 :
1598 : CALL cp_print_key_section_create(print_key, __LOCATION__, "WEIGHTS", &
1599 : description="Controls the printing of FP info during flexible partitioning simulations.", &
1600 : print_level=low_print_level, common_iter_levels=1, &
1601 9582 : filename="FLEXIBLE_PARTIONING")
1602 9582 : CALL section_add_subsection(section, print_key)
1603 9582 : CALL section_release(print_key)
1604 :
1605 : CALL cp_print_key_section_create(print_key, __LOCATION__, "CONTROL", &
1606 : description="Controls the printing of FP info at startup", &
1607 : print_level=low_print_level, common_iter_levels=1, &
1608 9582 : filename="__STD_OUT__")
1609 9582 : CALL section_add_subsection(section, print_key)
1610 9582 : CALL section_release(print_key)
1611 :
1612 9582 : END SUBROUTINE create_fp_section
1613 :
1614 : ! **************************************************************************************************
1615 : !> \brief ...
1616 : !> \param section will contain the driver section
1617 : !> \author mceriotti
1618 : ! **************************************************************************************************
1619 9582 : SUBROUTINE create_driver_section(section)
1620 : TYPE(section_type), POINTER :: section
1621 :
1622 : TYPE(keyword_type), POINTER :: keyword
1623 :
1624 9582 : CPASSERT(.NOT. ASSOCIATED(section))
1625 : CALL section_create(section, __LOCATION__, name="DRIVER", &
1626 : description="This section defines the parameters needed to run in i-PI driver mode.", &
1627 : citations=[Ceriotti2014, Kapil2016], &
1628 28746 : n_keywords=3, n_subsections=0, repeats=.FALSE.)
1629 :
1630 9582 : NULLIFY (keyword)
1631 : CALL keyword_create(keyword, __LOCATION__, name="unix", &
1632 : description="Use a UNIX socket rather than an INET socket.", &
1633 : usage="unix LOGICAL", &
1634 9582 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1635 9582 : CALL section_add_keyword(section, keyword)
1636 9582 : CALL keyword_release(keyword)
1637 :
1638 : CALL keyword_create(keyword, __LOCATION__, name="port", &
1639 : description="Port number for the i-PI server.", &
1640 : usage="port <INTEGER>", &
1641 9582 : default_i_val=12345)
1642 9582 : CALL section_add_keyword(section, keyword)
1643 9582 : CALL keyword_release(keyword)
1644 :
1645 : CALL keyword_create(keyword, __LOCATION__, name="host", &
1646 : description="Host name for the i-PI server.", &
1647 : usage="host <HOSTNAME>", &
1648 9582 : default_c_val="localhost")
1649 9582 : CALL section_add_keyword(section, keyword)
1650 9582 : CALL keyword_release(keyword)
1651 :
1652 : CALL keyword_create(keyword, __LOCATION__, name="SLEEP_TIME", &
1653 : description="Sleeping time while waiting for for driver commands [s].", &
1654 : usage="SLEEP_TIME 0.1", &
1655 9582 : default_r_val=0.01_dp)
1656 9582 : CALL section_add_keyword(section, keyword)
1657 9582 : CALL keyword_release(keyword)
1658 :
1659 9582 : END SUBROUTINE create_driver_section
1660 :
1661 : ! **************************************************************************************************
1662 : !> \brief creates the section for a path integral run
1663 : !> \param section will contain the pint section
1664 : !> \author fawzi
1665 : ! **************************************************************************************************
1666 9582 : SUBROUTINE create_pint_section(section)
1667 : TYPE(section_type), POINTER :: section
1668 :
1669 : TYPE(keyword_type), POINTER :: keyword
1670 : TYPE(section_type), POINTER :: print_key, subsection, subsubsection
1671 :
1672 9582 : CPASSERT(.NOT. ASSOCIATED(section))
1673 : CALL section_create(section, __LOCATION__, name="PINT", &
1674 : description="The section that controls a path integral run", &
1675 9582 : n_keywords=13, n_subsections=9, repeats=.FALSE.)
1676 9582 : NULLIFY (keyword)
1677 :
1678 : CALL keyword_create(keyword, __LOCATION__, name="p", &
1679 : description="Specify number beads to use", repeats=.FALSE., &
1680 9582 : default_i_val=3)
1681 9582 : CALL section_add_keyword(section, keyword)
1682 9582 : CALL keyword_release(keyword)
1683 : CALL keyword_create(keyword, __LOCATION__, name="proc_per_replica", &
1684 : description="Specify number of processors to use for each replica", &
1685 9582 : repeats=.FALSE., default_i_val=0)
1686 9582 : CALL section_add_keyword(section, keyword)
1687 9582 : CALL keyword_release(keyword)
1688 : CALL keyword_create(keyword, __LOCATION__, name="num_steps", &
1689 : description="Number of steps (if MAX_STEP is not explicitly given"// &
1690 : " the program will perform this number of steps)", repeats=.FALSE., &
1691 9582 : default_i_val=3)
1692 9582 : CALL section_add_keyword(section, keyword)
1693 9582 : CALL keyword_release(keyword)
1694 : CALL keyword_create(keyword, __LOCATION__, name="MAX_STEP", &
1695 : description="Maximum step number (the program will stop if"// &
1696 : " ITERATION >= MAX_STEP even if NUM_STEPS has not been reached)", &
1697 9582 : repeats=.FALSE., default_i_val=10)
1698 9582 : CALL section_add_keyword(section, keyword)
1699 9582 : CALL keyword_release(keyword)
1700 : CALL keyword_create(keyword, __LOCATION__, name="iteration", &
1701 : description="Specify the iteration number from which it should be "// &
1702 9582 : "counted", default_i_val=0)
1703 9582 : CALL section_add_keyword(section, keyword)
1704 9582 : CALL keyword_release(keyword)
1705 : CALL keyword_create(keyword, __LOCATION__, name="Temp", &
1706 : description="The temperature you want to simulate", &
1707 : default_r_val=cp_unit_to_cp2k(300._dp, "K"), &
1708 9582 : unit_str="K")
1709 9582 : CALL section_add_keyword(section, keyword)
1710 9582 : CALL keyword_release(keyword)
1711 : CALL keyword_create(keyword, __LOCATION__, name="kT_CORRECTION", &
1712 : description="Corrects for the loss of temperature due to constrained "// &
1713 : "degrees of freedom for Nose-Hover chains and numeric integration", &
1714 9582 : repeats=.FALSE., default_l_val=.FALSE.)
1715 9582 : CALL section_add_keyword(section, keyword)
1716 9582 : CALL keyword_release(keyword)
1717 : CALL keyword_create(keyword, __LOCATION__, name="T_tol", variants=["temp_to"], &
1718 : description="threshold for the oscillations of the temperature "// &
1719 : "excedeed which the temperature is rescaled. 0 means no rescaling.", &
1720 19164 : default_r_val=0._dp, unit_str="K")
1721 9582 : CALL section_add_keyword(section, keyword)
1722 9582 : CALL keyword_release(keyword)
1723 : CALL keyword_create(keyword, __LOCATION__, name="dt", &
1724 : description="timestep (might be subdivised in nrespa subtimesteps", &
1725 : repeats=.FALSE., &
1726 : default_r_val=cp_unit_to_cp2k(1.0_dp, "fs"), &
1727 9582 : usage="dt 1.0", unit_str="fs")
1728 9582 : CALL section_add_keyword(section, keyword)
1729 9582 : CALL keyword_release(keyword)
1730 : CALL keyword_create(keyword, __LOCATION__, name="HARM_INT", &
1731 : description="integrator scheme for integrating the harmonic bead springs.", &
1732 : usage="HARM_INT (NUMERIC|EXACT)", &
1733 : default_i_val=integrate_numeric, &
1734 : enum_c_vals=s2a("NUMERIC", "EXACT"), &
1735 9582 : enum_i_vals=[integrate_numeric, integrate_exact])
1736 9582 : CALL section_add_keyword(section, keyword)
1737 9582 : CALL keyword_release(keyword)
1738 : CALL keyword_create(keyword, __LOCATION__, name="nrespa", &
1739 : description="number of respa steps for the bead for each md step", &
1740 9582 : repeats=.FALSE., default_i_val=5)
1741 9582 : CALL section_add_keyword(section, keyword)
1742 9582 : CALL keyword_release(keyword)
1743 :
1744 : CALL keyword_create(keyword, __LOCATION__, name="transformation", &
1745 : description="Specifies the coordinate transformation to use", &
1746 : usage="TRANSFORMATION (NORMAL|STAGE)", &
1747 : default_i_val=transformation_normal, &
1748 : enum_c_vals=s2a("NORMAL", "STAGE"), &
1749 9582 : enum_i_vals=[transformation_normal, transformation_stage])
1750 :
1751 9582 : CALL section_add_keyword(section, keyword)
1752 9582 : CALL keyword_release(keyword)
1753 : CALL keyword_create(keyword, __LOCATION__, name="propagator", &
1754 : description="Specifies the real time propagator to use", &
1755 : usage="PROPAGATOR (PIMD|RPMD|CMD)", &
1756 : default_i_val=propagator_pimd, &
1757 : enum_c_vals=s2a("PIMD", "RPMD", "CMD"), &
1758 9582 : enum_i_vals=[propagator_pimd, propagator_rpmd, propagator_cmd])
1759 9582 : CALL section_add_keyword(section, keyword)
1760 9582 : CALL keyword_release(keyword)
1761 : CALL keyword_create(keyword, __LOCATION__, name="FIX_CENTROID_POS", &
1762 : description="Propagate all DOF but the centroid - "// &
1763 : "useful for equilibration of the non-centroid modes "// &
1764 : "(activated only if TRANSFORMATION==NORMAL)", &
1765 : repeats=.FALSE., default_l_val=.FALSE., &
1766 9582 : lone_keyword_l_val=.TRUE.)
1767 9582 : CALL section_add_keyword(section, keyword)
1768 9582 : CALL keyword_release(keyword)
1769 :
1770 9582 : NULLIFY (subsection, subsubsection)
1771 : CALL section_create(subsection, __LOCATION__, name="NORMALMODE", &
1772 : description="Controls the normal mode transformation", &
1773 9582 : n_keywords=3, n_subsections=0, repeats=.FALSE.)
1774 : CALL keyword_create(keyword, __LOCATION__, name="Q_CENTROID", &
1775 : description="Value of the thermostat mass of centroid degree of freedom", &
1776 9582 : repeats=.FALSE., default_r_val=-1.0_dp)
1777 9582 : CALL section_add_keyword(subsection, keyword)
1778 9582 : CALL keyword_release(keyword)
1779 : CALL keyword_create(keyword, __LOCATION__, name="Q_BEAD", &
1780 : description="Value of the thermostat mass of non-centroid degrees of freedom", &
1781 9582 : repeats=.FALSE., default_r_val=-1.0_dp)
1782 9582 : CALL section_add_keyword(subsection, keyword)
1783 9582 : CALL keyword_release(keyword)
1784 : CALL keyword_create(keyword, __LOCATION__, name="MODEFACTOR", &
1785 : description="mass scale factor for non-centroid degrees of freedom", &
1786 9582 : repeats=.FALSE., default_r_val=1.0_dp)
1787 9582 : CALL section_add_keyword(subsection, keyword)
1788 9582 : CALL keyword_release(keyword)
1789 : CALL keyword_create(keyword, __LOCATION__, name="GAMMA", &
1790 : description="mass scale factor for non-centroid degrees of freedom, &
1791 : & naming convention according to Witt, 2008, <https://doi.org/10.1063/1.3125009>.", &
1792 9582 : repeats=.FALSE., default_r_val=8.0_dp)
1793 9582 : CALL section_add_keyword(subsection, keyword)
1794 9582 : CALL keyword_release(keyword)
1795 :
1796 9582 : CALL section_add_subsection(section, subsection)
1797 9582 : CALL section_release(subsection)
1798 :
1799 : CALL section_create(subsection, __LOCATION__, name="staging", &
1800 : description="The section that controls the staging transformation", &
1801 9582 : n_keywords=2, n_subsections=0, repeats=.FALSE.)
1802 : CALL keyword_create(keyword, __LOCATION__, name="j", &
1803 : description="Value of the j parameter for the staging transformation", &
1804 9582 : repeats=.FALSE., default_i_val=2)
1805 9582 : CALL section_add_keyword(subsection, keyword)
1806 9582 : CALL keyword_release(keyword)
1807 : CALL keyword_create(keyword, __LOCATION__, name="Q_END", &
1808 : description="Value of the nose-hoover mass for the endbead (Q_end)", &
1809 9582 : repeats=.FALSE., default_i_val=2)
1810 9582 : CALL section_add_keyword(subsection, keyword)
1811 9582 : CALL keyword_release(keyword)
1812 9582 : CALL section_add_subsection(section, subsection)
1813 9582 : CALL section_release(subsection)
1814 :
1815 : CALL section_create(subsection, __LOCATION__, name="BEADS", &
1816 : description="Sets positions and velocities of the beads", &
1817 : n_keywords=0, n_subsections=2, &
1818 9582 : repeats=.FALSE.)
1819 9582 : CALL create_coord_section(subsubsection, "BEADS")
1820 9582 : CALL section_add_subsection(subsection, subsubsection)
1821 9582 : CALL section_release(subsubsection)
1822 9582 : CALL create_velocity_section(subsubsection, "BEADS")
1823 9582 : CALL section_add_subsection(subsection, subsubsection)
1824 9582 : CALL section_release(subsubsection)
1825 9582 : CALL section_add_subsection(section, subsection)
1826 9582 : CALL section_release(subsection)
1827 :
1828 : CALL section_create(subsection, __LOCATION__, name="NOSE", &
1829 : description="Controls the Nose-Hoover thermostats", &
1830 : n_keywords=1, n_subsections=2, &
1831 9582 : repeats=.FALSE.)
1832 : CALL keyword_create(keyword, __LOCATION__, name="nnos", &
1833 : description="length of nose-hoover chain. 0 means no thermostat", &
1834 9582 : repeats=.FALSE., default_i_val=2)
1835 9582 : CALL section_add_keyword(subsection, keyword)
1836 9582 : CALL keyword_release(keyword)
1837 9582 : CALL create_coord_section(subsubsection, "NOSE")
1838 9582 : CALL section_add_subsection(subsection, subsubsection)
1839 9582 : CALL section_release(subsubsection)
1840 9582 : CALL create_velocity_section(subsubsection, "NOSE")
1841 9582 : CALL section_add_subsection(subsection, subsubsection)
1842 9582 : CALL section_release(subsubsection)
1843 9582 : CALL section_add_subsection(section, subsection)
1844 9582 : CALL section_release(subsection)
1845 :
1846 9582 : CALL create_gle_section(subsection)
1847 9582 : CALL section_add_subsection(section, subsection)
1848 9582 : CALL section_release(subsection)
1849 :
1850 : CALL section_create(subsection, __LOCATION__, name="PILE", &
1851 : description="Controls the PI Langevin Equation thermostat."// &
1852 : " Needs the exact harmonic integrator."// &
1853 : " May lead to unphysical motions if constraint e.g. FIXED_ATOMS, is applied."// &
1854 : " RESTART_HELIUM section has to be .FALSE. when restarting the PIGLET job.", &
1855 : citations=[Ceriotti2010], &
1856 : n_keywords=3, n_subsections=1, &
1857 19164 : repeats=.FALSE.)
1858 9582 : CALL create_rng_section(subsubsection)
1859 9582 : CALL section_add_subsection(subsection, subsubsection)
1860 9582 : CALL section_release(subsubsection)
1861 : CALL keyword_create(keyword, __LOCATION__, name="TAU", &
1862 : description="Time constant for centroid motion. "// &
1863 : "If zero or negative the centroid is not thermostated.", &
1864 : usage="TAU {real}", type_of_var=real_t, &
1865 9582 : unit_str="fs", n_var=1, default_r_val=1000.0_dp)
1866 9582 : CALL section_add_keyword(subsection, keyword)
1867 9582 : CALL keyword_release(keyword)
1868 : CALL keyword_create(keyword, __LOCATION__, name="LAMBDA", &
1869 : description="Scaling of friction to mode coupling", &
1870 : usage="LAMBDA {real}", type_of_var=real_t, &
1871 9582 : n_var=1, default_r_val=0.5_dp)
1872 9582 : CALL section_add_keyword(subsection, keyword)
1873 9582 : CALL keyword_release(keyword)
1874 : CALL keyword_create(keyword, __LOCATION__, name="THERMOSTAT_ENERGY", &
1875 : description="Thermostat energy for conserved quantity. "// &
1876 : "Only useful in restart files.", &
1877 : usage="THERMOSTAT_ENERGY {real}", type_of_var=real_t, &
1878 9582 : n_var=1, default_r_val=0.0_dp)
1879 9582 : CALL section_add_keyword(subsection, keyword)
1880 9582 : CALL keyword_release(keyword)
1881 9582 : CALL section_add_subsection(section, subsection)
1882 9582 : CALL section_release(subsection)
1883 :
1884 : CALL section_create(subsection, __LOCATION__, name="PIGLET", &
1885 : description="Controls the PI Generalized Langevin Equation thermostat."// &
1886 : " Needs the exact harmonic integrator", &
1887 : citations=[Ceriotti2012], &
1888 : n_keywords=4, n_subsections=2, &
1889 19164 : repeats=.FALSE.)
1890 9582 : CALL create_rng_section(subsubsection)
1891 9582 : CALL section_add_subsection(subsection, subsubsection)
1892 9582 : CALL section_release(subsubsection)
1893 : CALL section_create(subsubsection, __LOCATION__, name="EXTRA_DOF", &
1894 : description="Additional degrees of freedom to ensure Markovian Dynamics.", &
1895 9582 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
1896 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
1897 : description="Restart values for additional degrees of freedom" &
1898 : //" (only for restarts, do not set explicitly)", &
1899 : repeats=.FALSE., &
1900 9582 : type_of_var=real_t, n_var=-1)
1901 9582 : CALL section_add_keyword(subsubsection, keyword)
1902 9582 : CALL keyword_release(keyword)
1903 9582 : CALL section_add_subsection(subsection, subsubsection)
1904 9582 : CALL section_release(subsubsection)
1905 : CALL keyword_create(keyword, __LOCATION__, name="NEXTRA_DOF", &
1906 : description="Number of extra degrees of freedom to ensure markovian dynamics", &
1907 9582 : repeats=.FALSE., default_i_val=8)
1908 9582 : CALL section_add_keyword(subsection, keyword)
1909 9582 : CALL keyword_release(keyword)
1910 : CALL keyword_create(keyword, __LOCATION__, name="MATRICES_FILE_NAME", &
1911 : description="Filename containig the raw matrices from "// &
1912 : "<https://gle4md.org/index.html?page=matrix>.", &
1913 9582 : repeats=.FALSE., default_lc_val="PIGLET.MAT")
1914 9582 : CALL section_add_keyword(subsection, keyword)
1915 9582 : CALL keyword_release(keyword)
1916 : CALL keyword_create(keyword, __LOCATION__, name="SMATRIX_INIT", &
1917 : description="Select algorithm to initialize piglet S-matrices", &
1918 : usage="SMATRIX_INIT (CHOLESKY|DIAGONAL)", &
1919 : default_i_val=matrix_init_cholesky, &
1920 : enum_c_vals=s2a("CHOLESKY", "DIAGONAL"), &
1921 9582 : enum_i_vals=[matrix_init_cholesky, matrix_init_diagonal])
1922 9582 : CALL section_add_keyword(subsection, keyword)
1923 9582 : CALL keyword_release(keyword)
1924 : CALL keyword_create(keyword, __LOCATION__, name="THERMOSTAT_ENERGY", &
1925 : description="Thermostat energy for conserved quantity. "// &
1926 : "Only useful in restart files.", &
1927 : usage="THERMOSTAT_ENERGY {real}", type_of_var=real_t, &
1928 9582 : n_var=1, default_r_val=0.0_dp)
1929 9582 : CALL section_add_keyword(subsection, keyword)
1930 9582 : CALL keyword_release(keyword)
1931 9582 : CALL section_add_subsection(section, subsection)
1932 9582 : CALL section_release(subsection)
1933 :
1934 : CALL section_create(subsection, __LOCATION__, name="QTB", &
1935 : description="Controls the QTB-PILE thermostat."// &
1936 : " Needs the exact harmonic integrator", &
1937 : citations=[Brieuc2016], &
1938 : n_keywords=7, n_subsections=1, &
1939 19164 : repeats=.FALSE.)
1940 9582 : CALL create_rng_section(subsubsection)
1941 9582 : CALL section_add_subsection(subsection, subsubsection)
1942 9582 : CALL section_release(subsubsection)
1943 : CALL keyword_create(keyword, __LOCATION__, name="TAU", &
1944 : description="Time constant for centroid motion. ", &
1945 : usage="TAU {real}", type_of_var=real_t, &
1946 9582 : unit_str="fs", n_var=1, default_r_val=1000.0_dp)
1947 9582 : CALL section_add_keyword(subsection, keyword)
1948 9582 : CALL keyword_release(keyword)
1949 : CALL keyword_create(keyword, __LOCATION__, name="LAMBDA", &
1950 : description="Scaling of friction to ring polymer NM freq.", &
1951 : usage="LAMBDA {real}", type_of_var=real_t, &
1952 9582 : n_var=1, default_r_val=0.5_dp)
1953 9582 : CALL section_add_keyword(subsection, keyword)
1954 9582 : CALL keyword_release(keyword)
1955 : CALL keyword_create(keyword, __LOCATION__, name="FP", &
1956 : description="Defines which version to use "// &
1957 : "0: f_P^(0), 1: f_P^(1)", &
1958 : usage="FP {integer}", type_of_var=integer_t, &
1959 9582 : n_var=1, default_i_val=1)
1960 9582 : CALL section_add_keyword(subsection, keyword)
1961 9582 : CALL keyword_release(keyword)
1962 : CALL keyword_create(keyword, __LOCATION__, name="TAUCUT", &
1963 : description="Inverse of cutoff freq. for the centroid mode", &
1964 : usage="TAUCUT {real}", type_of_var=real_t, &
1965 9582 : unit_str="fs", n_var=1, default_r_val=0.5_dp)
1966 9582 : CALL section_add_keyword(subsection, keyword)
1967 9582 : CALL keyword_release(keyword)
1968 : CALL keyword_create(keyword, __LOCATION__, name="LAMBCUT", &
1969 : description="Scaling of cutoff freq. to ring polymer NM freq.", &
1970 : usage="LAMBCUT {real}", type_of_var=real_t, &
1971 9582 : n_var=1, default_r_val=2.0_dp)
1972 9582 : CALL section_add_keyword(subsection, keyword)
1973 9582 : CALL keyword_release(keyword)
1974 : CALL keyword_create(keyword, __LOCATION__, name="NF", &
1975 : description="Number of points used for the convolution product.", &
1976 : usage="NF {integer}", type_of_var=integer_t, &
1977 9582 : n_var=1, default_i_val=128)
1978 9582 : CALL section_add_keyword(subsection, keyword)
1979 9582 : CALL keyword_release(keyword)
1980 : CALL keyword_create(keyword, __LOCATION__, name="THERMOSTAT_ENERGY", &
1981 : description="Thermostat energy for conserved quantity. "// &
1982 : "Only useful in restart files.", &
1983 : usage="THERMOSTAT_ENERGY {real}", type_of_var=real_t, &
1984 9582 : n_var=1, default_r_val=0.0_dp)
1985 9582 : CALL section_add_keyword(subsection, keyword)
1986 9582 : CALL keyword_release(keyword)
1987 9582 : CALL section_add_subsection(section, subsection)
1988 9582 : CALL section_release(subsection)
1989 :
1990 : CALL section_create(subsection, __LOCATION__, name="INIT", &
1991 : description="Controls the initialization if the beads are not present", &
1992 9582 : repeats=.FALSE.)
1993 :
1994 : CALL keyword_create(keyword, __LOCATION__, name="LEVY_POS_SAMPLE", &
1995 : description="Sample bead positions assuming free particle "// &
1996 : "behavior (performs a Levy random walk of length P around "// &
1997 : "the classical position of each atom at the physical "// &
1998 : "temperature defined in PINT%TEMP)", &
1999 : repeats=.FALSE., default_l_val=.FALSE., &
2000 9582 : lone_keyword_l_val=.TRUE.)
2001 9582 : CALL section_add_keyword(subsection, keyword)
2002 9582 : CALL keyword_release(keyword)
2003 : CALL keyword_create(keyword, __LOCATION__, name="LEVY_CORRELATED", &
2004 : description="Use the same Levy path for all atoms, though "// &
2005 : "with mass-dependent variances (might help at very low T)", &
2006 : repeats=.FALSE., default_l_val=.FALSE., &
2007 9582 : lone_keyword_l_val=.TRUE.)
2008 9582 : CALL section_add_keyword(subsection, keyword)
2009 9582 : CALL keyword_release(keyword)
2010 : CALL keyword_create(keyword, __LOCATION__, name="LEVY_TEMP_FACTOR", &
2011 : description="Multiplicative correction factor for the "// &
2012 : "temperature at which the Levy walk is performed "// &
2013 : "(correction is due to the interactions that modify "// &
2014 : "the spread of a free particle)", &
2015 9582 : repeats=.FALSE., default_r_val=1.0_dp)
2016 9582 : CALL section_add_keyword(subsection, keyword)
2017 9582 : CALL keyword_release(keyword)
2018 : CALL keyword_create(keyword, __LOCATION__, name="LEVY_SEED", &
2019 : description="Initial seed for the (pseudo)random number "// &
2020 : "generator that controls Levy walk for bead positions.", &
2021 : usage="LEVY_SEED <INTEGER>", default_i_val=1234, &
2022 9582 : repeats=.FALSE.)
2023 9582 : CALL section_add_keyword(subsection, keyword)
2024 9582 : CALL keyword_release(keyword)
2025 : CALL keyword_create(keyword, __LOCATION__, name="THERMOSTAT_SEED", &
2026 : description="Initial seed for the (pseudo)random number "// &
2027 : "generator that controls the PILE and PIGLET thermostats.", &
2028 : usage="THERMOSTAT_SEED <INTEGER>", default_i_val=12345, &
2029 9582 : repeats=.FALSE.)
2030 9582 : CALL section_add_keyword(subsection, keyword)
2031 9582 : CALL keyword_release(keyword)
2032 : CALL keyword_create(keyword, __LOCATION__, name="RANDOMIZE_POS", &
2033 : description="add gaussian noise to the positions of the beads", &
2034 9582 : repeats=.FALSE., default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2035 9582 : CALL section_add_keyword(subsection, keyword)
2036 9582 : CALL keyword_release(keyword)
2037 :
2038 : CALL keyword_create(keyword, __LOCATION__, name="CENTROID_SPEED", &
2039 : description="adds random velocity component to the centroid modes "// &
2040 : "(useful to correct for the averaging out of the speed of various beads)", &
2041 9582 : repeats=.FALSE., default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2042 9582 : CALL section_add_keyword(subsection, keyword)
2043 9582 : CALL keyword_release(keyword)
2044 :
2045 : CALL keyword_create(keyword, __LOCATION__, name="VELOCITY_QUENCH", &
2046 : description="set the initial velocities to zero", &
2047 9582 : repeats=.FALSE., default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2048 9582 : CALL section_add_keyword(subsection, keyword)
2049 9582 : CALL keyword_release(keyword)
2050 : CALL keyword_create(keyword, __LOCATION__, name="VELOCITY_SCALE", &
2051 : description="scale initial velocities to the temperature given in MOTION%PINT%TEMP", &
2052 9582 : repeats=.FALSE., default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2053 9582 : CALL section_add_keyword(subsection, keyword)
2054 9582 : CALL keyword_release(keyword)
2055 :
2056 9582 : CALL section_add_subsection(section, subsection)
2057 9582 : CALL section_release(subsection)
2058 :
2059 9582 : CALL create_helium_section(subsection)
2060 9582 : CALL section_add_subsection(section, subsection)
2061 9582 : CALL section_release(subsection)
2062 :
2063 : CALL section_create(subsection, __LOCATION__, name="PRINT", &
2064 : description="Controls the path integral-specific output", &
2065 9582 : n_keywords=2, n_subsections=0, repeats=.FALSE.)
2066 :
2067 9582 : NULLIFY (print_key)
2068 :
2069 : CALL cp_print_key_section_create(print_key, __LOCATION__, "ENERGY", &
2070 : description="Controls the output of the path integral energies", &
2071 9582 : print_level=low_print_level, common_iter_levels=1)
2072 9582 : CALL section_add_subsection(subsection, print_key)
2073 9582 : CALL section_release(print_key)
2074 :
2075 : CALL cp_print_key_section_create(print_key, __LOCATION__, "ACTION", &
2076 : description="Controls the output of the path integral action", &
2077 9582 : print_level=medium_print_level, common_iter_levels=1)
2078 9582 : CALL section_add_subsection(subsection, print_key)
2079 9582 : CALL section_release(print_key)
2080 :
2081 : CALL cp_print_key_section_create(print_key, __LOCATION__, "CENTROID_POS", &
2082 : description="Controls the output of the centroid's position", &
2083 : unit_str="angstrom", &
2084 9582 : print_level=low_print_level, common_iter_levels=1)
2085 : CALL add_format_keyword(keyword, print_key, pos=.TRUE., &
2086 9582 : description="Output file format for the positions of centroid")
2087 9582 : CALL section_add_subsection(subsection, print_key)
2088 9582 : CALL section_release(print_key)
2089 :
2090 : CALL cp_print_key_section_create(print_key, __LOCATION__, "CENTROID_VEL", &
2091 : description="Controls the output of the centroid's velocity", &
2092 : unit_str="bohr*au_t^-1", &
2093 9582 : print_level=low_print_level, common_iter_levels=1)
2094 : CALL add_format_keyword(keyword, print_key, pos=.FALSE., &
2095 9582 : description="Output file format for the velocity of centroid")
2096 9582 : CALL section_add_subsection(subsection, print_key)
2097 9582 : CALL section_release(print_key)
2098 :
2099 : CALL cp_print_key_section_create(print_key, __LOCATION__, "CENTROID_GYR", &
2100 : description="Controls the output of the centroid's radii of gyration", &
2101 : unit_str="angstrom", &
2102 9582 : print_level=low_print_level, common_iter_levels=1)
2103 9582 : CALL section_add_subsection(subsection, print_key)
2104 9582 : CALL section_release(print_key)
2105 :
2106 : CALL cp_print_key_section_create(print_key, __LOCATION__, "COM", &
2107 : description="Controls the output of the center of mass", &
2108 9582 : print_level=high_print_level, common_iter_levels=1)
2109 9582 : CALL section_add_subsection(subsection, print_key)
2110 9582 : CALL section_release(print_key)
2111 :
2112 : CALL keyword_create(keyword, __LOCATION__, name="IMAGINARY_TIME_STRIDE", &
2113 : description="Prints only every nth bead trajectory", &
2114 9582 : repeats=.FALSE., default_i_val=1)
2115 9582 : CALL section_add_keyword(subsection, keyword)
2116 9582 : CALL keyword_release(keyword)
2117 :
2118 9582 : CALL section_add_subsection(section, subsection)
2119 9582 : CALL section_release(subsection)
2120 :
2121 9582 : END SUBROUTINE create_pint_section
2122 :
2123 : ! ***************************************************************************
2124 : !> \brief Create the input section for superfluid helium solvent.
2125 : !> \author Lukasz Walewski
2126 : ! ***************************************************************************
2127 : ! **************************************************************************************************
2128 : !> \brief ...
2129 : !> \param section ...
2130 : ! **************************************************************************************************
2131 9582 : SUBROUTINE create_helium_section(section)
2132 : TYPE(section_type), POINTER :: section
2133 :
2134 : TYPE(keyword_type), POINTER :: keyword
2135 : TYPE(section_type), POINTER :: print_key, subsection, subsubsection
2136 :
2137 9582 : CPASSERT(.NOT. ASSOCIATED(section))
2138 :
2139 : CALL section_create(section, __LOCATION__, name="HELIUM", &
2140 : description="The section that controls optional helium solvent"// &
2141 : " environment (highly experimental, not for general use yet)", &
2142 9582 : n_keywords=31, n_subsections=11, repeats=.FALSE.)
2143 :
2144 9582 : NULLIFY (keyword)
2145 : CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
2146 : description="Whether or not to actually use this section", &
2147 9582 : usage="silent", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2148 9582 : CALL section_add_keyword(section, keyword)
2149 9582 : CALL keyword_release(keyword)
2150 :
2151 : CALL keyword_create(keyword, __LOCATION__, name="HELIUM_ONLY", &
2152 : description="Simulate helium solvent only, "// &
2153 : "disregard solute entirely", &
2154 : repeats=.FALSE., default_l_val=.FALSE., &
2155 9582 : lone_keyword_l_val=.TRUE.)
2156 9582 : CALL section_add_keyword(section, keyword)
2157 9582 : CALL keyword_release(keyword)
2158 :
2159 : CALL keyword_create(keyword, __LOCATION__, name="INTERACTION_POT_SCAN", &
2160 : description="Scan solute-helium interaction potential, "// &
2161 : "cubefile parameters set in subsection RHO", &
2162 : repeats=.FALSE., default_l_val=.FALSE., &
2163 9582 : lone_keyword_l_val=.TRUE.)
2164 9582 : CALL section_add_keyword(section, keyword)
2165 9582 : CALL keyword_release(keyword)
2166 :
2167 : CALL keyword_create(keyword, __LOCATION__, name="NUM_ENV", &
2168 : description="Number of independent helium environments", &
2169 9582 : repeats=.FALSE., default_i_val=1)
2170 9582 : CALL section_add_keyword(section, keyword)
2171 9582 : CALL keyword_release(keyword)
2172 :
2173 : CALL keyword_create(keyword, __LOCATION__, name="POTENTIAL_FILE_NAME", &
2174 : description="Name of the Helium interaction potential file", &
2175 9582 : repeats=.FALSE., default_lc_val="HELIUM.POT")
2176 9582 : CALL section_add_keyword(section, keyword)
2177 9582 : CALL keyword_release(keyword)
2178 :
2179 : CALL keyword_create(keyword, __LOCATION__, name="GET_FORCES", &
2180 : description="Get average MC forces or last MC forces to propagate MD", &
2181 : usage="GET_FORCES (AVERAGE|LAST)", &
2182 : default_i_val=helium_forces_average, &
2183 : enum_c_vals=s2a("AVERAGE", "LAST"), &
2184 9582 : enum_i_vals=[helium_forces_average, helium_forces_last])
2185 9582 : CALL section_add_keyword(section, keyword)
2186 9582 : CALL keyword_release(keyword)
2187 :
2188 : CALL keyword_create(keyword, __LOCATION__, name="SOLUTE_INTERACTION", &
2189 : description="Interaction potential between helium and the solute", &
2190 : usage="SOLUTE_INTERACTION (NONE | MWATER | NNP)", &
2191 : default_i_val=helium_solute_intpot_none, &
2192 : enum_c_vals=s2a("NONE", "MWATER", "NNP"), &
2193 : enum_i_vals=[ &
2194 : helium_solute_intpot_none, &
2195 : helium_solute_intpot_mwater, &
2196 : helium_solute_intpot_nnp], &
2197 : enum_desc=s2a( &
2198 : "No interaction with solute", &
2199 : "Test interaction with wrong Water", &
2200 9582 : "Interaction with NNP"))
2201 9582 : CALL section_add_keyword(section, keyword)
2202 9582 : CALL keyword_release(keyword)
2203 :
2204 : CALL keyword_create(keyword, __LOCATION__, name="NATOMS", &
2205 : description="Number of helium atoms", &
2206 9582 : repeats=.FALSE., default_i_val=64)
2207 9582 : CALL section_add_keyword(section, keyword)
2208 9582 : CALL keyword_release(keyword)
2209 :
2210 : CALL keyword_create(keyword, __LOCATION__, name="NBEADS", &
2211 : description="Number of helium path integral beads", &
2212 9582 : repeats=.FALSE., default_i_val=25)
2213 9582 : CALL section_add_keyword(section, keyword)
2214 9582 : CALL keyword_release(keyword)
2215 :
2216 : CALL keyword_create(keyword, __LOCATION__, name="RNG_SEED", &
2217 : description="Initial seed for the (pseudo)random number "// &
2218 : "generator that controls helium coordinate generation and propagation.", &
2219 : usage="RNG_SEED <INTEGER>", default_i_val=12345, &
2220 9582 : repeats=.FALSE.)
2221 9582 : CALL section_add_keyword(section, keyword)
2222 9582 : CALL keyword_release(keyword)
2223 :
2224 : CALL keyword_create(keyword, __LOCATION__, name="N_INNER", &
2225 : variants=s2a("INOROT"), &
2226 : description="Number of MC iterations at the same time slice(s) "// &
2227 : "(number of inner MC loop iterations)", &
2228 9582 : repeats=.FALSE., default_i_val=6600)
2229 9582 : CALL section_add_keyword(section, keyword)
2230 9582 : CALL keyword_release(keyword)
2231 :
2232 : CALL keyword_create(keyword, __LOCATION__, name="N_OUTER", &
2233 : variants=s2a("IROT"), &
2234 : description="how often to reselect the time slice(s) to work on "// &
2235 : "(number of outer MC loop iterations)", &
2236 9582 : repeats=.FALSE., default_i_val=300)
2237 9582 : CALL section_add_keyword(section, keyword)
2238 9582 : CALL keyword_release(keyword)
2239 :
2240 : CALL keyword_create(keyword, __LOCATION__, name="SAMPLING_METHOD", &
2241 : description="Choose between Ceperley or the worm algorithm", &
2242 : usage="SAMPLING_METHOD (CEPERLEY|WORM)", &
2243 : default_i_val=helium_sampling_ceperley, &
2244 : enum_c_vals=s2a("CEPERLEY", "WORM"), &
2245 9582 : enum_i_vals=[helium_sampling_ceperley, helium_sampling_worm])
2246 9582 : CALL section_add_keyword(section, keyword)
2247 9582 : CALL keyword_release(keyword)
2248 :
2249 : CALL keyword_create(keyword, __LOCATION__, name="COORD_INIT_TEMP", &
2250 : description="Temperature for thermal gaussian initialization of the helium."// &
2251 : " Negative values correspond to a hot start.", &
2252 : default_r_val=cp_unit_to_cp2k(300._dp, "K"), &
2253 9582 : unit_str="K")
2254 9582 : CALL section_add_keyword(section, keyword)
2255 9582 : CALL keyword_release(keyword)
2256 :
2257 : CALL keyword_create(keyword, __LOCATION__, name="SOLUTE_RADIUS", &
2258 : description="Radius of the solute molecule for prevention of"// &
2259 : " coordinate collision during initialization", &
2260 : default_r_val=cp_unit_to_cp2k(0.0_dp, "angstrom"), &
2261 9582 : repeats=.FALSE., type_of_var=real_t, unit_str="angstrom")
2262 9582 : CALL section_add_keyword(section, keyword)
2263 9582 : CALL keyword_release(keyword)
2264 :
2265 : ! Helium-solute interaction NNP
2266 9582 : NULLIFY (subsection)
2267 : CALL section_create(subsection, __LOCATION__, name="NNP", &
2268 : description="This section contains all information to run an helium-solute "// &
2269 : "interaction Neural Network Potential (NNP) calculation.", &
2270 9582 : n_keywords=2, n_subsections=3, repeats=.FALSE.)
2271 :
2272 : CALL keyword_create(keyword, __LOCATION__, name="NNP_INPUT_FILE_NAME", &
2273 : description="File containing the input information for the setup "// &
2274 : "of the NNP (n2p2/RuNNer format). ", &
2275 9582 : repeats=.FALSE., default_lc_val="input.nn")
2276 9582 : CALL section_add_keyword(subsection, keyword)
2277 9582 : CALL keyword_release(keyword)
2278 :
2279 : CALL keyword_create(keyword, __LOCATION__, name="SCALE_FILE_NAME", &
2280 : description="File containing the scaling information for the symmetry "// &
2281 : "functions of the NNP. ", &
2282 9582 : repeats=.FALSE., default_lc_val="scaling.data")
2283 9582 : CALL section_add_keyword(subsection, keyword)
2284 9582 : CALL keyword_release(keyword)
2285 :
2286 9582 : NULLIFY (subsubsection)
2287 : CALL section_create(subsubsection, __LOCATION__, name="SR_CUTOFF", &
2288 : description="Section for failsafe short range cutoffs for the NNPs, "// &
2289 : "if the distance between solvent and specified solute element becomes "// &
2290 : "smaller than the given cutoff, an artifical repulsive potential is "// &
2291 : "introduced. Note this is only meant to prevent such configurations, "// &
2292 : "not to physically sample them.", &
2293 9582 : n_keywords=2, n_subsections=0, repeats=.TRUE.)
2294 :
2295 : CALL keyword_create(keyword, __LOCATION__, name="ELEMENT", &
2296 : description="Solute element for which the short range cutoff is in effect", &
2297 9582 : repeats=.FALSE., default_c_val="none")
2298 9582 : CALL section_add_keyword(subsubsection, keyword)
2299 9582 : CALL keyword_release(keyword)
2300 :
2301 : CALL keyword_create(keyword, __LOCATION__, name="RADIUS", &
2302 : description="Short range cutoff in Angstrom, below this cutoff, the energy "// &
2303 : "is replaced by a sizable positive value plus a 1/r**2 term to guide particles "// &
2304 : "away from each other.", &
2305 : default_r_val=cp_unit_to_cp2k(0.0_dp, "angstrom"), &
2306 9582 : repeats=.FALSE., type_of_var=real_t, unit_str="angstrom")
2307 9582 : CALL section_add_keyword(subsubsection, keyword)
2308 9582 : CALL keyword_release(keyword)
2309 9582 : CALL section_add_subsection(subsection, subsubsection)
2310 9582 : CALL section_release(subsubsection)
2311 :
2312 9582 : NULLIFY (subsubsection)
2313 : CALL section_create(subsubsection, __LOCATION__, name="MODEL", &
2314 : description="Section for a single NNP model. If this section is repeated, "// &
2315 : "a committee model (C-NNP)is used where the NNP members share the same "// &
2316 : "symmetry functions. ", &
2317 9582 : n_keywords=1, n_subsections=0, repeats=.TRUE.)
2318 :
2319 : CALL keyword_create(keyword, __LOCATION__, name="WEIGHTS", &
2320 : description="File containing the weights for the artificial neural "// &
2321 : "networks of the NNP. The specified name is extended by .XXX.data ", &
2322 9582 : repeats=.FALSE., default_lc_val="weights")
2323 9582 : CALL section_add_keyword(subsubsection, keyword)
2324 9582 : CALL keyword_release(keyword)
2325 9582 : CALL section_add_subsection(subsection, subsubsection)
2326 9582 : CALL section_release(subsubsection)
2327 :
2328 : ! Create the PRINT subsection
2329 9582 : NULLIFY (subsubsection)
2330 : CALL section_create(subsubsection, __LOCATION__, name="PRINT", &
2331 : description="Section of possible print options in NNP code.", &
2332 9582 : n_keywords=0, n_subsections=3, repeats=.FALSE.)
2333 9582 : NULLIFY (print_key, keyword)
2334 :
2335 : CALL cp_print_key_section_create(print_key, __LOCATION__, "ENERGIES", &
2336 : description="Controls the printing of the NNP energies.", &
2337 9582 : print_level=medium_print_level, common_iter_levels=1)
2338 9582 : CALL section_add_subsection(subsubsection, print_key)
2339 9582 : CALL section_release(print_key)
2340 :
2341 : CALL cp_print_key_section_create(print_key, __LOCATION__, "FORCES_SIGMA", &
2342 : description="Controls the printing of the STD per atom of the NNP forces.", &
2343 9582 : print_level=medium_print_level, common_iter_levels=1)
2344 9582 : CALL section_add_subsection(subsubsection, print_key)
2345 9582 : CALL section_release(print_key)
2346 :
2347 : CALL cp_print_key_section_create(print_key, __LOCATION__, "EXTRAPOLATION", &
2348 : description="If activated, output structures with extrapolation "// &
2349 : "warning in xyz-format", &
2350 9582 : print_level=medium_print_level, common_iter_levels=1)
2351 9582 : CALL section_add_subsection(subsubsection, print_key)
2352 9582 : CALL section_release(print_key)
2353 9582 : CALL section_add_subsection(subsection, subsubsection)
2354 9582 : CALL section_release(subsubsection)
2355 :
2356 9582 : CALL section_add_subsection(section, subsection)
2357 9582 : CALL section_release(subsection) ! release NNP subsection
2358 :
2359 : ! Ceperley's sampling algorithm
2360 9582 : NULLIFY (subsection)
2361 : CALL section_create(subsection, __LOCATION__, name="CEPERLEY", &
2362 : description="Enables sampling with Ceperley's algorithm", &
2363 9582 : n_keywords=2, n_subsections=1, repeats=.FALSE.)
2364 :
2365 : CALL keyword_create(keyword, __LOCATION__, name="BISECTION", &
2366 : description="how many time slices to change at once (+1). "// &
2367 : "Must be a power of 2 currently", &
2368 9582 : repeats=.FALSE., default_i_val=8)
2369 9582 : CALL section_add_keyword(subsection, keyword)
2370 9582 : CALL keyword_release(keyword)
2371 :
2372 : CALL keyword_create(keyword, __LOCATION__, name="MAX_PERM_CYCLE", &
2373 : description="how large cyclic permutations to try", &
2374 9582 : repeats=.FALSE., default_i_val=6)
2375 9582 : CALL section_add_keyword(subsection, keyword)
2376 9582 : CALL keyword_release(keyword)
2377 :
2378 9582 : NULLIFY (subsubsection)
2379 : CALL section_create(subsubsection, __LOCATION__, name="M-SAMPLING", &
2380 : description="Permutation cycle length sampling settings", &
2381 9582 : n_keywords=3, n_subsections=0, repeats=.FALSE.)
2382 : CALL keyword_create(keyword, __LOCATION__, name="DISTRIBUTION-TYPE", &
2383 : description="Distribution from which the cycle length m is sampled", &
2384 : usage="DISTRIBUTION-TYPE (SINGLEV|UNIFORM|LINEAR|QUADRATIC|EXPONENTIAL|GAUSSIAN)", &
2385 : default_i_val=helium_mdist_uniform, &
2386 : enum_c_vals=s2a( &
2387 : "SINGLEV", &
2388 : "UNIFORM", &
2389 : "LINEAR", &
2390 : "QUADRATIC", &
2391 : "EXPONENTIAL", &
2392 : "GAUSSIAN"), &
2393 : enum_i_vals=[ &
2394 : helium_mdist_singlev, &
2395 : helium_mdist_uniform, &
2396 : helium_mdist_linear, &
2397 : helium_mdist_quadratic, &
2398 : helium_mdist_exponential, &
2399 9582 : helium_mdist_gaussian])
2400 9582 : CALL section_add_keyword(subsubsection, keyword)
2401 9582 : CALL keyword_release(keyword)
2402 : CALL keyword_create(keyword, __LOCATION__, name="M-VALUE", &
2403 : description="Value of m treated in a special way "// &
2404 : "(specific behavior depends on the distribution type chosen)", &
2405 : repeats=.FALSE., &
2406 9582 : default_i_val=1)
2407 9582 : CALL section_add_keyword(subsubsection, keyword)
2408 9582 : CALL keyword_release(keyword)
2409 : CALL keyword_create(keyword, __LOCATION__, name="M-RATIO", &
2410 : description="Probability ratio betw M-VALUE and other cycle lengths", &
2411 : repeats=.FALSE., &
2412 9582 : default_r_val=1.0_dp)
2413 9582 : CALL section_add_keyword(subsubsection, keyword)
2414 9582 : CALL keyword_release(keyword)
2415 9582 : CALL section_add_subsection(subsection, subsubsection)
2416 9582 : CALL section_release(subsubsection)
2417 9582 : CALL section_add_subsection(section, subsection)
2418 9582 : CALL section_release(subsection) ! release CEPERLEY subsection
2419 :
2420 : ! worm algorithm parameters:
2421 9582 : NULLIFY (subsection)
2422 : CALL section_create(subsection, __LOCATION__, name="WORM", &
2423 : description="Enables sampling via the canonical worm algorithm adapted from Bonisegni", &
2424 9582 : n_keywords=12, n_subsections=0, repeats=.FALSE.)
2425 :
2426 : CALL keyword_create(keyword, __LOCATION__, name="CENTROID_DRMAX", &
2427 : description="Maximum displacement allowed for the centroid moves", &
2428 9582 : repeats=.FALSE., default_r_val=0.5_dp)
2429 9582 : CALL section_add_keyword(subsection, keyword)
2430 9582 : CALL keyword_release(keyword)
2431 :
2432 : CALL keyword_create(keyword, __LOCATION__, name="STAGING_L", &
2433 : description="From 2 up to max. L-1 beads will be moved", &
2434 9582 : repeats=.FALSE., default_i_val=5)
2435 9582 : CALL section_add_keyword(subsection, keyword)
2436 9582 : CALL keyword_release(keyword)
2437 :
2438 : CALL keyword_create(keyword, __LOCATION__, name="OPEN_CLOSE_SCALE", &
2439 : description="Open/Close acceptance adjustment parameter", &
2440 9582 : repeats=.FALSE., default_r_val=0.01_dp)
2441 9582 : CALL section_add_keyword(subsection, keyword)
2442 9582 : CALL keyword_release(keyword)
2443 :
2444 : CALL keyword_create(keyword, __LOCATION__, name="ALLOW_OPEN", &
2445 : description="Enable bosonic exchange sampling", &
2446 9582 : repeats=.FALSE., default_l_val=.TRUE.)
2447 9582 : CALL section_add_keyword(subsection, keyword)
2448 9582 : CALL keyword_release(keyword)
2449 :
2450 : CALL keyword_create(keyword, __LOCATION__, name="MAX_OPEN_CYCLES", &
2451 : description="If > 0 then reset positions and permutations to the previous closed &
2452 : & state if staying more than this amount of MC cycles in open state to avoid staying &
2453 : & trapped in open state for too long. Use with caution as it can potentially introduce &
2454 : & a bias in the sampling.", &
2455 9582 : repeats=.FALSE., default_i_val=0)
2456 9582 : CALL section_add_keyword(subsection, keyword)
2457 9582 : CALL keyword_release(keyword)
2458 :
2459 : CALL keyword_create(keyword, __LOCATION__, name="SHOW_STATISTICS", &
2460 : description="Show sampling statistics in output", &
2461 9582 : repeats=.FALSE., default_l_val=.TRUE.)
2462 9582 : CALL section_add_keyword(subsection, keyword)
2463 9582 : CALL keyword_release(keyword)
2464 :
2465 : CALL keyword_create(keyword, __LOCATION__, name="CENTROID_WEIGHT", &
2466 : description="Absolute weight of the centroid move", &
2467 9582 : repeats=.FALSE., default_i_val=10)
2468 9582 : CALL section_add_keyword(subsection, keyword)
2469 9582 : CALL keyword_release(keyword)
2470 :
2471 : CALL keyword_create(keyword, __LOCATION__, name="STAGING_WEIGHT", &
2472 : description="Absolute weight of the staging move", &
2473 9582 : repeats=.FALSE., default_i_val=30)
2474 9582 : CALL section_add_keyword(subsection, keyword)
2475 9582 : CALL keyword_release(keyword)
2476 :
2477 : CALL keyword_create(keyword, __LOCATION__, name="OPEN_CLOSE_WEIGHT", &
2478 : description="Absolute weight of the open/close move", &
2479 9582 : repeats=.FALSE., default_i_val=10)
2480 9582 : CALL section_add_keyword(subsection, keyword)
2481 9582 : CALL keyword_release(keyword)
2482 :
2483 : CALL keyword_create(keyword, __LOCATION__, name="HEAD_TAIL_WEIGHT", &
2484 : description="Absolute weight of the head/tail moves (both)", &
2485 9582 : repeats=.FALSE., default_i_val=10)
2486 9582 : CALL section_add_keyword(subsection, keyword)
2487 9582 : CALL keyword_release(keyword)
2488 :
2489 : CALL keyword_create(keyword, __LOCATION__, name="CRAWL_WEIGHT", &
2490 : description="Absolute weight of the crawl bwd/fwd moves (both)", &
2491 9582 : repeats=.FALSE., default_i_val=10)
2492 9582 : CALL section_add_keyword(subsection, keyword)
2493 9582 : CALL keyword_release(keyword)
2494 :
2495 : CALL keyword_create(keyword, __LOCATION__, name="CRAWL_REPETITION", &
2496 : description="Number of repeated crawl moves", &
2497 9582 : repeats=.FALSE., default_i_val=4)
2498 9582 : CALL section_add_keyword(subsection, keyword)
2499 9582 : CALL keyword_release(keyword)
2500 :
2501 : CALL keyword_create(keyword, __LOCATION__, name="SWAP_WEIGHT", &
2502 : description="Absolute weight of the crawl move", &
2503 9582 : repeats=.FALSE., default_i_val=10)
2504 9582 : CALL section_add_keyword(subsection, keyword)
2505 9582 : CALL keyword_release(keyword)
2506 :
2507 9582 : CALL section_add_subsection(section, subsection)
2508 9582 : CALL section_release(subsection) ! release WORM subsection
2509 :
2510 : ! end of worm parameters
2511 :
2512 : CALL keyword_create(keyword, __LOCATION__, name="PERIODIC", &
2513 : description="Use periodic boundary conditions for helium", &
2514 9582 : repeats=.FALSE., default_l_val=.FALSE.)
2515 9582 : CALL section_add_keyword(section, keyword)
2516 9582 : CALL keyword_release(keyword)
2517 :
2518 : CALL keyword_create(keyword, __LOCATION__, name="CELL_SIZE", &
2519 : description="PBC unit cell size (NOTE 1: density, number of atoms"// &
2520 : " and volume are interdependent - give only two of them; "// &
2521 : "NOTE 2: for small cell sizes specify NATOMS instead)", &
2522 9582 : repeats=.FALSE., type_of_var=real_t, unit_str="angstrom")
2523 9582 : CALL section_add_keyword(section, keyword)
2524 9582 : CALL keyword_release(keyword)
2525 :
2526 : CALL keyword_create(keyword, __LOCATION__, name="CELL_SHAPE", &
2527 : description="PBC unit cell shape for helium", &
2528 : usage="CELL_SHAPE (CUBE|OCTAHEDRON)", &
2529 : default_i_val=helium_cell_shape_cube, &
2530 : enum_c_vals=s2a("CUBE", "OCTAHEDRON"), &
2531 9582 : enum_i_vals=[helium_cell_shape_cube, helium_cell_shape_octahedron])
2532 9582 : CALL section_add_keyword(section, keyword)
2533 9582 : CALL keyword_release(keyword)
2534 :
2535 : CALL keyword_create(keyword, __LOCATION__, name="DROPLET_RADIUS", &
2536 : description="Reject a move if any of the new positions does not lie within"// &
2537 : " this range from the center of gravity", &
2538 : repeats=.FALSE., type_of_var=real_t, default_r_val=HUGE(1.0_dp), &
2539 9582 : unit_str="angstrom")
2540 9582 : CALL section_add_keyword(section, keyword)
2541 9582 : CALL keyword_release(keyword)
2542 :
2543 : CALL keyword_create(keyword, __LOCATION__, name="DENSITY", &
2544 : description="trial density of helium for determining the helium "// &
2545 : "box size", &
2546 : repeats=.FALSE., &
2547 : default_r_val=cp_unit_to_cp2k(0.02186_dp, "angstrom^-3"), &
2548 9582 : unit_str="angstrom^-3")
2549 9582 : CALL section_add_keyword(section, keyword)
2550 9582 : CALL keyword_release(keyword)
2551 :
2552 : CALL keyword_create(keyword, __LOCATION__, name="PRESAMPLE", &
2553 : description="Presample He coordinates before first PIMD step", &
2554 9582 : repeats=.FALSE., default_l_val=.FALSE.)
2555 9582 : CALL section_add_keyword(section, keyword)
2556 9582 : CALL keyword_release(keyword)
2557 :
2558 : CALL section_create(subsection, __LOCATION__, name="RDF", &
2559 : description="Radial distribution settings", &
2560 9582 : n_keywords=5, n_subsections=0, repeats=.FALSE.)
2561 :
2562 : CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
2563 : description="Whether or not to actually calculate this property", &
2564 9582 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2565 9582 : CALL section_add_keyword(subsection, keyword)
2566 9582 : CALL keyword_release(keyword)
2567 :
2568 : CALL keyword_create(keyword, __LOCATION__, name="MAXR", &
2569 : description="Maximum RDF range, defaults to unit cell size", &
2570 : repeats=.FALSE., type_of_var=real_t, &
2571 9582 : unit_str="angstrom")
2572 9582 : CALL section_add_keyword(subsection, keyword)
2573 9582 : CALL keyword_release(keyword)
2574 :
2575 : CALL keyword_create(keyword, __LOCATION__, name="NBIN", &
2576 : description="Number of bins", &
2577 : repeats=.FALSE., &
2578 9582 : default_i_val=250)
2579 9582 : CALL section_add_keyword(subsection, keyword)
2580 9582 : CALL keyword_release(keyword)
2581 :
2582 : CALL keyword_create(keyword, __LOCATION__, name="SOLUTE_HE", &
2583 : description="Whether or not to calculate solute-He RDFs (if solute is present)", &
2584 9582 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
2585 9582 : CALL section_add_keyword(subsection, keyword)
2586 9582 : CALL keyword_release(keyword)
2587 :
2588 : CALL keyword_create(keyword, __LOCATION__, name="HE_HE", &
2589 : description="Whether or not to calculate He-He RDFs", &
2590 9582 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2591 9582 : CALL section_add_keyword(subsection, keyword)
2592 9582 : CALL keyword_release(keyword)
2593 :
2594 9582 : CALL section_add_subsection(section, subsection)
2595 9582 : CALL section_release(subsection)
2596 :
2597 9582 : NULLIFY (subsection)
2598 : CALL section_create(subsection, __LOCATION__, name="RHO", &
2599 : description="Spatial distribution settings", &
2600 9582 : n_keywords=10, n_subsections=0, repeats=.FALSE.)
2601 : CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
2602 : description="Whether or not to actually calculate densities "// &
2603 : "(requires significant amount of memory, depending on the value of NBIN)", &
2604 9582 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2605 9582 : CALL section_add_keyword(subsection, keyword)
2606 9582 : CALL keyword_release(keyword)
2607 : CALL keyword_create(keyword, __LOCATION__, name="NBIN", &
2608 : description="Number of grid points in each direction for density binning", &
2609 : repeats=.FALSE., &
2610 9582 : default_i_val=100)
2611 9582 : CALL section_add_keyword(subsection, keyword)
2612 9582 : CALL keyword_release(keyword)
2613 : !
2614 : CALL keyword_create(keyword, __LOCATION__, name="MIN_CYCLE_LENGTHS_WDG", &
2615 : description="Density of winding paths "// &
2616 : "not shorter than the given length", &
2617 : repeats=.FALSE., usage="MIN_CYCLE_LENGTHS_WDG <INT> <INT> .. <INT>", &
2618 9582 : type_of_var=integer_t, n_var=-1)
2619 9582 : CALL section_add_keyword(subsection, keyword)
2620 9582 : CALL keyword_release(keyword)
2621 : !
2622 : CALL keyword_create(keyword, __LOCATION__, name="MIN_CYCLE_LENGTHS_NON", &
2623 : description="Density of non-winding paths "// &
2624 : "not shorter than the given length", &
2625 : repeats=.FALSE., usage="MIN_CYCLE_LENGTHS_NON <INT> <INT> .. <INT>", &
2626 9582 : type_of_var=integer_t, n_var=-1)
2627 9582 : CALL section_add_keyword(subsection, keyword)
2628 9582 : CALL keyword_release(keyword)
2629 : !
2630 : CALL keyword_create(keyword, __LOCATION__, name="MIN_CYCLE_LENGTHS_ALL", &
2631 : description="Density of all paths "// &
2632 : "not shorter than the given length", &
2633 : repeats=.FALSE., usage="MIN_CYCLE_LENGTHS_ALL <INT> <INT> .. <INT>", &
2634 9582 : type_of_var=integer_t, n_var=-1)
2635 9582 : CALL section_add_keyword(subsection, keyword)
2636 9582 : CALL keyword_release(keyword)
2637 : !
2638 : CALL keyword_create(keyword, __LOCATION__, name="ATOM_NUMBER", &
2639 : description="Atom number density", &
2640 : repeats=.FALSE., &
2641 : type_of_var=logical_t, &
2642 : default_l_val=.TRUE., &
2643 9582 : lone_keyword_l_val=.TRUE.)
2644 9582 : CALL section_add_keyword(subsection, keyword)
2645 9582 : CALL keyword_release(keyword)
2646 : !
2647 : CALL keyword_create(keyword, __LOCATION__, name="PROJECTED_AREA_2", &
2648 : description="Projected area squared density, A*A(r)", &
2649 : repeats=.FALSE., &
2650 : type_of_var=logical_t, &
2651 : default_l_val=.FALSE., &
2652 9582 : lone_keyword_l_val=.TRUE.)
2653 9582 : CALL section_add_keyword(subsection, keyword)
2654 9582 : CALL keyword_release(keyword)
2655 : !
2656 : CALL keyword_create(keyword, __LOCATION__, name="WINDING_NUMBER_2", &
2657 : description="Winding number squared density, W*W(r)", &
2658 : repeats=.FALSE., &
2659 : type_of_var=logical_t, &
2660 : default_l_val=.FALSE., &
2661 9582 : lone_keyword_l_val=.TRUE.)
2662 9582 : CALL section_add_keyword(subsection, keyword)
2663 9582 : CALL keyword_release(keyword)
2664 : !
2665 : CALL keyword_create(keyword, __LOCATION__, name="WINDING_CYCLE_2", &
2666 : description="Winding number squared density, W^2(r)", &
2667 : repeats=.FALSE., &
2668 : type_of_var=logical_t, &
2669 : default_l_val=.FALSE., &
2670 9582 : lone_keyword_l_val=.TRUE.)
2671 9582 : CALL section_add_keyword(subsection, keyword)
2672 9582 : CALL keyword_release(keyword)
2673 : !
2674 : CALL keyword_create(keyword, __LOCATION__, name="MOMENT_OF_INERTIA", &
2675 : description="Moment of inertia density", &
2676 : repeats=.FALSE., &
2677 : type_of_var=logical_t, &
2678 : default_l_val=.FALSE., &
2679 9582 : lone_keyword_l_val=.TRUE.)
2680 9582 : CALL section_add_keyword(subsection, keyword)
2681 9582 : CALL keyword_release(keyword)
2682 :
2683 9582 : CALL section_add_subsection(section, subsection)
2684 9582 : CALL section_release(subsection)
2685 : ! end of subsection RHO
2686 :
2687 9582 : CALL create_coord_section(subsection, "HELIUM")
2688 9582 : CALL section_add_subsection(section, subsection)
2689 9582 : CALL section_release(subsection)
2690 :
2691 : CALL section_create(subsection, __LOCATION__, name="PERM", &
2692 : description="Permutation state used for restart", &
2693 9582 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
2694 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
2695 : description="Specify particle index permutation for every "// &
2696 : "helium atom", repeats=.TRUE., usage="<INT> <INT> .. <INT>", &
2697 9582 : type_of_var=integer_t, n_var=-1)
2698 9582 : CALL section_add_keyword(subsection, keyword)
2699 9582 : CALL keyword_release(keyword)
2700 9582 : CALL section_add_subsection(section, subsection)
2701 9582 : CALL section_release(subsection)
2702 :
2703 : CALL section_create(subsection, __LOCATION__, name="AVERAGES", &
2704 : description="Average properties (used for restarts)", &
2705 9582 : n_keywords=7, n_subsections=0, repeats=.FALSE.)
2706 : CALL keyword_create(keyword, __LOCATION__, name="PROJECTED_AREA", &
2707 : description="Projected area vector for all environments", &
2708 : repeats=.TRUE., usage="PROJECTED_AREA <REAL> <REAL> .. <REAL>", &
2709 9582 : type_of_var=real_t, n_var=-1)
2710 9582 : CALL section_add_keyword(subsection, keyword)
2711 9582 : CALL keyword_release(keyword)
2712 : CALL keyword_create(keyword, __LOCATION__, name="PROJECTED_AREA_2", &
2713 : description="Projected area vector squared for all environments", &
2714 : repeats=.TRUE., usage="PROJECTED_AREA_2 <REAL> <REAL> .. <REAL>", &
2715 9582 : type_of_var=real_t, n_var=-1)
2716 9582 : CALL section_add_keyword(subsection, keyword)
2717 9582 : CALL keyword_release(keyword)
2718 : CALL keyword_create(keyword, __LOCATION__, name="WINDING_NUMBER_2", &
2719 : description="Winding number vector squared for all environments", &
2720 : repeats=.TRUE., usage="WINDING_NUMBER_2 <REAL> <REAL> .. <REAL>", &
2721 9582 : type_of_var=real_t, n_var=-1)
2722 9582 : CALL section_add_keyword(subsection, keyword)
2723 9582 : CALL keyword_release(keyword)
2724 : CALL keyword_create(keyword, __LOCATION__, name="MOMENT_OF_INERTIA", &
2725 : description="Moment of inertia vector for all environments", &
2726 : repeats=.TRUE., usage="MOMENT_OF_INERTIA <REAL> <REAL> .. <REAL>", &
2727 9582 : type_of_var=real_t, n_var=-1)
2728 9582 : CALL section_add_keyword(subsection, keyword)
2729 9582 : CALL keyword_release(keyword)
2730 : CALL keyword_create(keyword, __LOCATION__, name="RDF", &
2731 : description="Radial distributions averaged over all environments", &
2732 : repeats=.TRUE., usage="RDF <REAL> <REAL> .. <REAL>", &
2733 9582 : type_of_var=real_t, n_var=-1)
2734 9582 : CALL section_add_keyword(subsection, keyword)
2735 9582 : CALL keyword_release(keyword)
2736 : CALL keyword_create(keyword, __LOCATION__, name="RHO", &
2737 : description="Spatial distributions averaged over all environments", &
2738 : repeats=.TRUE., usage="RHO <REAL> <REAL> .. <REAL>", &
2739 9582 : type_of_var=real_t, n_var=-1)
2740 9582 : CALL section_add_keyword(subsection, keyword)
2741 9582 : CALL keyword_release(keyword)
2742 : CALL keyword_create(keyword, __LOCATION__, name="IWEIGHT", &
2743 : description="Weight for the restarted quantities "// &
2744 : "(number of MC steps used to calculate the accumulated averages)", &
2745 : repeats=.FALSE., &
2746 9582 : default_i_val=0)
2747 9582 : CALL section_add_keyword(subsection, keyword)
2748 9582 : CALL keyword_release(keyword)
2749 9582 : CALL section_add_subsection(section, subsection)
2750 9582 : CALL section_release(subsection)
2751 :
2752 : CALL section_create(subsection, __LOCATION__, name="FORCE", &
2753 : description="Forces exerted by the helium on the solute system"// &
2754 : " (used for restarts)", &
2755 9582 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
2756 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
2757 : description="Number of real values should be 3 * "// &
2758 : "<num_solute_atoms> * <num_solute_beads>", repeats=.TRUE., &
2759 : usage="<REAL> <REAL> .. <REAL>", type_of_var=real_t, &
2760 9582 : n_var=-1)
2761 9582 : CALL section_add_keyword(subsection, keyword)
2762 9582 : CALL keyword_release(keyword)
2763 9582 : CALL section_add_subsection(section, subsection)
2764 9582 : CALL section_release(subsection)
2765 :
2766 : CALL section_create(subsection, __LOCATION__, name="RNG_STATE", &
2767 : description="Random number generator state for all processors", &
2768 9582 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
2769 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
2770 : description="Three real arrays of DIMENSION(3,2) times two RNG "// &
2771 : "streams - 36 real values per processor", &
2772 : repeats=.TRUE., usage="automatically filled, do not edit by hand", &
2773 9582 : type_of_var=real_t, n_var=-1)
2774 9582 : CALL section_add_keyword(subsection, keyword)
2775 9582 : CALL keyword_release(keyword)
2776 9582 : CALL section_add_subsection(section, subsection)
2777 9582 : CALL section_release(subsection)
2778 :
2779 : CALL section_create(subsection, __LOCATION__, name="PRINT", &
2780 : description="The section that controls the output of the helium code", &
2781 9582 : n_keywords=16, n_subsections=0, repeats=.FALSE.)
2782 :
2783 : ! *************************************************************************
2784 : !> Printkeys for properties output
2785 : ! *************************************************************************
2786 9582 : NULLIFY (print_key)
2787 :
2788 : ! Properties printed at SILENT print level
2789 : !
2790 :
2791 : ! Properties printed at LOW print level
2792 : !
2793 : CALL cp_print_key_section_create(print_key, __LOCATION__, "ENERGY", &
2794 : description="Controls the output of helium energies"// &
2795 : " (averaged over MC step)", &
2796 9582 : print_level=low_print_level, common_iter_levels=1)
2797 9582 : CALL section_add_subsection(subsection, print_key)
2798 9582 : CALL section_release(print_key)
2799 : !
2800 : CALL cp_print_key_section_create(print_key, __LOCATION__, "PROJECTED_AREA_2_AVG", &
2801 : description="Controls the output of the average projected area squared vector", &
2802 9582 : print_level=low_print_level, common_iter_levels=1)
2803 9582 : CALL section_add_subsection(subsection, print_key)
2804 9582 : CALL section_release(print_key)
2805 : !
2806 : CALL cp_print_key_section_create(print_key, __LOCATION__, "WINDING_NUMBER_2_AVG", &
2807 : description="Controls the output of the average winding number vector squared", &
2808 9582 : print_level=low_print_level, common_iter_levels=1)
2809 9582 : CALL section_add_subsection(subsection, print_key)
2810 9582 : CALL section_release(print_key)
2811 : !
2812 : CALL cp_print_key_section_create(print_key, __LOCATION__, "MOMENT_OF_INERTIA_AVG", &
2813 : description="Controls the output of the average moment of inertia vector", &
2814 9582 : print_level=low_print_level, common_iter_levels=1)
2815 9582 : CALL section_add_subsection(subsection, print_key)
2816 9582 : CALL section_release(print_key)
2817 :
2818 : ! Properties printed at MEDIUM print level
2819 : !
2820 : CALL cp_print_key_section_create(print_key, __LOCATION__, "RDF", &
2821 : description="Controls the output of helium radial distribution functions", &
2822 9582 : print_level=medium_print_level, common_iter_levels=1)
2823 9582 : CALL section_add_subsection(subsection, print_key)
2824 9582 : CALL section_release(print_key)
2825 :
2826 : CALL cp_print_key_section_create(print_key, __LOCATION__, "RHO", &
2827 : description="Controls the output of the helium density "// &
2828 : "(Gaussian cube file format)", &
2829 : each_iter_names=s2a("PINT"), each_iter_values=[100], &
2830 : print_level=medium_print_level, common_iter_levels=1, &
2831 9582 : add_last=add_last_numeric)
2832 : CALL keyword_create(keyword, __LOCATION__, name="BACKUP_COPIES", &
2833 : description="Specifies the maximum number of backup copies.", &
2834 : usage="BACKUP_COPIES {int}", &
2835 9582 : default_i_val=1)
2836 9582 : CALL section_add_keyword(print_key, keyword)
2837 9582 : CALL keyword_release(keyword)
2838 9582 : CALL section_add_subsection(subsection, print_key)
2839 9582 : CALL section_release(print_key)
2840 : !
2841 : CALL cp_print_key_section_create(print_key, __LOCATION__, "PROJECTED_AREA", &
2842 : description="Controls the output of the projected area vector", &
2843 9582 : print_level=medium_print_level, common_iter_levels=1)
2844 9582 : CALL section_add_subsection(subsection, print_key)
2845 9582 : CALL section_release(print_key)
2846 : !
2847 : CALL cp_print_key_section_create(print_key, __LOCATION__, "WINDING_NUMBER", &
2848 : description="Controls the output of the winding number vector", &
2849 9582 : print_level=medium_print_level, common_iter_levels=1)
2850 9582 : CALL section_add_subsection(subsection, print_key)
2851 9582 : CALL section_release(print_key)
2852 : !
2853 : CALL cp_print_key_section_create(print_key, __LOCATION__, "MOMENT_OF_INERTIA", &
2854 : description="Controls the output of the moment of inertia vector", &
2855 9582 : print_level=medium_print_level, common_iter_levels=1)
2856 9582 : CALL section_add_subsection(subsection, print_key)
2857 9582 : CALL section_release(print_key)
2858 : !
2859 : CALL cp_print_key_section_create(print_key, __LOCATION__, "PLENGTH", &
2860 : description="Controls the output of the helium permutation length", &
2861 9582 : print_level=medium_print_level, common_iter_levels=1)
2862 9582 : CALL section_add_subsection(subsection, print_key)
2863 9582 : CALL section_release(print_key)
2864 :
2865 : CALL cp_print_key_section_create(print_key, __LOCATION__, "ACTION", &
2866 : description="Controls the output of the total helium action", &
2867 9582 : print_level=medium_print_level, common_iter_levels=1)
2868 9582 : CALL section_add_subsection(subsection, print_key)
2869 9582 : CALL section_release(print_key)
2870 :
2871 : ! Properties printed at HIGH print level
2872 : !
2873 : CALL cp_print_key_section_create(print_key, __LOCATION__, "COORDINATES", &
2874 : description="Controls the output of helium coordinates", &
2875 9582 : print_level=high_print_level, common_iter_levels=1)
2876 : CALL keyword_create(keyword, __LOCATION__, name="FORMAT", &
2877 : description="Output file format for the coordinates", &
2878 : usage="FORMAT (PDB|XYZ)", &
2879 : default_i_val=fmt_id_pdb, &
2880 : enum_c_vals=s2a("PDB", "XYZ"), &
2881 : enum_i_vals=[fmt_id_pdb, fmt_id_xyz], &
2882 : enum_desc=s2a("Bead coordinates and connectivity is written in PDB format", &
2883 9582 : "Only bead coordinates are written in XYZ format"))
2884 9582 : CALL section_add_keyword(print_key, keyword)
2885 9582 : CALL keyword_release(keyword)
2886 9582 : CALL section_add_subsection(subsection, print_key)
2887 9582 : CALL section_release(print_key)
2888 : !
2889 : CALL cp_print_key_section_create(print_key, __LOCATION__, "PERM", &
2890 : description="Controls the output of the helium permutation state", &
2891 9582 : print_level=high_print_level, common_iter_levels=1)
2892 : CALL keyword_create(keyword, __LOCATION__, name="FORMAT", &
2893 : description="Output format for the permutation", &
2894 : usage="FORMAT (CYCLE|PLAIN)", &
2895 : default_i_val=perm_cycle, &
2896 : enum_c_vals=s2a("CYCLE", "PLAIN"), &
2897 : enum_i_vals=[perm_cycle, perm_plain], &
2898 : enum_desc=s2a( &
2899 : "Cycle notation with winding cycles enclosed"// &
2900 : " in '[...]' and non-winding ones enclosed in '(...)'", &
2901 9582 : "Plain permutation output, i.e. P(1) ... P(N)"))
2902 9582 : CALL section_add_keyword(print_key, keyword)
2903 9582 : CALL keyword_release(keyword)
2904 9582 : CALL section_add_subsection(subsection, print_key)
2905 9582 : CALL section_release(print_key)
2906 :
2907 : CALL cp_print_key_section_create(print_key, __LOCATION__, "FORCES", &
2908 : description="Controls the output of the helium forces on the solute", &
2909 9582 : print_level=high_print_level, common_iter_levels=1)
2910 9582 : CALL section_add_subsection(subsection, print_key)
2911 9582 : CALL section_release(print_key)
2912 :
2913 : ! Properties printed at DEBUG print level
2914 : !
2915 : CALL cp_print_key_section_create(print_key, __LOCATION__, "ACCEPTS", &
2916 : description="Controls the output of the helium acceptance data", &
2917 9582 : print_level=debug_print_level, common_iter_levels=1)
2918 9582 : CALL section_add_subsection(subsection, print_key)
2919 9582 : CALL section_release(print_key)
2920 : !
2921 : CALL cp_print_key_section_create(print_key, __LOCATION__, "FORCES_INST", &
2922 : description="Controls the output of the instantaneous helium forces on the solute", &
2923 9582 : print_level=debug_print_level, common_iter_levels=1)
2924 9582 : CALL section_add_subsection(subsection, print_key)
2925 9582 : CALL section_release(print_key)
2926 :
2927 9582 : CALL section_add_subsection(section, subsection)
2928 9582 : CALL section_release(subsection)
2929 :
2930 9582 : RETURN
2931 : END SUBROUTINE create_helium_section
2932 :
2933 : END MODULE input_cp2k_motion
|