(git:cccd2f3)
Loading...
Searching...
No Matches
input_cp2k_qs.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 function that build the QS section of the input
10!> \par History
11!> 10.2005 moved out of input_cp2k [fawzi]
12!> 07.2024 moved out of input_cp2k_dft [JGH]
13!> \author fawzi
14! **************************************************************************************************
16 USE bibliography, ONLY: &
24 USE input_constants, ONLY: &
53 USE input_val_types, ONLY: integer_t,&
54 lchar_t,&
55 real_t
56 USE kinds, ONLY: dp
60 USE string_utilities, ONLY: s2a
61#include "./base/base_uses.f90"
62
63 IMPLICIT NONE
64 PRIVATE
65
66 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_qs'
67
69
70CONTAINS
71
72! **************************************************************************************************
73!> \brief creates the input section for the qs part
74!> \param section the section to create
75!> \author teo
76! **************************************************************************************************
77 SUBROUTINE create_qs_section(section)
78 TYPE(section_type), POINTER :: section
79
80 TYPE(keyword_type), POINTER :: keyword
81 TYPE(section_type), POINTER :: subsection
82
83 cpassert(.NOT. ASSOCIATED(section))
84 CALL section_create(section, __location__, name="qs", &
85 description="parameters needed to set up the Quickstep framework", &
86 n_keywords=1, n_subsections=0, repeats=.false.)
87
88 NULLIFY (keyword, subsection)
89
90 ! Reals
91 CALL keyword_create(keyword, __location__, name="EPS_DEFAULT", &
92 description="Try setting all EPS_xxx to values leading to an energy correct up to EPS_DEFAULT", &
93 usage="EPS_DEFAULT real", default_r_val=1.0e-10_dp)
94 CALL section_add_keyword(section, keyword)
95 CALL keyword_release(keyword)
96
97 CALL keyword_create(keyword, __location__, name="EPS_CORE_CHARGE", &
98 description="Precision for mapping the core charges.Overrides EPS_DEFAULT/100.0 value", &
99 usage="EPS_CORE_CHARGE real", type_of_var=real_t)
100 CALL section_add_keyword(section, keyword)
101 CALL keyword_release(keyword)
102
103 CALL keyword_create( &
104 keyword, __location__, name="EPS_GVG_RSPACE", &
105 variants=["EPS_GVG"], &
106 description="Sets precision of the realspace KS matrix element integration. Overrides SQRT(EPS_DEFAULT) value", &
107 usage="EPS_GVG_RSPACE real", type_of_var=real_t)
108 CALL section_add_keyword(section, keyword)
109 CALL keyword_release(keyword)
110
111 CALL keyword_create(keyword, __location__, name="EPS_PGF_ORB", &
112 description="Sets precision of the overlap matrix elements. Overrides SQRT(EPS_DEFAULT) value", &
113 usage="EPS_PGF_ORB real", type_of_var=real_t)
114 CALL section_add_keyword(section, keyword)
115 CALL keyword_release(keyword)
116
117 CALL keyword_create( &
118 keyword, __location__, name="EPS_KG_ORB", &
119 description="Sets precision used in coloring the subsets for the Kim-Gordon method. Overrides SQRT(EPS_DEFAULT) value", &
120 usage="EPS_KG_ORB 1.0E-8", &
121 type_of_var=real_t)
122 CALL section_add_keyword(section, keyword)
123 CALL keyword_release(keyword)
124
125 CALL keyword_create(keyword, __location__, name="EPS_PPL", &
126 description="Adjusts the precision for the local part of the pseudo potential. ", &
127 usage="EPS_PPL real", type_of_var=real_t, default_r_val=1.0e-2_dp)
128 CALL section_add_keyword(section, keyword)
129 CALL keyword_release(keyword)
130
131 CALL keyword_create( &
132 keyword, __location__, name="EPS_PPNL", &
133 description="Sets precision of the non-local part of the pseudo potential. Overrides sqrt(EPS_DEFAULT) value", &
134 usage="EPS_PPNL real", type_of_var=real_t)
135 CALL section_add_keyword(section, keyword)
136 CALL keyword_release(keyword)
137
138 CALL keyword_create(keyword, __location__, name="EPS_CPC", &
139 description="Sets precision of the GAPW projection. Overrides EPS_DEFAULT value", &
140 usage="EPS_CPC real", type_of_var=real_t)
141 CALL section_add_keyword(section, keyword)
142 CALL keyword_release(keyword)
143
144 CALL keyword_create(keyword, __location__, name="EPS_RHO", &
145 description="Sets precision of the density mapping on the grids.Overrides EPS_DEFAULT value", &
146 usage="EPS_RHO real", type_of_var=real_t)
147 CALL section_add_keyword(section, keyword)
148 CALL keyword_release(keyword)
149
150 CALL keyword_create(keyword, __location__, name="EPS_RHO_RSPACE", &
151 description="Sets precision of the density mapping in rspace.Overrides EPS_DEFAULT value."// &
152 " Overrides EPS_RHO value", &
153 usage="EPS_RHO_RSPACE real", type_of_var=real_t)
154 CALL section_add_keyword(section, keyword)
155 CALL keyword_release(keyword)
156
157 CALL keyword_create(keyword, __location__, name="EPS_RHO_GSPACE", &
158 description="Sets precision of the density mapping in gspace.Overrides EPS_DEFAULT value."// &
159 " Overrides EPS_RHO value", &
160 usage="EPS_RHO_GSPACE real", type_of_var=real_t)
161 CALL section_add_keyword(section, keyword)
162 CALL keyword_release(keyword)
163
164 CALL keyword_create(keyword, __location__, name="EPS_FILTER_MATRIX", &
165 description="Sets the threshold for filtering matrix elements.", &
166 usage="EPS_FILTER_MATRIX 1.0E-6", type_of_var=real_t, default_r_val=0.0e0_dp)
167 CALL section_add_keyword(section, keyword)
168 CALL keyword_release(keyword)
169
170 CALL keyword_create(keyword, __location__, name="EPSFIT", &
171 variants=["EPS_FIT"], &
172 description="GAPW: tolerance controlling the split of Gaussian basis functions "// &
173 "into hard atom-centered and soft grid-expanded parts. Smaller values include "// &
174 "harder Gaussians in the soft density and can require a larger MGRID cutoff.", &
175 usage="EPSFIT real", default_r_val=1.0e-4_dp)
176 CALL section_add_keyword(section, keyword)
177 CALL keyword_release(keyword)
178
179 CALL keyword_create(keyword, __location__, name="EPSISO", &
180 variants=["EPS_ISO"], &
181 description="GAPW: precision to determine an isolated projector", &
182 usage="EPSISO real", default_r_val=1.0e-12_dp)
183 CALL section_add_keyword(section, keyword)
184 CALL keyword_release(keyword)
185
186 CALL keyword_create(keyword, __location__, name="EPSSVD", &
187 variants=["EPS_SVD"], &
188 description="GAPW: tolerance used in the singular value decomposition of the "// &
189 "projector matrix. Smaller values can improve numerical accuracy at increased cost.", &
190 usage="EPS_SVD real", default_r_val=1.0e-8_dp)
191 CALL section_add_keyword(section, keyword)
192 CALL keyword_release(keyword)
193
194 CALL keyword_create(keyword, __location__, name="EPSRHO0", &
195 variants=s2a("EPSVRHO0", "EPS_VRHO0"), &
196 description="GAPW: tolerance used to determine the range of the "// &
197 "V(rho0-rho0_soft) compensation contribution.", &
198 usage="EPSRHO0 real", default_r_val=1.0e-6_dp)
199 CALL section_add_keyword(section, keyword)
200 CALL keyword_release(keyword)
201
202 CALL keyword_create(keyword, __location__, name="ALPHA0_HARD", &
203 variants=s2a("ALPHA0_H", "ALPHA0"), &
204 description="GAPW: Exponent for hard compensation charge", &
205 usage="ALPHA0_HARD real", default_r_val=0.0_dp)
206 CALL section_add_keyword(section, keyword)
207 CALL keyword_release(keyword)
208
209 CALL keyword_create( &
210 keyword, __location__, name="FORCE_PAW", &
211 description="Use the GAPW scheme also for atoms with soft basis sets, i.e. "// &
212 "the local densities are computed even if hard and soft should be equal. "// &
213 "If this keyword is not set to true, those atoms with soft basis sets are treated by a GPW scheme, i.e. "// &
214 "the corresponding density contribution goes on the global grid and is expanded in PW. "// &
215 "This option nullifies the effect of the GPW_TYPE in the atomic KIND", &
216 usage="FORCE_PAW", &
217 default_l_val=.false., lone_keyword_l_val=.true.)
218 CALL section_add_keyword(section, keyword)
219 CALL keyword_release(keyword)
220
221 CALL keyword_create(keyword, __location__, name="MAX_RAD_LOCAL", &
222 description="GAPW : maximum radius of gaussian functions"// &
223 " included in the generation of projectors", &
224 usage="MAX_RAD_LOCAL real", default_r_val=25.0_dp)
225 CALL section_add_keyword(section, keyword)
226 CALL keyword_release(keyword)
227
228 CALL keyword_create(keyword, __location__, name="GAPW_1C_BASIS", &
229 description="Specifies how to construct the GAPW one center basis set. "// &
230 "Default is to use the primitives from the orbital basis.", &
231 usage="GAPW_1C_BASIS MEDIUM", &
232 enum_c_vals=s2a("ORB", "EXT_SMALL", "EXT_MEDIUM", "EXT_LARGE", "EXT_VERY_LARGE"), &
233 enum_desc=s2a("Use orbital basis set.", &
234 "Extension using Small number of primitive Gaussians.", &
235 "Extension using Medium number of primitive Gaussians.", &
236 "Extension using Large number of primitive Gaussians.", &
237 "Extension using Very Large number of primitive Gaussians."), &
240 default_i_val=gapw_1c_orb)
241 CALL section_add_keyword(section, keyword)
242 CALL keyword_release(keyword)
243
244 CALL keyword_create( &
245 keyword, __location__, name="GAPW_ACCURATE_XCINT", &
246 description="Use the accurate GAPW/GAPW_XC XC integration scheme for one-center hard/soft "// &
247 "density differences. This opt-in path covers regular GAPW/GAPW_XC XC energy, potential, "// &
248 "forces, mGGA/tau terms, NLCC, Fine-XC grids, local XC energy-density transfer, analytical "// &
249 "stress, TDDFPT/response forces, ADMM-GAPW force paths, an ADMM-GAPW diagonal stress "// &
250 "debug path, nonlocal vdW smoke coverage, representative k-point, XAS_TDP, and RTBSE "// &
251 "smoke cases, and KG GAPW/GAPW_XC EMBED, EMBED_RI, ATOMIC, and NONE cases. Regular-grid "// &
252 "local energy and stress cube print keys keep their existing soft-grid semantics and are "// &
253 "not changed by this keyword. The default remains off while this coverage is being prepared "// &
254 "for a future default change.", &
255 usage="GAPW_ACCURATE_XCINT", &
256 default_l_val=.false., lone_keyword_l_val=.true.)
257 CALL section_add_keyword(section, keyword)
258 CALL keyword_release(keyword)
259
260 CALL keyword_create( &
261 keyword, __location__, name="ALPHA_WEIGHTS", &
262 description="Gaussian exponent reference (rc=1.2 Bohr) for accurate integration in GAPW.", &
263 usage="ALPHA_WEIGHTS 10.0", default_r_val=6.0_dp)
264 CALL section_add_keyword(section, keyword)
265 CALL keyword_release(keyword)
266
267 CALL keyword_create(keyword, __location__, name="MIN_PAIR_LIST_RADIUS", &
268 description="Set the minimum value [Bohr] for the overlap pair list radius."// &
269 " Default is 0.0 Bohr, negative values are changed to the cell size."// &
270 " This allows to control the sparsity of the KS matrix for HFX calculations.", &
271 usage="MIN_PAIR_LIST_RADIUS real", default_r_val=0.0_dp)
272 CALL section_add_keyword(section, keyword)
273 CALL keyword_release(keyword)
274
275 ! Logicals
276 CALL keyword_create(keyword, __location__, name="LS_SCF", &
277 description="Perform a linear scaling SCF", &
278 usage="LS_SCF", lone_keyword_l_val=.true., &
279 default_l_val=.false.)
280 CALL section_add_keyword(section, keyword)
281 CALL keyword_release(keyword)
282
283 CALL keyword_create(keyword, __location__, name="ALMO_SCF", &
284 description="Perform ALMO SCF", &
285 usage="ALMO_SCF", lone_keyword_l_val=.true., &
286 default_l_val=.false.)
287 CALL section_add_keyword(section, keyword)
288 CALL keyword_release(keyword)
289
290 CALL keyword_create(keyword, __location__, name="TRANSPORT", &
291 description="Perform transport calculations (coupling CP2K and OMEN)", &
292 usage="TRANSPORT", lone_keyword_l_val=.true., &
293 default_l_val=.false.)
294 CALL section_add_keyword(section, keyword)
295 CALL keyword_release(keyword)
296
297 CALL keyword_create(keyword, __location__, name="KG_METHOD", &
298 description="Use a Kim-Gordon-like scheme.", &
299 usage="KG_METHOD", lone_keyword_l_val=.true., &
300 default_l_val=.false., citations=[iannuzzi2006, brelaz1979, andermatt2016])
301 CALL section_add_keyword(section, keyword)
302 CALL keyword_release(keyword)
303
304 CALL keyword_create(keyword, __location__, name="REF_EMBED_SUBSYS", &
305 description="A total, reference, system in DFT embedding. ", &
306 usage="REF_EMBED_SUBSYS FALSE", &
307 default_l_val=.false., lone_keyword_l_val=.true.)
308 CALL section_add_keyword(section, keyword)
309 CALL keyword_release(keyword)
310
311 CALL keyword_create(keyword, __location__, name="CLUSTER_EMBED_SUBSYS", &
312 description="A cluster treated with DFT in DFT embedding. ", &
313 usage="CLUSTER_EMBED_SUBSYS FALSE", &
314 default_l_val=.false., lone_keyword_l_val=.true.)
315 CALL section_add_keyword(section, keyword)
316 CALL keyword_release(keyword)
317
318 CALL keyword_create(keyword, __location__, name="HIGH_LEVEL_EMBED_SUBSYS", &
319 description="A cluster treated with a high-level method in DFT embedding. ", &
320 usage="HIGH_LEVEL_EMBED_SUBSYS FALSE", &
321 default_l_val=.false., lone_keyword_l_val=.true.)
322 CALL section_add_keyword(section, keyword)
323 CALL keyword_release(keyword)
324
325 CALL keyword_create(keyword, __location__, name="DFET_EMBEDDED", &
326 description="Calculation with DFT-embedding potential. ", &
327 usage="DFET_EMBEDDED FALSE", &
328 default_l_val=.false., lone_keyword_l_val=.true.)
329 CALL section_add_keyword(section, keyword)
330 CALL keyword_release(keyword)
331
332 CALL keyword_create(keyword, __location__, name="DMFET_EMBEDDED", &
333 description="Calculation with DM embedding potential. ", &
334 usage="DMFET_EMBEDDED FALSE", &
335 default_l_val=.false., lone_keyword_l_val=.true.)
336 CALL section_add_keyword(section, keyword)
337 CALL keyword_release(keyword)
338
339 ! Integers
340 CALL keyword_create(keyword, __location__, name="STO_NG", &
341 description="Order of Gaussian type expansion of Slater orbital basis sets.", &
342 usage="STO_NG", default_i_val=6)
343 CALL section_add_keyword(section, keyword)
344 CALL keyword_release(keyword)
345
346 CALL keyword_create(keyword, __location__, name="LMAXN1", &
347 variants=["LMAXRHO1"], &
348 description="GAPW : max L number for expansion of the atomic densities in spherical gaussians", &
349 usage="LMAXN1 integer", &
350 default_i_val=-1)
351 CALL section_add_keyword(section, keyword)
352 CALL keyword_release(keyword)
353
354 CALL keyword_create(keyword, __location__, name="LMAXN0", &
355 variants=["LMAXRHO0"], &
356 description="GAPW : max L number for the expansion compensation densities in spherical gaussians", &
357 usage="LMAXN0 integer", &
358 default_i_val=2)
359 CALL section_add_keyword(section, keyword)
360 CALL keyword_release(keyword)
361
362 CALL keyword_create(keyword, __location__, name="LADDN0", &
363 description="GAPW : integer added to the max L of the basis set, used to determine the "// &
364 "maximum value of L for the compensation charge density.", &
365 usage="LADDN0 integer", &
366 default_i_val=99)
367 CALL section_add_keyword(section, keyword)
368 CALL keyword_release(keyword)
369
370 ! Characters
371 CALL keyword_create(keyword, __location__, name="QUADRATURE", &
372 description="GAPW: algorithm to construct the atomic radial grids", &
373 usage="QUADRATURE GC_SIMPLE", &
374 enum_c_vals=s2a("GC_SIMPLE", "GC_TRANSFORMED", "GC_LOG"), &
375 enum_i_vals=[do_gapw_gcs, do_gapw_gct, do_gapw_log], &
376 enum_desc=s2a("Gauss-Chebyshev quadrature", &
377 "Transformed Gauss-Chebyshev quadrature", &
378 "Logarithmic transformed Gauss-Chebyshev quadrature"), &
379 default_i_val=do_gapw_log)
380 CALL section_add_keyword(section, keyword)
381 CALL keyword_release(keyword)
382
383 CALL keyword_create(keyword, __location__, name="PW_GRID", &
384 description="What kind of PW_GRID should be employed", &
385 usage="PW_GRID NS-FULLSPACE", &
386 enum_c_vals=s2a("SPHERICAL", "NS-FULLSPACE", "NS-HALFSPACE"), &
387 enum_desc=s2a("- not tested", " tested", " - not tested"), &
389 default_i_val=do_pwgrid_ns_fullspace)
390 CALL section_add_keyword(section, keyword)
391 CALL keyword_release(keyword)
392
393 CALL keyword_create(keyword, __location__, name="PW_GRID_LAYOUT", &
394 description="Force a particular real-space layout for the plane waves grids. "// &
395 "Numbers &le; 0 mean that this dimension is free, incorrect layouts will be ignored. "// &
396 "The default (/-1,-1/) causes CP2K to select a good value, "// &
397 "i.e. plane distributed for large grids, more general distribution for small grids.", &
398 usage="PW_GRID_LAYOUT 4 16", &
399 repeats=.false., n_var=2, &
400 default_i_vals=[-1, -1])
401 CALL section_add_keyword(section, keyword)
402 CALL keyword_release(keyword)
403
404 CALL keyword_create(keyword, __location__, name="PW_GRID_BLOCKED", &
405 description="Can be used to set the distribution in g-space for the pw grids and their FFT.", &
406 usage="PW_GRID_BLOCKED FREE", &
407 enum_c_vals=s2a("FREE", "TRUE", "FALSE"), &
408 enum_desc=s2a("CP2K will select an appropriate value", "blocked", "not blocked"), &
410 default_i_val=do_pw_grid_blocked_free)
411 CALL section_add_keyword(section, keyword)
412 CALL keyword_release(keyword)
413
414 CALL keyword_create( &
415 keyword, __location__, name="EXTRAPOLATION", &
416 variants=s2a("INTERPOLATION", "WF_INTERPOLATION"), &
417 description="Extrapolation strategy for the wavefunction during e.g. MD. "// &
418 "Not all options are available for all simulation methods. "// &
419 "PS and ASPC are recommended, see also EXTRAPOLATION_ORDER.", &
420 citations=[kolafa2004, vandevondele2005a, kuhne2007], &
421 usage="EXTRAPOLATION PS", &
422 enum_c_vals=s2a("USE_GUESS", "USE_PREV_P", "USE_PREV_RHO_R", "LINEAR_WF", &
423 "LINEAR_P", "LINEAR_PS", "USE_PREV_WF", "PS", "FROZEN", "ASPC", &
424 "GEXT_PROJ", "GEXT_PROJ_QTR"), &
425 enum_desc=s2a( &
426 "Use the method specified with SCF_GUESS, i.e. no extrapolation", &
427 "Use the previous density matrix", &
428 "Use the previous density in real space", &
429 "Linear extrapolation of the wavefunction (not available for k-points)", &
430 "Linear extrapolation of the density matrix", &
431 "Linear extrapolation of the density matrix times the overlap matrix (not available for k-points)", &
432 "Use the previous wavefunction", &
433 "Higher order extrapolation of the density matrix times the overlap matrix", &
434 "Frozen ... (not available for k-points)", &
435 "Always stable predictor corrector, similar to PS, but going for MD stability instead of initial guess accuracy.", &
436 "GExt extrapolation for the density matrix times the overlap matrix.", &
437 "Quasi time reversible GExt extrapolation for the density matrix times the overlap matrix."), &
438 enum_i_vals=[ &
448 wfi_aspc_nr, &
451 default_i_val=wfi_aspc_nr)
452 CALL section_add_keyword(section, keyword)
453 CALL keyword_release(keyword)
454
455 CALL keyword_create(keyword, __location__, name="EXTRAPOLATION_ORDER", &
456 description="Order for the PS, ASPC extrapolation (typically 2-4) or "// &
457 "order for the GEXT_PROJ, GEXT_PROJ_QTR extrapolation (typically 4-10). "// &
458 "Higher order might bring more accuracy, but comes, "// &
459 "for large systems, also at some cost. "// &
460 "In some cases, a high order extrapolation is not stable,"// &
461 " and the order needs to be reduced.", &
462 usage="EXTRAPOLATION_ORDER {integer}", default_i_val=3)
463 CALL section_add_keyword(section, keyword)
464 CALL keyword_release(keyword)
465
466 CALL keyword_create(keyword, __location__, name="METHOD", &
467 description="Specifies the electronic structure method that should be employed", &
468 usage="METHOD GAPW", &
469 enum_c_vals=s2a("GAPW", "GAPW_XC", "GPW", "LRIGPW", "RIGPW", &
470 "MNDO", "MNDOD", "AM1", "PM3", "PM6", "PM6-FM", "PDG", "RM1", "PNNL", "DFTB", "xTB", "OFGPW"), &
471 enum_desc=s2a("Gaussian and augmented plane waves method", &
472 "Gaussian and augmented plane waves method only for XC", &
473 "Gaussian and plane waves method", &
474 "Local resolution of identity method", &
475 "Resolution of identity method for HXC terms", &
476 "MNDO semiempirical", "MNDO-d semiempirical", "AM1 semiempirical", &
477 "PM3 semiempirical", "PM6 semiempirical", "PM6-FM semiempirical", "PDG semiempirical", &
478 "RM1 semiempirical", &
479 "PNNL semiempirical", &
480 "DFTB Density Functional based Tight-Binding", &
481 "GFN-xTB Extended Tight-Binding", &
482 "OFGPW Orbital-free GPW method"), &
490 default_i_val=do_method_gpw)
491 CALL section_add_keyword(section, keyword)
492 CALL keyword_release(keyword)
493
494 CALL keyword_create(keyword, __location__, name="CORE_PPL", &
495 description="Specifies the method used to calculate the local pseudopotential contribution.", &
496 usage="CORE_PPL ANALYTIC", &
497 enum_c_vals=s2a("ANALYTIC", "GRID"), &
498 enum_desc=s2a("Analytic integration of integrals", &
499 "Numerical integration on real space grid. Lumped together with core charge"), &
500 enum_i_vals=[do_ppl_analytic, do_ppl_grid], &
501 default_i_val=do_ppl_analytic)
502 CALL section_add_keyword(section, keyword)
503 CALL keyword_release(keyword)
504
505 CALL keyword_create(keyword, __location__, name="EMBED_RESTART_FILE_NAME", &
506 description="Root of the file name where to read the embedding "// &
507 "potential guess.", &
508 usage="EMBED_RESTART_FILE_NAME <FILENAME>", &
509 type_of_var=lchar_t)
510 CALL section_add_keyword(section, keyword)
511 CALL keyword_release(keyword)
512
513 CALL keyword_create(keyword, __location__, name="EMBED_CUBE_FILE_NAME", &
514 description="Root of the file name where to read the embedding "// &
515 "potential (guess) as a cube.", &
516 usage="EMBED_CUBE_FILE_NAME <FILENAME>", &
517 type_of_var=lchar_t)
518 CALL section_add_keyword(section, keyword)
519 CALL keyword_release(keyword)
520
521 CALL keyword_create(keyword, __location__, name="EMBED_SPIN_CUBE_FILE_NAME", &
522 description="Root of the file name where to read the spin part "// &
523 "of the embedding potential (guess) as a cube.", &
524 usage="EMBED_SPIN_CUBE_FILE_NAME <FILENAME>", &
525 type_of_var=lchar_t)
526 CALL section_add_keyword(section, keyword)
527 CALL keyword_release(keyword)
528
529 CALL create_distribution_section(subsection)
530 CALL section_add_subsection(section, subsection)
531 CALL section_release(subsection)
532
533 CALL create_dftb_control_section(subsection)
534 CALL section_add_subsection(section, subsection)
535 CALL section_release(subsection)
536
537 CALL create_xtb_control_section(subsection)
538 CALL section_add_subsection(section, subsection)
539 CALL section_release(subsection)
540
541 CALL create_se_control_section(subsection)
542 CALL section_add_subsection(section, subsection)
543 CALL section_release(subsection)
544
545 CALL create_mulliken_section(subsection)
546 CALL section_add_subsection(section, subsection)
547 CALL section_release(subsection)
548
549 CALL create_ddapc_restraint_section(subsection, "DDAPC_RESTRAINT")
550 CALL section_add_subsection(section, subsection)
551 CALL section_release(subsection)
552
553 CALL create_cdft_control_section(subsection)
554 CALL section_add_subsection(section, subsection)
555 CALL section_release(subsection)
556
557 CALL create_s2_restraint_section(subsection)
558 CALL section_add_subsection(section, subsection)
559 CALL section_release(subsection)
560
561 CALL create_lrigpw_section(subsection)
562 CALL section_add_subsection(section, subsection)
563 CALL section_release(subsection)
564
565 CALL create_optimize_lri_basis_section(subsection)
566 CALL section_add_subsection(section, subsection)
567 CALL section_release(subsection)
568
569 ! Embedding subsections: DFET and DMFET
570 CALL create_optimize_embed(subsection)
571 CALL section_add_subsection(section, subsection)
572 CALL section_release(subsection)
573
574 CALL create_optimize_dmfet(subsection)
575 CALL section_add_subsection(section, subsection)
576 CALL section_release(subsection)
577
578 END SUBROUTINE create_qs_section
579
580! **************************************************************************************************
581!> \brief ...
582!> \param section ...
583! **************************************************************************************************
584 SUBROUTINE create_mulliken_section(section)
585 TYPE(section_type), POINTER :: section
586
587 TYPE(keyword_type), POINTER :: keyword
588
589 NULLIFY (keyword)
590 cpassert(.NOT. ASSOCIATED(section))
591 CALL section_create(section, __location__, name="MULLIKEN_RESTRAINT", &
592 description="Use mulliken charges in a restraint (check code for details)", &
593 n_keywords=7, n_subsections=0, repeats=.false.)
594
595 CALL keyword_create(keyword, __location__, name="STRENGTH", &
596 description="force constant of the restraint", &
597 usage="STRENGTH {real} ", default_r_val=0.1_dp)
598 CALL section_add_keyword(section, keyword)
599 CALL keyword_release(keyword)
600
601 CALL keyword_create(keyword, __location__, name="TARGET", &
602 description="target value of the restraint", &
603 usage="TARGET {real} ", default_r_val=1._dp)
604 CALL section_add_keyword(section, keyword)
605 CALL keyword_release(keyword)
606
607 CALL keyword_create(keyword, __location__, name="ATOMS", &
608 description="Specifies the list of atoms that is summed in the restraint", &
609 usage="ATOMS {integer} {integer} .. {integer}", &
610 n_var=-1, type_of_var=integer_t)
611 CALL section_add_keyword(section, keyword)
612 CALL keyword_release(keyword)
613
614 END SUBROUTINE create_mulliken_section
615
616! **************************************************************************************************
617!> \brief ...
618!> \param section ...
619!> \param section_name ...
620! **************************************************************************************************
621 SUBROUTINE create_ddapc_restraint_section(section, section_name)
622 TYPE(section_type), POINTER :: section
623 CHARACTER(len=*), INTENT(in) :: section_name
624
625 TYPE(keyword_type), POINTER :: keyword
626 TYPE(section_type), POINTER :: print_key
627
628 NULLIFY (keyword, print_key)
629 cpassert(.NOT. ASSOCIATED(section))
630 CALL section_create(section, __location__, name=trim(adjustl(section_name)), &
631 description="Use DDAPC charges in a restraint (check code for details)", &
632 n_keywords=7, n_subsections=0, repeats=.true.)
633
634 CALL keyword_create(keyword, __location__, name="TYPE_OF_DENSITY", &
635 description="Specifies the type of density used for the fitting", &
636 usage="TYPE_OF_DENSITY (FULL|SPIN)", &
637 enum_c_vals=s2a("FULL", "SPIN"), &
638 enum_i_vals=[do_full_density, do_spin_density], &
639 enum_desc=s2a("Full density", "Spin density"), &
640 default_i_val=do_full_density)
641 CALL section_add_keyword(section, keyword)
642 CALL keyword_release(keyword)
643
644 CALL keyword_create(keyword, __location__, name="STRENGTH", &
645 description="force constant of the restraint", &
646 usage="STRENGTH {real} ", default_r_val=0.1_dp)
647 CALL section_add_keyword(section, keyword)
648 CALL keyword_release(keyword)
649
650 CALL keyword_create(keyword, __location__, name="TARGET", &
651 description="target value of the restraint", &
652 usage="TARGET {real} ", default_r_val=1._dp)
653 CALL section_add_keyword(section, keyword)
654 CALL keyword_release(keyword)
655
656 CALL keyword_create(keyword, __location__, name="ATOMS", &
657 description="Specifies the list of atoms that is summed in the restraint", &
658 usage="ATOMS {integer} {integer} .. {integer}", &
659 n_var=-1, type_of_var=integer_t)
660 CALL section_add_keyword(section, keyword)
661 CALL keyword_release(keyword)
662
663 CALL keyword_create(keyword, __location__, name="COEFF", &
664 description="Defines the the coefficient of the atom in the atom list (default is one) ", &
665 usage="COEFF 1.0 -1.0", &
666 type_of_var=real_t, n_var=-1)
667 CALL section_add_keyword(section, keyword)
668 CALL keyword_release(keyword)
669
670 CALL keyword_create(keyword, __location__, name="FUNCTIONAL_FORM", &
671 description="Specifies the functional form of the term added", &
672 usage="FUNCTIONAL_FORM RESTRAINT", &
673 enum_c_vals=s2a("RESTRAINT", "CONSTRAINT"), &
675 enum_desc=s2a("Harmonic potential: s*(q-t)**2", "Constraint form: s*(q-t)"), &
676 default_i_val=do_ddapc_restraint)
677 CALL section_add_keyword(section, keyword)
678 CALL keyword_release(keyword)
679
680 CALL cp_print_key_section_create(print_key, __location__, "program_run_info", &
681 description="Controls the printing basic info about the method", &
682 print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
683 CALL section_add_subsection(section, print_key)
684 CALL section_release(print_key)
685
686 END SUBROUTINE create_ddapc_restraint_section
687
688! **************************************************************************************************
689!> \brief ...
690!> \param section ...
691! **************************************************************************************************
692 SUBROUTINE create_s2_restraint_section(section)
693 TYPE(section_type), POINTER :: section
694
695 TYPE(keyword_type), POINTER :: keyword
696
697 NULLIFY (keyword)
698 cpassert(.NOT. ASSOCIATED(section))
699
700 CALL section_create(section, __location__, name="S2_RESTRAINT", &
701 description="Use S2 in a re/constraint (OT only)", &
702 n_keywords=7, n_subsections=0, repeats=.false.)
703
704 CALL keyword_create(keyword, __location__, name="STRENGTH", &
705 description="force constant of the restraint", &
706 usage="STRENGTH {real} ", default_r_val=0.1_dp)
707 CALL section_add_keyword(section, keyword)
708 CALL keyword_release(keyword)
709
710 CALL keyword_create(keyword, __location__, name="TARGET", &
711 description="target value of the restraint", &
712 usage="TARGET {real} ", default_r_val=1._dp)
713 CALL section_add_keyword(section, keyword)
714 CALL keyword_release(keyword)
715
716 CALL keyword_create(keyword, __location__, name="FUNCTIONAL_FORM", &
717 description="Specifies the functional form of the term added", &
718 usage="FUNCTIONAL_FORM RESTRAINT", &
719 enum_c_vals=s2a("RESTRAINT", "CONSTRAINT"), &
720 enum_i_vals=[do_s2_restraint, do_s2_constraint], &
721 enum_desc=s2a("Harmonic potential: s*(q-t)**2", "Constraint form: s*(q-t)"), &
722 default_i_val=do_s2_restraint)
723 CALL section_add_keyword(section, keyword)
724 CALL keyword_release(keyword)
725
726 END SUBROUTINE create_s2_restraint_section
727
728! **************************************************************************************************
729!> \brief input section for optional parameters for LRIGPW
730!> LRI: local resolution of identity
731!> \param section the section to create
732!> \author Dorothea Golze [02.2015]
733! **************************************************************************************************
734 SUBROUTINE create_lrigpw_section(section)
735 TYPE(section_type), POINTER :: section
736
737 TYPE(keyword_type), POINTER :: keyword
738
739 cpassert(.NOT. ASSOCIATED(section))
740 CALL section_create(section, __location__, name="LRIGPW", &
741 description="This section specifies optional parameters for LRIGPW.", &
742 n_keywords=3, n_subsections=0, repeats=.false., citations=[golze2017b])
743
744 NULLIFY (keyword)
745
746 CALL keyword_create(keyword, __location__, name="LRI_OVERLAP_MATRIX", &
747 description="Specifies whether to calculate the inverse or the "// &
748 "pseudoinverse of the overlap matrix of the auxiliary "// &
749 "basis set. Calculating the pseudoinverse is necessary "// &
750 "for very large auxiliary basis sets, but more expensive. "// &
751 "Using the pseudoinverse, consistent forces are not "// &
752 "guaranteed yet.", &
753 usage="LRI_OVERLAP_MATRIX INVERSE", &
754 enum_c_vals=s2a("INVERSE", "PSEUDO_INVERSE_SVD", "PSEUDO_INVERSE_DIAG", &
755 "AUTOSELECT"), &
756 enum_desc=s2a("Calculate inverse of the overlap matrix.", &
757 "Calculate the pseuodinverse of the overlap matrix "// &
758 "using singular value decomposition.", &
759 "Calculate the pseudoinverse of the overlap matrix "// &
760 "by prior diagonalization.", &
761 "Choose automatically for each pair whether to "// &
762 "calculate the inverse or pseudoinverse based on the "// &
763 "condition number of the overlap matrix for each pair. "// &
764 "Calculating the pseudoinverse is much more expensive."), &
765 enum_i_vals=[do_lri_inv, do_lri_pseudoinv_svd, &
767 default_i_val=do_lri_inv)
768 CALL section_add_keyword(section, keyword)
769 CALL keyword_release(keyword)
770
771 CALL keyword_create(keyword, __location__, name="MAX_CONDITION_NUM", &
772 description="If AUTOSELECT is chosen for LRI_OVERLAP_MATRIX, this "// &
773 "keyword specifies that the pseudoinverse is calculated "// &
774 "only if the LOG of the condition number of the lri "// &
775 "overlap matrix is larger than the given value.", &
776 usage="MAX_CONDITION_NUM 20.0", default_r_val=20.0_dp)
777 CALL section_add_keyword(section, keyword)
778 CALL keyword_release(keyword)
779
780 CALL keyword_create(keyword, __location__, name="EPS_O3_INT", &
781 description="Threshold for ABA and ABB integrals in LRI. "// &
782 "This is used for screening in the KS and "// &
783 "force calculations (tensor contractions).", &
784 usage="EPS_O3_INT 1.e-10", default_r_val=1.0e-14_dp)
785 CALL section_add_keyword(section, keyword)
786 CALL keyword_release(keyword)
787
788 CALL keyword_create(keyword, __location__, name="DEBUG_LRI_INTEGRALS", &
789 description="Debug the integrals needed for LRIGPW.", &
790 usage="DEBUG_LRI_INTEGRALS TRUE", &
791 default_l_val=.false., lone_keyword_l_val=.true.)
792 CALL section_add_keyword(section, keyword)
793 CALL keyword_release(keyword)
794
795 CALL keyword_create(keyword, __location__, name="EXACT_1C_TERMS", &
796 description="Don't use LRI for one center densities.", &
797 usage="EXACT_1C_TERMS TRUE", &
798 default_l_val=.false., lone_keyword_l_val=.true.)
799 CALL section_add_keyword(section, keyword)
800 CALL keyword_release(keyword)
801
802 CALL keyword_create(keyword, __location__, name="PPL_RI", &
803 description="Use LRI/RI for local pseudopotential.", &
804 usage="PPL_RI TRUE", &
805 default_l_val=.false., lone_keyword_l_val=.true.)
806 CALL section_add_keyword(section, keyword)
807 CALL keyword_release(keyword)
808
809 CALL keyword_create(keyword, __location__, name="RI_STATISTIC", &
810 description="Print statistical information on the RI calculation.", &
811 usage="RI_STATISTIC TRUE", &
812 default_l_val=.false., lone_keyword_l_val=.true.)
813 CALL section_add_keyword(section, keyword)
814 CALL keyword_release(keyword)
815
816 CALL keyword_create(keyword, __location__, name="DISTANT_PAIR_APPROXIMATION", &
817 description="Calculate distant pairs using an independent atom approximation.", &
818 usage="DISTANT_PAIR_APPROXIMATION TRUE", &
819 default_l_val=.false., lone_keyword_l_val=.true.)
820 CALL section_add_keyword(section, keyword)
821 CALL keyword_release(keyword)
822
823 CALL keyword_create(keyword, __location__, name="DISTANT_PAIR_METHOD", &
824 description="Method used to separate pair density for distant pairs. "// &
825 "Options: EW (equal weights); AW (atomic weights); SW (set weights); "// &
826 "LW (shell function weights)", &
827 usage="DISTANT_PAIR_METHOD {method}", &
828 default_c_val="LW")
829 CALL section_add_keyword(section, keyword)
830 CALL keyword_release(keyword)
831
832 CALL keyword_create(keyword, __location__, name="DISTANT_PAIR_RADII", &
833 description="Inner and outer radii used in distant "// &
834 "pair separation. Smooth interpolation between inner and outer "// &
835 "radius is used.", &
836 usage="DISTANT_PAIR_RADII r_inner {real} r_outer {real} ", &
837 n_var=2, default_r_vals=[8._dp, 12._dp], unit_str='bohr', &
838 type_of_var=real_t)
839 CALL section_add_keyword(section, keyword)
840 CALL keyword_release(keyword)
841
842 CALL keyword_create(keyword, __location__, name="SHG_LRI_INTEGRALS", &
843 description="Uses the SHG (solid harmonic Gaussian) integral "// &
844 "scheme instead of Obara-Saika", &
845 usage="SHG_LRI_INTEGRALS TRUE", &
846 default_l_val=.true., lone_keyword_l_val=.true., &
847 citations=[golze2017a])
848 CALL section_add_keyword(section, keyword)
849 CALL keyword_release(keyword)
850
851 CALL keyword_create(keyword, __location__, name="RI_SINV", &
852 description="Approximation to be used for the inverse of the "// &
853 "RI overlap matrix. INVF, INVS: exact inverse, apply directly "// &
854 "for solver (F:full matrix, S:sparsematrix). AINV approximate inverse, use with PCG. "// &
855 "NONE: no approximation used with CG solver.", &
856 usage="RI_SINV NONE", default_c_val="INVF")
857 CALL section_add_keyword(section, keyword)
858 CALL keyword_release(keyword)
859
860 END SUBROUTINE create_lrigpw_section
861
862END MODULE input_cp2k_qs
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public stewart2007
integer, save, public vandevondele2006
integer, save, public golze2017b
integer, save, public vandevondele2005a
integer, save, public kuhne2007
integer, save, public golze2017a
integer, save, public lippert1999
integer, save, public dewar1977
integer, save, public vanvoorhis2015
integer, save, public repasky2002
integer, save, public iannuzzi2006
integer, save, public rocha2006
integer, save, public lippert1997
integer, save, public andermatt2016
integer, save, public thiel1992
integer, save, public schenter2008
integer, save, public brelaz1979
integer, save, public krack2000
integer, save, public dewar1985
integer, save, public stewart1989
integer, save, public kolafa2004
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer, parameter, public low_print_level
integer, parameter, public add_last_numeric
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
collects all constants needed in input so that they can be used without circular dependencies
integer, parameter, public do_method_ofgpw
integer, parameter, public do_gapw_gct
integer, parameter, public do_gapw_gcs
integer, parameter, public do_s2_restraint
integer, parameter, public do_method_rigpw
integer, parameter, public do_s2_constraint
integer, parameter, public wfi_frozen_method_nr
integer, parameter, public do_method_gpw
integer, parameter, public gapw_1c_large
integer, parameter, public do_method_pdg
integer, parameter, public wfi_linear_wf_method_nr
integer, parameter, public wfi_linear_p_method_nr
integer, parameter, public wfi_linear_ps_method_nr
integer, parameter, public do_method_pnnl
integer, parameter, public do_ddapc_constraint
integer, parameter, public wfi_use_prev_rho_r_method_nr
integer, parameter, public do_lri_inv_auto
integer, parameter, public gapw_1c_medium
integer, parameter, public wfi_use_guess_method_nr
integer, parameter, public wfi_gext_proj_qtr_nr
integer, parameter, public do_ppl_grid
integer, parameter, public do_method_rm1
integer, parameter, public gapw_1c_small
integer, parameter, public do_method_pm3
integer, parameter, public do_method_mndo
integer, parameter, public gapw_1c_orb
integer, parameter, public do_pwgrid_ns_fullspace
integer, parameter, public gapw_1c_very_large
integer, parameter, public do_method_gapw
integer, parameter, public do_lri_pseudoinv_svd
integer, parameter, public do_method_mndod
integer, parameter, public do_gapw_log
integer, parameter, public do_method_am1
integer, parameter, public do_method_dftb
integer, parameter, public wfi_use_prev_wf_method_nr
integer, parameter, public do_spin_density
integer, parameter, public gaussian
integer, parameter, public wfi_ps_method_nr
integer, parameter, public do_pwgrid_spherical
integer, parameter, public wfi_gext_proj_nr
integer, parameter, public do_method_lrigpw
integer, parameter, public do_ppl_analytic
integer, parameter, public wfi_aspc_nr
integer, parameter, public do_lri_inv
integer, parameter, public do_method_xtb
integer, parameter, public do_ddapc_restraint
integer, parameter, public do_pwgrid_ns_halfspace
integer, parameter, public do_method_pm6fm
integer, parameter, public do_full_density
integer, parameter, public do_method_gapw_xc
integer, parameter, public numerical
integer, parameter, public do_method_pm6
integer, parameter, public wfi_use_prev_p_method_nr
integer, parameter, public do_lri_pseudoinv_diag
integer, parameter, public slater
function that builds the distribution section of the input
subroutine, public create_distribution_section(section)
Creates the distribution section.
function that build the dft section of the input
subroutine, public create_optimize_lri_basis_section(section)
input section for optimization of the auxililary basis for LRIGPW
subroutine, public create_optimize_dmfet(section)
Input for density matrix functional embedding, DMFET.
subroutine, public create_optimize_embed(section)
Input for DFT embedding.
function that build the QS section of the input
subroutine, public create_qs_section(section)
creates the input section for the qs part
subroutine, public create_lrigpw_section(section)
input section for optional parameters for LRIGPW LRI: local resolution of identity
subroutine, public create_ddapc_restraint_section(section, section_name)
...
function that build the scf section of the input
subroutine, public create_cdft_control_section(section)
Creates the input section for defining CDFT constraints.
function that build the semi empirical section of the input
subroutine, public create_se_control_section(section)
...
function that build the dft section of the input
subroutine, public create_dftb_control_section(section)
...
subroutine, public create_xtb_control_section(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 integer_t
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
This module defines the grid data type and some basic operations on it.
Definition pw_grids.F:36
integer, parameter, public do_pw_grid_blocked_false
Definition pw_grids.F:77
integer, parameter, public do_pw_grid_blocked_true
Definition pw_grids.F:77
integer, parameter, public do_pw_grid_blocked_free
Definition pw_grids.F:77
Utilities for string manipulations.
represent a keyword in the input
represent a section of the input file