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