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