30 #include "./base/base_uses.f90"
35 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_optimize_input'
46 TYPE(section_type),
POINTER :: section
48 TYPE(keyword_type),
POINTER :: keyword
49 TYPE(section_type),
POINTER :: sub_section, subsubsection
51 cpassert(.NOT.
ASSOCIATED(section))
52 CALL section_create(section, __location__, name=
"OPTIMIZE_INPUT", &
53 description=
"describes an input optimization job, in which parameters in input files get optimized.", &
58 description=
"What kind of input optimization to perform.", &
59 usage=
"METHOD FORCE_MATCHING", &
60 enum_c_vals=s2a(
"FORCE_MATCHING"), &
61 enum_desc=s2a(
"Perform a force matching minimization."), &
68 description=
"Final accuracy requested in optimization (RHOEND)", &
69 usage=
"ACCURACY 0.00001", &
70 default_r_val=1.e-5_dp)
75 description=
"Initial step size for search algorithm (RHOBEG)", &
76 usage=
"STEP_SIZE 0.005", &
77 default_r_val=0.05_dp)
82 description=
"Maximum number of function evaluations", &
83 usage=
"MAX_FUN 1000", &
88 CALL keyword_create(keyword, __location__, name=
"ITER_START_VAL", &
89 description=
"Used for restarting, starting value of the iteration", &
90 usage=
"ITER_START_VAL 0", &
95 CALL keyword_create(keyword, __location__, name=
"RANDOMIZE_VARIABLES", &
96 description=
"Percentage randomization of the free variables applied initially", &
97 usage=
"RANDOMIZE_VARIABLES 20", &
98 default_r_val=0.00_dp)
106 NULLIFY (sub_section)
108 description=
"Defines initial values for variables and their labels", &
109 n_subsections=0, repeats=.true.)
112 description=
"Initial value of the variable", &
114 type_of_var=
real_t, unit_str=
"internal_cp2k")
119 description=
"Is this variable fixed or should it be optimized.", &
121 default_l_val=.false., lone_keyword_l_val=.true.)
126 description=
"The label used in the input file, i.e. ${LABEL} will be replaced by the VALUE specified.", &
127 usage=
"LABEL PRM01", &
139 NULLIFY (sub_section)
140 CALL section_create(sub_section, __location__, name=
"FORCE_MATCHING", &
141 description=
"Specify the force matching input.", &
144 CALL keyword_create(keyword, __location__, name=
"OPTIMIZE_FILE_NAME", &
145 description=
"the filename of the input file which contains the parameters to be optimized", &
146 usage=
"OPTIMIZE_FILE_NAME my_input.inp", &
151 CALL keyword_create(keyword, __location__, name=
"REF_TRAJ_FILE_NAME", &
152 description=
"the filename of the reference coordinates.", &
153 usage=
"REF_TRAJ_FILE_NAME pos.xyz", &
158 CALL keyword_create(keyword, __location__, name=
"REF_FORCE_FILE_NAME", &
159 description=
"the filename of the reference forces, should also contain the energy", &
160 usage=
"REF_FORCE_FILE_NAME frc.xyz", &
165 CALL keyword_create(keyword, __location__, name=
"REF_CELL_FILE_NAME", &
166 description=
"the filename of the reference cell", &
167 usage=
"REF_CELL_FILE_NAME project.cell", &
173 description=
"Gives the preferred size of a working group, "// &
174 "groups will always be equal or larger than this size. "// &
175 "Usually this should take the number of cores per socket into account for good performance.", &
176 usage=
"group_size 2", default_i_val=6)
181 description=
"starting frame to be used from the reference trajectory", &
182 usage=
"FRAME_START 1", default_i_val=1)
187 description=
"final frame to be used from the reference trajectory (all=-1)", &
188 usage=
"FRAME_STOP -1", default_i_val=-1)
193 description=
"stride when using the reference trajectory", &
194 usage=
"FRAME_STRIDE 1", default_i_val=1)
199 description=
"Use at most FRAME_COUNT frames from the reference trajectory, "// &
200 "adjusting the stride to have them as fas apart as possible (all=-1).", &
201 usage=
"FRAME_COUNT 100", default_i_val=-1)
205 CALL keyword_create(keyword, __location__, name=
"ENERGY_WEIGHT", &
206 description=
"Relative weight of the energy RMSD vs the force RMSD", &
207 usage=
"ENERGY_WEIGHT 0.1", default_r_val=0.1_dp)
211 CALL keyword_create(keyword, __location__, name=
"SHIFT_AVERAGE", &
212 description=
"Shift averages of the energies before computing energy RMSD.", &
213 usage=
"SHIFT_AVERAGE", default_l_val=.false., lone_keyword_l_val=.true.)
218 description=
"Shift of the reference energies applied before computing energy RMSD.", &
219 usage=
"SHIFT_QM -17.0", default_r_val=0.0_dp)
224 description=
"Shift of the fit energies applied before computing energy RMSD.", &
225 usage=
"SHIFT_MM 0.0", default_r_val=0.0_dp)
229 NULLIFY (subsubsection)
231 description=
"A comparison of energies between fit and reference", &
232 print_level=
low_print_level, filename=
"compare_energies", common_iter_levels=1)
236 NULLIFY (subsubsection)
238 description=
"A comparison of forces between fit and reference", &
239 print_level=
low_print_level, filename=
"compare_forces", common_iter_levels=1)
246 NULLIFY (subsubsection)
248 description=
"writes a history of the function value and parameters", &
254 description=
"writes an input file that can be used to restart ", &
255 print_level=
low_print_level, filename=
"optimize", common_iter_levels=1)
256 CALL keyword_create(keyword, __location__, name=
"BACKUP_COPIES", &
257 description=
"Specifies the maximum number of backup copies.", &
258 usage=
"BACKUP_COPIES {int}", &
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
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
Defines the basic variable types.
integer, parameter, public dp
Utilities for string manipulations.