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