51#include "./base/base_uses.f90"
56 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .true.
57 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_force_eval'
74 cpassert(.NOT.
ASSOCIATED(section))
76 description=
"parameters needed to calculate energy and forces and"// &
77 " describe the system you want to analyze.", &
78 n_keywords=1, n_subsections=10, repeats=.true.)
83 description=
"Selects the method used by this FORCE_EVAL section to compute energies, "// &
84 "forces, and related properties.", &
85 usage=
"METHOD <STRING>", &
86 enum_c_vals=
s2a(
"QS", &
96 enum_desc=
s2a(
"Alias for QUICKSTEP", &
97 "PW DFT using the SIRIUS library", &
98 "Molecular Mechanics", &
99 "Hybrid quantum classical", &
100 "Empirical Interatomic Potential", &
101 "Electronic structure methods in the Quickstep module, including GPW and GAPW DFT.", &
102 "Neural Network Potentials", &
103 "Use a combination of two of the above", &
104 "Perform an embedded calculation", &
105 "Receive forces from an i-PI client"), &
106 enum_i_vals=[
do_qs,
do_sirius,
do_fist,
do_qmmm,
do_eip,
do_qs,
do_nnp,
do_mixed,
do_embed,
do_ipi], &
111 CALL keyword_create(keyword, __location__, name=
"STRESS_TENSOR", &
112 description=
"Controls the calculation of the stress tensor. The combinations defined below"// &
113 " are not implemented for all methods.", &
114 usage=
"stress_tensor (NONE|ANALYTICAL|NUMERICAL|DIAGONAL_ANA|DIAGONAL_NUM)", &
116 enum_c_vals=
s2a(
"NONE",
"ANALYTICAL",
"NUMERICAL",
"DIAGONAL_ANALYTICAL",
"DIAGONAL_NUMERICAL"), &
119 enum_desc=
s2a(
"Do not compute stress tensor", &
120 "Compute the stress tensor analytically (if available).", &
121 "Compute the stress tensor numerically.", &
122 "Compute the diagonal part only of the stress tensor analytically (if available).", &
123 "Compute the diagonal part only of the stress tensor numerically"))
128 CALL create_ext_pot_section(subsection)
132 CALL create_rescale_force_section(subsection)
180 CALL create_f_env_print_section(subsection)
192 SUBROUTINE create_ext_pot_section(section)
197 cpassert(.NOT.
ASSOCIATED(section))
198 CALL section_create(section, __location__, name=
"EXTERNAL_POTENTIAL", &
199 description=
"Section controlling the presence of an external potential dependent "// &
200 "on the atomic positions (X,Y,Z)", &
201 n_keywords=7, n_subsections=0, repeats=.true.)
205 description=
"Specifies the atoms on which the external potential will act", &
206 usage=
"ATOMS_LIST {INT} {INT} ..", repeats=.true., &
212 description=
"Specifies the functional form in mathematical notation. Variables must be the atomic "// &
213 "coordinates (X,Y,Z).", usage=
"FUNCTION X^2+Y^2+Z^2+LOG(ABS(X+Y))", &
219 description=
"Defines the parameters of the functional form", &
220 usage=
"PARAMETERS a b D", type_of_var=
char_t, &
221 n_var=-1, repeats=.true.)
226 description=
"Defines the values of parameter of the functional form", &
227 usage=
"VALUES ", type_of_var=
real_t, &
228 n_var=-1, repeats=.true., unit_str=
"internal_cp2k")
233 description=
"Optionally, allows to define valid CP2K unit strings for each parameter value. "// &
234 "It is assumed that the corresponding parameter value is specified in this unit.", &
235 usage=
"UNITS angstrom eV*angstrom^-1 angstrom^1 K", type_of_var=
char_t, &
236 n_var=-1, repeats=.true.)
241 description=
"Parameter used for computing the derivative with the Ridders' method.", &
242 usage=
"DX <REAL>", default_r_val=0.1_dp, unit_str=
"bohr")
247 description=
"Checks that the error in computing the derivative is not larger than "// &
248 "the value set; in case error is larger a warning message is printed.", &
249 usage=
"ERROR_LIMIT <REAL>", default_r_val=1.0e-12_dp)
253 END SUBROUTINE create_ext_pot_section
260 SUBROUTINE create_rescale_force_section(section)
265 cpassert(.NOT.
ASSOCIATED(section))
266 CALL section_create(section, __location__, name=
"RESCALE_FORCES", &
267 description=
"Section controlling the rescaling of forces. Useful when"// &
268 " starting from quite bad geometries with unphysically large forces.", &
269 n_keywords=1, n_subsections=0, repeats=.false.)
273 description=
"Specify the Maximum Values of the force. If the force"// &
274 " of one atom exceed this value it's rescaled to the MAX_FORCE"// &
277 unit_str=
"kcalmol*angstrom^-1"), &
278 unit_str=
"hartree*bohr^-1")
282 END SUBROUTINE create_rescale_force_section
289 SUBROUTINE create_f_env_print_section(section)
298 cpassert(.NOT.
ASSOCIATED(section))
302 description=
"Properties that you want to output and that are common to all methods", &
303 n_keywords=0, n_subsections=10, repeats=.false.)
306 name=
"PROGRAM_RUN_INFO", &
307 description=
"Controls the printing of basic information generated by FORCE_EVAL", &
310 name=
"ENERGY_UNIT", &
311 description=
"Specifies the physical unit used for the printing of the total energy. "// &
312 "Note that the meaningfulness of the unit is not checked.", &
313 usage=
"ENERGY_UNIT eV", &
314 default_c_val=
"hartree", &
323 description=
"Controls the printing of the forces after each force evaluation", &
327 description=
"Specifies the number of digits used "// &
328 "for the printing of the forces", &
337 description=
"Specifies the physical unit used for the printing of the forces. "// &
338 "Note that the meaningfulness of the unit is not checked.", &
339 usage=
"FORCE_UNIT eV/angstrom", &
340 default_c_val=
"hartree/bohr", &
348 name=
"GRID_INFORMATION", &
349 description=
"Controls the printing of information regarding the PW and RS grid structures.", &
355 name=
"TOTAL_NUMBERS", &
356 description=
"Controls the printing of the total number of atoms, kinds, ...", &
362 name=
"DISTRIBUTION", &
363 description=
"Controls the printing of the distribution of molecules, atoms, ...", &
369 name=
"DISTRIBUTION2D", &
370 description=
"Controls the printing of the distribution of matrix blocks, ...", &
376 name=
"DISTRIBUTION1D", &
377 description=
"Each node prints out its distribution info ...", &
383 name=
"STRESS_TENSOR", &
384 description=
"Controls the printing of the stress tensor", &
388 description=
"Print all GPW/GAPW components contributing to the stress tensor", &
389 usage=
"COMPONENTS", &
390 default_l_val=.false., &
391 lone_keyword_l_val=.true.)
395 name=
"STRESS_UNIT", &
396 description=
"Specifies the physical unit used for the printing of the stress tensor. "// &
397 "Note that the meaningfulness of the unit is not checked.", &
398 usage=
"STRESS_UNIT kbar", &
399 default_c_val=
"bar", &
408 description=
"Controls the printing of the GRRM interface file", &
415 description=
"Controls the printing of the SCINE interface file", &
420 END SUBROUTINE create_f_env_print_section
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer, parameter, public debug_print_level
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.