49#include "./base/base_uses.f90"
54 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .true.
55 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_force_eval'
72 cpassert(.NOT.
ASSOCIATED(section))
74 description=
"parameters needed to calculate energy and forces and"// &
75 " describe the system you want to analyze.", &
76 n_keywords=1, n_subsections=10, repeats=.true.)
81 description=
"Selects the method used by this FORCE_EVAL section to compute energies, "// &
82 "forces, and related properties.", &
83 usage=
"METHOD <STRING>", &
84 enum_c_vals=
s2a(
"QS", &
94 enum_desc=
s2a(
"Alias for QUICKSTEP", &
95 "PW DFT using the SIRIUS library", &
96 "Molecular Mechanics", &
97 "Hybrid quantum classical", &
98 "Empirical Interatomic Potential", &
99 "Electronic structure methods in the Quickstep module, including GPW and GAPW DFT.", &
100 "Neural Network Potentials", &
101 "Use a combination of two of the above", &
102 "Perform an embedded calculation", &
103 "Receive forces from an i-PI client"), &
104 enum_i_vals=[
do_qs,
do_sirius,
do_fist,
do_qmmm,
do_eip,
do_qs,
do_nnp,
do_mixed,
do_embed,
do_ipi], &
109 CALL keyword_create(keyword, __location__, name=
"STRESS_TENSOR", &
110 description=
"Controls the calculation of the stress tensor. The combinations defined below"// &
111 " are not implemented for all methods.", &
112 usage=
"stress_tensor (NONE|ANALYTICAL|NUMERICAL|DIAGONAL_ANA|DIAGONAL_NUM)", &
114 enum_c_vals=
s2a(
"NONE",
"ANALYTICAL",
"NUMERICAL",
"DIAGONAL_ANALYTICAL",
"DIAGONAL_NUMERICAL"), &
117 enum_desc=
s2a(
"Do not compute stress tensor", &
118 "Compute the stress tensor analytically (if available).", &
119 "Compute the stress tensor numerically.", &
120 "Compute the diagonal part only of the stress tensor analytically (if available).", &
121 "Compute the diagonal part only of the stress tensor numerically"))
132 description=
"Section controlling the presence of an external "// &
133 "potential dependent on the atomic positions (X,Y,Z). Not to "// &
134 "be confused with the Quickstep DFT-specific settings under "// &
135 "FORCE_EVAL/DFT/EXTERNAL_POTENTIAL.", &
136 repeats=.true., do_deriv=.true., input_variables=[
"X",
"Y",
"Z"])
138 description=
"Specifies the atoms on which the external potential will act", &
139 usage=
"ATOMS_LIST {INT} {INT} ..", repeats=.true., &
146 CALL create_rescale_force_section(subsection)
194 CALL create_f_env_print_section(subsection)
205 SUBROUTINE create_rescale_force_section(section)
210 cpassert(.NOT.
ASSOCIATED(section))
211 CALL section_create(section, __location__, name=
"RESCALE_FORCES", &
212 description=
"Section controlling the rescaling of forces. Useful when"// &
213 " starting from quite bad geometries with unphysically large forces.", &
214 n_keywords=1, n_subsections=0, repeats=.false.)
218 description=
"Specify the Maximum Values of the force. If the force"// &
219 " of one atom exceed this value it's rescaled to the MAX_FORCE"// &
222 unit_str=
"kcalmol*angstrom^-1"), &
223 unit_str=
"hartree*bohr^-1")
227 END SUBROUTINE create_rescale_force_section
234 SUBROUTINE create_f_env_print_section(section)
243 cpassert(.NOT.
ASSOCIATED(section))
247 description=
"Properties that you want to output and that are common to all methods", &
248 n_keywords=0, n_subsections=10, repeats=.false.)
251 name=
"PROGRAM_RUN_INFO", &
252 description=
"Controls the printing of basic information generated by FORCE_EVAL", &
255 name=
"ENERGY_UNIT", &
256 description=
"Specifies the physical unit used for the printing of the total energy. "// &
257 "Note that the meaningfulness of the unit is not checked.", &
258 usage=
"ENERGY_UNIT eV", &
259 default_c_val=
"hartree", &
268 description=
"Controls the printing of the forces after each force evaluation", &
272 description=
"Specifies the number of digits used "// &
273 "for the printing of the forces", &
282 description=
"Specifies the physical unit used for the printing of the forces. "// &
283 "Note that the meaningfulness of the unit is not checked.", &
284 usage=
"FORCE_UNIT eV/angstrom", &
285 default_c_val=
"hartree/bohr", &
293 name=
"GRID_INFORMATION", &
294 description=
"Controls the printing of information regarding the PW and RS grid structures.", &
300 name=
"TOTAL_NUMBERS", &
301 description=
"Controls the printing of the total number of atoms, kinds, ...", &
307 name=
"DISTRIBUTION", &
308 description=
"Controls the printing of the distribution of molecules, atoms, ...", &
314 name=
"DISTRIBUTION2D", &
315 description=
"Controls the printing of the distribution of matrix blocks, ...", &
321 name=
"DISTRIBUTION1D", &
322 description=
"Each node prints out its distribution info ...", &
328 name=
"STRESS_TENSOR", &
329 description=
"Controls the printing of the stress tensor", &
333 description=
"Print all GPW/GAPW components contributing to the stress tensor", &
334 usage=
"COMPONENTS", &
335 default_l_val=.false., &
336 lone_keyword_l_val=.true.)
340 name=
"STRESS_UNIT", &
341 description=
"Specifies the physical unit used for the printing of the stress tensor. "// &
342 "Note that the meaningfulness of the unit is not checked.", &
343 usage=
"STRESS_UNIT kbar", &
344 default_c_val=
"bar", &
353 description=
"Controls the printing of the GRRM interface file", &
360 description=
"Controls the printing of the SCINE interface file", &
365 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...
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, do_backup)
creates a print_key section
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
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.