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