42#include "./base/base_uses.f90"
47 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .true.
48 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_neb'
63 TYPE(
section_type),
POINTER :: print_key, subsection, subsubsection
65 cpassert(.NOT.
ASSOCIATED(section))
67 description=
"The section that controls a BAND run", &
68 n_keywords=1, n_subsections=0, repeats=.false., &
70 NULLIFY (keyword, print_key, subsection, subsubsection)
73 description=
"Specify the number of processors to be used per replica "// &
74 "environment (for parallel runs)", &
79 CALL keyword_create(keyword, __location__, name=
"PROC_DIST_TYPE", &
80 description=
"Specify the topology of the mapping of processors into replicas.", &
81 usage=
"PROC_DIST_TYPE (INTERLEAVED|BLOCKED)", &
82 enum_c_vals=
s2a(
"INTERLEAVED", &
84 enum_desc=
s2a(
"Interleaved distribution", &
85 "Blocked distribution"), &
92 description=
"Specifies the type of BAND calculation", &
93 usage=
"BAND_TYPE (B-NEB|IT-NEB|CI-NEB|D-NEB|SM|EB)", &
95 enum_c_vals=
s2a(
"B-NEB", &
101 enum_desc=
s2a(
"Bisection nudged elastic band", &
102 "Improved tangent nudged elastic band", &
103 "Climbing image nudged elastic band", &
104 "Doubly nudged elastic band", &
106 "Elastic band (Hamiltonian formulation)"), &
111 CALL keyword_create(keyword, __location__, name=
"NUMBER_OF_REPLICA", &
112 description=
"Specify the number of Replica to use in the BAND", &
118 description=
"Uses a version of the band scheme projected in a subspace of colvars.", &
119 default_l_val=.false., lone_keyword_l_val=.true.)
124 description=
"Specifies the type of potential used in the BAND calculation", &
125 usage=
"POT_TYPE (FULL|FE|ME)", &
127 enum_c_vals=
s2a(
"FULL", &
130 enum_desc=
s2a(
"Full potential (no projections in a subspace of colvars)", &
131 "Free energy (requires a projections in a subspace of colvars)", &
132 "Minimum energy (requires a projections in a subspace of colvars)"), &
137 CALL keyword_create(keyword, __location__, name=
"ROTATE_FRAMES", &
138 description=
"Compute at each BAND step the RMSD and rotate the frames in order"// &
139 " to minimize it.", &
140 default_l_val=.true., lone_keyword_l_val=.true.)
145 description=
"Enables the alignment of the frames at the beginning of a BAND calculation. "// &
146 "This keyword does not affect the rotation of the replicas during a BAND calculation.", &
147 default_l_val=.true., lone_keyword_l_val=.true.)
153 description=
"Specify the value of the spring constant", &
154 default_r_val=0.02_dp)
159 CALL section_create(subsection, __location__, name=
"CONVERGENCE_CONTROL", &
160 description=
"Setup parameters to control the convergence criteria for BAND", &
163 description=
"Tolerance on the maximum value of the displacement on the BAND.", &
164 usage=
"MAX_DR {real}", &
165 default_r_val=0.0002_dp)
170 description=
"Tolerance on the maximum value of Forces on the BAND.", &
171 usage=
"MAX_FORCE {real}", &
172 default_r_val=0.00045_dp)
177 description=
"Tolerance on RMS displacements on the BAND.", &
178 usage=
"RMS_DR {real}", &
179 default_r_val=0.0001_dp)
184 description=
"Tolerance on RMS Forces on the BAND.", &
185 usage=
"RMS_FORCE {real}", &
186 default_r_val=0.00030_dp)
192 NULLIFY (subsection, subsubsection)
195 description=
"Controls parameters for CI-NEB type calculation only.", &
198 description=
"Specify the number of steps of IT-NEB to perform before "// &
199 "switching on the CI algorithm", &
207 CALL section_create(subsection, __location__, name=
"STRING_METHOD", &
208 description=
"Controls parameters for String Method type calculation only.", &
212 description=
"Specify the oder of the spline used in the String Method.", &
217 description=
"Smoothing parameter for the reparametrization of the frames.", &
218 default_r_val=0.2_dp)
226 CALL section_create(subsection, __location__, name=
"optimize_band", &
227 description=
"Specify the optimization method for the band", &
229 CALL create_opt_band_section(subsection)
236 description=
"Specify coordinates and velocities (possibly) of the replica", &
240 description=
"Specifies the value of the collective variables used in the projected"// &
241 " BAND method. The order of the values is the order of the COLLECTIVE section in the"// &
242 " constraints/restraints section", &
243 usage=
"COLLECTIVE {real} .. {real}", &
244 type_of_var=
real_t, n_var=-1)
248 CALL keyword_create(keyword, __location__, name=
"COORD_FILE_NAME", &
249 description=
"Name of the xyz file with coordinates (alternative to &COORD section)", &
250 usage=
"COORD_FILE_NAME <CHAR>", &
267 description=
"Controls the printing basic info about the BAND run", &
270 CALL keyword_create(keyword, __location__, name=
"INITIAL_CONFIGURATION_INFO", &
271 description=
"Print information for the setup of the initial configuration.", &
272 usage=
"INITIAL_CONFIGURATION_INFO <LOGICAL>", &
273 default_l_val=.false., lone_keyword_l_val=.true.)
281 description=
"Controls the printing of the convergence criteria during a BAND run", &
287 description=
"Controls the printing of each replica info during a BAND run", &
293 description=
"Controls the printing of the ENER file in a BAND run", &
300 description=
"Controls the printing of the BAND banner", &
302 filename=
"__STD_OUT__")
312 SUBROUTINE create_opt_band_section(section)
316 TYPE(
section_type),
POINTER :: print_key, subsection, subsubsection
318 cpassert(
ASSOCIATED(section))
319 NULLIFY (keyword, print_key, subsection, subsubsection)
322 description=
"Specifies the type optimizer used for the band", &
323 usage=
"OPT_TYPE (MD|DIIS)", &
325 enum_c_vals=
s2a(
"MD", &
327 enum_desc=
s2a(
"Molecular dynamics-based optimizer", &
328 "Coupled steepest descent / direct inversion in the iterative subspace"), &
333 CALL keyword_create(keyword, __location__, name=
"OPTIMIZE_END_POINTS", &
334 description=
"Performs also an optimization of the end points of the band.", &
335 default_l_val=.false., lone_keyword_l_val=.true.)
341 description=
"Activate the MD based optimization procedure for BAND", &
345 description=
"Specify the maximum number of MD steps", &
351 keyword, __location__, &
353 description=
"The length of an integration step", &
354 usage=
"timestep 1.0", &
362 description=
"Specify the initial temperature", &
370 CALL section_create(subsubsection, __location__, name=
"TEMP_CONTROL", &
371 description=
"Setup parameters to control the temperature during a BAND MD run.", &
374 description=
"Specify the target temperature", &
375 type_of_var=
real_t, unit_str=
"K")
380 description=
"Specify the tolerance on the temperature for rescaling", &
387 CALL keyword_create(keyword, __location__, name=
"TEMP_TOL_STEPS", &
388 description=
"Specify the number of steps to apply a temperature control", &
396 CALL section_create(subsubsection, __location__, name=
"VEL_CONTROL", &
397 description=
"Setup parameters to control the velocity during a BAND MD run.", &
400 description=
"Specify the annealing coefficient", &
401 default_r_val=1.0_dp)
404 CALL keyword_create(keyword, __location__, name=
"PROJ_VELOCITY_VERLET", &
405 description=
"Uses a Projected Velocity Verlet instead of a normal Velocity Verlet."// &
406 " Every time the cosine between velocities and forces is < 0 velocities are"// &
408 usage=
"PROJ_VELOCITY_VERLET <LOGICAL>", &
409 default_l_val=.true., lone_keyword_l_val=.true.)
413 description=
"Zeros velocity at each MD step emulating a steepest descent like "// &
414 "(SD_LIKE) approach", &
415 usage=
"SD_LIKE <LOGICAL>", &
416 default_l_val=.false., lone_keyword_l_val=.true.)
427 description=
"Activate the DIIS based optimization procedure for BAND", &
431 description=
"Specify the maximum number of SD steps to perform"// &
432 " before switching on DIIS (the minimum number will always be equal to N_DIIS).", &
438 description=
"Specify the maximum number of optimization steps", &
444 variants=(/
"NDIIS"/), &
445 description=
"Number of history vectors to be used with DIIS", &
452 description=
"Initial stepsize used for the line search, sometimes this parameter "// &
453 "can be reduced to stabilize DIIS", &
454 usage=
"STEPSIZE <REAL>", &
455 default_r_val=1.0_dp)
460 description=
"Maximum stepsize used for the line search, sometimes this parameter "// &
461 "can be reduced to stabilize the LS for particularly difficult initial geometries", &
462 usage=
"MAX_STEPSIZE <REAL>", &
463 default_r_val=2.0_dp)
468 description=
"Number of points used in the line search SD.", &
469 usage=
"NP_LS <INTEGER>", &
475 description=
"Does not perform LS during SD. Useful in combination with a proper STEPSIZE"// &
476 " for particularly out of equilibrium starting geometries.", &
477 default_l_val=.false., lone_keyword_l_val=.true.)
482 description=
"Performs a series of checks on the DIIS solution in order to accept the DIIS step."// &
483 " If set to .FALSE. the only check performed is that the angle between the DIIS solution and the"// &
484 " reference vector is less than Pi/2. Can be useful if many DIIS steps are rejected.", &
485 default_l_val=.true., lone_keyword_l_val=.true.)
490 description=
"Controls the printing of DIIS info during a BAND run", &
497 END SUBROUTINE create_opt_band_section
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public elber1987
integer, save, public jonsson2000_1
integer, save, public jonsson1998
integer, save, public jonsson2000_2
integer, save, public wales2004
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer, parameter, public low_print_level
integer, parameter, public medium_print_level
integer, parameter, public high_print_level
integer, parameter, public add_last_numeric
subroutine, public cp_print_key_section_create(print_key_section, location, name, description, print_level, each_iter_names, each_iter_values, add_last, filename, common_iter_levels, citations, unit_str)
creates a print_key section
real(kind=dp) function, public cp_unit_to_cp2k(value, unit_str, defaults, power)
converts to the internal cp2k units to the given unit
Defines the basic variable types.
integer, parameter, public dp
Utilities for string manipulations.