35#include "./base/base_uses.f90"
40 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .false.
41 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_nnp'
59 cpassert(.NOT.
ASSOCIATED(section))
61 description=
"This section contains all information to run a "// &
62 "Neural Network Potential (NNP) calculation.", &
63 n_keywords=5, n_subsections=3, repeats=.false., &
66 NULLIFY (subsection, subsubsection, keyword)
68 CALL keyword_create(keyword, __location__, name=
"NNP_INPUT_FILE_NAME", &
69 description=
"File containing the input information for "// &
70 "the setup of the NNP (n2p2/RuNNer format).", &
71 repeats=.false., default_lc_val=
"input.nn")
74 CALL keyword_create(keyword, __location__, name=
"SCALE_FILE_NAME", &
75 description=
"File containing the scaling information for "// &
76 "the symmetry functions of the NNP.", &
77 repeats=.false., default_lc_val=
"scaling.data")
82 description=
"Number of knots per radial group in "// &
83 "the cubic-Hermite spline tables that tabulate "// &
84 "the radial symmetry-function product "// &
85 "y(r) = exp(-eta*(r-rs)^2) * fcut(r). "// &
86 "The value error scales as O(1/n^4) and the "// &
87 "force (derivative) error as O(1/n^3); the "// &
88 "default keeps both inside the NNP regression "// &
89 "tolerance for a radial cutoff of ~12 bohr "// &
90 "(value ~1e-14, force ~1e-10). Larger cutoffs or "// &
91 "stricter tolerances may need a larger n, with "// &
92 "the force term the binding constraint. Memory "// &
93 "cost scales linearly in n per group.", &
98 usage=
"RAD_SPLINE_N 8192")
103 description=
"Verlet skin distance for the NNP descriptor "// &
104 "neighbour cell-list. The neighbour-list cutoff is "// &
105 "(symmetry-function cutoff + skin); the cell-list "// &
106 "chain is rebuilt only when an atom drifts more "// &
107 "than skin/2 from its rebuild-time position, "// &
108 "analogous to the LAMMPS 'neighbor <skin> bin' "// &
109 "command. Larger skin reduces the rebuild rate "// &
110 "but enlarges the per-atom neighbour list. "// &
111 "A negative value (default) selects the "// &
112 "automatic heuristic MIN(0.5 bohr, 0.1*cutoff). "// &
113 "Useful upper bound is half the smallest "// &
114 "perpendicular cell width.", &
118 default_r_val=-1.0_dp, &
120 usage=
"VERLET_SKIN [bohr] 0.5")
126 description=
"Section to bias the committee disagreement (sigma) by "// &
127 "E = 0.5 * K_B * (sigma - SIGMA_0)**2, if sigma > SIGMA_0.", &
128 n_keywords=2, n_subsections=0, repeats=.false., &
131 description=
"Harmonic spring constant of the bias potential [1/hartree].", &
136 unit_str=
"hartree^-1", &
137 usage=
"K_B [hartree^-1] 0.1")
141 description=
"Shift of the harmonic bias potential.", &
146 unit_str=
"hartree", &
147 usage=
"SIGMA_0 [hartree] 0.1")
150 CALL keyword_create(keyword, __location__, name=
"ALIGN_NNP_ENERGIES", &
151 description=
"Remove PES shifts within the committee by "// &
152 "subtracting energy for each committee member. Provide "// &
153 "one number per C-NNP member.", &
157 usage=
"ALIGN_NNP_ENERGIES <REAL> <REAL> ... <REAL>")
161 CALL create_nnp_bias_print_section(subsubsection)
170 description=
"Section for a single NNP model. "// &
171 "If this section is repeated, a committee model (C-NNP) "// &
172 "is used where the NNP members share the same symmetry functions.", &
173 n_keywords=1, n_subsections=0, repeats=.true.)
175 description=
"File containing the weights for the "// &
176 "artificial neural networks of the NNP. "// &
177 "The specified name is extended by .XXX.data", &
178 repeats=.false., default_lc_val=
"weights")
184 CALL create_nnp_print_section(subsection)
196 SUBROUTINE create_nnp_print_section(section)
202 cpassert(.NOT.
ASSOCIATED(section))
204 description=
"Section of possible print options in NNP code.", &
205 n_keywords=0, n_subsections=5, repeats=.false.)
207 NULLIFY (print_key, keyword)
210 description=
"Controls the printing of the NNP energies.", &
216 description=
"Controls the printing of the NNP forces.", &
222 description=
"Controls the printing of the STD per atom of the NNP forces.", &
228 description=
"If activated, output structures with extrapolation "// &
229 "warning in xyz-format", &
235 description=
"If activated, output summed force over specified atoms. "// &
236 "Used in Green-Kubo relation for friction at liquid-solid interfaces.", &
240 description=
"List of atoms over which to calculate summed force", &
241 usage=
"ATOM_LISTS {O} {H} .. {X}", repeats=.false., &
242 n_var=-1, type_of_var=
char_t)
249 END SUBROUTINE create_nnp_print_section
257 SUBROUTINE create_nnp_bias_print_section(section)
262 cpassert(.NOT.
ASSOCIATED(section))
264 description=
"Section of possible print options in NNP code.", &
265 n_keywords=0, n_subsections=3, repeats=.false.)
270 description=
"Controls the printing of the BIAS energy.", &
276 description=
"Controls the printing of the BIAS forces.", &
281 END SUBROUTINE create_nnp_bias_print_section
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public schran2020b
integer, save, public schran2020a
integer, save, public behler2011
integer, save, public behler2007
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer, parameter, public medium_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
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