Line data Source code
1 : !--------------------------------------------------------------------------------------------------!
2 : ! CP2K: A general program to perform molecular dynamics simulations !
3 : ! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
4 : ! !
5 : ! SPDX-License-Identifier: GPL-2.0-or-later !
6 : !--------------------------------------------------------------------------------------------------!
7 :
8 : ! **************************************************************************************************
9 : !> \brief builds the subsystem section of the input
10 : !> \par History
11 : !> 10.2005 split input_cp2k [fawzi]
12 : !> \author teo & fawzi
13 : ! **************************************************************************************************
14 : MODULE input_cp2k_subsys
15 :
16 : USE bibliography, ONLY: Goedecker1996, &
17 : Guidon2010, &
18 : Hartwigsen1998, &
19 : Krack2005, &
20 : VandeVondele2005a, &
21 : VandeVondele2007
22 : USE cell_types, ONLY: &
23 : cell_sym_cubic, cell_sym_hexagonal_gamma_120, cell_sym_hexagonal_gamma_60, &
24 : cell_sym_monoclinic, cell_sym_monoclinic_gamma_ab, cell_sym_none, cell_sym_orthorhombic, &
25 : cell_sym_rhombohedral, cell_sym_tetragonal_ab, cell_sym_tetragonal_ac, &
26 : cell_sym_tetragonal_bc, cell_sym_triclinic, use_perd_none, use_perd_x, use_perd_xy, &
27 : use_perd_xyz, use_perd_xz, use_perd_y, use_perd_yz, use_perd_z
28 : USE cp_output_handling, ONLY: cp_print_key_section_create, debug_print_level, &
29 : high_print_level, medium_print_level
30 : USE cp_units, ONLY: cp_unit_to_cp2k
31 : USE input_constants, ONLY: canonicalize_cell_auto, canonicalize_cell_false, &
32 : canonicalize_cell_true, do_add, do_bondparm_covalent, do_bondparm_vdw, &
33 : do_cell_cif, do_cell_cp2k, do_cell_xsc, &
34 : do_cell_extxyz, do_cell_pdb, &
35 : do_conn_amb7, do_conn_g87, do_conn_g96, &
36 : do_conn_generate, do_conn_mol_set, do_conn_off, &
37 : do_conn_psf, do_conn_psf_u, do_conn_user, &
38 : do_coord_cif, do_coord_cp2k, do_coord_crd, &
39 : do_coord_g96, do_coord_off, do_coord_pdb, &
40 : do_coord_xtl, do_coord_xyz, do_remove, &
41 : do_skip_11, do_skip_12, do_skip_13, do_skip_14, &
42 : dump_pdb, gaussian
43 : USE input_cp2k_colvar, ONLY: create_colvar_section
44 : USE input_cp2k_mm, ONLY: create_neighbor_lists_section
45 : USE input_keyword_types, ONLY: keyword_create, keyword_release, keyword_type
46 : USE input_section_types, ONLY: section_add_keyword, section_add_subsection, &
47 : section_create, section_release, section_type
48 : USE input_val_types, ONLY: char_t, integer_t, lchar_t, real_t
49 : USE kinds, ONLY: dp
50 : USE physcon, ONLY: bohr
51 : USE string_utilities, ONLY: newline, s2a
52 : #include "./base/base_uses.f90"
53 :
54 : IMPLICIT NONE
55 : PRIVATE
56 :
57 : LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .TRUE.
58 : CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_subsys'
59 :
60 : PUBLIC :: create_subsys_section, &
61 : create_cell_section, &
62 : create_structure_data_section, &
63 : create_rng_section, &
64 : create_basis_section
65 :
66 : CONTAINS
67 :
68 : ! **************************************************************************************************
69 : !> \brief creates the cell section
70 : !> \param section ...
71 : !> \param periodic ...
72 : !> \author Ole Schuett
73 : ! **************************************************************************************************
74 23825 : SUBROUTINE create_cell_section(section, periodic)
75 : TYPE(section_type), POINTER :: section
76 : INTEGER, INTENT(IN), OPTIONAL :: periodic
77 :
78 : TYPE(section_type), POINTER :: subsection
79 :
80 23825 : CPASSERT(.NOT. ASSOCIATED(section))
81 : CALL section_create(section, __LOCATION__, "CELL", &
82 : description="Input parameters needed to set up the simulation cell. "// &
83 : "Simple products and fractions combined with functions of a single "// &
84 : "number can be used like 2/3, 0.3*COS(60) or -SQRT(3)/2. The functions "// &
85 : "COS, EXP, LOG, LOG10, SIN, SQRT, and TAN are available."//newline//newline// &
86 : "Cell settings are parsed in the following precedence order:"//newline// &
87 : "1. The external file set by CELL_FILE_NAME with a CELL_FILE_FORMAT;"//newline// &
88 : "2. The lengths and angles of cell vectors set by ABC and ALPHA_BETA_GAMMA;"//newline// &
89 : "3. The vectors set by A, B, C together;"//newline// &
90 : "4. If none above exist, the external file set by TOPOLOGY/COORD_FILE_NAME with "// &
91 : "suitable TOPOLOGY/COORD_FILE_FORMAT may also be parsed for FORCE_EVAL/SUBSYS/CELL "// &
92 23825 : "but not for FORCE_EVAL/QMMM/CELL.")
93 23825 : CALL create_cell_section_low(section, periodic)
94 :
95 23825 : NULLIFY (subsection)
96 : CALL section_create(subsection, __LOCATION__, "CELL_REF", &
97 : description="Input parameters needed to set up the reference cell for "// &
98 : "FORCE_EVAL/SUBSYS/CELL. This option can be used to keep the FFT grid "// &
99 : "fixed while running a cell optimization or NpT molecular dynamics. "// &
100 23825 : "Check the &CELL section for further details.")
101 23825 : CALL create_cell_section_low(subsection, periodic)
102 23825 : CALL section_add_subsection(section, subsection)
103 23825 : CALL section_release(subsection)
104 :
105 23825 : END SUBROUTINE create_cell_section
106 :
107 : ! **************************************************************************************************
108 : !> \brief populates cell section with keywords
109 : !> \param section ...
110 : !> \param periodic ...
111 : !> \author teo
112 : ! **************************************************************************************************
113 47650 : SUBROUTINE create_cell_section_low(section, periodic)
114 : TYPE(section_type), POINTER :: section
115 : INTEGER, INTENT(IN), OPTIONAL :: periodic
116 :
117 : INTEGER :: my_periodic
118 : TYPE(keyword_type), POINTER :: keyword
119 :
120 47650 : my_periodic = use_perd_xyz
121 47650 : IF (PRESENT(periodic)) my_periodic = periodic
122 :
123 47650 : NULLIFY (keyword)
124 : CALL keyword_create(keyword, __LOCATION__, name="A", &
125 : description="Specify the Cartesian components for the cell vector A. "// &
126 : "This defines the first column of the h matrix. "// &
127 : "Ignored if the keywords ABC or CELL_FILE_NAME are used.", &
128 : usage="A 10.000 0.000 0.000", unit_str="angstrom", &
129 47650 : n_var=3, type_of_var=real_t, repeats=.FALSE.)
130 47650 : CALL section_add_keyword(section, keyword)
131 47650 : CALL keyword_release(keyword)
132 :
133 : CALL keyword_create(keyword, __LOCATION__, name="B", &
134 : description="Specify the Cartesian components for the cell vector B. "// &
135 : "This defines the second column of the h matrix. "// &
136 : "Ignored if the keywords ABC or CELL_FILE_NAME are used.", &
137 : usage="B 0.000 10.000 0.000", unit_str="angstrom", &
138 47650 : n_var=3, type_of_var=real_t, repeats=.FALSE.)
139 47650 : CALL section_add_keyword(section, keyword)
140 47650 : CALL keyword_release(keyword)
141 :
142 : CALL keyword_create(keyword, __LOCATION__, name="C", &
143 : description="Specify the Cartesian components for the cell vector C. "// &
144 : "This defines the third column of the h matrix. "// &
145 : "Ignored if the keywords ABC or CELL_FILE_NAME are used.", &
146 : usage="C 0.000 0.000 10.000", unit_str="angstrom", &
147 47650 : n_var=3, type_of_var=real_t, repeats=.FALSE.)
148 47650 : CALL section_add_keyword(section, keyword)
149 47650 : CALL keyword_release(keyword)
150 :
151 : CALL keyword_create(keyword, __LOCATION__, name="ABC", &
152 : description="Specify the lengths of the cell vectors A, B, and C, which"// &
153 : " defines the diagonal elements of h matrix for an orthorhombic cell."// &
154 : " For non-orthorhombic cells it is possible either to specify the angles "// &
155 : "ALPHA, BETA, GAMMA via ALPHA_BETA_GAMMA keyword or alternatively use the keywords "// &
156 : "A, B, and C. The convention is that A lies along the X-axis, B is in the XY plane. "// &
157 : "Ignored if CELL_FILE_NAME is used.", &
158 : usage="ABC 10.000 10.000 10.000", unit_str="angstrom", &
159 47650 : n_var=3, type_of_var=real_t, repeats=.FALSE.)
160 47650 : CALL section_add_keyword(section, keyword)
161 47650 : CALL keyword_release(keyword)
162 :
163 : CALL keyword_create(keyword, __LOCATION__, name="ALPHA_BETA_GAMMA", &
164 : variants=["ANGLES"], &
165 : description="Specify the angles between the vectors A, B and C when using the ABC keyword. "// &
166 : "The convention is that A lies along the X-axis, B is in the XY plane. "// &
167 : "ALPHA is the angle between B and C, BETA is the angle between A and C and "// &
168 : "GAMMA is the angle between A and B.", &
169 : usage="ALPHA_BETA_GAMMA [deg] 90.0 90.0 120.0", unit_str="deg", &
170 : n_var=3, default_r_vals=[cp_unit_to_cp2k(value=90.0_dp, unit_str="deg"), &
171 : cp_unit_to_cp2k(value=90.0_dp, unit_str="deg"), &
172 : cp_unit_to_cp2k(value=90.0_dp, unit_str="deg")], &
173 238250 : repeats=.FALSE.)
174 47650 : CALL section_add_keyword(section, keyword)
175 47650 : CALL keyword_release(keyword)
176 :
177 : CALL keyword_create(keyword, __LOCATION__, name="CELL_FILE_NAME", &
178 : description="The external file from which cell is parsed ", &
179 : repeats=.FALSE., usage="CELL_FILE_NAME <CHARACTER>", &
180 47650 : type_of_var=lchar_t)
181 47650 : CALL section_add_keyword(section, keyword)
182 47650 : CALL keyword_release(keyword)
183 :
184 : CALL keyword_create(keyword, __LOCATION__, name="CELL_FILE_FORMAT", &
185 : description="Format of the external file from which "// &
186 : "cell is parsed. If the format specifies a cell by "// &
187 : "lengths and angles of three vectors, then a cell "// &
188 : "matrix is constructed with the convention that A "// &
189 : "lies along the X-axis, B is in the XY plane. ALPHA "// &
190 : "is the angle between B and C, BETA is the angle "// &
191 : "between A and C, and GAMMA is the angle between A and B.", &
192 : usage="CELL_FILE_FORMAT (CP2K|CIF|XSC|EXTXYZ|XYZ|PDB)", &
193 : enum_c_vals=s2a("CP2K", "CIF", "XSC", "EXTXYZ", "XYZ", "PDB"), &
194 : enum_i_vals=[do_cell_cp2k, do_cell_cif, do_cell_xsc, do_cell_extxyz, do_cell_extxyz, do_cell_pdb], &
195 : enum_desc=s2a("Cell info in the CP2K native format", &
196 : "Cell info from CIF file (from fields `_cell_length_a` or `_cell.length_a`, etc)", &
197 : "Cell info in the XSC format (NAMD)", &
198 : "Cell info as `lattice=...` field in the comment line of Extended XYZ format", &
199 : "Alias for Extended XYZ", &
200 : "Cell info in the `CRYST1` record of PDB format"), &
201 47650 : default_i_val=do_cell_cp2k)
202 47650 : CALL section_add_keyword(section, keyword)
203 47650 : CALL keyword_release(keyword)
204 :
205 : CALL keyword_create(keyword, __LOCATION__, name="CANONICALIZE", &
206 : description="Policy for transforming a general input cell to CP2K's internal "// &
207 : "convention that A lies along the X-axis and B is in the XY plane. AUTO is "// &
208 : "conservative and keeps the input orientation when a silent transformation "// &
209 : "could affect Cartesian or direction-dependent input. TRUE explicitly requests "// &
210 : "canonicalization and transforms supported cell-dependent input. FALSE always "// &
211 : "keeps the input orientation.", &
212 : usage="CANONICALIZE AUTO", &
213 : enum_c_vals=s2a("AUTO", "TRUE", "FALSE", "T", "F", ".TRUE.", ".FALSE."), &
214 : enum_i_vals=[canonicalize_cell_auto, canonicalize_cell_true, &
215 : canonicalize_cell_false, canonicalize_cell_true, canonicalize_cell_false, &
216 : canonicalize_cell_true, canonicalize_cell_false], &
217 : enum_desc=s2a("Keep the input orientation unless canonicalization is unambiguously safe", &
218 : "Explicitly canonicalize the input cell", &
219 : "Keep the input cell orientation", &
220 : "Alias for TRUE", &
221 : "Alias for FALSE", &
222 : "Alias for TRUE", &
223 : "Alias for FALSE"), &
224 47650 : default_i_val=canonicalize_cell_auto, lone_keyword_i_val=canonicalize_cell_true)
225 47650 : CALL section_add_keyword(section, keyword)
226 47650 : CALL keyword_release(keyword)
227 :
228 : CALL keyword_create(keyword, __LOCATION__, name="PERIODIC", &
229 : description="Specify the directions for which periodic boundary conditions (PBC) will be applied. "// &
230 : "Important notice: This applies to the generation of the pair lists as well as to the "// &
231 : "application of the PBCs to positions. "// &
232 : "See the POISSON section to specify the periodicity used for the electrostatics. "// &
233 : "Typically the settings should be the same.", &
234 : usage="PERIODIC (x|y|z|xy|xz|yz|xyz|none)", &
235 : enum_c_vals=s2a("x", "y", "z", "xy", "xz", "yz", "xyz", "none"), &
236 : enum_i_vals=[use_perd_x, use_perd_y, use_perd_z, &
237 : use_perd_xy, use_perd_xz, use_perd_yz, &
238 : use_perd_xyz, use_perd_none], &
239 47650 : default_i_val=my_periodic)
240 47650 : CALL section_add_keyword(section, keyword)
241 47650 : CALL keyword_release(keyword)
242 :
243 : CALL keyword_create(keyword, __LOCATION__, name="MULTIPLE_UNIT_CELL", &
244 : description="Specifies the numbers of repetition in space (X, Y, Z) of the defined cell, "// &
245 : "assuming it as a unit cell. This keyword affects only the CELL specification. The same keyword "// &
246 : "in SUBSYS%TOPOLOGY%MULTIPLE_UNIT_CELL should be modified in order to affect the coordinates "// &
247 : "specification.", usage="MULTIPLE_UNIT_CELL 1 1 1", &
248 47650 : n_var=3, default_i_vals=[1, 1, 1], repeats=.FALSE.)
249 47650 : CALL section_add_keyword(section, keyword)
250 47650 : CALL keyword_release(keyword)
251 :
252 : CALL keyword_create( &
253 : keyword, __LOCATION__, name="SYMMETRY", &
254 : description="Imposes an initial cell symmetry, according to the convention "// &
255 : "that A lies along the X-axis, B is in the XY plane. After the "// &
256 : "input cell information is parsed, the symmetry is enforced by "// &
257 : "reconstructing the cell matrix from lengths and angles of the "// &
258 : "cell vectors, taking averages if necessary. This process does "// &
259 : "not affect input atomic coordinates; in case a space group is "// &
260 : "to be detected and preserved for an optimization task, atomic "// &
261 : "coordinates should correspond to cell vectors already obeying "// &
262 : "the convention mentioned above.", &
263 : usage="SYMMETRY monoclinic", &
264 : enum_desc=s2a("No cell symmetry", &
265 : "Triclinic (a ≠ b ≠ c ≠ a, α ≠ β ≠ γ ≠ α ≠ 90°)", &
266 : "Monoclinic (a ≠ b ≠ c, α = γ = 90°, β ≠ 90°)", &
267 : "Monoclinic (a = b ≠ c, α = β = 90°, γ ≠ 90°)", &
268 : "Orthorhombic (a ≠ b ≠ c, α = β = γ = 90°)", &
269 : "Tetragonal (a = b ≠ c, α = β = γ = 90°)", &
270 : "Tetragonal (a = c ≠ b, α = β = γ = 90°)", &
271 : "Tetragonal (a ≠ b = c, α = β = γ = 90°)", &
272 : "Tetragonal (alias for TETRAGONAL_AB)", &
273 : "Rhombohedral (a = b = c, α = β = γ ≠ 90°)", &
274 : "Hexagonal (alias for HEXAGONAL_GAMMA_60)", &
275 : "Hexagonal (a = b ≠ c, α = β = 90°, γ = 60°)", &
276 : "Hexagonal (a = b ≠ c, α = β = 90°, γ = 120°)", &
277 : "Cubic (a = b = c, α = β = γ = 90°)"), &
278 : enum_c_vals=s2a("NONE", "TRICLINIC", "MONOCLINIC", "MONOCLINIC_GAMMA_AB", "ORTHORHOMBIC", &
279 : "TETRAGONAL_AB", "TETRAGONAL_AC", "TETRAGONAL_BC", "TETRAGONAL", "RHOMBOHEDRAL", &
280 : "HEXAGONAL", "HEXAGONAL_GAMMA_60", "HEXAGONAL_GAMMA_120", "CUBIC"), &
281 : enum_i_vals=[cell_sym_none, cell_sym_triclinic, cell_sym_monoclinic, cell_sym_monoclinic_gamma_ab, &
282 : cell_sym_orthorhombic, cell_sym_tetragonal_ab, cell_sym_tetragonal_ac, cell_sym_tetragonal_bc, &
283 : cell_sym_tetragonal_ab, cell_sym_rhombohedral, cell_sym_hexagonal_gamma_60, &
284 : cell_sym_hexagonal_gamma_60, cell_sym_hexagonal_gamma_120, cell_sym_cubic], &
285 47650 : default_i_val=cell_sym_none)
286 47650 : CALL section_add_keyword(section, keyword)
287 47650 : CALL keyword_release(keyword)
288 :
289 47650 : END SUBROUTINE create_cell_section_low
290 :
291 : ! **************************************************************************************************
292 : !> \brief Creates the random number restart section
293 : !> \param section the section to create
294 : !> \author teo
295 : ! **************************************************************************************************
296 234792 : SUBROUTINE create_rng_section(section)
297 : TYPE(section_type), POINTER :: section
298 :
299 : TYPE(keyword_type), POINTER :: keyword
300 :
301 234792 : CPASSERT(.NOT. ASSOCIATED(section))
302 : CALL section_create(section, __LOCATION__, name="RNG_INIT", &
303 : description="Information to initialize the parallel random number generator streams", &
304 234792 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
305 234792 : NULLIFY (keyword)
306 :
307 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
308 : description="Specify an initial RNG stream record", repeats=.TRUE., &
309 234792 : usage="{RNG record string}", type_of_var=lchar_t)
310 234792 : CALL section_add_keyword(section, keyword)
311 234792 : CALL keyword_release(keyword)
312 :
313 234792 : END SUBROUTINE create_rng_section
314 :
315 : ! **************************************************************************************************
316 : !> \brief creates the structure of a subsys, i.e. a full set of
317 : !> atoms+mol+bounds+cell
318 : !> \param section the section to create
319 : !> \author fawzi
320 : ! **************************************************************************************************
321 10272 : SUBROUTINE create_subsys_section(section)
322 : TYPE(section_type), POINTER :: section
323 :
324 : TYPE(keyword_type), POINTER :: keyword
325 : TYPE(section_type), POINTER :: subsection
326 :
327 10272 : CPASSERT(.NOT. ASSOCIATED(section))
328 : CALL section_create(section, __LOCATION__, name="subsys", &
329 : description="a subsystem: coordinates, topology, molecules and cell", &
330 10272 : n_keywords=1, n_subsections=9, repeats=.FALSE.)
331 :
332 10272 : NULLIFY (keyword)
333 : CALL keyword_create(keyword, __LOCATION__, name="SEED", &
334 : description="Initial seed for the (pseudo)random number generator for the "// &
335 : "Wiener process employed by the Langevin dynamics. Exactly 1 or 6 positive "// &
336 : "integer values are expected. A single value is replicated to fill up the "// &
337 : "full seed array with 6 numbers.", &
338 : n_var=-1, &
339 : type_of_var=integer_t, &
340 : usage="SEED {INTEGER} .. {INTEGER}", &
341 10272 : default_i_vals=[12345])
342 10272 : CALL section_add_keyword(section, keyword)
343 10272 : CALL keyword_release(keyword)
344 :
345 10272 : NULLIFY (subsection)
346 :
347 10272 : CALL create_rng_section(subsection)
348 10272 : CALL section_add_subsection(section, subsection)
349 10272 : CALL section_release(subsection)
350 :
351 10272 : CALL create_cell_section(subsection)
352 10272 : CALL section_add_subsection(section, subsection)
353 10272 : CALL section_release(subsection)
354 :
355 10272 : CALL create_coord_section(subsection)
356 10272 : CALL section_add_subsection(section, subsection)
357 10272 : CALL section_release(subsection)
358 :
359 10272 : CALL create_velocity_section(subsection)
360 10272 : CALL section_add_subsection(section, subsection)
361 10272 : CALL section_release(subsection)
362 :
363 10272 : CALL create_kind_section(subsection)
364 10272 : CALL section_add_subsection(section, subsection)
365 10272 : CALL section_release(subsection)
366 :
367 10272 : CALL create_topology_section(subsection)
368 10272 : CALL section_add_subsection(section, subsection)
369 10272 : CALL section_release(subsection)
370 :
371 10272 : CALL create_colvar_section(section=subsection)
372 10272 : CALL section_add_subsection(section, subsection)
373 10272 : CALL section_release(subsection)
374 :
375 10272 : CALL create_multipole_section(subsection)
376 10272 : CALL section_add_subsection(section, subsection)
377 10272 : CALL section_release(subsection)
378 :
379 10272 : CALL create_shell_coord_section(subsection)
380 10272 : CALL section_add_subsection(section, subsection)
381 10272 : CALL section_release(subsection)
382 :
383 10272 : CALL create_shell_vel_section(subsection)
384 10272 : CALL section_add_subsection(section, subsection)
385 10272 : CALL section_release(subsection)
386 10272 : CALL create_core_coord_section(subsection)
387 10272 : CALL section_add_subsection(section, subsection)
388 10272 : CALL section_release(subsection)
389 :
390 10272 : CALL create_core_vel_section(subsection)
391 10272 : CALL section_add_subsection(section, subsection)
392 10272 : CALL section_release(subsection)
393 :
394 10272 : CALL create_subsys_print_section(subsection)
395 10272 : CALL section_add_subsection(section, subsection)
396 10272 : CALL section_release(subsection)
397 :
398 10272 : END SUBROUTINE create_subsys_section
399 :
400 : ! **************************************************************************************************
401 : !> \brief Creates the subsys print section
402 : !> \param section the section to create
403 : !> \author teo
404 : ! **************************************************************************************************
405 10272 : SUBROUTINE create_subsys_print_section(section)
406 : TYPE(section_type), POINTER :: section
407 :
408 : TYPE(keyword_type), POINTER :: keyword
409 : TYPE(section_type), POINTER :: print_key
410 :
411 10272 : NULLIFY (print_key, keyword)
412 10272 : CPASSERT(.NOT. ASSOCIATED(section))
413 : CALL section_create(section, __LOCATION__, name="print", &
414 : description="Controls printings related to the subsys", &
415 10272 : n_keywords=0, n_subsections=9, repeats=.FALSE.)
416 :
417 : CALL cp_print_key_section_create(print_key, __LOCATION__, "atomic_coordinates", &
418 : description="controls the output of the atomic coordinates when setting up the"// &
419 : " force environment. For printing coordinates during MD or GEO refer to the keyword"// &
420 : " trajectory.", unit_str="angstrom", &
421 10272 : print_level=medium_print_level, filename="__STD_OUT__")
422 10272 : CALL section_add_subsection(section, print_key)
423 10272 : CALL section_release(print_key)
424 :
425 10272 : CALL create_structure_data_section(print_key)
426 10272 : CALL section_add_subsection(section, print_key)
427 10272 : CALL section_release(print_key)
428 :
429 : CALL cp_print_key_section_create(print_key, __LOCATION__, "INTERATOMIC_DISTANCES", &
430 : description="Controls the printout of the interatomic distances when setting up the "// &
431 : "force environment", unit_str="angstrom", &
432 10272 : print_level=debug_print_level, filename="__STD_OUT__")
433 : CALL keyword_create(keyword, __LOCATION__, name="CHECK_INTERATOMIC_DISTANCES", &
434 : description="Minimum allowed distance between two atoms. "// &
435 : "A warning is printed, if a smaller interatomic distance is encountered. "// &
436 : "The check is disabled for the threshold value 0 which is the default "// &
437 : "for systems with more than 2000 atoms (otherwise 0.5 A). "// &
438 : "The run is aborted, if an interatomic distance is smaller than the absolute "// &
439 : "value of a negative threshold value.", &
440 10272 : default_r_val=0.5_dp*bohr, unit_str="angstrom")
441 10272 : CALL section_add_keyword(print_key, keyword)
442 10272 : CALL keyword_release(keyword)
443 10272 : CALL section_add_subsection(section, print_key)
444 10272 : CALL section_release(print_key)
445 :
446 : CALL cp_print_key_section_create(print_key, __LOCATION__, "topology_info", description= &
447 : "controls the printing of information in the topology settings", &
448 10272 : print_level=high_print_level, filename="__STD_OUT__")
449 : CALL keyword_create(keyword, __LOCATION__, name="xtl_info", &
450 : description="Prints information when parsing XTL files.", &
451 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
452 10272 : CALL section_add_keyword(print_key, keyword)
453 10272 : CALL keyword_release(keyword)
454 : CALL keyword_create(keyword, __LOCATION__, name="cif_info", &
455 : description="Prints information when parsing CIF files.", &
456 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
457 10272 : CALL section_add_keyword(print_key, keyword)
458 10272 : CALL keyword_release(keyword)
459 : CALL keyword_create(keyword, __LOCATION__, name="pdb_info", &
460 : description="Prints information when parsing PDB files.", &
461 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
462 10272 : CALL section_add_keyword(print_key, keyword)
463 10272 : CALL keyword_release(keyword)
464 : CALL keyword_create(keyword, __LOCATION__, name="xyz_info", &
465 : description="Prints information when parsing XYZ files.", &
466 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
467 10272 : CALL section_add_keyword(print_key, keyword)
468 10272 : CALL keyword_release(keyword)
469 : CALL keyword_create(keyword, __LOCATION__, name="psf_info", &
470 : description="Prints information when parsing PSF files.", &
471 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
472 10272 : CALL section_add_keyword(print_key, keyword)
473 10272 : CALL keyword_release(keyword)
474 : CALL keyword_create(keyword, __LOCATION__, name="amber_info", &
475 : description="Prints information when parsing ABER topology files.", &
476 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
477 10272 : CALL section_add_keyword(print_key, keyword)
478 10272 : CALL keyword_release(keyword)
479 : CALL keyword_create(keyword, __LOCATION__, name="g96_info", &
480 : description="Prints information when parsing G96 files.", &
481 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
482 10272 : CALL section_add_keyword(print_key, keyword)
483 10272 : CALL keyword_release(keyword)
484 : CALL keyword_create(keyword, __LOCATION__, name="crd_info", &
485 : description="Prints information when parsing CRD files.", &
486 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
487 10272 : CALL section_add_keyword(print_key, keyword)
488 10272 : CALL keyword_release(keyword)
489 : CALL keyword_create(keyword, __LOCATION__, name="gtop_info", &
490 : description="Prints information when parsing GROMOS topology files.", &
491 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
492 10272 : CALL section_add_keyword(print_key, keyword)
493 10272 : CALL keyword_release(keyword)
494 : CALL keyword_create(keyword, __LOCATION__, name="util_info", &
495 : description="Prints information regarding topology utilities", &
496 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
497 10272 : CALL section_add_keyword(print_key, keyword)
498 10272 : CALL keyword_release(keyword)
499 : CALL keyword_create(keyword, __LOCATION__, name="generate_info", &
500 : description="Prints information regarding topology generation", &
501 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
502 10272 : CALL section_add_keyword(print_key, keyword)
503 10272 : CALL keyword_release(keyword)
504 10272 : CALL section_add_subsection(section, print_key)
505 10272 : CALL section_release(print_key)
506 :
507 : CALL cp_print_key_section_create(print_key, __LOCATION__, "cell", &
508 : description="controls the output of the cell parameters", &
509 : print_level=medium_print_level, filename="__STD_OUT__", &
510 10272 : unit_str="angstrom")
511 10272 : CALL section_add_subsection(section, print_key)
512 10272 : CALL section_release(print_key)
513 :
514 : CALL cp_print_key_section_create(print_key, __LOCATION__, "kinds", &
515 : description="controls the output of information on the kinds", &
516 10272 : print_level=medium_print_level, filename="__STD_OUT__")
517 : CALL keyword_create(keyword, __LOCATION__, name="potential", &
518 : description="If the printkey is activated controls the printing of the"// &
519 : " fist_potential, gth_potential, sgp_potential or all electron"// &
520 : " potential information", &
521 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
522 10272 : CALL section_add_keyword(print_key, keyword)
523 10272 : CALL keyword_release(keyword)
524 : CALL keyword_create(keyword, __LOCATION__, name="basis_set", &
525 : description="If the printkey is activated controls the printing of basis set information", &
526 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
527 10272 : CALL section_add_keyword(print_key, keyword)
528 10272 : CALL keyword_release(keyword)
529 : CALL keyword_create(keyword, __LOCATION__, name="se_parameters", &
530 : description="If the printkey is activated controls the printing of the semi-empirical parameters.", &
531 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
532 10272 : CALL section_add_keyword(print_key, keyword)
533 10272 : CALL keyword_release(keyword)
534 10272 : CALL section_add_subsection(section, print_key)
535 10272 : CALL section_release(print_key)
536 :
537 : CALL cp_print_key_section_create(print_key, __LOCATION__, "SYMMETRY", &
538 : description="controls the output of symmetry information", &
539 10272 : print_level=debug_print_level + 1, filename="__STD_OUT__")
540 : CALL keyword_create(keyword, __LOCATION__, name="MOLECULE", &
541 : description="Assume the system is an isolated molecule", &
542 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
543 10272 : CALL section_add_keyword(print_key, keyword)
544 10272 : CALL keyword_release(keyword)
545 : CALL keyword_create(keyword, __LOCATION__, name="EPS_GEO", &
546 : description="Accuracy required for symmetry detection", &
547 10272 : default_r_val=1.0E-4_dp)
548 10272 : CALL section_add_keyword(print_key, keyword)
549 10272 : CALL keyword_release(keyword)
550 : CALL keyword_create(keyword, __LOCATION__, name="STANDARD_ORIENTATION", &
551 : description="Print molecular coordinates in standard orientation", &
552 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
553 10272 : CALL section_add_keyword(print_key, keyword)
554 10272 : CALL keyword_release(keyword)
555 : CALL keyword_create(keyword, __LOCATION__, name="INERTIA", &
556 : description="Print molecular inertia tensor", &
557 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
558 10272 : CALL section_add_keyword(print_key, keyword)
559 10272 : CALL keyword_release(keyword)
560 : CALL keyword_create(keyword, __LOCATION__, name="SYMMETRY_ELEMENTS", &
561 : description="Print symmetry elements", &
562 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
563 10272 : CALL section_add_keyword(print_key, keyword)
564 10272 : CALL keyword_release(keyword)
565 : CALL keyword_create(keyword, __LOCATION__, name="ALL", &
566 : description="Print all symmetry information", &
567 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
568 10272 : CALL section_add_keyword(print_key, keyword)
569 10272 : CALL keyword_release(keyword)
570 : CALL keyword_create(keyword, __LOCATION__, name="ROTATION_MATRICES", &
571 : description="All the rotation matrices of the point group", &
572 10272 : default_l_val=.FALSE.)
573 10272 : CALL section_add_keyword(print_key, keyword)
574 10272 : CALL keyword_release(keyword)
575 : CALL keyword_create(keyword, __LOCATION__, name="CHECK_SYMMETRY", &
576 : description="Check if calculated symmetry has expected value."// &
577 : " Use either Schoenfliess or Hermann-Maugin symbols", &
578 10272 : default_c_val="NONE")
579 10272 : CALL section_add_keyword(print_key, keyword)
580 10272 : CALL keyword_release(keyword)
581 10272 : CALL section_add_subsection(section, print_key)
582 10272 : CALL section_release(print_key)
583 :
584 : CALL cp_print_key_section_create(print_key, __LOCATION__, "molecules", &
585 : description="controls the output of information on the molecules", &
586 10272 : print_level=medium_print_level, filename="__STD_OUT__")
587 10272 : CALL section_add_subsection(section, print_key)
588 10272 : CALL section_release(print_key)
589 :
590 : CALL cp_print_key_section_create(print_key, __LOCATION__, "radii", &
591 : description="controls the output of radii information", unit_str="angstrom", &
592 10272 : print_level=high_print_level, filename="__STD_OUT__")
593 :
594 : CALL keyword_create(keyword, __LOCATION__, name="core_charges_radii", &
595 : description="If the printkey is activated controls the printing of the radii of the core charges", &
596 10272 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
597 10272 : CALL section_add_keyword(print_key, keyword)
598 10272 : CALL keyword_release(keyword)
599 :
600 : CALL keyword_create(keyword, __LOCATION__, name="pgf_radii", &
601 : description="If the printkey is activated controls the printing of the core gaussian radii", &
602 10272 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
603 10272 : CALL section_add_keyword(print_key, keyword)
604 10272 : CALL keyword_release(keyword)
605 :
606 : CALL keyword_create(keyword, __LOCATION__, name="set_radii", &
607 : description="If the printkey is activated controls the printing of the set_radii", &
608 10272 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
609 10272 : CALL section_add_keyword(print_key, keyword)
610 10272 : CALL keyword_release(keyword)
611 :
612 : CALL keyword_create(keyword, __LOCATION__, name="kind_radii", &
613 : description="If the printkey is activated controls the printing of the kind_radii", &
614 10272 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
615 10272 : CALL section_add_keyword(print_key, keyword)
616 10272 : CALL keyword_release(keyword)
617 :
618 : CALL keyword_create(keyword, __LOCATION__, name="core_charge_radii", &
619 : description="If the printkey is activated controls the printing of the core_charge_radii", &
620 10272 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
621 10272 : CALL section_add_keyword(print_key, keyword)
622 10272 : CALL keyword_release(keyword)
623 :
624 : CALL keyword_create(keyword, __LOCATION__, name="ppl_radii", &
625 : description="If the printkey is activated controls the printing of the "// &
626 : "pseudo potential local radii", &
627 10272 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
628 10272 : CALL section_add_keyword(print_key, keyword)
629 10272 : CALL keyword_release(keyword)
630 :
631 : CALL keyword_create(keyword, __LOCATION__, name="ppnl_radii", &
632 : description="If the printkey is activated controls the printing of the "// &
633 : "pseudo potential non local radii", &
634 10272 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
635 10272 : CALL section_add_keyword(print_key, keyword)
636 10272 : CALL keyword_release(keyword)
637 :
638 : CALL keyword_create(keyword, __LOCATION__, name="gapw_prj_radii", &
639 : description="If the printkey is activated controls the printing of the gapw projector radii", &
640 10272 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
641 10272 : CALL section_add_keyword(print_key, keyword)
642 10272 : CALL keyword_release(keyword)
643 :
644 10272 : CALL section_add_subsection(section, print_key)
645 10272 : CALL section_release(print_key)
646 :
647 10272 : END SUBROUTINE create_subsys_print_section
648 :
649 : ! **************************************************************************************************
650 : !> \brief Creates the multipole section
651 : !> \param section the section to create
652 : !> \author teo
653 : ! **************************************************************************************************
654 10272 : SUBROUTINE create_multipole_section(section)
655 : TYPE(section_type), POINTER :: section
656 :
657 : TYPE(keyword_type), POINTER :: keyword
658 : TYPE(section_type), POINTER :: subsection
659 :
660 10272 : CPASSERT(.NOT. ASSOCIATED(section))
661 : CALL section_create(section, __LOCATION__, name="multipoles", &
662 : description="Specifies the dipoles and quadrupoles for particles.", &
663 10272 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
664 :
665 10272 : NULLIFY (keyword, subsection)
666 : CALL section_create(subsection, __LOCATION__, name="dipoles", &
667 : description="Specifies the dipoles of the particles.", &
668 10272 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
669 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
670 : description="The dipole components for each atom in the format: "// &
671 : "$D_x \ D_y \ D_z$", &
672 : repeats=.TRUE., usage="{Real} {Real} {Real}", &
673 10272 : type_of_var=real_t, n_var=3)
674 10272 : CALL section_add_keyword(subsection, keyword)
675 10272 : CALL keyword_release(keyword)
676 10272 : CALL section_add_subsection(section, subsection)
677 10272 : CALL section_release(subsection)
678 :
679 : CALL section_create(subsection, __LOCATION__, name="quadrupoles", &
680 : description="Specifies the quadrupoles of the particles.", &
681 10272 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
682 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
683 : description="The quadrupole components for each atom in the format: "// &
684 : "$Q_{xx} \ Q_{xy} \ Q_{xz} \ Q_{yy} \ Q_{yz} \ Q_{zz}$", &
685 : repeats=.TRUE., usage="{Real} {Real} {Real} {Real} {Real} {Real}", &
686 10272 : type_of_var=real_t, n_var=6)
687 10272 : CALL section_add_keyword(subsection, keyword)
688 10272 : CALL keyword_release(keyword)
689 10272 : CALL section_add_subsection(section, subsection)
690 10272 : CALL section_release(subsection)
691 :
692 10272 : END SUBROUTINE create_multipole_section
693 :
694 : ! **************************************************************************************************
695 : !> \brief creates structure data section for output.. both subsys (for initialization)
696 : !> and motion section..
697 : !> \param print_key ...
698 : ! **************************************************************************************************
699 20544 : SUBROUTINE create_structure_data_section(print_key)
700 : TYPE(section_type), POINTER :: print_key
701 :
702 : TYPE(keyword_type), POINTER :: keyword
703 :
704 20544 : CPASSERT(.NOT. ASSOCIATED(print_key))
705 :
706 20544 : NULLIFY (keyword)
707 :
708 : CALL cp_print_key_section_create(print_key, __LOCATION__, name="STRUCTURE_DATA", &
709 : description="Request the printing of special structure data during a structure "// &
710 : "optimization (in MOTION%PRINT) or when setting up a subsys (in SUBSYS%PRINT).", &
711 20544 : print_level=high_print_level, filename="__STD_OUT__", unit_str="angstrom")
712 :
713 : CALL keyword_create(keyword, __LOCATION__, name="POSITION", variants=["POS"], &
714 : description="Print the position vectors in Cartesian coordinates of the atoms specified "// &
715 : "by a list of their indices", &
716 : usage="POSITION {integer} {integer} {integer}..{integer}", n_var=-1, repeats=.TRUE., &
717 41088 : type_of_var=integer_t)
718 20544 : CALL section_add_keyword(print_key, keyword)
719 20544 : CALL keyword_release(keyword)
720 :
721 : CALL keyword_create(keyword, __LOCATION__, name="POSITION_SCALED", variants=["POS_SCALED"], &
722 : description="Print the position vectors in scaled coordinates of the atoms specified "// &
723 : "by a list of their indices", &
724 : usage="POSITION_SCALED {integer} {integer} {integer}..{integer}", n_var=-1, repeats=.TRUE., &
725 41088 : type_of_var=integer_t)
726 20544 : CALL section_add_keyword(print_key, keyword)
727 20544 : CALL keyword_release(keyword)
728 :
729 : CALL keyword_create(keyword, __LOCATION__, name="DISTANCE", variants=["DIS"], &
730 : description="Print the distance between the atoms a and b specified by their indices", &
731 : usage="DISTANCE {integer} {integer}", n_var=2, repeats=.TRUE., &
732 41088 : type_of_var=integer_t)
733 20544 : CALL section_add_keyword(print_key, keyword)
734 20544 : CALL keyword_release(keyword)
735 :
736 : CALL keyword_create(keyword, __LOCATION__, name="ANGLE", variants=["ANG"], &
737 : description="Print the angle formed by the atoms specified by their indices", &
738 : usage="ANGLE {integer} {integer} {integer}", n_var=3, repeats=.TRUE., &
739 41088 : type_of_var=integer_t)
740 20544 : CALL section_add_keyword(print_key, keyword)
741 20544 : CALL keyword_release(keyword)
742 :
743 : CALL keyword_create(keyword, __LOCATION__, name="DIHEDRAL_ANGLE", variants=s2a("DIHEDRAL", "DIH"), &
744 : description="Print the dihedral angle between the planes defined by the atoms (a,b,c) and "// &
745 : "the atoms (b,c,d) specified by their indices", &
746 : usage="DIHEDRAL_ANGLE {integer} {integer} {integer} {integer}", n_var=4, &
747 20544 : repeats=.TRUE., type_of_var=integer_t)
748 20544 : CALL section_add_keyword(print_key, keyword)
749 20544 : CALL keyword_release(keyword)
750 :
751 20544 : END SUBROUTINE create_structure_data_section
752 :
753 : ! **************************************************************************************************
754 : !> \brief Creates the velocity section
755 : !> \param section the section to create
756 : !> \author teo
757 : ! **************************************************************************************************
758 10272 : SUBROUTINE create_velocity_section(section)
759 : TYPE(section_type), POINTER :: section
760 :
761 : TYPE(keyword_type), POINTER :: keyword
762 :
763 10272 : CPASSERT(.NOT. ASSOCIATED(section))
764 : CALL section_create(section, __LOCATION__, name="velocity", &
765 : description="The velocities for simple systems or "// &
766 : "the centroid mode in PI runs, xyz format by default", &
767 10272 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
768 10272 : NULLIFY (keyword)
769 : CALL keyword_create(keyword, __LOCATION__, name="PINT_UNIT", &
770 : description="Specify the units of measurement for the velocities "// &
771 : "(currently works only for the path integral code). "// &
772 : "All available CP2K units can be used.", &
773 : usage="PINT_UNIT angstrom*au_t^-1", &
774 10272 : default_c_val="bohr*au_t^-1")
775 10272 : CALL section_add_keyword(section, keyword)
776 10272 : CALL keyword_release(keyword)
777 :
778 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
779 : description="The atomic velocities in the format: "// &
780 : "$ v_x \ v_y \ v_z$ "// &
781 : "The same order as for the atomic coordinates is assumed.", &
782 : repeats=.TRUE., usage="{Real} {Real} {Real}", &
783 10272 : type_of_var=real_t, n_var=3)
784 10272 : CALL section_add_keyword(section, keyword)
785 10272 : CALL keyword_release(keyword)
786 :
787 10272 : END SUBROUTINE create_velocity_section
788 :
789 : ! **************************************************************************************************
790 : !> \brief Creates the shell velocity section
791 : !> \param section the section to create
792 : !> \author teo
793 : ! **************************************************************************************************
794 10272 : SUBROUTINE create_shell_vel_section(section)
795 : TYPE(section_type), POINTER :: section
796 :
797 : TYPE(keyword_type), POINTER :: keyword
798 :
799 10272 : CPASSERT(.NOT. ASSOCIATED(section))
800 : CALL section_create(section, __LOCATION__, name="shell_velocity", &
801 : description="The velocities of shells for shell-model potentials, "// &
802 : "in xyz format ", &
803 10272 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
804 10272 : NULLIFY (keyword)
805 :
806 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
807 : description="The shell particle velocities in the format: "// &
808 : "$v_x \ v_y \ v_z$ "// &
809 : "The same order as for the shell particle coordinates is assumed.", &
810 : repeats=.TRUE., usage="{Real} {Real} {Real}", &
811 10272 : type_of_var=real_t, n_var=3)
812 10272 : CALL section_add_keyword(section, keyword)
813 10272 : CALL keyword_release(keyword)
814 :
815 10272 : END SUBROUTINE create_shell_vel_section
816 :
817 : ! **************************************************************************************************
818 : !> \brief Creates the shell velocity section
819 : !> \param section the section to create
820 : !> \author teo
821 : ! **************************************************************************************************
822 10272 : SUBROUTINE create_core_vel_section(section)
823 : TYPE(section_type), POINTER :: section
824 :
825 : TYPE(keyword_type), POINTER :: keyword
826 :
827 10272 : CPASSERT(.NOT. ASSOCIATED(section))
828 : CALL section_create(section, __LOCATION__, name="core_velocity", &
829 : description="The velocities of cores for shell-model potentials, "// &
830 : "in xyz format ", &
831 10272 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
832 10272 : NULLIFY (keyword)
833 :
834 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
835 : description="The core particle velocities in the format: "// &
836 : "$v_x \ v_y \ v_z$ "// &
837 : "The same order as for the core particle coordinates is assumed.", &
838 : repeats=.TRUE., usage="{Real} {Real} {Real}", &
839 10272 : type_of_var=real_t, n_var=3)
840 10272 : CALL section_add_keyword(section, keyword)
841 10272 : CALL keyword_release(keyword)
842 :
843 10272 : END SUBROUTINE create_core_vel_section
844 :
845 : ! **************************************************************************************************
846 : !> \brief Creates the &POTENTIAL section
847 : !> \param section the section to create
848 : !> \author teo
849 : ! **************************************************************************************************
850 10272 : SUBROUTINE create_potential_section(section)
851 : TYPE(section_type), POINTER :: section
852 :
853 : TYPE(keyword_type), POINTER :: keyword
854 :
855 : CALL section_create(section, __LOCATION__, name="potential", &
856 : description="Section used to specify Potentials.", &
857 10272 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
858 10272 : NULLIFY (keyword)
859 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
860 : description="CP2K Pseudo Potential Standard Format (GTH, ALL)", &
861 10272 : repeats=.TRUE., type_of_var=lchar_t)
862 10272 : CALL section_add_keyword(section, keyword)
863 10272 : CALL keyword_release(keyword)
864 :
865 10272 : END SUBROUTINE create_potential_section
866 :
867 : ! **************************************************************************************************
868 : !> \brief Creates the &KG_POTENTIAL section
869 : !> \param section the section to create
870 : !> \author JGH
871 : ! **************************************************************************************************
872 10272 : SUBROUTINE create_kgpot_section(section)
873 : TYPE(section_type), POINTER :: section
874 :
875 : TYPE(keyword_type), POINTER :: keyword
876 :
877 : CALL section_create(section, __LOCATION__, name="kg_potential", &
878 : description="Section used to specify KG Potentials.", &
879 10272 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
880 10272 : NULLIFY (keyword)
881 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
882 : description="CP2K KG TNADD Potential Standard Format (TNADD)", &
883 10272 : repeats=.TRUE., type_of_var=lchar_t)
884 10272 : CALL section_add_keyword(section, keyword)
885 10272 : CALL keyword_release(keyword)
886 :
887 10272 : END SUBROUTINE create_kgpot_section
888 :
889 : ! **************************************************************************************************
890 : !> \brief Creates the &BASIS section
891 : !> \param section the section to create
892 : !> \author teo
893 : ! **************************************************************************************************
894 20544 : SUBROUTINE create_basis_section(section)
895 : TYPE(section_type), POINTER :: section
896 :
897 : TYPE(keyword_type), POINTER :: keyword
898 :
899 : CALL section_create(section, __LOCATION__, name="BASIS", &
900 : description="Section used to specify a general basis set for QM calculations.", &
901 20544 : n_keywords=1, n_subsections=0, repeats=.TRUE.)
902 :
903 20544 : NULLIFY (keyword)
904 :
905 : CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
906 : description="The type of basis set defined in this section.", &
907 : lone_keyword_c_val="Orbital", &
908 20544 : usage="Orbital", default_c_val="Orbital")
909 20544 : CALL section_add_keyword(section, keyword)
910 20544 : CALL keyword_release(keyword)
911 :
912 : CALL keyword_create( &
913 : keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
914 : repeats=.TRUE., type_of_var=lchar_t, &
915 : description="CP2K Basis Set Standard Format:"//newline//newline// &
916 : "```"//newline// &
917 : "Element symbol Name of the basis set Alias names"//newline// &
918 : "nset (repeat the following block of lines nset times)"//newline// &
919 : "n lmin lmax nexp nshell(lmin) nshell(lmin+1) ... nshell(lmax-1) nshell(lmax)"//newline// &
920 : "a(1) c(1,l,1) c(1,l,2) ... c(1,l,nshell(l)-1) c(1,l,nshell(l)), l=lmin,lmax"//newline// &
921 : "a(2) c(2,l,1) c(2,l,2) ... c(2,l,nshell(l)-1) c(2,l,nshell(l)), l=lmin,lmax"//newline// &
922 : " . . . . ."//newline// &
923 : " . . . . ."//newline// &
924 : " . . . . ."//newline// &
925 : "a(nexp-1) c(nexp-1,l,1) c(nexp-1,l,2) ... c(nexp-1,l,nshell(l)-1) c(nexp-1,l,nshell(l)), l=lmin,lmax"//newline// &
926 : "a(nexp) c(nexp,l,1) c(nexp,l,2) ... c(nexp,l,nshell(l)-1) c(nexp,l,nshell(l)), l=lmin,lmax"//newline// &
927 : newline// &
928 : newline// &
929 : "nset : Number of exponent sets"//newline// &
930 : "n : Principle quantum number (only for orbital label printing)"//newline// &
931 : "lmax : Maximum angular momentum quantum number l"//newline// &
932 : "lmin : Minimum angular momentum quantum number l"//newline// &
933 : "nshell(l): Number of shells for angular momentum quantum number l"//newline// &
934 : "a : Exponent"//newline// &
935 : "c : Contraction coefficient"//newline// &
936 20544 : "```")
937 20544 : CALL section_add_keyword(section, keyword)
938 20544 : CALL keyword_release(keyword)
939 :
940 20544 : END SUBROUTINE create_basis_section
941 :
942 : ! **************************************************************************************************
943 : !> \brief Creates the &COORD section
944 : !> \param section the section to create
945 : !> \author teo
946 : ! **************************************************************************************************
947 10272 : SUBROUTINE create_coord_section(section)
948 : TYPE(section_type), POINTER :: section
949 :
950 : TYPE(keyword_type), POINTER :: keyword
951 :
952 10272 : CPASSERT(.NOT. ASSOCIATED(section))
953 : CALL section_create(section, __LOCATION__, name="coord", &
954 : description="The coordinates for simple systems (like small QM cells) "// &
955 : "are specified here by default using explicit XYZ coordinates. "// &
956 : "Simple products and fractions combined with functions of a single "// &
957 : "number can be used like 2/3, 0.3*COS(60) or -SQRT(3)/2. "// &
958 : "More complex systems should be given via an external coordinate "// &
959 : "file in the SUBSYS%TOPOLOGY section.", &
960 10272 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
961 10272 : NULLIFY (keyword)
962 : CALL keyword_create(keyword, __LOCATION__, name="UNIT", &
963 : description='Specify the unit of measurement for the coordinates in input'// &
964 : "All available CP2K units can be used.", &
965 10272 : usage="UNIT angstrom", default_c_val="angstrom")
966 10272 : CALL section_add_keyword(section, keyword)
967 10272 : CALL keyword_release(keyword)
968 :
969 : CALL keyword_create(keyword, __LOCATION__, name="SCALED", &
970 : description='Specify if the coordinates in input are scaled. '// &
971 : 'When true, the coordinates are given in multiples of the lattice vectors.', &
972 : usage="SCALED F", default_l_val=.FALSE., &
973 10272 : lone_keyword_l_val=.TRUE.)
974 10272 : CALL section_add_keyword(section, keyword)
975 10272 : CALL keyword_release(keyword)
976 :
977 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
978 : description="The atomic coordinates in the format:"//newline//newline// &
979 : "`ATOMIC_KIND X Y Z MOLNAME`"//newline//newline// &
980 : "The `MOLNAME` is optional. If not provided the molecule name "// &
981 : "is internally created. All other fields after `MOLNAME` are simply ignored.", &
982 : repeats=.TRUE., usage="{{String} {Real} {Real} {Real} {String}}", &
983 10272 : type_of_var=lchar_t)
984 10272 : CALL section_add_keyword(section, keyword)
985 10272 : CALL keyword_release(keyword)
986 10272 : END SUBROUTINE create_coord_section
987 :
988 : ! **************************************************************************************************
989 : !> \brief Creates the &SHELL_COORD section
990 : !> \param section the section to create
991 : !> \author teo
992 : ! **************************************************************************************************
993 10272 : SUBROUTINE create_shell_coord_section(section)
994 : TYPE(section_type), POINTER :: section
995 :
996 : TYPE(keyword_type), POINTER :: keyword
997 :
998 10272 : CPASSERT(.NOT. ASSOCIATED(section))
999 : CALL section_create(section, __LOCATION__, name="shell_coord", &
1000 : description="The shell coordinates for the shell-model potentials"// &
1001 : " xyz format with an additional column for the index of the corresponding particle", &
1002 10272 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
1003 10272 : NULLIFY (keyword)
1004 : CALL keyword_create(keyword, __LOCATION__, name="UNIT", &
1005 : description='Specify the unit of measurement for the coordinates in input'// &
1006 : "All available CP2K units can be used.", &
1007 10272 : usage="UNIT angstrom", default_c_val="angstrom")
1008 10272 : CALL section_add_keyword(section, keyword)
1009 10272 : CALL keyword_release(keyword)
1010 :
1011 : CALL keyword_create(keyword, __LOCATION__, name="SCALED", &
1012 : description='Specify if the coordinates in input are scaled. '// &
1013 : 'When true, the coordinates are given in multiples of the lattice vectors.', &
1014 : usage="SCALED F", default_l_val=.FALSE., &
1015 10272 : lone_keyword_l_val=.TRUE.)
1016 10272 : CALL section_add_keyword(section, keyword)
1017 10272 : CALL keyword_release(keyword)
1018 :
1019 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
1020 : description="The shell particle coordinates in the format:"//newline//newline// &
1021 : "`ATOMIC_KIND X Y Z ATOMIC_INDEX`"//newline//newline// &
1022 : "The `ATOMIC_INDEX` refers to the atom the shell particle belongs to.", &
1023 : repeats=.TRUE., usage="{{String} {Real} {Real} {Real} {Integer}}", &
1024 10272 : type_of_var=lchar_t)
1025 10272 : CALL section_add_keyword(section, keyword)
1026 10272 : CALL keyword_release(keyword)
1027 :
1028 10272 : END SUBROUTINE create_shell_coord_section
1029 :
1030 : ! **************************************************************************************************
1031 : !> \brief Creates the &core_COORD section
1032 : !> \param section the section to create
1033 : !> \author teo
1034 : ! **************************************************************************************************
1035 10272 : SUBROUTINE create_core_coord_section(section)
1036 : TYPE(section_type), POINTER :: section
1037 :
1038 : TYPE(keyword_type), POINTER :: keyword
1039 :
1040 10272 : CPASSERT(.NOT. ASSOCIATED(section))
1041 : CALL section_create(section, __LOCATION__, name="core_coord", &
1042 : description="The core coordinates for the shell-model potentials"// &
1043 : " xyz format with an additional column for the index of the corresponding particle", &
1044 10272 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
1045 10272 : NULLIFY (keyword)
1046 : CALL keyword_create(keyword, __LOCATION__, name="UNIT", &
1047 : description='Specify the unit of measurement for the coordinates in input'// &
1048 : "All available CP2K units can be used.", &
1049 10272 : usage="UNIT angstrom", default_c_val="angstrom")
1050 10272 : CALL section_add_keyword(section, keyword)
1051 10272 : CALL keyword_release(keyword)
1052 :
1053 : CALL keyword_create(keyword, __LOCATION__, name="SCALED", &
1054 : description='Specify if the coordinates in input are scaled. '// &
1055 : 'When true, the coordinates are given in multiples of the lattice vectors.', &
1056 : usage="SCALED F", default_l_val=.FALSE., &
1057 10272 : lone_keyword_l_val=.TRUE.)
1058 10272 : CALL section_add_keyword(section, keyword)
1059 10272 : CALL keyword_release(keyword)
1060 :
1061 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
1062 : description="The core particle coordinates in the format:"//newline//newline// &
1063 : "`ATOMIC_KIND X Y Z ATOMIC_INDEX`"//newline//newline// &
1064 : "The `ATOMIC_INDEX` refers to the atom the core particle belongs to.", &
1065 : repeats=.TRUE., usage="{{String} {Real} {Real} {Real} {Integer}}", &
1066 10272 : type_of_var=lchar_t)
1067 10272 : CALL section_add_keyword(section, keyword)
1068 10272 : CALL keyword_release(keyword)
1069 :
1070 10272 : END SUBROUTINE create_core_coord_section
1071 :
1072 : ! **************************************************************************************************
1073 : !> \brief Creates the QM/MM section
1074 : !> \param section the section to create
1075 : !> \author teo
1076 : ! **************************************************************************************************
1077 10272 : SUBROUTINE create_kind_section(section)
1078 : TYPE(section_type), POINTER :: section
1079 :
1080 : TYPE(keyword_type), POINTER :: keyword
1081 : TYPE(section_type), POINTER :: subsection
1082 :
1083 10272 : CPASSERT(.NOT. ASSOCIATED(section))
1084 :
1085 : CALL section_create(section, __LOCATION__, name="KIND", &
1086 : description="Defines settings shared by atoms of the same kind, such as basis sets, "// &
1087 : "pseudopotentials, all-electron treatment, and atom-centered grids.", &
1088 10272 : n_keywords=20, n_subsections=1, repeats=.TRUE.)
1089 :
1090 10272 : NULLIFY (keyword)
1091 :
1092 : CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
1093 : description="The name of the kind described in this section.", &
1094 10272 : usage="H", default_c_val="DEFAULT")
1095 10272 : CALL section_add_keyword(section, keyword)
1096 10272 : CALL keyword_release(keyword)
1097 :
1098 : CALL keyword_create(keyword, __LOCATION__, name="BASIS_SET", &
1099 : description="Selects a Gaussian basis set for this kind. The default type is ORB and the default "// &
1100 : "form is GTO; NONE implies no basis and is meaningful for ghost atoms. Possible values for TYPE are "// &
1101 : "{ORB, AUX, MIN, RI_AUX, LRI, ...}. Possible values for "// &
1102 : "FORM are {GTO, STO}. Where STO results in a GTO expansion of a Slater type basis. "// &
1103 : "If a value for FORM is given, also TYPE has to be set explicitly.", &
1104 : usage="BASIS_SET [type] [form] DZVP", type_of_var=char_t, default_c_vals=[" ", " ", " "], &
1105 : citations=[VandeVondele2005a, VandeVondele2007], &
1106 61632 : repeats=.TRUE., n_var=-1)
1107 10272 : CALL section_add_keyword(section, keyword)
1108 10272 : CALL keyword_release(keyword)
1109 :
1110 : ! old type basis set input keywords
1111 : ! kept for backward compatibility
1112 : CALL keyword_create( &
1113 : keyword, __LOCATION__, name="AUX_BASIS_SET", &
1114 : variants=s2a("AUXILIARY_BASIS_SET", "AUX_BASIS"), &
1115 : description="The auxiliary basis set (GTO type)", &
1116 : usage="AUX_BASIS_SET DZVP", default_c_val=" ", &
1117 : n_var=1, &
1118 : deprecation_notice="use 'BASIS_SET AUX ...' instead", &
1119 10272 : removed=.TRUE.)
1120 10272 : CALL section_add_keyword(section, keyword)
1121 10272 : CALL keyword_release(keyword)
1122 :
1123 : CALL keyword_create( &
1124 : keyword, __LOCATION__, name="RI_AUX_BASIS_SET", &
1125 : variants=s2a("RI_MP2_BASIS_SET", "RI_RPA_BASIS_SET", "RI_AUX_BASIS"), &
1126 : description="The RI auxiliary basis set used in WF_CORRELATION (GTO type)", &
1127 : usage="RI_AUX_BASIS_SET DZVP", default_c_val=" ", &
1128 : n_var=1, &
1129 : deprecation_notice="Use 'BASIS_SET RI_AUX ...' instead.", &
1130 10272 : removed=.TRUE.)
1131 10272 : CALL section_add_keyword(section, keyword)
1132 10272 : CALL keyword_release(keyword)
1133 :
1134 : CALL keyword_create( &
1135 : keyword, __LOCATION__, name="LRI_BASIS_SET", &
1136 : variants=s2a("LRI_BASIS"), &
1137 : description="The local resolution of identity basis set (GTO type)", &
1138 : usage="LRI_BASIS_SET", default_c_val=" ", &
1139 : n_var=1, &
1140 : deprecation_notice="Use 'BASIS_SET LRI ...' instead.", &
1141 10272 : removed=.TRUE.)
1142 10272 : CALL section_add_keyword(section, keyword)
1143 10272 : CALL keyword_release(keyword)
1144 :
1145 : CALL keyword_create( &
1146 : keyword, __LOCATION__, name="AUX_FIT_BASIS_SET", &
1147 : variants=s2a("AUXILIARY_FIT_BASIS_SET", "AUX_FIT_BASIS"), &
1148 : description="The auxiliary basis set (GTO type) for auxiliary density matrix method", &
1149 : usage="AUX_FIT_BASIS_SET DZVP", default_c_val=" ", &
1150 : citations=[Guidon2010], &
1151 : n_var=1, &
1152 : deprecation_notice="Use 'BASIS_SET AUX_FIT ...' instead.", &
1153 20544 : removed=.TRUE.)
1154 10272 : CALL section_add_keyword(section, keyword)
1155 10272 : CALL keyword_release(keyword)
1156 : ! end of old basis set keywords
1157 :
1158 : CALL keyword_create(keyword, __LOCATION__, name="ELEC_CONF", &
1159 : description="Specifies the electronic configuration used in construction the "// &
1160 : "atomic initial guess (see the pseudo potential file for the default values).", &
1161 : usage="ELEC_CONF n_elec(s) n_elec(p) n_elec(d) ... ", &
1162 10272 : n_var=-1, type_of_var=integer_t)
1163 10272 : CALL section_add_keyword(section, keyword)
1164 10272 : CALL keyword_release(keyword)
1165 :
1166 : CALL keyword_create(keyword, __LOCATION__, name="CORE_CORRECTION", &
1167 : description="Corrects the effective nuclear charge", &
1168 : usage="CORE_CORRECTION 1.0", n_var=1, &
1169 10272 : default_r_val=0.0_dp)
1170 10272 : CALL section_add_keyword(section, keyword)
1171 10272 : CALL keyword_release(keyword)
1172 :
1173 : CALL keyword_create(keyword, __LOCATION__, name="MAGNETIZATION", &
1174 : description="The magnetization used in the atomic initial guess. "// &
1175 : "Adds magnetization/2 spin-alpha electrons and removes magnetization/2 spin-beta electrons.", &
1176 : usage="MAGNETIZATION 0.5", n_var=1, &
1177 10272 : default_r_val=0.0_dp)
1178 10272 : CALL section_add_keyword(section, keyword)
1179 10272 : CALL keyword_release(keyword)
1180 :
1181 : CALL keyword_create(keyword, __LOCATION__, name="ELEMENT", &
1182 : variants=["ELEMENT_SYMBOL"], &
1183 : description="The element of the actual kind "// &
1184 : "(if not given it is inferred from the kind name)", &
1185 20544 : usage="ELEMENT O", type_of_var=char_t, n_var=1)
1186 10272 : CALL section_add_keyword(section, keyword)
1187 10272 : CALL keyword_release(keyword)
1188 :
1189 : CALL keyword_create(keyword, __LOCATION__, name="MASS", &
1190 : variants=s2a("ATOMIC_MASS", "ATOMIC_WEIGHT", "WEIGHT"), &
1191 : description="The mass of the atom "// &
1192 : "(if negative or non present it is inferred from the element symbol)", &
1193 10272 : usage="MASS 2.0", type_of_var=real_t, n_var=1)
1194 10272 : CALL section_add_keyword(section, keyword)
1195 10272 : CALL keyword_release(keyword)
1196 :
1197 : CALL keyword_create(keyword, __LOCATION__, name="POTENTIAL_FILE_NAME", &
1198 : description="The name of the file where to find this kinds pseudopotential."// &
1199 : " Default file is specified in DFT section.", &
1200 10272 : usage="POTENTIAL_FILE_NAME <PSEUDO-POTENTIAL-FILE-NAME>", default_c_val="-", n_var=1)
1201 10272 : CALL section_add_keyword(section, keyword)
1202 10272 : CALL keyword_release(keyword)
1203 :
1204 : CALL keyword_create(keyword, __LOCATION__, name="POTENTIAL_TYPE", &
1205 : description="The type of this kinds pseudopotential (ECP, ALL, GTH, UPS).", &
1206 : deprecation_notice="Use 'POTENTIAL <TYPE> ...' instead.", &
1207 10272 : usage="POTENTIAL_TYPE <TYPE>", default_c_val="", n_var=1)
1208 10272 : CALL section_add_keyword(section, keyword)
1209 10272 : CALL keyword_release(keyword)
1210 :
1211 : CALL keyword_create(keyword, __LOCATION__, name="POTENTIAL", &
1212 : variants=["POT"], &
1213 : description= &
1214 : "The type (ECP, ALL, GTH, UPS) and name of the "// &
1215 : "pseudopotential for the defined kind. Use GTH potentials "// &
1216 : "for most GPW calculations, ECP for Gaussian-integral effective core "// &
1217 : "potentials, and ALL for all-electron calculations.", &
1218 : usage="POTENTIAL [type] <POTENTIAL-NAME>", type_of_var=char_t, &
1219 : default_c_vals=[" ", " "], &
1220 71904 : citations=[Goedecker1996, Hartwigsen1998, Krack2005], n_var=-1)
1221 10272 : CALL section_add_keyword(section, keyword)
1222 10272 : CALL keyword_release(keyword)
1223 :
1224 : CALL keyword_create(keyword, __LOCATION__, name="KG_POTENTIAL_FILE_NAME", &
1225 : description="The name of the file where to find this kinds KG potential."// &
1226 : " Default file is specified in DFT section.", &
1227 10272 : usage="KG_POTENTIAL_FILE_NAME <POTENTIAL-FILE-NAME>", default_c_val="-", n_var=1)
1228 10272 : CALL section_add_keyword(section, keyword)
1229 10272 : CALL keyword_release(keyword)
1230 :
1231 : CALL keyword_create(keyword, __LOCATION__, name="KG_POTENTIAL", &
1232 : variants=["KG_POT"], &
1233 : description="The name of the non-additive atomic kinetic energy potential.", &
1234 20544 : usage="KG_POTENTIAL <TNADD-POTENTIAL-NAME>", default_c_val="NONE", n_var=1)
1235 10272 : CALL section_add_keyword(section, keyword)
1236 10272 : CALL keyword_release(keyword)
1237 :
1238 : CALL keyword_create(keyword, __LOCATION__, name="ECP_SEMI_LOCAL", &
1239 : description="Use ECPs in the original semi-local form."// &
1240 : " This requires the availability of the corresponding integral library."// &
1241 : " If set to False, a fully nonlocal one-center expansion of the ECP is constructed.", &
1242 10272 : usage="ECP_SEMI_LOCAL {T,F}", default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
1243 10272 : CALL section_add_keyword(section, keyword)
1244 10272 : CALL keyword_release(keyword)
1245 :
1246 : CALL keyword_create(keyword, __LOCATION__, name="COVALENT_RADIUS", &
1247 : description="Use this covalent radius (in Angstrom) for all atoms of "// &
1248 : "the atomic kind instead of the internally tabulated default value", &
1249 : usage="COVALENT_RADIUS 1.24", n_var=1, default_r_val=0.0_dp, &
1250 10272 : unit_str="angstrom")
1251 10272 : CALL section_add_keyword(section, keyword)
1252 10272 : CALL keyword_release(keyword)
1253 :
1254 : CALL keyword_create(keyword, __LOCATION__, name="VDW_RADIUS", &
1255 : description="Use this van der Waals radius (in Angstrom) for all atoms of "// &
1256 : "the atomic kind instead of the internally tabulated default value", &
1257 10272 : usage="VDW_RADIUS 1.85", n_var=1, default_r_val=0.0_dp, unit_str="angstrom")
1258 10272 : CALL section_add_keyword(section, keyword)
1259 10272 : CALL keyword_release(keyword)
1260 :
1261 : CALL keyword_create(keyword, __LOCATION__, name="HARD_EXP_RADIUS", &
1262 : description="The region where the hard density is supposed to be confined"// &
1263 : " (GAPW) (in Bohr, default is 1.2 for H and 1.512 otherwise)", &
1264 10272 : usage="HARD_EXP_RADIUS 0.9", type_of_var=real_t, n_var=1)
1265 10272 : CALL section_add_keyword(section, keyword)
1266 10272 : CALL keyword_release(keyword)
1267 :
1268 : CALL keyword_create(keyword, __LOCATION__, name="MAX_RAD_LOCAL", &
1269 : description="Max radius for the basis functions used to"// &
1270 : " generate the local projectors in GAPW [Bohr]", &
1271 10272 : usage="MAX_RAD_LOCAL 15.0", default_r_val=13.0_dp*bohr)
1272 10272 : CALL section_add_keyword(section, keyword)
1273 10272 : CALL keyword_release(keyword)
1274 :
1275 : CALL keyword_create(keyword, __LOCATION__, name="RHO0_EXP_RADIUS", &
1276 : description="the radius which defines the atomic region where "// &
1277 : "the hard compensation density is confined. "// &
1278 : "should be less than HARD_EXP_RADIUS (GAPW) (Bohr, default equals HARD_EXP_RADIUS)", &
1279 10272 : usage="RHO0_EXP_RADIUS 0.9", type_of_var=real_t, n_var=1)
1280 10272 : CALL section_add_keyword(section, keyword)
1281 10272 : CALL keyword_release(keyword)
1282 :
1283 : CALL keyword_create(keyword, __LOCATION__, name="LEBEDEV_GRID", &
1284 : description="GAPW: size of the angular Lebedev grid used for "// &
1285 : "atom-centered integrations for this kind.", &
1286 10272 : usage="LEBEDEV_GRID 40", default_i_val=50)
1287 10272 : CALL section_add_keyword(section, keyword)
1288 10272 : CALL keyword_release(keyword)
1289 :
1290 : CALL keyword_create(keyword, __LOCATION__, name="RADIAL_GRID", &
1291 : description="GAPW: number of radial grid points used for atom-centered "// &
1292 : "integrations for this kind.", &
1293 10272 : usage="RADIAL_GRID 70", default_i_val=50)
1294 10272 : CALL section_add_keyword(section, keyword)
1295 10272 : CALL keyword_release(keyword)
1296 :
1297 : CALL keyword_create(keyword, __LOCATION__, name="MM_RADIUS", &
1298 : description="Defines the radius of the electrostatic multipole "// &
1299 : "of the atom in Fist. This radius applies to the charge, the "// &
1300 : "dipole and the quadrupole. When zero, the atom is treated as "// &
1301 : "a point multipole, otherwise it is treated as a Gaussian "// &
1302 : "charge distribution with the given radius: "// &
1303 : "p(x,y,z)*N*exp(-(x**2+y**2+z**2)/(2*MM_RADIUS**2)), where N is "// &
1304 : "a normalization constant. In the core-shell model, only the "// &
1305 : "shell is treated as a Gaussian and the core is always a point "// &
1306 : "charge.", &
1307 : usage="MM_RADIUS {real}", default_r_val=0.0_dp, type_of_var=real_t, &
1308 10272 : unit_str="angstrom", n_var=1)
1309 10272 : CALL section_add_keyword(section, keyword)
1310 10272 : CALL keyword_release(keyword)
1311 :
1312 : CALL keyword_create(keyword, __LOCATION__, name="DFTB3_PARAM", &
1313 : description="The third order parameter (derivative of hardness) used in "// &
1314 : "diagonal DFTB3 correction.", &
1315 10272 : usage="DFTB3_PARAM 0.2", default_r_val=0.0_dp)
1316 10272 : CALL section_add_keyword(section, keyword)
1317 10272 : CALL keyword_release(keyword)
1318 :
1319 : CALL keyword_create(keyword, __LOCATION__, name="LMAX_DFTB", &
1320 : description="The maximum l-quantum number of the DFTB basis for this kind.", &
1321 10272 : usage="LMAX_DFTB 1", default_i_val=-1)
1322 10272 : CALL section_add_keyword(section, keyword)
1323 10272 : CALL keyword_release(keyword)
1324 :
1325 : CALL keyword_create(keyword, __LOCATION__, name="MAO", &
1326 : description="The number of MAOs (Modified Atomic Orbitals) for this kind.", &
1327 10272 : usage="MAO 4", default_i_val=-1)
1328 10272 : CALL section_add_keyword(section, keyword)
1329 10272 : CALL keyword_release(keyword)
1330 :
1331 : ! Logicals
1332 : CALL keyword_create(keyword, __LOCATION__, name="SE_P_ORBITALS_ON_H", &
1333 : description="Forces the usage of p-orbitals on H for SEMI-EMPIRICAL calculations."// &
1334 : " This keyword applies only when the KIND is specifying an Hydrogen element."// &
1335 : " It is ignored in all other cases. ", &
1336 10272 : usage="SE_P_ORBITALS_ON_H", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1337 10272 : CALL section_add_keyword(section, keyword)
1338 10272 : CALL keyword_release(keyword)
1339 :
1340 : CALL keyword_create(keyword, __LOCATION__, name="GPW_TYPE", &
1341 : description="Force one type to be treated by the GPW scheme,"// &
1342 : " whatever are its primitives, even if the GAPW method is used", &
1343 10272 : usage="GPW_TYPE", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1344 10272 : CALL section_add_keyword(section, keyword)
1345 10272 : CALL keyword_release(keyword)
1346 :
1347 : CALL keyword_create(keyword, __LOCATION__, &
1348 : name="GHOST", &
1349 : description="This keyword makes all atoms of this kind "// &
1350 : "ghost atoms, i.e. without pseudo or nuclear charge. "// &
1351 : "Useful to just have the basis set at that position (e.g. BSSE calculations), "// &
1352 : "or to have a non-interacting particle with BASIS_SET NONE", &
1353 : usage="GHOST", &
1354 : default_l_val=.FALSE., &
1355 10272 : lone_keyword_l_val=.TRUE.)
1356 10272 : CALL section_add_keyword(section, keyword)
1357 10272 : CALL keyword_release(keyword)
1358 :
1359 : CALL keyword_create(keyword, __LOCATION__, &
1360 : name="MONOVALENT", &
1361 : description="This keyword makes all atoms of this kind monovalent, i.e. with "// &
1362 : "a single electron and nuclear charge set to 1.0. Used to saturate dangling bonds, "// &
1363 : "ideally in conjunction with a monovalent pseudopotential. Currently GTH only.", &
1364 : usage="MONOVALENT", &
1365 : default_l_val=.FALSE., &
1366 10272 : lone_keyword_l_val=.TRUE.)
1367 10272 : CALL section_add_keyword(section, keyword)
1368 10272 : CALL keyword_release(keyword)
1369 :
1370 : CALL keyword_create(keyword, __LOCATION__, &
1371 : name="FLOATING_BASIS_CENTER", &
1372 : description="This keyword makes all atoms of this kind "// &
1373 : "floating functions, i.e. without pseudo or nuclear charge"// &
1374 : " which are subject to a geometry optimization in the outer SCF.", &
1375 : usage="FLOATING_BASIS_CENTER", &
1376 : default_l_val=.FALSE., &
1377 10272 : lone_keyword_l_val=.TRUE.)
1378 10272 : CALL section_add_keyword(section, keyword)
1379 10272 : CALL keyword_release(keyword)
1380 :
1381 : CALL keyword_create(keyword, __LOCATION__, &
1382 : name="NO_OPTIMIZE", &
1383 : description="Skip optimization of this type (used in specific basis set or"// &
1384 : " potential optimization schemes)", &
1385 : usage="NO_OPTIMIZE", &
1386 : default_l_val=.FALSE., &
1387 10272 : lone_keyword_l_val=.TRUE.)
1388 10272 : CALL section_add_keyword(section, keyword)
1389 10272 : CALL keyword_release(keyword)
1390 :
1391 : CALL keyword_create(keyword, __LOCATION__, name="PAO_BASIS_SIZE", &
1392 : description="The block size used for the polarized atomic orbital basis. "// &
1393 : "Setting PAO_BASIS_SIZE to the size of the primary basis or to a value "// &
1394 : "below one will disables the PAO method for the given atomic kind. "// &
1395 10272 : "By default PAO is disbabled.", default_i_val=0)
1396 10272 : CALL section_add_keyword(section, keyword)
1397 10272 : CALL keyword_release(keyword)
1398 :
1399 : CALL keyword_create(keyword, __LOCATION__, name="PAO_MODEL_FILE", type_of_var=lchar_t, &
1400 10272 : description="The filename of the PyTorch model for predicting PAO basis sets.")
1401 10272 : CALL section_add_keyword(section, keyword)
1402 10272 : CALL keyword_release(keyword)
1403 :
1404 10272 : NULLIFY (subsection)
1405 10272 : CALL create_pao_potential_section(subsection)
1406 10272 : CALL section_add_subsection(section, subsection)
1407 10272 : CALL section_release(subsection)
1408 :
1409 10272 : CALL create_pao_descriptor_section(subsection)
1410 10272 : CALL section_add_subsection(section, subsection)
1411 10272 : CALL section_release(subsection)
1412 :
1413 10272 : CALL create_basis_section(subsection)
1414 10272 : CALL section_add_subsection(section, subsection)
1415 10272 : CALL section_release(subsection)
1416 :
1417 10272 : CALL create_potential_section(subsection)
1418 10272 : CALL section_add_subsection(section, subsection)
1419 10272 : CALL section_release(subsection)
1420 :
1421 10272 : CALL create_kgpot_section(subsection)
1422 10272 : CALL section_add_subsection(section, subsection)
1423 10272 : CALL section_release(subsection)
1424 :
1425 10272 : CALL create_dft_plus_u_section(subsection)
1426 10272 : CALL section_add_subsection(section, subsection)
1427 10272 : CALL section_release(subsection)
1428 :
1429 10272 : CALL create_bs_section(subsection)
1430 10272 : CALL section_add_subsection(section, subsection)
1431 10272 : CALL section_release(subsection)
1432 :
1433 10272 : END SUBROUTINE create_kind_section
1434 :
1435 : ! **************************************************************************************************
1436 : !> \brief Creates the PAO_POTENTIAL section
1437 : !> \param section the section to create
1438 : !> \author Ole Schuett
1439 : ! **************************************************************************************************
1440 10272 : SUBROUTINE create_pao_potential_section(section)
1441 : TYPE(section_type), POINTER :: section
1442 :
1443 : TYPE(keyword_type), POINTER :: keyword
1444 :
1445 10272 : CPASSERT(.NOT. ASSOCIATED(section))
1446 10272 : NULLIFY (keyword)
1447 :
1448 : CALL section_create(section, __LOCATION__, name="PAO_POTENTIAL", repeats=.TRUE., &
1449 10272 : description="Settings of the PAO potentials, which are atomic kind specific.")
1450 :
1451 : CALL keyword_create(keyword, __LOCATION__, name="MAXL", &
1452 : description="Maximum angular moment of the potential "// &
1453 10272 : "(must be an even number).", default_i_val=0)
1454 10272 : CALL section_add_keyword(section, keyword)
1455 10272 : CALL keyword_release(keyword)
1456 :
1457 : CALL keyword_create(keyword, __LOCATION__, name="BETA", &
1458 : description="Exponent of the Gaussian potential term.", &
1459 10272 : default_r_val=1.0_dp)
1460 10272 : CALL section_add_keyword(section, keyword)
1461 10272 : CALL keyword_release(keyword)
1462 :
1463 : CALL keyword_create(keyword, __LOCATION__, name="WEIGHT", &
1464 : description="Weight of Gaussian potential term.", &
1465 10272 : default_r_val=1.0_dp)
1466 10272 : CALL section_add_keyword(section, keyword)
1467 10272 : CALL keyword_release(keyword)
1468 :
1469 : CALL keyword_create(keyword, __LOCATION__, name="MAX_PROJECTOR", &
1470 : description="Maximum angular moment of the potential's projectors. "// &
1471 10272 : "Used only by the GTH parametrization", default_i_val=2)
1472 10272 : CALL section_add_keyword(section, keyword)
1473 10272 : CALL keyword_release(keyword)
1474 :
1475 10272 : END SUBROUTINE create_pao_potential_section
1476 :
1477 : ! **************************************************************************************************
1478 : !> \brief Creates the PAO_DESCRIPTOR section
1479 : !> \param section the section to create
1480 : !> \author Ole Schuett
1481 : ! **************************************************************************************************
1482 10272 : SUBROUTINE create_pao_descriptor_section(section)
1483 : TYPE(section_type), POINTER :: section
1484 :
1485 : TYPE(keyword_type), POINTER :: keyword
1486 :
1487 10272 : CPASSERT(.NOT. ASSOCIATED(section))
1488 10272 : NULLIFY (keyword)
1489 :
1490 : CALL section_create(section, __LOCATION__, name="PAO_DESCRIPTOR", repeats=.TRUE., &
1491 10272 : description="Settings of the PAO descriptor, which are atomic kind specific.")
1492 :
1493 : CALL keyword_create(keyword, __LOCATION__, name="BETA", &
1494 : description="Exponent of the Gaussian potential term.", &
1495 10272 : default_r_val=1.0_dp)
1496 10272 : CALL section_add_keyword(section, keyword)
1497 10272 : CALL keyword_release(keyword)
1498 :
1499 : CALL keyword_create(keyword, __LOCATION__, name="SCREENING", &
1500 : description="Exponent of the Gaussian screening.", &
1501 10272 : default_r_val=0.2_dp)
1502 10272 : CALL section_add_keyword(section, keyword)
1503 10272 : CALL keyword_release(keyword)
1504 :
1505 : CALL keyword_create(keyword, __LOCATION__, name="WEIGHT", &
1506 : description="Weight of Gaussian potential term.", &
1507 10272 : default_r_val=1.0_dp)
1508 10272 : CALL section_add_keyword(section, keyword)
1509 10272 : CALL keyword_release(keyword)
1510 :
1511 10272 : END SUBROUTINE create_pao_descriptor_section
1512 :
1513 : ! **************************************************************************************************
1514 : !> \brief Create CP2K input section for BS method: imposing atomic orbital occupation
1515 : !> different from default in initialization of the density matrix
1516 : !> it works only with GUESS ATOMIC
1517 : !> \param section ...
1518 : !> \date 05.08.2009
1519 : !> \author MI
1520 : !> \version 1.0
1521 : ! **************************************************************************************************
1522 10272 : SUBROUTINE create_bs_section(section)
1523 :
1524 : TYPE(section_type), POINTER :: section
1525 :
1526 : TYPE(keyword_type), POINTER :: keyword
1527 : TYPE(section_type), POINTER :: subsection
1528 :
1529 10272 : CPASSERT(.NOT. ASSOCIATED(section))
1530 :
1531 : CALL section_create(section, __LOCATION__, &
1532 : name="BS", &
1533 : description="Define the required atomic orbital occupation "// &
1534 : "assigned in initialization of the density matrix, by adding or "// &
1535 : "subtracting electrons from specific angular momentum channels. "// &
1536 : "It works only with GUESS ATOMIC.", &
1537 : n_keywords=0, &
1538 : n_subsections=2, &
1539 10272 : repeats=.FALSE.)
1540 :
1541 10272 : NULLIFY (keyword, subsection)
1542 :
1543 : CALL keyword_create(keyword, __LOCATION__, &
1544 : name="_SECTION_PARAMETERS_", &
1545 : description="controls the activation of the BS section", &
1546 : usage="&BS ON", &
1547 : default_l_val=.FALSE., &
1548 10272 : lone_keyword_l_val=.TRUE.)
1549 10272 : CALL section_add_keyword(section, keyword)
1550 10272 : CALL keyword_release(keyword)
1551 :
1552 : CALL section_create(subsection, __LOCATION__, name="ALPHA", description="alpha spin", &
1553 : n_keywords=3, &
1554 : n_subsections=0, &
1555 10272 : repeats=.FALSE.)
1556 :
1557 : CALL keyword_create(keyword, __LOCATION__, &
1558 : name="NEL", &
1559 : description="Orbital ccupation change per angular momentum quantum number. "// &
1560 : "In unrestricted calculations applied to spin alpha.", &
1561 : repeats=.FALSE., &
1562 : n_var=-1, &
1563 : default_i_val=-1, &
1564 10272 : usage="NEL 2")
1565 10272 : CALL section_add_keyword(subsection, keyword)
1566 10272 : CALL keyword_release(keyword)
1567 :
1568 : CALL keyword_create(keyword, __LOCATION__, &
1569 : name="L", &
1570 : variants=["L"], &
1571 : description="Angular momentum quantum number of the "// &
1572 : "orbitals whose occupation is changed", &
1573 : repeats=.FALSE., &
1574 : n_var=-1, &
1575 : default_i_val=-1, &
1576 20544 : usage="L 2")
1577 10272 : CALL section_add_keyword(subsection, keyword)
1578 10272 : CALL keyword_release(keyword)
1579 :
1580 : CALL keyword_create(keyword, __LOCATION__, &
1581 : name="N", &
1582 : variants=["N"], &
1583 : description="Principal quantum number of the "// &
1584 : "orbitals whose occupation is changed. "// &
1585 : "Default is the first not occupied", &
1586 : repeats=.FALSE., &
1587 : n_var=-1, &
1588 : default_i_val=0, &
1589 20544 : usage="N 2")
1590 10272 : CALL section_add_keyword(subsection, keyword)
1591 10272 : CALL keyword_release(keyword)
1592 10272 : CALL section_add_subsection(section, subsection)
1593 10272 : CALL section_release(subsection)
1594 :
1595 : CALL section_create(subsection, __LOCATION__, name="BETA", description="beta spin", &
1596 : n_keywords=3, &
1597 : n_subsections=0, &
1598 10272 : repeats=.FALSE.)
1599 :
1600 : CALL keyword_create(keyword, __LOCATION__, &
1601 : name="NEL", &
1602 : description="Orbital ccupation change per angular momentum quantum number. "// &
1603 : "Applied to spin beta and active only in unrestricted calculations.", &
1604 : repeats=.FALSE., &
1605 : n_var=-1, &
1606 : default_i_val=-1, &
1607 10272 : usage="NEL 2")
1608 10272 : CALL section_add_keyword(subsection, keyword)
1609 10272 : CALL keyword_release(keyword)
1610 :
1611 : CALL keyword_create(keyword, __LOCATION__, &
1612 : name="L", &
1613 : description="Angular momentum quantum number of the "// &
1614 : "orbitals of beta spin whose occupation is changed. "// &
1615 : "Active only for unrestricted calculations", &
1616 : repeats=.FALSE., &
1617 : n_var=-1, &
1618 : default_i_val=-1, &
1619 10272 : usage="L 2")
1620 10272 : CALL section_add_keyword(subsection, keyword)
1621 10272 : CALL keyword_release(keyword)
1622 :
1623 : CALL keyword_create(keyword, __LOCATION__, &
1624 : name="N", &
1625 : description="Principal quantum number of the "// &
1626 : "orbitals of beta spin whose occupation is changed. "// &
1627 : "Default is the first not occupied. "// &
1628 : "Active only for unrestricted calculations", &
1629 : repeats=.FALSE., &
1630 : n_var=-1, &
1631 : default_i_val=0, &
1632 10272 : usage="N 2")
1633 10272 : CALL section_add_keyword(subsection, keyword)
1634 10272 : CALL keyword_release(keyword)
1635 :
1636 10272 : CALL section_add_subsection(section, subsection)
1637 10272 : CALL section_release(subsection)
1638 :
1639 10272 : END SUBROUTINE create_bs_section
1640 :
1641 : ! **************************************************************************************************
1642 : !> \brief Create the topology section for FIST.. and the base is running running...
1643 : !> Contains all information regarding topology to be read in input file..
1644 : !> \param section the section to create
1645 : !> \author teo
1646 : ! **************************************************************************************************
1647 10272 : SUBROUTINE create_topology_section(section)
1648 : TYPE(section_type), POINTER :: section
1649 :
1650 : TYPE(keyword_type), POINTER :: keyword
1651 : TYPE(section_type), POINTER :: print_key, subsection
1652 :
1653 10272 : CPASSERT(.NOT. ASSOCIATED(section))
1654 : CALL section_create(section, __LOCATION__, name="TOPOLOGY", &
1655 : description="Section specifying information regarding how to handle the topology"// &
1656 : " for classical runs.", &
1657 10272 : n_keywords=5, n_subsections=0, repeats=.FALSE.)
1658 :
1659 10272 : NULLIFY (keyword, print_key)
1660 : ! Logical
1661 : CALL keyword_create(keyword, __LOCATION__, name="USE_ELEMENT_AS_KIND", &
1662 : description="Kinds are generated according to the element name."// &
1663 : " Default=True for SE and TB methods.", &
1664 : usage="USE_ELEMENT_AS_KIND logical", &
1665 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1666 10272 : CALL section_add_keyword(section, keyword)
1667 10272 : CALL keyword_release(keyword)
1668 :
1669 : CALL keyword_create(keyword, __LOCATION__, name="CHARGE_OCCUP", &
1670 : variants=["CHARGE_O"], &
1671 : description="Read MM charges from the OCCUP field of PDB file.", &
1672 : usage="CHARGE_OCCUP logical", &
1673 20544 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1674 10272 : CALL section_add_keyword(section, keyword)
1675 10272 : CALL keyword_release(keyword)
1676 :
1677 : CALL keyword_create(keyword, __LOCATION__, name="CHARGE_BETA", &
1678 : variants=["CHARGE_B"], &
1679 : description="Read MM charges from the BETA field of PDB file.", &
1680 : usage="CHARGE_BETA logical", &
1681 20544 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1682 10272 : CALL section_add_keyword(section, keyword)
1683 10272 : CALL keyword_release(keyword)
1684 :
1685 : CALL keyword_create(keyword, __LOCATION__, name="CHARGE_EXTENDED", &
1686 : description="Read MM charges from the very last field of PDB file (starting from column 81)."// &
1687 : " No limitations of number of digits.", &
1688 : usage="CHARGE_EXTENDED logical", &
1689 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1690 10272 : CALL section_add_keyword(section, keyword)
1691 10272 : CALL keyword_release(keyword)
1692 :
1693 : CALL keyword_create(keyword, __LOCATION__, name="PARA_RES", &
1694 : description="For a protein, each residue is now considered a molecule", &
1695 : usage="PARA_RES logical", &
1696 10272 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
1697 10272 : CALL section_add_keyword(section, keyword)
1698 10272 : CALL keyword_release(keyword)
1699 :
1700 : CALL keyword_create(keyword, __LOCATION__, name="MOL_CHECK", &
1701 : description="Check molecules have the same number of atom and names.", &
1702 : usage="MOL_CHECK logical", &
1703 10272 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
1704 10272 : CALL section_add_keyword(section, keyword)
1705 10272 : CALL keyword_release(keyword)
1706 :
1707 : CALL keyword_create(keyword, __LOCATION__, name="USE_G96_VELOCITY", &
1708 : description="Use the velocities in the G96 coordinate files as the starting velocity", &
1709 : usage="USE_G96_VELOCITY logical", &
1710 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1711 10272 : CALL section_add_keyword(section, keyword)
1712 10272 : CALL keyword_release(keyword)
1713 :
1714 : ! Character
1715 : CALL keyword_create(keyword, __LOCATION__, name="COORD_FILE_NAME", &
1716 : variants=s2a("COORD_FILE"), &
1717 : description="Specifies the filename that contains coordinates. "// &
1718 : "In case the CELL section is not set explicitly but this file "// &
1719 : "contains cell information, including CIF, PDB and (Extended) XYZ "// &
1720 : "formats, this file is also parsed for setting up the simulation cell.", &
1721 10272 : usage="COORD_FILE_NAME <FILENAME>", type_of_var=lchar_t)
1722 10272 : CALL section_add_keyword(section, keyword)
1723 10272 : CALL keyword_release(keyword)
1724 :
1725 : CALL keyword_create(keyword, __LOCATION__, name="COORD_FILE_FORMAT", &
1726 : variants=s2a("COORDINATE"), &
1727 : description="Set up the way in which coordinates will be read.", &
1728 : usage="COORD_FILE_FORMAT (OFF|PDB|XYZ|G96|CRD|CIF|XTL|CP2K)", &
1729 : enum_c_vals=s2a("OFF", "PDB", "XYZ", "G96", "CRD", "CIF", "XTL", "CP2K"), &
1730 : enum_i_vals=[do_coord_off, do_coord_pdb, do_coord_xyz, do_coord_g96, do_coord_crd, &
1731 : do_coord_cif, do_coord_xtl, do_coord_cp2k], &
1732 : enum_desc=s2a( &
1733 : "Coordinates read in the &COORD section of the input file", &
1734 : "Coordinates provided through a PDB file format", &
1735 : "Coordinates provided through an XYZ file format", &
1736 : "Coordinates provided through a GROMOS96 file format", &
1737 : "Coordinates provided through an AMBER file format", &
1738 : "Coordinates provided through a CIF (Crystallographic Information File) file format", &
1739 : "Coordinates provided through a XTL (MSI native) file format", &
1740 : "Read the coordinates in CP2K &COORD section format from an external file. "// &
1741 : "NOTE: This file will be overwritten with the latest coordinates."), &
1742 10272 : default_i_val=do_coord_off)
1743 10272 : CALL section_add_keyword(section, keyword)
1744 10272 : CALL keyword_release(keyword)
1745 :
1746 : CALL keyword_create(keyword, __LOCATION__, name="NUMBER_OF_ATOMS", &
1747 : variants=s2a("NATOMS", "NATOM"), &
1748 : description="Optionally define the number of atoms read from an external file "// &
1749 : "(see COORD_FILE_NAME) if the COORD_FILE_FORMAT CP2K is used", &
1750 : repeats=.FALSE., &
1751 : n_var=1, &
1752 : type_of_var=integer_t, &
1753 : default_i_val=-1, &
1754 10272 : usage="NATOMS 768000")
1755 10272 : CALL section_add_keyword(section, keyword)
1756 10272 : CALL keyword_release(keyword)
1757 :
1758 10272 : CALL connectivity_framework(section, do_conn_generate)
1759 :
1760 : CALL keyword_create(keyword, __LOCATION__, name="DISABLE_EXCLUSION_LISTS", &
1761 : description="Do not build any exclusion lists.", &
1762 : usage="DISABLE_EXCLUSION_LISTS", &
1763 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1764 10272 : CALL section_add_keyword(section, keyword)
1765 10272 : CALL keyword_release(keyword)
1766 :
1767 : CALL keyword_create(keyword, __LOCATION__, name="EXCLUDE_VDW", &
1768 : description="Specifies which kind of Van der Waals interaction to skip.", &
1769 : usage="EXCLUDE_VDW (1-1||1-2||1-3||1-4)", &
1770 : enum_c_vals=s2a("1-1", "1-2", "1-3", "1-4"), &
1771 : enum_i_vals=[do_skip_11, do_skip_12, do_skip_13, do_skip_14], &
1772 10272 : default_i_val=do_skip_13)
1773 10272 : CALL section_add_keyword(section, keyword)
1774 10272 : CALL keyword_release(keyword)
1775 :
1776 : CALL keyword_create(keyword, __LOCATION__, name="EXCLUDE_EI", &
1777 : description="Specifies which kind of Electrostatic interaction to skip.", &
1778 : usage="EXCLUDE_EI (1-1||1-2||1-3||1-4)", &
1779 : enum_c_vals=s2a("1-1", "1-2", "1-3", "1-4"), &
1780 : enum_i_vals=[do_skip_11, do_skip_12, do_skip_13, do_skip_14], &
1781 10272 : default_i_val=do_skip_13)
1782 10272 : CALL section_add_keyword(section, keyword)
1783 10272 : CALL keyword_release(keyword)
1784 :
1785 : CALL keyword_create(keyword, __LOCATION__, name="AUTOGEN_EXCLUDE_LISTS", &
1786 : description="When True, the exclude lists are solely based on"// &
1787 : " the bond data in the topology. The (minimal)"// &
1788 : " number of bonds between two atoms is used to"// &
1789 : " determine if the atom pair is added to an"// &
1790 : " exclusion list. When False, 1-2 exclusion is based"// &
1791 : " on bonds in the topology, 1-3 exclusion is based"// &
1792 : " on bonds and bends in the topology, 1-4 exclusion"// &
1793 : " is based on bonds, bends and dihedrals in the"// &
1794 : " topology. This implies that a missing dihedral in"// &
1795 : " the topology will cause the corresponding 1-4 pair"// &
1796 : " not to be in the exclusion list, in case 1-4"// &
1797 : " exclusion is requested for VDW or EI interactions.", &
1798 : usage="AUTOGEN_EXCLUDE_LISTS logical", &
1799 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1800 10272 : CALL section_add_keyword(section, keyword)
1801 10272 : CALL keyword_release(keyword)
1802 :
1803 : CALL keyword_create( &
1804 : keyword, __LOCATION__, name="MULTIPLE_UNIT_CELL", &
1805 : description="Specifies the numbers of repetition in space (X, Y, Z) of the defined cell, "// &
1806 : "assuming it as a unit cell. This keyword affects only the coordinates specification. The same keyword "// &
1807 : "in SUBSYS%CELL%MULTIPLE_UNIT_CELL should be modified in order to affect the cell "// &
1808 : "specification.", usage="MULTIPLE_UNIT_CELL 1 1 1", &
1809 10272 : n_var=3, default_i_vals=[1, 1, 1], repeats=.FALSE.)
1810 10272 : CALL section_add_keyword(section, keyword)
1811 10272 : CALL keyword_release(keyword)
1812 :
1813 : CALL keyword_create(keyword, __LOCATION__, name="MEMORY_PROGRESSION_FACTOR", &
1814 : description="This keyword is quite technical and should normally not be changed by the user. It "// &
1815 : "affects the memory allocation during the construction of the topology. It does NOT affect the "// &
1816 : "memory used once the topology is built.", &
1817 10272 : n_var=1, default_r_val=1.2_dp, repeats=.FALSE.)
1818 10272 : CALL section_add_keyword(section, keyword)
1819 10272 : CALL keyword_release(keyword)
1820 :
1821 : CALL cp_print_key_section_create(print_key, __LOCATION__, "DUMP_PDB", &
1822 : description="controls the dumping of the PDB at the starting geometry", &
1823 10272 : print_level=debug_print_level, filename="dump")
1824 10272 : CALL section_add_subsection(section, print_key)
1825 :
1826 : CALL keyword_create(keyword, __LOCATION__, name="CHARGE_OCCUP", &
1827 : variants=["CHARGE_O"], &
1828 : description="Write the MM charges to the OCCUP field of the PDB file", &
1829 : usage="CHARGE_OCCUP logical", &
1830 20544 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1831 10272 : CALL section_add_keyword(print_key, keyword)
1832 10272 : CALL keyword_release(keyword)
1833 :
1834 : CALL keyword_create(keyword, __LOCATION__, name="CHARGE_BETA", &
1835 : variants=["CHARGE_B"], &
1836 : description="Write the MM charges to the BETA field of the PDB file", &
1837 : usage="CHARGE_BETA logical", &
1838 20544 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1839 10272 : CALL section_add_keyword(print_key, keyword)
1840 10272 : CALL keyword_release(keyword)
1841 :
1842 : CALL keyword_create(keyword, __LOCATION__, name="CHARGE_EXTENDED", &
1843 : description="Write the MM charges to the very last field of the PDB file (starting from column 81)", &
1844 : usage="CHARGE_EXTENDED logical", &
1845 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
1846 10272 : CALL section_add_keyword(print_key, keyword)
1847 10272 : CALL keyword_release(keyword)
1848 :
1849 10272 : CALL section_release(print_key)
1850 :
1851 : CALL cp_print_key_section_create(print_key, __LOCATION__, "DUMP_PSF", &
1852 : description="controls the dumping of the PSF connectivity", &
1853 10272 : print_level=debug_print_level, filename="dump")
1854 10272 : CALL section_add_subsection(section, print_key)
1855 10272 : CALL section_release(print_key)
1856 :
1857 10272 : NULLIFY (subsection)
1858 10272 : CALL create_exclude_list_section(subsection, "EXCLUDE_VDW_LIST")
1859 10272 : CALL section_add_subsection(section, subsection)
1860 10272 : CALL section_release(subsection)
1861 :
1862 10272 : CALL create_exclude_list_section(subsection, "EXCLUDE_EI_LIST")
1863 10272 : CALL section_add_subsection(section, subsection)
1864 10272 : CALL section_release(subsection)
1865 :
1866 10272 : CALL create_center_section(subsection)
1867 10272 : CALL section_add_subsection(section, subsection)
1868 10272 : CALL section_release(subsection)
1869 :
1870 10272 : CALL create_generate_section(subsection)
1871 10272 : CALL section_add_subsection(section, subsection)
1872 10272 : CALL section_release(subsection)
1873 :
1874 10272 : CALL create_molset_section(subsection)
1875 10272 : CALL section_add_subsection(section, subsection)
1876 10272 : CALL section_release(subsection)
1877 :
1878 10272 : CALL create_fragments_section(subsection)
1879 10272 : CALL section_add_subsection(section, subsection)
1880 10272 : CALL section_release(subsection)
1881 :
1882 10272 : END SUBROUTINE create_topology_section
1883 :
1884 : ! **************************************************************************************************
1885 : !> \brief Setup a list of fine exclusion elements
1886 : !> \param section the section to create
1887 : !> \param header ...
1888 : !> \author Teodoro Laino [tlaino] - 12.2009
1889 : ! **************************************************************************************************
1890 20544 : SUBROUTINE create_exclude_list_section(section, header)
1891 : TYPE(section_type), POINTER :: section
1892 : CHARACTER(LEN=*), INTENT(IN) :: header
1893 :
1894 : TYPE(keyword_type), POINTER :: keyword
1895 :
1896 20544 : CPASSERT(.NOT. ASSOCIATED(section))
1897 20544 : NULLIFY (keyword)
1898 : CALL section_create(section, __LOCATION__, TRIM(header), &
1899 : description="Speficy bonds (via atom kinds) for fine tuning of 1-2 "// &
1900 : "exclusion lists. If this section is not present the 1-2 exclusion is "// &
1901 : "applied to all bond kinds. When this section is present the 1-2 exclusion "// &
1902 : "is applied ONLY to the bonds defined herein. This section allows ONLY fine tuning of 1-2 "// &
1903 : "interactions. ", &
1904 20544 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
1905 :
1906 : CALL keyword_create(keyword, __LOCATION__, name="BOND", &
1907 : description="Specify the atom kinds involved in the bond for which 1-2 exclusion holds.", &
1908 : usage="BOND {KIND1} {KIND2}", type_of_var=char_t, &
1909 20544 : n_var=2)
1910 20544 : CALL section_add_keyword(section, keyword)
1911 20544 : CALL keyword_release(keyword)
1912 20544 : END SUBROUTINE create_exclude_list_section
1913 :
1914 : ! **************************************************************************************************
1915 : !> \brief Specify keywords used to center molecule in the box
1916 : !> \param section the section to create
1917 : !> \author Teodoro Laino [tlaino] - University of Zurich - 06.2009
1918 : ! **************************************************************************************************
1919 10272 : SUBROUTINE create_center_section(section)
1920 : TYPE(section_type), POINTER :: section
1921 :
1922 : TYPE(keyword_type), POINTER :: keyword
1923 :
1924 10272 : CPASSERT(.NOT. ASSOCIATED(section))
1925 10272 : NULLIFY (keyword)
1926 : CALL section_create(section, __LOCATION__, "CENTER_COORDINATES", &
1927 : description="Allows centering the coordinates of the system in the box. "// &
1928 : "The centering point can be defined by the user.", &
1929 10272 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
1930 :
1931 : CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
1932 : description="Controls the activation of the centering method", &
1933 : usage="&CENTER_COORDINATES T", &
1934 : default_l_val=.FALSE., &
1935 10272 : lone_keyword_l_val=.TRUE.)
1936 10272 : CALL section_add_keyword(section, keyword)
1937 10272 : CALL keyword_release(keyword)
1938 :
1939 : CALL keyword_create(keyword, __LOCATION__, name="CENTER_POINT", &
1940 : description="Specify the point used for centering the coordinates. Default is to "// &
1941 : "center the system in cell/2. ", type_of_var=real_t, n_var=3, &
1942 10272 : repeats=.FALSE.)
1943 10272 : CALL section_add_keyword(section, keyword)
1944 10272 : CALL keyword_release(keyword)
1945 10272 : END SUBROUTINE create_center_section
1946 :
1947 : ! **************************************************************************************************
1948 : !> \brief Specify keywords used to setup several fragments
1949 : !> \param section the section to create
1950 : ! **************************************************************************************************
1951 10272 : SUBROUTINE create_fragments_section(section)
1952 : TYPE(section_type), POINTER :: section
1953 :
1954 : TYPE(keyword_type), POINTER :: keyword
1955 : TYPE(section_type), POINTER :: subsection, subsubsection
1956 :
1957 10272 : CPASSERT(.NOT. ASSOCIATED(section))
1958 10272 : NULLIFY (keyword, subsection, subsubsection)
1959 : CALL section_create(section, __LOCATION__, name="FRAGMENTS", &
1960 : description="Specify the fragments of a full system.", &
1961 10272 : n_keywords=1, n_subsections=0, repeats=.FALSE.)
1962 :
1963 : CALL section_create(subsection, __LOCATION__, name="FRAGMENT", &
1964 : description="Specify information about the fragments.", &
1965 10272 : n_keywords=1, n_subsections=0, repeats=.TRUE.)
1966 :
1967 : CALL keyword_create(keyword, __LOCATION__, &
1968 : name="FRAG_RANGE", &
1969 : variants=s2a("RANGE"), &
1970 : description="Defines fragments. This keyword can be repeated.", &
1971 : repeats=.FALSE., &
1972 : n_var=-1, &
1973 : type_of_var=integer_t, &
1974 10272 : usage="FRAG_RANGE 1 5")
1975 10272 : CALL section_add_keyword(subsection, keyword)
1976 10272 : CALL keyword_release(keyword)
1977 :
1978 10272 : CALL section_add_subsection(section, subsection)
1979 10272 : CALL section_release(subsection)
1980 :
1981 10272 : END SUBROUTINE create_fragments_section
1982 :
1983 : ! **************************************************************************************************
1984 : !> \brief Specify keywords used to setup several molecules with few connectivity files
1985 : !> \param section the section to create
1986 : !> \author Teodoro Laino [tlaino] - University of Zurich - 08.2008
1987 : ! **************************************************************************************************
1988 10272 : SUBROUTINE create_molset_section(section)
1989 : TYPE(section_type), POINTER :: section
1990 :
1991 : TYPE(keyword_type), POINTER :: keyword
1992 : TYPE(section_type), POINTER :: subsection, subsubsection
1993 :
1994 10272 : CPASSERT(.NOT. ASSOCIATED(section))
1995 10272 : NULLIFY (keyword, subsection, subsubsection)
1996 : CALL section_create(section, __LOCATION__, name="MOL_SET", &
1997 : description="Specify the connectivity of a full system specifying the connectivity"// &
1998 : " of the fragments of the system.", &
1999 10272 : n_keywords=2, n_subsections=0, repeats=.FALSE.)
2000 :
2001 : ! MOLECULES
2002 : CALL section_create(subsection, __LOCATION__, name="MOLECULE", &
2003 : description="Specify information about the connectivity of single molecules", &
2004 10272 : n_keywords=2, n_subsections=0, repeats=.TRUE.)
2005 :
2006 : CALL keyword_create(keyword, __LOCATION__, name="NMOL", &
2007 : description="number of molecules ", &
2008 10272 : usage="NMOL {integer}", default_i_val=1)
2009 10272 : CALL section_add_keyword(subsection, keyword)
2010 10272 : CALL keyword_release(keyword)
2011 :
2012 10272 : CALL connectivity_framework(subsection, do_conn_psf)
2013 10272 : CALL section_add_subsection(section, subsection)
2014 10272 : CALL section_release(subsection)
2015 :
2016 : ! MERGE MOLECULES
2017 : CALL section_create(subsection, __LOCATION__, name="MERGE_MOLECULES", &
2018 : description="Enables the creation of connecting bridges (bonds, angles, torsions, impropers)"// &
2019 : " between the two or more molecules defined with independent connectivity.", &
2020 10272 : n_keywords=2, n_subsections=0, repeats=.FALSE.)
2021 :
2022 : CALL section_create(subsubsection, __LOCATION__, name="bonds", &
2023 10272 : description="Defines new bonds", n_keywords=2, n_subsections=0, repeats=.FALSE.)
2024 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
2025 : description="Two integer indexes per line defining the new bond."// &
2026 : " Indexes must be relative to the full system and not to the single molecules", &
2027 : repeats=.TRUE., &
2028 10272 : usage="{Integer} {Integer}", type_of_var=integer_t, n_var=2)
2029 10272 : CALL section_add_keyword(subsubsection, keyword)
2030 10272 : CALL keyword_release(keyword)
2031 10272 : CALL section_add_subsection(subsection, subsubsection)
2032 10272 : CALL section_release(subsubsection)
2033 :
2034 : CALL section_create(subsubsection, __LOCATION__, name="angles", &
2035 : description="Defines new angles", n_keywords=2, n_subsections=0, &
2036 10272 : repeats=.FALSE.)
2037 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
2038 : description="Three integer indexes per line defining the new angle"// &
2039 : " Indexes must be relative to the full system and not to the single molecules", repeats=.TRUE., &
2040 10272 : usage="{Integer} {Integer} {Integer}", type_of_var=integer_t, n_var=3)
2041 10272 : CALL section_add_keyword(subsubsection, keyword)
2042 10272 : CALL keyword_release(keyword)
2043 10272 : CALL section_add_subsection(subsection, subsubsection)
2044 10272 : CALL section_release(subsubsection)
2045 :
2046 : CALL section_create(subsubsection, __LOCATION__, name="torsions", &
2047 : description="Defines new torsions", n_keywords=2, n_subsections=0, &
2048 10272 : repeats=.FALSE.)
2049 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
2050 : description="Four integer indexes per line defining the new torsion"// &
2051 : " Indexes must be relative to the full system and not to the single molecules", repeats=.TRUE., &
2052 10272 : usage="{Integer} {Integer} {Integer} {Integer}", type_of_var=integer_t, n_var=4)
2053 10272 : CALL section_add_keyword(subsubsection, keyword)
2054 10272 : CALL keyword_release(keyword)
2055 10272 : CALL section_add_subsection(subsection, subsubsection)
2056 10272 : CALL section_release(subsubsection)
2057 :
2058 : CALL section_create(subsubsection, __LOCATION__, name="impropers", &
2059 : description="Defines new impropers", n_keywords=2, n_subsections=0, &
2060 10272 : repeats=.FALSE.)
2061 : CALL keyword_create(keyword, __LOCATION__, name="_DEFAULT_KEYWORD_", &
2062 : description="Four integer indexes per line defining the new improper"// &
2063 : " Indexes must be relative to the full system and not to the single molecules", repeats=.TRUE., &
2064 10272 : usage="{Integer} {Integer} {Integer} {Integer}", type_of_var=integer_t, n_var=4)
2065 10272 : CALL section_add_keyword(subsubsection, keyword)
2066 10272 : CALL keyword_release(keyword)
2067 10272 : CALL section_add_subsection(subsection, subsubsection)
2068 10272 : CALL section_release(subsubsection)
2069 :
2070 10272 : CALL section_add_subsection(section, subsection)
2071 10272 : CALL section_release(subsection)
2072 :
2073 10272 : END SUBROUTINE create_molset_section
2074 :
2075 : ! **************************************************************************************************
2076 : !> \brief Specify keywords used to generate connectivity
2077 : !> \param section the section to create
2078 : !> \author Teodoro Laino [tlaino] - University of Zurich - 08.2008
2079 : ! **************************************************************************************************
2080 10272 : SUBROUTINE create_generate_section(section)
2081 : TYPE(section_type), POINTER :: section
2082 :
2083 : TYPE(keyword_type), POINTER :: keyword
2084 : TYPE(section_type), POINTER :: subsection
2085 :
2086 10272 : CPASSERT(.NOT. ASSOCIATED(section))
2087 10272 : NULLIFY (keyword, subsection)
2088 : CALL section_create(section, __LOCATION__, name="GENERATE", &
2089 : description="Setup of keywords controlling the generation of the connectivity", &
2090 10272 : n_keywords=2, n_subsections=0, repeats=.TRUE.)
2091 :
2092 : CALL keyword_create(keyword, __LOCATION__, name="REORDER", &
2093 : description="Reorder a list of atomic coordinates into order so it can be packed correctly.", &
2094 : usage="REORDER <LOGICAL>", &
2095 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2096 10272 : CALL section_add_keyword(section, keyword)
2097 10272 : CALL keyword_release(keyword)
2098 :
2099 : CALL keyword_create(keyword, __LOCATION__, name="CREATE_MOLECULES", &
2100 : description="Create molecules names and definition. Can be used to override the"// &
2101 : " molecules specifications of a possible input connectivity or to create molecules"// &
2102 : " specifications for file types as XYZ, missing of molecules definitions.", &
2103 : usage="CREATE_MOLECULES <LOGICAL>", &
2104 10272 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
2105 10272 : CALL section_add_keyword(section, keyword)
2106 10272 : CALL keyword_release(keyword)
2107 :
2108 : CALL keyword_create(keyword, __LOCATION__, name="BONDPARM", &
2109 : description="Used in conjunction with BONDPARM_FACTOR to "// &
2110 : "help determine wheather there is bonding "// &
2111 : "between two atoms based on a distance criteria. "// &
2112 : "Can use covalent radii information or VDW radii information", &
2113 : usage="BONDPARM (COVALENT||VDW)", &
2114 : enum_c_vals=s2a("COVALENT", "VDW"), &
2115 : enum_i_vals=[do_bondparm_covalent, do_bondparm_vdw], &
2116 10272 : default_i_val=do_bondparm_covalent)
2117 10272 : CALL section_add_keyword(section, keyword)
2118 10272 : CALL keyword_release(keyword)
2119 :
2120 : CALL keyword_create(keyword, __LOCATION__, name="BONDPARM_FACTOR", &
2121 : description="Used in conjunction with BONDPARM to help "// &
2122 : "determine wheather there is bonding between "// &
2123 : "two atoms based on a distance criteria.", &
2124 10272 : usage="bondparm_factor {real}", default_r_val=1.1_dp)
2125 10272 : CALL section_add_keyword(section, keyword)
2126 10272 : CALL keyword_release(keyword)
2127 :
2128 : CALL keyword_create(keyword, __LOCATION__, name="BONDLENGTH_MAX", &
2129 : description="Maximum distance to generate neighbor lists to build connectivity", &
2130 : usage="BONDLENGTH_MAX <real>", &
2131 : default_r_val=cp_unit_to_cp2k(value=3.0_dp, unit_str="angstrom"), &
2132 10272 : unit_str="angstrom")
2133 10272 : CALL section_add_keyword(section, keyword)
2134 10272 : CALL keyword_release(keyword)
2135 :
2136 : CALL keyword_create(keyword, __LOCATION__, name="BONDLENGTH_MIN", &
2137 : description="Minimum distance to generate neighbor lists to build connectivity", &
2138 : usage="BONDLENGTH_MIN <real>", &
2139 : default_r_val=cp_unit_to_cp2k(value=0.01_dp, unit_str="angstrom"), &
2140 10272 : unit_str="angstrom")
2141 10272 : CALL section_add_keyword(section, keyword)
2142 10272 : CALL keyword_release(keyword)
2143 :
2144 : ! BONDS
2145 : CALL section_create(subsection, __LOCATION__, name="BOND", &
2146 : description="Section used to add/remove bonds in the connectivity."// &
2147 : " Useful for systems with a complex connectivity, difficult to find out automatically.", &
2148 10272 : n_keywords=1, n_subsections=0, repeats=.TRUE.)
2149 :
2150 : CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
2151 : description="controls the activation of the bond", &
2152 : usage="&BOND (ADD|REMOVE)", &
2153 : enum_c_vals=s2a("ADD", "REMOVE"), &
2154 : enum_i_vals=[do_add, do_remove], &
2155 10272 : default_i_val=do_add)
2156 10272 : CALL section_add_keyword(subsection, keyword)
2157 10272 : CALL keyword_release(keyword)
2158 :
2159 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
2160 : description="Specifies two atomic index united by a covalent bond", &
2161 : usage="ATOMS {integer} {integer}", type_of_var=integer_t, n_var=2, &
2162 10272 : repeats=.TRUE.)
2163 10272 : CALL section_add_keyword(subsection, keyword)
2164 10272 : CALL keyword_release(keyword)
2165 :
2166 10272 : CALL section_add_subsection(section, subsection)
2167 10272 : CALL section_release(subsection)
2168 :
2169 : ! ANGLES
2170 : CALL section_create(subsection, __LOCATION__, name="ANGLE", &
2171 : description="Section used to add/remove angles in the connectivity."// &
2172 : " Useful for systems with a complex connectivity, difficult to find out automatically.", &
2173 10272 : n_keywords=1, n_subsections=0, repeats=.TRUE.)
2174 :
2175 : CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
2176 : description="controls the activation of the bond", &
2177 : usage="&ANGLE (ADD|REMOVE)", &
2178 : enum_c_vals=s2a("ADD", "REMOVE"), &
2179 : enum_i_vals=[do_add, do_remove], &
2180 10272 : default_i_val=do_add)
2181 10272 : CALL section_add_keyword(subsection, keyword)
2182 10272 : CALL keyword_release(keyword)
2183 :
2184 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
2185 : description="Specifies two atomic index united by a covalent bond", &
2186 : usage="ATOMS {integer} {integer} {integer} ", type_of_var=integer_t, n_var=3, &
2187 10272 : repeats=.TRUE.)
2188 10272 : CALL section_add_keyword(subsection, keyword)
2189 10272 : CALL keyword_release(keyword)
2190 :
2191 10272 : CALL section_add_subsection(section, subsection)
2192 10272 : CALL section_release(subsection)
2193 :
2194 : ! TORSIONS
2195 : CALL section_create(subsection, __LOCATION__, name="TORSION", &
2196 : description="Section used to add/remove torsion in the connectivity."// &
2197 : " Useful for systems with a complex connectivity, difficult to find out automatically.", &
2198 10272 : n_keywords=1, n_subsections=0, repeats=.TRUE.)
2199 :
2200 : CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
2201 : description="controls the activation of the bond", &
2202 : usage="&TORSION (ADD|REMOVE)", &
2203 : enum_c_vals=s2a("ADD", "REMOVE"), &
2204 : enum_i_vals=[do_add, do_remove], &
2205 10272 : default_i_val=do_add)
2206 10272 : CALL section_add_keyword(subsection, keyword)
2207 10272 : CALL keyword_release(keyword)
2208 :
2209 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
2210 : description="Specifies two atomic index united by a covalent bond", &
2211 : usage="ATOMS {integer} {integer} {integer} {integer} ", type_of_var=integer_t, n_var=4, &
2212 10272 : repeats=.TRUE.)
2213 10272 : CALL section_add_keyword(subsection, keyword)
2214 10272 : CALL keyword_release(keyword)
2215 :
2216 10272 : CALL section_add_subsection(section, subsection)
2217 10272 : CALL section_release(subsection)
2218 :
2219 : ! IMPROPERS
2220 : CALL section_create(subsection, __LOCATION__, name="IMPROPER", &
2221 : description="Section used to add/remove improper in the connectivity."// &
2222 : " Useful for systems with a complex connectivity, difficult to find out automatically.", &
2223 10272 : n_keywords=1, n_subsections=0, repeats=.TRUE.)
2224 :
2225 : CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
2226 : description="controls the activation of the bond", &
2227 : usage="&IMPROPER (ADD|REMOVE)", &
2228 : enum_c_vals=s2a("ADD", "REMOVE"), &
2229 : enum_i_vals=[do_add, do_remove], &
2230 10272 : default_i_val=do_add)
2231 10272 : CALL section_add_keyword(subsection, keyword)
2232 10272 : CALL keyword_release(keyword)
2233 :
2234 : CALL keyword_create(keyword, __LOCATION__, name="ATOMS", &
2235 : description="Specifies two atomic index united by a covalent bond", &
2236 : usage="ATOMS {integer} {integer} {integer} {integer} ", type_of_var=integer_t, n_var=4, &
2237 10272 : repeats=.TRUE.)
2238 10272 : CALL section_add_keyword(subsection, keyword)
2239 10272 : CALL keyword_release(keyword)
2240 :
2241 10272 : CALL section_add_subsection(section, subsection)
2242 10272 : CALL section_release(subsection)
2243 :
2244 : ! ISOLATED ATOMS
2245 : CALL section_create(subsection, __LOCATION__, name="ISOLATED_ATOMS", &
2246 : description=" This section specifies the atoms that one considers isolated. Useful when present "// &
2247 10272 : "ions in solution.", n_keywords=1, n_subsections=0, repeats=.FALSE.)
2248 : CALL keyword_create(keyword, __LOCATION__, name="LIST", &
2249 : description="Specifies a list of atomic indexes of the isolated ion", &
2250 : usage="LIST {integer}", type_of_var=integer_t, n_var=-1, &
2251 10272 : repeats=.TRUE.)
2252 10272 : CALL section_add_keyword(subsection, keyword)
2253 10272 : CALL keyword_release(keyword)
2254 :
2255 10272 : CALL section_add_subsection(section, subsection)
2256 10272 : CALL section_release(subsection)
2257 :
2258 : ! Neighbor lists keys and printing handling the construction of NL for the connectivity
2259 10272 : CALL create_neighbor_lists_section(subsection)
2260 10272 : CALL section_add_subsection(section, subsection)
2261 10272 : CALL section_release(subsection)
2262 :
2263 10272 : CALL create_gen_print_section(subsection)
2264 10272 : CALL section_add_subsection(section, subsection)
2265 10272 : CALL section_release(subsection)
2266 :
2267 10272 : END SUBROUTINE create_generate_section
2268 :
2269 : ! **************************************************************************************************
2270 : !> \brief Create the print gen section
2271 : !> \param section the section to create
2272 : !> \author teo
2273 : ! **************************************************************************************************
2274 10272 : SUBROUTINE create_gen_print_section(section)
2275 : TYPE(section_type), POINTER :: section
2276 :
2277 : TYPE(section_type), POINTER :: print_key
2278 :
2279 10272 : CPASSERT(.NOT. ASSOCIATED(section))
2280 : CALL section_create(section, __LOCATION__, name="print", &
2281 : description="Section of possible print options in GENERATE code.", &
2282 10272 : n_keywords=0, n_subsections=1, repeats=.FALSE.)
2283 :
2284 10272 : NULLIFY (print_key)
2285 : CALL cp_print_key_section_create(print_key, __LOCATION__, "NEIGHBOR_LISTS", &
2286 : description="Activates the printing of the neighbor lists used"// &
2287 : " for generating the connectivity.", print_level=high_print_level, &
2288 10272 : filename="", unit_str="angstrom")
2289 10272 : CALL section_add_subsection(section, print_key)
2290 10272 : CALL section_release(print_key)
2291 :
2292 : CALL cp_print_key_section_create(print_key, __LOCATION__, "SUBCELL", &
2293 : description="Activates the printing of the subcells used for the "// &
2294 : "generation of neighbor lists for connectivity.", &
2295 10272 : print_level=high_print_level, filename="__STD_OUT__")
2296 10272 : CALL section_add_subsection(section, print_key)
2297 10272 : CALL section_release(print_key)
2298 :
2299 10272 : END SUBROUTINE create_gen_print_section
2300 :
2301 : ! **************************************************************************************************
2302 : !> \brief Specify keywords used to define connectivity
2303 : !> \param section the section to create
2304 : !> \param default ...
2305 : !> \author teo
2306 : ! **************************************************************************************************
2307 20544 : SUBROUTINE connectivity_framework(section, default)
2308 : TYPE(section_type), POINTER :: section
2309 : INTEGER, INTENT(IN) :: default
2310 :
2311 : TYPE(keyword_type), POINTER :: keyword
2312 :
2313 20544 : CPASSERT(ASSOCIATED(section))
2314 20544 : NULLIFY (keyword)
2315 : CALL keyword_create(keyword, __LOCATION__, name="CONN_FILE_NAME", &
2316 : variants=["CONN_FILE"], &
2317 : description="Specifies the filename that contains the molecular connectivity.", &
2318 41088 : usage="CONN_FILE_NAME <FILENAME>", type_of_var=lchar_t)
2319 20544 : CALL section_add_keyword(section, keyword)
2320 20544 : CALL keyword_release(keyword)
2321 :
2322 : CALL keyword_create(keyword, __LOCATION__, name="CONN_FILE_FORMAT", &
2323 : variants=["CONNECTIVITY"], &
2324 : description="Ways to determine and generate a molecules. "// &
2325 : "Default is to use GENERATE", &
2326 : usage="CONN_FILE_FORMAT (PSF|UPSF|MOL_SET|GENERATE|OFF|G87|G96|AMBER|USER)", &
2327 : enum_c_vals=s2a("PSF", "UPSF", "MOL_SET", "GENERATE", "OFF", "G87", "G96", "AMBER", "USER"), &
2328 : enum_i_vals=[do_conn_psf, &
2329 : do_conn_psf_u, &
2330 : do_conn_mol_set, &
2331 : do_conn_generate, &
2332 : do_conn_off, &
2333 : do_conn_g87, &
2334 : do_conn_g96, &
2335 : do_conn_amb7, &
2336 : do_conn_user], &
2337 : enum_desc=s2a("Use a PSF file to determine the connectivity."// &
2338 : " (support standard CHARMM/XPLOR and EXT CHARMM)", &
2339 : "Read a PSF file in an unformatted way (useful for not so standard PSF).", &
2340 : "Use multiple PSF (for now...) files to generate the whole system.", &
2341 : "Use a simple distance criteria. (Look at keyword BONDPARM)", &
2342 : "Do not generate molecules. (e.g. for QS or ill defined systems)", &
2343 : "Use GROMOS G87 topology file.", &
2344 : "Use GROMOS G96 topology file.", &
2345 : "Use AMBER topology file for reading connectivity (compatible starting from AMBER V.7)", &
2346 : "Allows the definition of molecules and residues based on the 5th and 6th column of "// &
2347 : "the COORD section. This option can be handy for the definition of molecules with QS "// &
2348 : "or to save memory in the case of very large systems (use PARA_RES off)."), &
2349 41088 : default_i_val=default)
2350 20544 : CALL section_add_keyword(section, keyword)
2351 20544 : CALL keyword_release(keyword)
2352 20544 : END SUBROUTINE connectivity_framework
2353 :
2354 : ! **************************************************************************************************
2355 : !> \brief Create CP2K input section for the DFT+U method parameters
2356 : !> \param section ...
2357 : !> \date 01.11.2007
2358 : !> \author Matthias Krack (MK)
2359 : !> \version 1.0
2360 : ! **************************************************************************************************
2361 10272 : SUBROUTINE create_dft_plus_u_section(section)
2362 :
2363 : TYPE(section_type), POINTER :: section
2364 :
2365 : TYPE(keyword_type), POINTER :: keyword
2366 : TYPE(section_type), POINTER :: subsection
2367 :
2368 10272 : CPASSERT(.NOT. ASSOCIATED(section))
2369 :
2370 : CALL section_create(section, __LOCATION__, &
2371 : name="DFT_PLUS_U", &
2372 : description="Define the parameters for a DFT+U run", &
2373 : n_keywords=3, &
2374 : n_subsections=1, &
2375 10272 : repeats=.FALSE.)
2376 10272 : NULLIFY (keyword)
2377 :
2378 : CALL keyword_create(keyword, __LOCATION__, &
2379 : name="_SECTION_PARAMETERS_", &
2380 : description="Controls the activation of the DFT+U section", &
2381 : usage="&DFT_PLUS_U ON", &
2382 : default_l_val=.FALSE., &
2383 10272 : lone_keyword_l_val=.TRUE.)
2384 10272 : CALL section_add_keyword(section, keyword)
2385 10272 : CALL keyword_release(keyword)
2386 :
2387 : CALL keyword_create(keyword, __LOCATION__, &
2388 : name="L", &
2389 : description="Angular momentum quantum number of the "// &
2390 : "orbitals to which the correction is applied", &
2391 : repeats=.FALSE., &
2392 : n_var=1, &
2393 : type_of_var=integer_t, &
2394 : default_i_val=-1, &
2395 10272 : usage="L 2")
2396 10272 : CALL section_add_keyword(section, keyword)
2397 10272 : CALL keyword_release(keyword)
2398 :
2399 : CALL keyword_create(keyword, __LOCATION__, &
2400 : name="U_MINUS_J", &
2401 : variants=["U_EFF"], &
2402 : description="Effective parameter U(eff) = U - J", &
2403 : repeats=.FALSE., &
2404 : n_var=1, &
2405 : type_of_var=real_t, &
2406 : default_r_val=0.0_dp, &
2407 : unit_str="au_e", &
2408 20544 : usage="U_MINUS_J [eV] 1.4")
2409 10272 : CALL section_add_keyword(section, keyword)
2410 10272 : CALL keyword_release(keyword)
2411 :
2412 : CALL keyword_create(keyword, __LOCATION__, &
2413 : name="N", &
2414 : description="principal quantum number of the "// &
2415 : "orbitals to which the correction is applied. Ignored unless pwdft is used for the calculations", &
2416 : repeats=.FALSE., &
2417 : n_var=1, &
2418 : type_of_var=integer_t, &
2419 : default_i_val=-1, &
2420 10272 : usage="N 2")
2421 10272 : CALL section_add_keyword(section, keyword)
2422 10272 : CALL keyword_release(keyword)
2423 :
2424 : CALL keyword_create(keyword, __LOCATION__, &
2425 : name="U", &
2426 : description="U parameter in the theory of Dudarev et al. Ignored unless pwdft is used", &
2427 : repeats=.FALSE., &
2428 : n_var=1, &
2429 : type_of_var=real_t, &
2430 : default_r_val=0.0_dp, &
2431 : unit_str="au_e", &
2432 10272 : usage="U [eV] 1.4")
2433 10272 : CALL section_add_keyword(section, keyword)
2434 10272 : CALL keyword_release(keyword)
2435 :
2436 : CALL keyword_create(keyword, __LOCATION__, &
2437 : name="J", &
2438 : description="J parameter in the theory of Dudarev et al. Ignored unless pwdft is used", &
2439 : repeats=.FALSE., &
2440 : n_var=1, &
2441 : type_of_var=real_t, &
2442 : default_r_val=0.0_dp, &
2443 : unit_str="au_e", &
2444 10272 : usage="J [eV] 1.4")
2445 10272 : CALL section_add_keyword(section, keyword)
2446 10272 : CALL keyword_release(keyword)
2447 :
2448 : CALL keyword_create(keyword, __LOCATION__, &
2449 : name="alpha", &
2450 : description="alpha parameter in the theory of Dudarev et al. Ignored unless pwdft is used", &
2451 : repeats=.FALSE., &
2452 : n_var=1, &
2453 : type_of_var=real_t, &
2454 : default_r_val=0.0_dp, &
2455 : unit_str="au_e", &
2456 10272 : usage="alpha [eV] 1.4")
2457 10272 : CALL section_add_keyword(section, keyword)
2458 10272 : CALL keyword_release(keyword)
2459 :
2460 : CALL keyword_create(keyword, __LOCATION__, &
2461 : name="beta", &
2462 : description="beta parameter in the theory of Dudarev et al. Ignored unless pwdft is used", &
2463 : repeats=.FALSE., &
2464 : n_var=1, &
2465 : type_of_var=real_t, &
2466 : default_r_val=0.0_dp, &
2467 : unit_str="au_e", &
2468 10272 : usage="beta [eV] 1.4")
2469 10272 : CALL section_add_keyword(section, keyword)
2470 10272 : CALL keyword_release(keyword)
2471 :
2472 : CALL keyword_create(keyword, __LOCATION__, &
2473 : name="J0", &
2474 : description="J0 parameter in the theory of Dudarev et al. Ignored unless pwdft is used", &
2475 : repeats=.FALSE., &
2476 : n_var=1, &
2477 : type_of_var=real_t, &
2478 : default_r_val=0.0_dp, &
2479 : unit_str="au_e", &
2480 10272 : usage="J0 [eV] 1.4")
2481 10272 : CALL section_add_keyword(section, keyword)
2482 10272 : CALL keyword_release(keyword)
2483 :
2484 : CALL keyword_create(keyword, __LOCATION__, &
2485 : name="occupation", &
2486 : description="number of electrons in the hubbard shell. Ignored unless pwdft is used", &
2487 : repeats=.FALSE., &
2488 : n_var=1, &
2489 : type_of_var=real_t, &
2490 : default_r_val=0.0_dp, &
2491 10272 : usage="occupation 6")
2492 10272 : CALL section_add_keyword(section, keyword)
2493 10272 : CALL keyword_release(keyword)
2494 :
2495 : CALL keyword_create(keyword, __LOCATION__, &
2496 : name="U_RAMPING", &
2497 : description="Increase the effective U parameter stepwise using the specified "// &
2498 : "increment until the target value given by U_MINUS_J is reached.", &
2499 : repeats=.FALSE., &
2500 : n_var=1, &
2501 : type_of_var=real_t, &
2502 : default_r_val=0.0_dp, &
2503 : unit_str="au_e", &
2504 10272 : usage="U_RAMPING [eV] 0.1")
2505 10272 : CALL section_add_keyword(section, keyword)
2506 10272 : CALL keyword_release(keyword)
2507 :
2508 : CALL keyword_create(keyword, __LOCATION__, &
2509 : name="EPS_U_RAMPING", &
2510 : description="Threshold value (SCF convergence) for incrementing the effective "// &
2511 : "U value when U ramping is active.", &
2512 : repeats=.FALSE., &
2513 : n_var=1, &
2514 : type_of_var=real_t, &
2515 : default_r_val=1.0E-5_dp, &
2516 10272 : usage="EPS_U_RAMPING 1.0E-6")
2517 10272 : CALL section_add_keyword(section, keyword)
2518 10272 : CALL keyword_release(keyword)
2519 :
2520 : CALL keyword_create(keyword, __LOCATION__, &
2521 : name="INIT_U_RAMPING_EACH_SCF", &
2522 : description="Set the initial U ramping value to zero before each wavefunction optimisation. "// &
2523 : "The default is to apply U ramping only for the initial wavefunction optimisation.", &
2524 : repeats=.FALSE., &
2525 : default_l_val=.FALSE., &
2526 : lone_keyword_l_val=.TRUE., &
2527 10272 : usage="INIT_U_RAMPING_EACH_SCF on")
2528 10272 : CALL section_add_keyword(section, keyword)
2529 10272 : CALL keyword_release(keyword)
2530 :
2531 10272 : NULLIFY (subsection)
2532 :
2533 : CALL section_create(subsection, __LOCATION__, &
2534 : name="ENFORCE_OCCUPATION", &
2535 : description="Enforce and control a special (initial) orbital occupation. "// &
2536 : "Note, this feature works only for the methods MULLIKEN and LOWDIN. "// &
2537 : "It should only be used to prepare an initial configuration. An "// &
2538 : "inadequate parameter choice can easily inhibit SCF convergence.", &
2539 : n_keywords=5, &
2540 : n_subsections=0, &
2541 10272 : repeats=.FALSE.)
2542 :
2543 : CALL keyword_create(keyword, __LOCATION__, &
2544 : name="_SECTION_PARAMETERS_", &
2545 : description="Controls the activation of the ENFORCE_OCCUPATION section", &
2546 : usage="&ENFORCE_OCCUPATION ON", &
2547 : default_l_val=.FALSE., &
2548 10272 : lone_keyword_l_val=.TRUE.)
2549 10272 : CALL section_add_keyword(subsection, keyword)
2550 10272 : CALL keyword_release(keyword)
2551 :
2552 : CALL keyword_create(keyword, __LOCATION__, name="NELEC", &
2553 : variants=["N_ELECTRONS"], &
2554 : description="Number of alpha and beta electrons. An occupation (per spin) smaller than 0.5 is ignored.", &
2555 : repeats=.FALSE., &
2556 : n_var=-1, &
2557 : type_of_var=real_t, &
2558 : default_r_val=0.0_dp, &
2559 20544 : usage="NELEC 5.0 4.0")
2560 10272 : CALL section_add_keyword(subsection, keyword)
2561 10272 : CALL keyword_release(keyword)
2562 :
2563 : CALL keyword_create(keyword, __LOCATION__, &
2564 : name="ORBITALS", &
2565 : variants=["M"], &
2566 : description="Select orbitals and occupation order. An input of 1 to 2*L+1 integer values in "// &
2567 : "the range -L to L defining the M values of the spherical orbitals is expected.", &
2568 : repeats=.FALSE., &
2569 : n_var=-1, &
2570 : type_of_var=integer_t, &
2571 : default_i_val=0, &
2572 20544 : usage="ORBITALS 0 +1 -1")
2573 10272 : CALL section_add_keyword(subsection, keyword)
2574 10272 : CALL keyword_release(keyword)
2575 :
2576 : CALL keyword_create(keyword, __LOCATION__, &
2577 : name="EPS_SCF", &
2578 : description="The occupation constraint is enforced until this threshold value "// &
2579 : "for the SCF convergence criterion is reached", &
2580 : repeats=.FALSE., &
2581 : n_var=1, &
2582 : type_of_var=real_t, &
2583 : default_r_val=1.0E30_dp, &
2584 10272 : usage="EPS_SCF 0.001")
2585 10272 : CALL section_add_keyword(subsection, keyword)
2586 10272 : CALL keyword_release(keyword)
2587 :
2588 : CALL keyword_create(keyword, __LOCATION__, &
2589 : name="MAX_SCF", &
2590 : description="The occupation constraint is applied for this number of initial SCF iterations", &
2591 : repeats=.FALSE., &
2592 : n_var=1, &
2593 : type_of_var=integer_t, &
2594 : default_i_val=-1, &
2595 10272 : usage="MAX_SCF 5")
2596 10272 : CALL section_add_keyword(subsection, keyword)
2597 10272 : CALL keyword_release(keyword)
2598 :
2599 : CALL keyword_create(keyword, __LOCATION__, &
2600 : name="SMEAR", &
2601 : description="The occupation constraint is applied with smearing", &
2602 : repeats=.FALSE., &
2603 : default_l_val=.FALSE., &
2604 : lone_keyword_l_val=.TRUE., &
2605 10272 : usage="SMEAR ON")
2606 10272 : CALL section_add_keyword(subsection, keyword)
2607 10272 : CALL keyword_release(keyword)
2608 :
2609 10272 : CALL section_add_subsection(section, subsection)
2610 10272 : CALL section_release(subsection)
2611 :
2612 10272 : END SUBROUTINE create_dft_plus_u_section
2613 :
2614 : END MODULE input_cp2k_subsys
|