(git:a709f7f)
Loading...
Searching...
No Matches
input_cp2k_atom.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 input structure for the ATOM module
10!> \author jgh
11! **************************************************************************************************
18 USE input_constants, ONLY: &
34 USE input_val_types, ONLY: char_t,&
35 integer_t,&
36 lchar_t,&
37 logical_t,&
38 real_t
39 USE kinds, ONLY: dp
40 USE string_utilities, ONLY: s2a
41#include "./base/base_uses.f90"
42
43 IMPLICIT NONE
44 PRIVATE
45
46 LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .true.
47 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_atom'
48
49 PUBLIC :: create_atom_section
50
51! **************************************************************************************************
52
53CONTAINS
54
55! **************************************************************************************************
56!> \brief Creates the input section for the atom code
57!> \param section the section to create
58!> \author jgh
59! **************************************************************************************************
60 SUBROUTINE create_atom_section(section)
61 TYPE(section_type), POINTER :: section
62
63 TYPE(keyword_type), POINTER :: keyword
64 TYPE(section_type), POINTER :: subsection
65
66 cpassert(.NOT. ASSOCIATED(section))
67 CALL section_create(section, __location__, name="ATOM", &
68 description="Section handling input for atomic calculations.", &
69 n_keywords=1, n_subsections=1, repeats=.false.)
70 NULLIFY (keyword, subsection)
71
72 CALL keyword_create(keyword, __location__, name="ATOMIC_NUMBER", &
73 description="Specify the atomic number", &
74 default_i_val=1)
75 CALL section_add_keyword(section, keyword)
76 CALL keyword_release(keyword)
77
78 CALL keyword_create(keyword, __location__, name="ELEMENT", &
79 description="Specify the element to be calculated", &
80 usage="ELEMENT char", n_var=1, type_of_var=char_t, &
81 default_c_val="H")
82 CALL section_add_keyword(section, keyword)
83 CALL keyword_release(keyword)
84
85 CALL keyword_create(keyword, __location__, name="RUN_TYPE", &
86 description="Type of run that you want to perform "// &
87 "[ENERGY,BASIS_OPTIMIZATION,PSEUDOPOTENTIAL_OPTIMIZATION,,...] ", &
88 usage="RUN_TYPE (NONE|ENERGY|BASIS_OPTIMIZATION|PSEUDOPOTENTIAL_OPTIMIZATION)", &
89 default_i_val=atom_energy_run, &
90 enum_c_vals=s2a("NONE", "ENERGY", "BASIS_OPTIMIZATION", "PSEUDOPOTENTIAL_OPTIMIZATION"), &
92 enum_desc=s2a("Perform no run", &
93 "Perform energy optimization", &
94 "Perform basis optimization", &
95 "Perform pseudopotential optimization"))
96 CALL section_add_keyword(section, keyword)
97 CALL keyword_release(keyword)
98
99 CALL keyword_create(keyword, __location__, name="COULOMB_INTEGRALS", &
100 description="Method to calculate Coulomb integrals", &
101 usage="COULOMB_INTEGRALS (ANALYTIC|SEMI_ANALYTIC|NUMERIC)", &
102 default_i_val=do_numeric, &
103 enum_c_vals=["ANALYTIC ", &
104 "SEMI_ANALYTIC ", &
105 "NUMERIC "], &
106 enum_i_vals=[do_analytic, do_semi_analytic, do_numeric], &
107 enum_desc=s2a("Use analytical method", &
108 "Use semi-analytical method", &
109 "Use numerical method"))
110 CALL section_add_keyword(section, keyword)
111 CALL keyword_release(keyword)
112
113 CALL keyword_create(keyword, __location__, name="EXCHANGE_INTEGRALS", &
114 description="Method to calculate Exchange integrals", &
115 usage="EXCHANGE_INTEGRALS (ANALYTIC|SEMI_ANALYTIC|NUMERIC)", &
116 default_i_val=do_numeric, &
117 enum_c_vals=["ANALYTIC ", &
118 "SEMI_ANALYTIC ", &
119 "NUMERIC "], &
120 enum_i_vals=[do_analytic, do_semi_analytic, do_numeric], &
121 enum_desc=s2a("Use analytical method. Not available for longrange Hartree-Fock", &
122 "Use semi-analytical method", &
123 "Use numerical method"))
124 CALL section_add_keyword(section, keyword)
125 CALL keyword_release(keyword)
126
127 CALL keyword_create(keyword, __location__, name="CORE", &
128 description="Specifies the core electrons for a pseudopotential", &
129 usage="CORE 1s2 ... or CORE [Ne] or CORE none for 0 electron cores", repeats=.false., &
130 n_var=-1, type_of_var=char_t)
131 CALL section_add_keyword(section, keyword)
132 CALL keyword_release(keyword)
133
134 CALL keyword_create(keyword, __location__, name="ELECTRON_CONFIGURATION", &
135 description="Specifies the electron configuration. "// &
136 "Optional the multiplicity (m) and a core state [XX] can be declared", &
137 usage="ELECTRON_CONFIGURATION (1) [Ne] 3s2 ... ", repeats=.true., &
138 n_var=-1, type_of_var=char_t)
139 CALL section_add_keyword(section, keyword)
140 CALL keyword_release(keyword)
141
142 CALL keyword_create(keyword, __location__, name="MAX_ANGULAR_MOMENTUM", &
143 description="Specifies the largest angular momentum calculated [0-3]", &
144 usage="MAX_ANGULAR_MOMENTUM 3", repeats=.false., &
145 default_i_val=3)
146 CALL section_add_keyword(section, keyword)
147 CALL keyword_release(keyword)
148
149 CALL keyword_create(keyword, __location__, name="CALCULATE_STATES", &
150 description="Specifies the number of states calculated per l value", &
151 usage="CALCULATE_STATES 5 5 5 3 ", repeats=.false., &
152 default_i_val=0, n_var=-1, type_of_var=integer_t)
153 CALL section_add_keyword(section, keyword)
154 CALL keyword_release(keyword)
155
156 CALL keyword_create(keyword, __location__, name="USE_GAUSS_HERMITE", &
157 description="Whether a Gauss-Hermite grid is to be used for the numerical integration of "// &
158 "longrange exchange integrals", &
159 usage="USE_GAUSS_HERMITE TRUE", repeats=.false., &
160 default_l_val=.false.)
161 CALL section_add_keyword(section, keyword)
162 CALL keyword_release(keyword)
163
164 CALL keyword_create(keyword, __location__, name="GRID_POINTS_GH", &
165 description="Number of grid points for Gauss-Hermite grid", &
166 usage="GRID_POINTS_GH 100", repeats=.false., &
167 default_i_val=100)
168 CALL section_add_keyword(section, keyword)
169 CALL keyword_release(keyword)
170
171 CALL create_atom_reference_section(subsection)
172 CALL section_add_subsection(section, subsection)
173 CALL section_release(subsection)
174
175 CALL create_atom_print_section(subsection)
176 CALL section_add_subsection(section, subsection)
177 CALL section_release(subsection)
178
179 CALL create_atom_aebasis_section(subsection)
180 CALL section_add_subsection(section, subsection)
181 CALL section_release(subsection)
182
183 CALL create_atom_ppbasis_section(subsection)
184 CALL section_add_subsection(section, subsection)
185 CALL section_release(subsection)
186
187 CALL create_atom_method_section(subsection)
188 CALL section_add_subsection(section, subsection)
189 CALL section_release(subsection)
190
191 CALL create_optimization_section(subsection)
192 CALL section_add_subsection(section, subsection)
193 CALL section_release(subsection)
194
195 CALL create_potential_section(subsection)
196 CALL section_add_subsection(section, subsection)
197 CALL section_release(subsection)
198
199 CALL create_powell_section(subsection)
200 CALL section_add_subsection(section, subsection)
201 CALL section_release(subsection)
202
203 END SUBROUTINE create_atom_section
204
205! **************************************************************************************************
206!> \brief Create the atom section for reference method
207!> \param section the section to create
208!> \author jgh
209! **************************************************************************************************
210 SUBROUTINE create_atom_reference_section(section)
211 TYPE(section_type), POINTER :: section
212
213 TYPE(keyword_type), POINTER :: keyword
214 TYPE(section_type), POINTER :: subsection
215
216 cpassert(.NOT. ASSOCIATED(section))
217 CALL section_create(section, __location__, name="REFERENCE", &
218 description="Section to specify a reference method for PP optimization.", &
219 n_keywords=1, n_subsections=1, repeats=.false.)
220
221 NULLIFY (keyword)
222
223 CALL keyword_create(keyword, __location__, name="METHOD", &
224 description="METHOD to be used as reference: [AE|PP] ", &
225 usage="METHOD PP", &
226 type_of_var=char_t, default_c_val="AE", n_var=-1)
227 CALL section_add_keyword(section, keyword)
228 CALL keyword_release(keyword)
229
230 CALL keyword_create(keyword, __location__, name="CORE", &
231 description="Specifies the core electrons for a pseudopotential", &
232 usage="CORE 1s2 ... or CORE [Ne] or CORE none for 0 electron cores", repeats=.false., &
233 n_var=-1, type_of_var=char_t)
234 CALL section_add_keyword(section, keyword)
235 CALL keyword_release(keyword)
236
237 NULLIFY (subsection)
238 CALL create_potential_section(subsection)
239 CALL section_add_subsection(section, subsection)
240 CALL section_release(subsection)
241
242 END SUBROUTINE create_atom_reference_section
243
244! **************************************************************************************************
245!> \brief Create the print atom section
246!> \param section the section to create
247!> \author jgh
248! **************************************************************************************************
249 SUBROUTINE create_atom_print_section(section)
250 TYPE(section_type), POINTER :: section
251
252 TYPE(keyword_type), POINTER :: keyword
253 TYPE(section_type), POINTER :: print_key, subsection
254
255 cpassert(.NOT. ASSOCIATED(section))
256 CALL section_create(section, __location__, name="print", &
257 description="Section of possible print options specific of the ATOM code.", &
258 n_keywords=0, n_subsections=1, repeats=.false.)
259
260 NULLIFY (print_key, keyword)
261
262 ! Print key section
263 CALL cp_print_key_section_create(print_key, __location__, "PROGRAM_BANNER", &
264 description="Controls the printing of the banner of the ATOM program", &
265 print_level=silent_print_level, filename="__STD_OUT__")
266 CALL section_add_subsection(section, print_key)
267 CALL section_release(print_key)
268
269 ! Print key section
270 CALL cp_print_key_section_create(print_key, __location__, "METHOD_INFO", &
271 description="Controls the printing of method information", &
272 print_level=medium_print_level, filename="__STD_OUT__")
273 CALL section_add_subsection(section, print_key)
274 CALL section_release(print_key)
275
276 ! Print key section
277 CALL cp_print_key_section_create(print_key, __location__, "BASIS_SET", &
278 description="Controls the printing of the basis sets", &
279 print_level=high_print_level, filename="__STD_OUT__")
280 CALL section_add_subsection(section, print_key)
281 CALL section_release(print_key)
282
283 ! Print key section
284 CALL cp_print_key_section_create(print_key, __location__, "POTENTIAL", &
285 description="Controls the printing of the potentials", &
286 print_level=high_print_level, filename="__STD_OUT__")
287 CALL section_add_subsection(section, print_key)
288 CALL section_release(print_key)
289
290 ! Print key section
292 print_key, __location__, "FIT_DENSITY", &
293 description="Fit the total electronic density to a linear combination of Gaussian functions", &
294 print_level=high_print_level, filename="__STD_OUT__")
295 CALL keyword_create(keyword, __location__, name="NUM_GTO", &
296 description="Number of Gaussian type functions for density fit", &
297 usage="NUM_GTO integer ", type_of_var=integer_t, &
298 default_i_val=40)
299 CALL section_add_keyword(print_key, keyword)
300 CALL keyword_release(keyword)
301 CALL section_add_subsection(section, print_key)
302 CALL section_release(print_key)
303
304 ! Print key section
305 CALL cp_print_key_section_create(print_key, __location__, "FIT_KGPOT", &
306 description="Fit an approximation to the non-additive"// &
307 " kinetic energy potential used in KG", &
308 print_level=high_print_level, filename="__STD_OUT__")
309 CALL keyword_create(keyword, __location__, name="NUM_GAUSSIAN", &
310 description="Number of Gaussian terms for the fit", &
311 usage="NUM_GAUSSIAN integer ", type_of_var=integer_t, &
312 default_i_val=1)
313 CALL section_add_keyword(print_key, keyword)
314 CALL keyword_release(keyword)
315 CALL keyword_create(keyword, __location__, name="NUM_POLYNOM", &
316 description="Number of terms in the polynomial expansion", &
317 usage="NUM_POLYNOM integer ", type_of_var=integer_t, &
318 default_i_val=4)
319 CALL section_add_keyword(print_key, keyword)
320 CALL keyword_release(keyword)
321 CALL section_add_subsection(section, print_key)
322 CALL section_release(print_key)
323
324 ! Print key section
325 CALL cp_print_key_section_create(print_key, __location__, "RESPONSE_BASIS", &
326 description="Calculate a response basis set contraction scheme", &
327 print_level=high_print_level, filename="__STD_OUT__")
328 CALL keyword_create(keyword, __location__, name="DELTA_CHARGE", &
329 description="Variation of charge used in finite difference calculation", &
330 usage="DELTA_CHARGE real ", type_of_var=real_t, &
331 default_r_val=0.05_dp)
332 CALL section_add_keyword(print_key, keyword)
333 CALL keyword_release(keyword)
334 CALL keyword_create(keyword, __location__, name="DERIVATIVES", &
335 description="Number of wavefunction derivatives to calculate", &
336 usage="DERIVATIVES integer ", type_of_var=integer_t, &
337 default_i_val=2)
338 CALL section_add_keyword(print_key, keyword)
339 CALL keyword_release(keyword)
340 CALL section_add_subsection(section, print_key)
341 CALL section_release(print_key)
342
343 ! Print key section
344 CALL cp_print_key_section_create(print_key, __location__, "GEOMETRICAL_RESPONSE_BASIS", &
345 description="Calculate a response basis set based on a set of geometrical exponents", &
346 print_level=high_print_level, filename="__STD_OUT__")
347 !
348 CALL keyword_create(keyword, __location__, name="DELTA_CHARGE", &
349 description="Variation of charge used in finite difference calculation", &
350 usage="DELTA_CHARGE real ", type_of_var=real_t, &
351 default_r_val=0.05_dp)
352 CALL section_add_keyword(print_key, keyword)
353 CALL keyword_release(keyword)
354 !
355 CALL keyword_create(keyword, __location__, name="DERIVATIVES", &
356 description="Number of wavefunction derivatives to calculate", &
357 usage="DERIVATIVES integer ", type_of_var=integer_t, &
358 default_i_val=3)
359 CALL section_add_keyword(print_key, keyword)
360 CALL keyword_release(keyword)
361 !
362 CALL keyword_create(keyword, __location__, name="QUADRATURE", &
363 description="Algorithm to construct the atomic radial grids", &
364 usage="QUADRATURE (GC_SIMPLE|GC_TRANSFORMED|GC_LOG)", &
365 enum_c_vals=s2a("GC_SIMPLE", "GC_TRANSFORMED", "GC_LOG"), &
366 enum_i_vals=[do_gapw_gcs, do_gapw_gct, do_gapw_log], &
367 enum_desc=s2a("Gauss-Chebyshev quadrature", &
368 "Transformed Gauss-Chebyshev quadrature", &
369 "Logarithmic transformed Gauss-Chebyshev quadrature"), &
370 default_i_val=do_gapw_log)
371 CALL section_add_keyword(print_key, keyword)
372 CALL keyword_release(keyword)
373 !
374 CALL keyword_create(keyword, __location__, name="GRID_POINTS", &
375 description="Number of radial grid points", &
376 usage="GRID_POINTS integer", &
377 default_i_val=400)
378 CALL section_add_keyword(print_key, keyword)
379 CALL keyword_release(keyword)
380 !
381 CALL keyword_create(keyword, __location__, name="NUM_GTO_CORE", &
382 description="Number of Gaussian type functions for s, p, d, ... "// &
383 "for the main body of the basis", &
384 usage="NUM_GTO_CORE 6 ", n_var=1, type_of_var=integer_t, &
385 default_i_val=-1)
386 CALL section_add_keyword(print_key, keyword)
387 CALL keyword_release(keyword)
388 CALL keyword_create(keyword, __location__, name="NUM_GTO_EXTENDED", &
389 description="Number of Gaussian type functions for s, p, d, ... "// &
390 "for the extension set", &
391 usage="NUM_GTO_EXTENDED 4 ", n_var=1, type_of_var=integer_t, &
392 default_i_val=-1)
393 CALL section_add_keyword(print_key, keyword)
394 CALL keyword_release(keyword)
395 CALL keyword_create(keyword, __location__, name="NUM_GTO_POLARIZATION", &
396 description="Number of Gaussian type functions for the polarization set", &
397 usage="NUM_GTO_POLARIZATION 4 ", n_var=1, type_of_var=integer_t, &
398 default_i_val=-1)
399 CALL section_add_keyword(print_key, keyword)
400 CALL keyword_release(keyword)
401 CALL keyword_create(keyword, __location__, name="EXTENSION_BASIS", &
402 description="Number of basis functions for s, p, d, ... "// &
403 "for the extension set", &
404 usage="EXTENSION_BASIS 4 3 2 1 ", n_var=-1, type_of_var=integer_t, &
405 default_i_val=-1)
406 CALL section_add_keyword(print_key, keyword)
407 CALL keyword_release(keyword)
408 CALL keyword_create(keyword, __location__, name="GEOMETRICAL_FACTOR", &
409 description="Geometrical basis: factor C in a*C^k (initial value for optimization)", &
410 usage="GEOMETRICAL_FACTOR real", &
411 default_r_val=2.3_dp)
412 CALL section_add_keyword(print_key, keyword)
413 CALL keyword_release(keyword)
414 CALL keyword_create(keyword, __location__, name="GEO_START_VALUE", &
415 description="Geometrical basis: starting value a in a*C^k (initial value for optimization)", &
416 usage="GEO_START_VALUE real", &
417 default_r_val=0.06_dp)
418 CALL section_add_keyword(print_key, keyword)
419 CALL keyword_release(keyword)
420 CALL keyword_create(keyword, __location__, name="CONFINEMENT", &
421 description="Onset value of barrier confinement potential [Bohr]", &
422 usage="CONFINEMENT real", &
423 default_r_val=8.00_dp)
424 CALL section_add_keyword(print_key, keyword)
425 CALL keyword_release(keyword)
426 CALL keyword_create(keyword, __location__, name="NAME_BODY", &
427 description="Specifies the body of the basis set name ", &
428 usage="NAME_BODY <char>", &
429 type_of_var=char_t, default_c_val="GRB", n_var=-1)
430 CALL section_add_keyword(print_key, keyword)
431 CALL keyword_release(keyword)
432 !
433 CALL section_add_subsection(section, print_key)
434 CALL section_release(print_key)
435
436 ! Print key section
437 CALL cp_print_key_section_create(print_key, __location__, "SCF_INFO", &
438 description="Controls the printing of SCF information", &
439 print_level=medium_print_level, filename="__STD_OUT__")
440 CALL section_add_subsection(section, print_key)
441 CALL section_release(print_key)
442
443 ! Print key section
444 CALL cp_print_key_section_create(print_key, __location__, "ORBITALS", &
445 description="Controls the printing of the optimized orbitals information", &
446 print_level=high_print_level, filename="__STD_OUT__")
447 CALL keyword_create(keyword, __location__, name="XMGRACE", &
448 description="Output orbitals in Xmgrace format to files.", &
449 usage="XMGRACE <logical>", &
450 type_of_var=logical_t, &
451 default_l_val=.false., &
452 lone_keyword_l_val=.true.)
453 CALL section_add_keyword(print_key, keyword)
454 CALL keyword_release(keyword)
455 CALL section_add_subsection(section, print_key)
456 CALL section_release(print_key)
457
458 ! Print key section
459 CALL cp_print_key_section_create(print_key, __location__, "ANALYZE_BASIS", &
460 description="Calculates some basis set analysis data", &
461 print_level=high_print_level, filename="__STD_OUT__")
462 CALL keyword_create(keyword, __location__, name="OVERLAP_CONDITION_NUMBER", &
463 description="Condition number of the basis set overlap matrix calculated for a cubic crystal", &
464 usage="OVERLAP_CONDITION_NUMBER <logical>", type_of_var=logical_t, default_l_val=.false.)
465 CALL section_add_keyword(print_key, keyword)
466 CALL keyword_release(keyword)
467 CALL keyword_create(keyword, __location__, name="COMPLETENESS", &
468 description="Calculate a completeness estimate for the basis set.", &
469 usage="COMPLETENESS <logical>", type_of_var=logical_t, default_l_val=.false.)
470 CALL section_add_keyword(print_key, keyword)
471 CALL keyword_release(keyword)
472 CALL section_add_subsection(section, print_key)
473 CALL section_release(print_key)
474
475 ! Print key section
476 CALL cp_print_key_section_create(print_key, __location__, "FIT_PSEUDO", &
477 description="Controls the printing of FIT PSEUDO task", &
478 print_level=medium_print_level, filename="__STD_OUT__")
479 CALL section_add_subsection(section, print_key)
480 CALL section_release(print_key)
481
482 ! Print key section
483 CALL cp_print_key_section_create(print_key, __location__, "FIT_BASIS", &
484 description="Controls the printing of FIT BASIS task", &
485 print_level=medium_print_level, filename="__STD_OUT__")
486 CALL section_add_subsection(section, print_key)
487 CALL section_release(print_key)
488
489 ! Print key section
490 CALL cp_print_key_section_create(print_key, __location__, "UPF_FILE", &
491 description="Write GTH pseudopotential in UPF format", &
492 print_level=high_print_level, filename="__STD_OUT__")
493 CALL section_add_subsection(section, print_key)
494 CALL section_release(print_key)
495
496 ! Print key section
497 CALL cp_print_key_section_create(print_key, __location__, "SEPARABLE_GAUSSIAN_PSEUDO", &
498 description="Creates a representation of the pseudopotential in separable "// &
499 "form using Gaussian functions.", &
500 print_level=debug_print_level, filename="__STD_OUT__")
501 CALL section_add_subsection(section, print_key)
502 CALL section_release(print_key)
503
504 ! Print key section: ADMM Analysis
505 CALL cp_print_key_section_create(print_key, __location__, "ADMM", &
506 description="Analysis of ADMM approximation to exact exchange", &
507 print_level=high_print_level, filename="__STD_OUT__")
508
509 NULLIFY (subsection)
510 CALL section_create(subsection, __location__, name="ADMM_BASIS", &
511 description="Section of basis set information for ADMM calculations.", &
512 n_keywords=0, n_subsections=0, repeats=.false.)
513 CALL atom_basis_section(subsection)
514 CALL section_add_subsection(print_key, subsection)
515 CALL section_release(subsection)
516 CALL section_add_subsection(section, print_key)
517 CALL section_release(print_key)
518
519 END SUBROUTINE create_atom_print_section
520
521! **************************************************************************************************
522!> \brief Create the all-electron basis section
523!> \param section the section to create
524!> \author jgh
525! **************************************************************************************************
526 SUBROUTINE create_atom_aebasis_section(section)
527 TYPE(section_type), POINTER :: section
528
529 cpassert(.NOT. ASSOCIATED(section))
530 CALL section_create(section, __location__, name="AE_BASIS", &
531 description="Section of basis set information for all-electron calculations.", &
532 n_keywords=0, n_subsections=0, repeats=.false.)
533
534 CALL atom_basis_section(section)
535
536 END SUBROUTINE create_atom_aebasis_section
537
538! **************************************************************************************************
539!> \brief Create the pseudopotential basis section
540!> \param section the section to create
541!> \author jgh
542! **************************************************************************************************
543 SUBROUTINE create_atom_ppbasis_section(section)
544 TYPE(section_type), POINTER :: section
545
546 cpassert(.NOT. ASSOCIATED(section))
547 CALL section_create(section, __location__, name="PP_BASIS", &
548 description="Section of basis set information for pseudopotential calculations.", &
549 n_keywords=0, n_subsections=0, repeats=.false.)
550
551 CALL atom_basis_section(section)
552
553 END SUBROUTINE create_atom_ppbasis_section
554
555! **************************************************************************************************
556!> \brief Keywords in the atom basis section
557!> \param section the section to fill
558!> \author jgh
559! **************************************************************************************************
560 SUBROUTINE atom_basis_section(section)
561 TYPE(section_type), POINTER :: section
562
563 TYPE(keyword_type), POINTER :: keyword
564 TYPE(section_type), POINTER :: subsection
565
566 cpassert(ASSOCIATED(section))
567 NULLIFY (keyword)
568
569 CALL keyword_create(keyword, __location__, name="BASIS_TYPE", &
570 description="Basis set type", &
571 usage="BASIS_TYPE (GAUSSIAN|GEOMETRICAL_GTO|CONTRACTED_GTO|SLATER|NUMERICAL)", &
572 default_i_val=gaussian, &
573 enum_c_vals=["GAUSSIAN ", &
574 "GEOMETRICAL_GTO ", &
575 "CONTRACTED_GTO ", &
576 "SLATER ", &
577 "NUMERICAL "], &
579 enum_desc=s2a("Gaussian type orbitals", &
580 "Geometrical Gaussian type orbitals", &
581 "Contracted Gaussian type orbitals", &
582 "Slater-type orbitals", &
583 "Numerical basis type"))
584 CALL section_add_keyword(section, keyword)
585 CALL keyword_release(keyword)
586
587 CALL keyword_create(keyword, __location__, name="NUM_GTO", &
588 description="Number of Gaussian type functions for s, p, d, ...", &
589 usage="NUM_GTO 5 5 5 ", n_var=-1, type_of_var=integer_t, &
590 default_i_val=-1)
591 CALL section_add_keyword(section, keyword)
592 CALL keyword_release(keyword)
593
594 CALL keyword_create(keyword, __location__, name="NUM_SLATER", &
595 description="Number of Slater type functions for s, p, d, ...", &
596 usage="NUM_SLATER 5 5 5 ", n_var=-1, type_of_var=integer_t, &
597 default_i_val=-1)
598 CALL section_add_keyword(section, keyword)
599 CALL keyword_release(keyword)
600
601 CALL keyword_create(keyword, __location__, name="START_INDEX", &
602 description="Starting index for Geometrical Basis sets", &
603 usage="START_INDEX 0 2 5 4 ", n_var=-1, type_of_var=integer_t, &
604 default_i_val=0)
605 CALL section_add_keyword(section, keyword)
606 CALL keyword_release(keyword)
607
608 CALL keyword_create(keyword, __location__, name="S_EXPONENTS", &
609 description="Exponents for s functions", &
610 usage="S_EXPONENTS 1.0 2.0 ... ", n_var=-1, type_of_var=real_t)
611 CALL section_add_keyword(section, keyword)
612 CALL keyword_release(keyword)
613 CALL keyword_create(keyword, __location__, name="P_EXPONENTS", &
614 description="Exponents for p functions", &
615 usage="P_EXPONENTS 1.0 2.0 ... ", n_var=-1, type_of_var=real_t)
616 CALL section_add_keyword(section, keyword)
617 CALL keyword_release(keyword)
618 CALL keyword_create(keyword, __location__, name="D_EXPONENTS", &
619 description="Exponents for d functions", &
620 usage="D_EXPONENTS 1.0 2.0 ... ", n_var=-1, type_of_var=real_t)
621 CALL section_add_keyword(section, keyword)
622 CALL keyword_release(keyword)
623 CALL keyword_create(keyword, __location__, name="F_EXPONENTS", &
624 description="Exponents for f functions", &
625 usage="F_EXPONENTS 1.0 2.0 ... ", n_var=-1, type_of_var=real_t)
626 CALL section_add_keyword(section, keyword)
627 CALL keyword_release(keyword)
628
629 CALL keyword_create(keyword, __location__, name="S_QUANTUM_NUMBERS", &
630 description="Main quantum numbers for s functions", &
631 usage="S_QUANTUM_NUMBERS 1 2 ... ", n_var=-1, type_of_var=integer_t)
632 CALL section_add_keyword(section, keyword)
633 CALL keyword_release(keyword)
634 CALL keyword_create(keyword, __location__, name="P_QUANTUM_NUMBERS", &
635 description="Main quantum numbers for p functions", &
636 usage="P_QUANTUM_NUMBERS 2 3 ... ", n_var=-1, type_of_var=integer_t)
637 CALL section_add_keyword(section, keyword)
638 CALL keyword_release(keyword)
639 CALL keyword_create(keyword, __location__, name="D_QUANTUM_NUMBERS", &
640 description="Main quantum numbers for d functions", &
641 usage="D_QUANTUM_NUMBERS 3 4 ... ", n_var=-1, type_of_var=integer_t)
642 CALL section_add_keyword(section, keyword)
643 CALL keyword_release(keyword)
644 CALL keyword_create(keyword, __location__, name="F_QUANTUM_NUMBERS", &
645 description="Main quantum numbers for f functions", &
646 usage="F_QUANTUM_NUMBERS 4 5 ... ", n_var=-1, type_of_var=integer_t)
647 CALL section_add_keyword(section, keyword)
648 CALL keyword_release(keyword)
649
650 CALL keyword_create(keyword, __location__, name="GEOMETRICAL_FACTOR", &
651 description="Geometrical basis: factor C in a*C^k", &
652 usage="GEOMETRICAL_FACTOR real", &
653 default_r_val=2.6_dp)
654 CALL section_add_keyword(section, keyword)
655 CALL keyword_release(keyword)
656
657 CALL keyword_create(keyword, __location__, name="GEO_START_VALUE", &
658 description="Geometrical basis: starting value a in a*C^k", &
659 usage="GEO_START_VALUE real", &
660 default_r_val=0.016_dp)
661 CALL section_add_keyword(section, keyword)
662 CALL keyword_release(keyword)
663
664 CALL keyword_create(keyword, __location__, name="BASIS_SET_FILE_NAME", &
665 description="Name of the basis set file, may include a path", &
666 usage="BASIS_SET_FILE_NAME <FILENAME>", &
667 default_lc_val="BASIS_SET")
668 CALL section_add_keyword(section, keyword)
669 CALL keyword_release(keyword)
670
671 CALL keyword_create(keyword, __location__, name="BASIS_SET", &
672 variants=s2a("ORBITAL_BASIS_SET", "ORB_BASIS"), &
673 description="The contracted Gaussian basis set", &
674 usage="BASIS_SET DZVP", default_c_val=" ", &
675 n_var=1)
676 CALL section_add_keyword(section, keyword)
677 CALL keyword_release(keyword)
678
679 CALL keyword_create(keyword, __location__, name="QUADRATURE", &
680 description="Algorithm to construct the atomic radial grids", &
681 usage="QUADRATURE (GC_SIMPLE|GC_TRANSFORMED|GC_LOG)", &
682 enum_c_vals=s2a("GC_SIMPLE", "GC_TRANSFORMED", "GC_LOG"), &
683 enum_i_vals=[do_gapw_gcs, do_gapw_gct, do_gapw_log], &
684 enum_desc=s2a("Gauss-Chebyshev quadrature", &
685 "Transformed Gauss-Chebyshev quadrature", &
686 "Logarithmic transformed Gauss-Chebyshev quadrature"), &
687 default_i_val=do_gapw_log)
688 CALL section_add_keyword(section, keyword)
689 CALL keyword_release(keyword)
690
691 CALL keyword_create(keyword, __location__, name="GRID_POINTS", &
692 description="Number of radial grid points", &
693 usage="GRID_POINTS integer", &
694 default_i_val=400)
695 CALL section_add_keyword(section, keyword)
696 CALL keyword_release(keyword)
697
698 CALL keyword_create(keyword, __location__, name="EPS_EIGENVALUE", &
699 description="Cutoff of overlap matrix eigenvalues included into basis", &
700 usage="EPS_EIGENVALUE real", &
701 default_r_val=1.e-12_dp)
702 CALL section_add_keyword(section, keyword)
703 CALL keyword_release(keyword)
704
705 NULLIFY (subsection)
706 CALL create_basis_section(subsection)
707 CALL section_add_subsection(section, subsection)
708 CALL section_release(subsection)
709
710 END SUBROUTINE atom_basis_section
711
712! **************************************************************************************************
713!> \brief Create the method section for Atom calculations
714!> \param section the section to create
715!> \author jgh
716! **************************************************************************************************
717 SUBROUTINE create_atom_method_section(section)
718 TYPE(section_type), POINTER :: section
719
720 TYPE(keyword_type), POINTER :: keyword
721 TYPE(section_type), POINTER :: subsection
722
723 NULLIFY (subsection, keyword)
724 cpassert(.NOT. ASSOCIATED(section))
725 CALL section_create(section, __location__, name="METHOD", &
726 description="Section of information on method to use.", &
727 n_keywords=0, n_subsections=2, repeats=.true.)
728
729 CALL keyword_create(keyword, __location__, name="METHOD_TYPE", &
730 description="Type of electronic structure method to be used", &
731 usage="METHOD_TYPE (KOHN-SHAM|RKS|UKS|HARTREE-FOCK|RHF|UHF|ROHF)", &
732 default_i_val=do_rks_atom, &
733 enum_c_vals=["KOHN-SHAM ", &
734 "RKS ", &
735 "UKS ", &
736 "HARTREE-FOCK ", &
737 "RHF ", &
738 "UHF ", &
739 "ROHF "], &
742 enum_desc=s2a("Kohn-Sham electronic structure method", &
743 "Restricted Kohn-Sham electronic structure method", &
744 "Unrestricted Kohn-Sham electronic structure method", &
745 "Hartree-Fock electronic structure method", &
746 "Restricted Hartree-Fock electronic structure method", &
747 "Unrestricted Hartree-Fock electronic structure method", &
748 "Restricted open-shell Hartree-Fock electronic structure method"))
749 CALL section_add_keyword(section, keyword)
750 CALL keyword_release(keyword)
751
752 CALL keyword_create(keyword, __location__, name="RELATIVISTIC", &
753 description="Type of scalar relativistic method to be used", &
754 usage="RELATIVISTIC (OFF|ZORA(MP)|scZORA(MP)|DKH(0)|DKH(1)|DKH(2)|DKH(3))", &
755 default_i_val=do_nonrel_atom, &
756 enum_c_vals=["OFF ", &
757 "ZORA(MP) ", &
758 "scZORA(MP) ", &
759 "DKH(0) ", &
760 "DKH(1) ", &
761 "DKH(2) ", &
762 "DKH(3) "], &
765 enum_desc=s2a("Use no scalar relativistic method", &
766 "Use ZORA method with atomic model potential", &
767 "Use scaled ZORA method with atomic model potential", &
768 "Use Douglas-Kroll-Hess Hamiltonian of order 0", &
769 "Use Douglas-Kroll-Hess Hamiltonian of order 1", &
770 "Use Douglas-Kroll-Hess Hamiltonian of order 2", &
771 "Use Douglas-Kroll-Hess Hamiltonian of order 3"))
772 CALL section_add_keyword(section, keyword)
773 CALL keyword_release(keyword)
774
775 CALL create_xc_section(subsection)
776 CALL section_add_subsection(section, subsection)
777 CALL section_release(subsection)
778
779! ZMP creating zubsection for the zmp calculations
780 CALL create_zmp_section(subsection)
781 CALL section_add_subsection(section, subsection)
782 CALL section_release(subsection)
783
784 CALL create_external_vxc(subsection)
785 CALL section_add_subsection(section, subsection)
786 CALL section_release(subsection)
787
788 END SUBROUTINE create_atom_method_section
789
790! **************************************************************************************************
791!> \brief Create the ZMP subsection for Atom calculations
792!>
793!> \param section ...
794!> \author D. Varsano [daniele.varsano@nano.cnr.it]
795! **************************************************************************************************
796 SUBROUTINE create_zmp_section(section)
797 TYPE(section_type), POINTER :: section
798
799 TYPE(keyword_type), POINTER :: keyword
800 TYPE(section_type), POINTER :: subsection
801
802 NULLIFY (subsection, keyword)
803 cpassert(.NOT. ASSOCIATED(section))
804 CALL section_create(section, __location__, name="ZMP", &
805 description="Section used to specify ZMP Potentials.", &
806 n_keywords=3, n_subsections=0, repeats=.false.)
807
808 CALL keyword_create(keyword, __location__, name="FILE_DENSITY", &
809 description="Specifies the filename containing the target density ", &
810 usage="FILE_DENSITY <FILENAME>", &
811 type_of_var=char_t, default_c_val="RHO_O.dat", n_var=-1)
812 CALL section_add_keyword(section, keyword)
813 CALL keyword_release(keyword)
814
815 CALL keyword_create(keyword, __location__, name="GRID_TOL", &
816 description="Tolerance in the equivalence of read-grid in ZMP method", &
817 usage="GRID_TOL <REAL>", default_r_val=1.e-12_dp)
818 CALL section_add_keyword(section, keyword)
819 CALL keyword_release(keyword)
820
821 CALL keyword_create(keyword, __location__, name="LAMBDA", &
822 description="Parameter used for the constraint in ZMP method", &
823 usage="LAMBDA <REAL>", default_r_val=10.0_dp)
824 CALL section_add_keyword(section, keyword)
825 CALL keyword_release(keyword)
826
827 CALL keyword_create(keyword, __location__, name="DM", &
828 description="read external density from density matrix", &
829 usage="DM <LOGICAL>", type_of_var=logical_t, default_l_val=.false.)
830 CALL section_add_keyword(section, keyword)
831 CALL keyword_release(keyword)
832
833 CALL create_zmp_restart_section(subsection)
834 CALL section_add_subsection(section, subsection)
835 CALL section_release(subsection)
836
837 END SUBROUTINE create_zmp_section
838
839! **************************************************************************************************
840!> \brief Create the ZMP restart subsection for Atom calculations
841!>
842!> \param section ...
843!> \author D. Varsano [daniele.varsano@nano.cnr.it]
844! **************************************************************************************************
845 SUBROUTINE create_zmp_restart_section(section)
846 TYPE(section_type), POINTER :: section
847
848 TYPE(keyword_type), POINTER :: keyword
849
850 NULLIFY (keyword)
851 cpassert(.NOT. ASSOCIATED(section))
852 CALL section_create(section, __location__, name="RESTART", &
853 description="Section used to specify the restart option in the ZMP "// &
854 "procedure, and the file that must be read.", &
855 n_keywords=1, n_subsections=0, repeats=.false.)
856
857 CALL keyword_create(keyword, __location__, name="FILE_RESTART", &
858 description="Specifies the filename containing the restart file density ", &
859 usage="FILE_RESTART <FILENAME>", &
860 type_of_var=char_t, default_c_val="RESTART.wfn", n_var=-1)
861 CALL section_add_keyword(section, keyword)
862 CALL keyword_release(keyword)
863
864 END SUBROUTINE create_zmp_restart_section
865
866! **************************************************************************************************
867!> \brief Subroutine to create the external v_xc potential
868!>
869!> \param section ...
870!> \author D. Varsano [daniele.varsano@nano.cnr.it]
871! **************************************************************************************************
872 SUBROUTINE create_external_vxc(section)
873 TYPE(section_type), POINTER :: section
874
875 TYPE(keyword_type), POINTER :: keyword
876
877 NULLIFY (keyword)
878 cpassert(.NOT. ASSOCIATED(section))
879 CALL section_create(section, __location__, name="EXTERNAL_VXC", &
880 description="Section used to specify exernal VXC Potentials.", &
881 n_keywords=1, n_subsections=0, repeats=.false.)
882
883 CALL keyword_create(keyword, __location__, name="FILE_VXC", &
884 description="Specifies the filename containing the external vxc ", &
885 usage="FILE_VXC <FILENAME>", &
886 type_of_var=char_t, default_c_val="VXC.dat", n_var=-1)
887 CALL section_add_keyword(section, keyword)
888 CALL keyword_release(keyword)
889
890 CALL keyword_create(keyword, __location__, name="GRID_TOL", &
891 description="Tolerance in the equivalence of read-grid in ZMP method", &
892 usage="GRID_TOL <REAL>", default_r_val=1.e-12_dp)
893 CALL section_add_keyword(section, keyword)
894 CALL keyword_release(keyword)
895
896 END SUBROUTINE create_external_vxc
897
898! **************************************************************************************************
899!> \brief Create the optimization section for Atom calculations
900!> \param section the section to create
901!> \author jgh
902! **************************************************************************************************
903 SUBROUTINE create_optimization_section(section)
904 TYPE(section_type), POINTER :: section
905
906 TYPE(keyword_type), POINTER :: keyword
907
908 NULLIFY (keyword)
909 cpassert(.NOT. ASSOCIATED(section))
910 CALL section_create(section, __location__, name="OPTIMIZATION", &
911 description="Section of information on optimization thresholds and algorithms.", &
912 n_keywords=0, n_subsections=1, repeats=.false.)
913
914 CALL keyword_create(keyword, __location__, name="MAX_ITER", &
915 description="Maximum number of iterations for optimization", &
916 usage="MAX_ITER 50", default_i_val=200)
917 CALL section_add_keyword(section, keyword)
918 CALL keyword_release(keyword)
919
920 CALL keyword_create(keyword, __location__, name="EPS_SCF", &
921 description="Convergence criterion for SCF", &
922 usage="EPS_SCF 1.e-10", default_r_val=1.e-6_dp)
923 CALL section_add_keyword(section, keyword)
924 CALL keyword_release(keyword)
925
926 CALL keyword_create(keyword, __location__, name="DAMPING", &
927 description="Damping parameter for extrapolation method", &
928 usage="DAMPING 0.4", default_r_val=0.4_dp)
929 CALL section_add_keyword(section, keyword)
930 CALL keyword_release(keyword)
931
932 CALL keyword_create(keyword, __location__, name="EPS_DIIS", &
933 description="Starting DIIS method at convergence to EPS_DIIS", &
934 usage="EPS_DIIS 0.01", default_r_val=10000._dp)
935 CALL section_add_keyword(section, keyword)
936 CALL keyword_release(keyword)
937
938 CALL keyword_create(keyword, __location__, name="N_DIIS", &
939 description="Maximum number of DIIS vectors", &
940 usage="N_DIIS 6", default_i_val=5)
941 CALL section_add_keyword(section, keyword)
942 CALL keyword_release(keyword)
943
944 END SUBROUTINE create_optimization_section
945
946! **************************************************************************************************
947!> \brief Create the potential section for Atom calculations
948!> \param section the section to create
949!> \author jgh
950! **************************************************************************************************
951 SUBROUTINE create_potential_section(section)
952 TYPE(section_type), POINTER :: section
953
954 TYPE(keyword_type), POINTER :: keyword
955 TYPE(section_type), POINTER :: subsection
956
957 NULLIFY (keyword)
958 cpassert(.NOT. ASSOCIATED(section))
959 CALL section_create(section, __location__, name="POTENTIAL", &
960 description="Section of information on potential.", &
961 n_keywords=0, n_subsections=1, repeats=.false.)
962
963 CALL keyword_create(keyword, __location__, name="CONFINEMENT_TYPE", &
964 description="Define functional form of confinement potential.", &
965 usage="CONFINEMENT_TYPE (NONE|POLYNOM|BARRIER)", &
966 default_i_val=poly_conf, &
967 enum_c_vals=["NONE ", &
968 "POLYNOM ", &
969 "BARRIER "], &
970 enum_i_vals=[no_conf, poly_conf, barrier_conf], &
971 enum_desc=s2a("Do not use confinement potential", &
972 "Use polynomial confinement potential: a*(R/b)^c", &
973 "Use a smooth barrier potential: a*F[R-c)/b]"))
974 CALL section_add_keyword(section, keyword)
975 CALL keyword_release(keyword)
976
977 CALL keyword_create(keyword, __location__, name="CONFINEMENT", &
978 description="Definition of parameters for confinement potential (a,b,c)", &
979 usage="CONFINEMENT prefactor range exponent (POLYNOM) "// &
980 "CONFINEMENT prefactor range r_onset (BARRIER)", &
981 default_r_vals=[0._dp, 0._dp, 0._dp], &
982 repeats=.false., n_var=-1)
983 CALL section_add_keyword(section, keyword)
984 CALL keyword_release(keyword)
985
986 CALL keyword_create(keyword, __location__, name="PSEUDO_TYPE", &
987 description="Pseudopotential type", &
988 usage="PSEUDO_TYPE (NONE|GTH|UPF|ECP)", &
989 default_i_val=no_pseudo, &
990 enum_c_vals=["NONE ", &
991 "GTH ", &
992 "UPF ", &
993 "SGP ", &
994 "ECP "], &
996 enum_desc=s2a("Do not use pseudopotentials", &
997 "Use Goedecker-Teter-Hutter pseudopotentials", &
998 "Use UPF norm-conserving pseudopotentials", &
999 "Use SGP norm-conserving pseudopotentials", &
1000 "Use ECP semi-local pseudopotentials"))
1001 CALL section_add_keyword(section, keyword)
1002 CALL keyword_release(keyword)
1003
1004 CALL keyword_create(keyword, __location__, name="POTENTIAL_FILE_NAME", &
1005 description="Name of the pseudo potential file, may include a path", &
1006 usage="POTENTIAL_FILE_NAME <FILENAME>", &
1007 default_lc_val="POTENTIAL")
1008 CALL section_add_keyword(section, keyword)
1009 CALL keyword_release(keyword)
1010
1011 CALL keyword_create(keyword, __location__, name="POTENTIAL_NAME", &
1012 variants=["POT_NAME"], &
1013 description="The name of the pseudopotential for the defined kind.", &
1014 usage="POTENTIAL_NAME <PSEUDO-POTENTIAL-NAME>", default_c_val=" ", n_var=1)
1015 CALL section_add_keyword(section, keyword)
1016 CALL keyword_release(keyword)
1017
1018 NULLIFY (subsection)
1019 CALL create_gthpotential_section(subsection)
1020 CALL section_add_subsection(section, subsection)
1021 CALL section_release(subsection)
1022
1023 NULLIFY (subsection)
1024 CALL create_ecp_section(subsection)
1025 CALL section_add_subsection(section, subsection)
1026 CALL section_release(subsection)
1027
1028 END SUBROUTINE create_potential_section
1029
1030! **************************************************************************************************
1031!> \brief Creates the &GTH_POTENTIAL section
1032!> \param section the section to create
1033!> \author teo
1034! **************************************************************************************************
1035 SUBROUTINE create_gthpotential_section(section)
1036 TYPE(section_type), POINTER :: section
1037
1038 TYPE(keyword_type), POINTER :: keyword
1039
1040 CALL section_create(section, __location__, name="GTH_POTENTIAL", &
1041 description="Section used to specify Potentials.", &
1042 n_keywords=1, n_subsections=0, repeats=.false.)
1043 NULLIFY (keyword)
1044 CALL keyword_create(keyword, __location__, name="_DEFAULT_KEYWORD_", &
1045 description="CP2K Pseudo Potential Standard Format (GTH, ALL or KG)", &
1046 repeats=.true., type_of_var=lchar_t)
1047 CALL section_add_keyword(section, keyword)
1048 CALL keyword_release(keyword)
1049 END SUBROUTINE create_gthpotential_section
1050
1051! **************************************************************************************************
1052!> \brief Creates the &ECP section
1053!> \param section the section to create
1054!> \author jgh
1055! **************************************************************************************************
1056 SUBROUTINE create_ecp_section(section)
1057 TYPE(section_type), POINTER :: section
1058
1059 TYPE(keyword_type), POINTER :: keyword
1060
1061 CALL section_create(section, __location__, name="ECP", &
1062 description="Section used to specify ECP's.", &
1063 n_keywords=1, n_subsections=0, repeats=.false.)
1064 NULLIFY (keyword)
1065 CALL keyword_create(keyword, __location__, name="_DEFAULT_KEYWORD_", &
1066 description="Effective Core Potentials definition", &
1067 repeats=.true., type_of_var=lchar_t)
1068 CALL section_add_keyword(section, keyword)
1069 CALL keyword_release(keyword)
1070 END SUBROUTINE create_ecp_section
1071
1072! **************************************************************************************************
1073!> \brief Creates the &BASIS section
1074!> \param section the section to create
1075!> \author teo
1076! **************************************************************************************************
1077 SUBROUTINE create_basis_section(section)
1078 TYPE(section_type), POINTER :: section
1079
1080 TYPE(keyword_type), POINTER :: keyword
1081
1082 CALL section_create(section, __location__, name="basis", &
1083 description="Section used to specify a general basis set for QM calculations.", &
1084 n_keywords=1, n_subsections=0, repeats=.false.)
1085 NULLIFY (keyword)
1086 CALL keyword_create(keyword, __location__, name="_DEFAULT_KEYWORD_", &
1087 description="CP2K Basis Set Standard Format", repeats=.true., &
1088 type_of_var=lchar_t)
1089 CALL section_add_keyword(section, keyword)
1090 CALL keyword_release(keyword)
1091 END SUBROUTINE create_basis_section
1092
1093! **************************************************************************************************
1094!> \brief Creates the &POWELL section
1095!> \param section the section to create
1096!> \author teo
1097! **************************************************************************************************
1098 SUBROUTINE create_powell_section(section)
1099 TYPE(section_type), POINTER :: section
1100
1101 TYPE(keyword_type), POINTER :: keyword
1102
1103 CALL section_create(section, __location__, name="powell", &
1104 description="Section defines basic parameters for Powell optimization", &
1105 n_keywords=4, n_subsections=0, repeats=.false.)
1106
1107 NULLIFY (keyword)
1108 CALL keyword_create(keyword, __location__, name="ACCURACY", &
1109 description="Final accuracy requested in optimization (RHOEND)", &
1110 usage="ACCURACY 0.00001", &
1111 default_r_val=1.e-6_dp)
1112 CALL section_add_keyword(section, keyword)
1113 CALL keyword_release(keyword)
1114
1115 CALL keyword_create(keyword, __location__, name="STEP_SIZE", &
1116 description="Initial step size for search algorithm (RHOBEG)", &
1117 usage="STEP_SIZE 0.005", &
1118 default_r_val=0.005_dp)
1119 CALL section_add_keyword(section, keyword)
1120 CALL keyword_release(keyword)
1121
1122 CALL keyword_create(keyword, __location__, name="MAX_FUN", &
1123 description="Maximum number of function evaluations", &
1124 usage="MAX_FUN 1000", &
1125 default_i_val=5000)
1126 CALL section_add_keyword(section, keyword)
1127 CALL keyword_release(keyword)
1128
1129 CALL keyword_create(keyword, __location__, name="MAX_INIT", &
1130 description="Maximum number of re-initialization of Powell method", &
1131 usage="MAX_INIT 5", &
1132 default_i_val=1)
1133 CALL section_add_keyword(section, keyword)
1134 CALL keyword_release(keyword)
1135
1136 CALL keyword_create(keyword, __location__, name="STEP_SIZE_SCALING", &
1137 description="Scaling of Step Size on re-initialization of Powell method", &
1138 usage="STEP_SIZE_SCALING 0.80", &
1139 default_r_val=0.75_dp)
1140 CALL section_add_keyword(section, keyword)
1141 CALL keyword_release(keyword)
1142
1143 CALL keyword_create(keyword, __location__, name="WEIGHT_POT_VIRTUAL", &
1144 description="Weight for virtual states in pseudopotential optimization", &
1145 usage="WEIGHT_POT_VIRTUAL 1.0", &
1146 default_r_val=1._dp)
1147 CALL section_add_keyword(section, keyword)
1148 CALL keyword_release(keyword)
1149
1150 CALL keyword_create(keyword, __location__, name="WEIGHT_POT_SEMICORE", &
1151 description="Weight for semi core states in pseudopotential optimization", &
1152 usage="WEIGHT_POT_SEMICORE 1.0", &
1153 default_r_val=1._dp)
1154 CALL section_add_keyword(section, keyword)
1155 CALL keyword_release(keyword)
1156
1157 CALL keyword_create(keyword, __location__, name="WEIGHT_POT_VALENCE", &
1158 description="Weight for valence states in pseudopotential optimization", &
1159 usage="WEIGHT_POT_VALENCE 1.0", &
1160 default_r_val=1.0_dp)
1161 CALL section_add_keyword(section, keyword)
1162 CALL keyword_release(keyword)
1163
1164 CALL keyword_create(keyword, __location__, name="WEIGHT_POT_NODE", &
1165 description="Weight for node mismatch in pseudopotential optimization", &
1166 usage="WEIGHT_POT_NODE 1.0", &
1167 default_r_val=1.0_dp)
1168 CALL section_add_keyword(section, keyword)
1169 CALL keyword_release(keyword)
1170
1171 CALL keyword_create(keyword, __location__, name="WEIGHT_DELTA_ENERGY", &
1172 description="Weight for energy differences in pseudopotential optimization", &
1173 usage="WEIGHT_DELTA_ENERGY 1.0", &
1174 default_r_val=1._dp)
1175 CALL section_add_keyword(section, keyword)
1176 CALL keyword_release(keyword)
1177
1178 CALL keyword_create(keyword, __location__, name="WEIGHT_ELECTRON_CONFIGURATION", &
1179 description="Weight for different electronic states in optimization", &
1180 usage="WEIGHT_ELECTRON_CONFIGURATION 1.0 0.1 ...", &
1181 n_var=-1, type_of_var=real_t, default_r_val=1.0_dp)
1182 CALL section_add_keyword(section, keyword)
1183 CALL keyword_release(keyword)
1184
1185 CALL keyword_create(keyword, __location__, name="WEIGHT_METHOD", &
1186 description="Weight for different methods in optimization", &
1187 usage="WEIGHT_METHOD 1.0 0.1 ...", &
1188 n_var=-1, type_of_var=real_t, default_r_val=1.0_dp)
1189 CALL section_add_keyword(section, keyword)
1190 CALL keyword_release(keyword)
1191
1192 CALL keyword_create(keyword, __location__, name="TARGET_POT_VIRTUAL", &
1193 description="Target accuracy for virtual state eigenvalues in pseudopotential optimization", &
1194 usage="TARGET_POT_VIRTUAL 0.0001", &
1195 default_r_val=1.0e-3_dp, unit_str="hartree")
1196 CALL section_add_keyword(section, keyword)
1197 CALL keyword_release(keyword)
1198
1199 CALL keyword_create(keyword, __location__, name="TARGET_POT_VALENCE", &
1200 description="Target accuracy for valence state eigenvalues in pseudopotential optimization", &
1201 usage="TARGET_POT_VALENCE 0.0001", &
1202 default_r_val=1.0e-5_dp, unit_str="hartree")
1203 CALL section_add_keyword(section, keyword)
1204 CALL keyword_release(keyword)
1205
1206 CALL keyword_create(keyword, __location__, name="TARGET_POT_SEMICORE", &
1207 description="Target accuracy for semicore state eigenvalues in pseudopotential optimization", &
1208 usage="TARGET_POT_SEMICORE 0.01", &
1209 default_r_val=1.0e-3_dp, unit_str="hartree")
1210 CALL section_add_keyword(section, keyword)
1211 CALL keyword_release(keyword)
1212
1213 CALL keyword_create(keyword, __location__, name="TARGET_DELTA_ENERGY", &
1214 description="Target accuracy for energy differences in pseudopotential optimization", &
1215 usage="TARGET_DELTA_ENERGY 0.01", &
1216 default_r_val=1.0e-4_dp, unit_str="hartree")
1217 CALL section_add_keyword(section, keyword)
1218 CALL keyword_release(keyword)
1219
1220 CALL keyword_create(keyword, __location__, name="TARGET_PSIR0", &
1221 description="Minimum value for the wavefunctions at r=0 (only occupied states)"// &
1222 " Value=0 means keeping wfn(r=0)=0", &
1223 usage="TARGET_PSIR0 0.50", &
1224 default_r_val=0._dp)
1225 CALL section_add_keyword(section, keyword)
1226 CALL keyword_release(keyword)
1227
1228 CALL keyword_create(keyword, __location__, name="WEIGHT_PSIR0", &
1229 description="Weight for the wavefunctions at r=0 (only occupied states)", &
1230 usage="WEIGHT_PSIR0 0.01", &
1231 default_r_val=0._dp)
1232 CALL section_add_keyword(section, keyword)
1233 CALL keyword_release(keyword)
1234
1235 CALL keyword_create(keyword, __location__, name="RCOV_MULTIPLICATION", &
1236 description="Multiply Rcov integration limit for charge conservation", &
1237 usage="RCOV_MULTIPLICATION 1.10", &
1238 default_r_val=1._dp)
1239 CALL section_add_keyword(section, keyword)
1240 CALL keyword_release(keyword)
1241
1242 CALL keyword_create(keyword, __location__, name="SEMICORE_LEVEL", &
1243 description="Energy at which to consider a full shell as semicore", &
1244 usage="SEMICORE_LEVEL 1.0", &
1245 default_r_val=1._dp, unit_str="hartree")
1246 CALL section_add_keyword(section, keyword)
1247 CALL keyword_release(keyword)
1248
1249 CALL keyword_create(keyword, __location__, name="NOOPT_NLCC", &
1250 description="Don't optimize NLCC parameters.", &
1251 usage="NOOPT_NLCC T", &
1252 type_of_var=logical_t, &
1253 default_l_val=.false.)
1254 CALL section_add_keyword(section, keyword)
1255 CALL keyword_release(keyword)
1256
1257 CALL keyword_create(keyword, __location__, name="PREOPT_NLCC", &
1258 description="Optimize NLCC parameters by fitting core charge density.", &
1259 usage="PREOPT_NLCC T", &
1260 type_of_var=logical_t, &
1261 default_l_val=.false.)
1262 CALL section_add_keyword(section, keyword)
1263 CALL keyword_release(keyword)
1264
1265 END SUBROUTINE create_powell_section
1266
1267! **************************************************************************************************
1268
1269END MODULE input_cp2k_atom
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
integer, parameter, public silent_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
collects all constants needed in input so that they can be used without circular dependencies
integer, parameter, public do_rhf_atom
integer, parameter, public do_gapw_gct
integer, parameter, public do_gapw_gcs
integer, parameter, public do_rks_atom
integer, parameter, public atom_pseudo_run
integer, parameter, public do_analytic
integer, parameter, public sgp_pseudo
integer, parameter, public do_dkh3_atom
integer, parameter, public atom_no_run
integer, parameter, public gth_pseudo
integer, parameter, public ecp_pseudo
integer, parameter, public do_nonrel_atom
integer, parameter, public do_dkh0_atom
integer, parameter, public no_conf
integer, parameter, public do_uhf_atom
integer, parameter, public upf_pseudo
integer, parameter, public contracted_gto
integer, parameter, public poly_conf
integer, parameter, public do_dkh2_atom
integer, parameter, public no_pseudo
integer, parameter, public do_uks_atom
integer, parameter, public barrier_conf
integer, parameter, public do_numeric
integer, parameter, public atom_basis_run
integer, parameter, public do_zoramp_atom
integer, parameter, public do_gapw_log
integer, parameter, public atom_energy_run
integer, parameter, public gaussian
integer, parameter, public do_dkh1_atom
integer, parameter, public do_rohf_atom
integer, parameter, public do_semi_analytic
integer, parameter, public geometrical_gto
integer, parameter, public numerical
integer, parameter, public do_sczoramp_atom
integer, parameter, public slater
builds the input structure for the ATOM module
subroutine, public create_atom_section(section)
Creates the input section for the atom code.
function that build the xc section of the input
subroutine, public create_xc_section(section)
creates the input section for the xc part
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 logical_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
Utilities for string manipulations.
represent a keyword in the input
represent a section of the input file