Line data Source code
1 : !--------------------------------------------------------------------------------------------------!
2 : ! CP2K: A general program to perform molecular dynamics simulations !
3 : ! Copyright 2000-2024 CP2K developers group <https://cp2k.org> !
4 : ! !
5 : ! SPDX-License-Identifier: GPL-2.0-or-later !
6 : !--------------------------------------------------------------------------------------------------!
7 :
8 : ! **************************************************************************************************
9 : !> \brief input section for NEGF based quantum transport calculations
10 : !> (integration with the quantum transport code OMEN)
11 : !>
12 : !> \par History
13 : !> 07.2013 created [Hossein Bani-Hashemian]
14 : !> \author Hossein Bani-Hashemian
15 : ! **************************************************************************************************
16 : MODULE input_cp2k_transport
17 : USE bibliography, ONLY: Bruck2014
18 : USE cp_output_handling, ONLY: cp_print_key_section_create,&
19 : high_print_level
20 : USE cp_units, ONLY: cp_unit_to_cp2k
21 : USE input_constants, ONLY: &
22 : injmethod_beyn, injmethod_evp, injsign_negative, injsign_positive, linsolver_banded, &
23 : linsolver_full, linsolver_mumps, linsolver_pardiso, linsolver_splitsolve, &
24 : linsolver_superlu, linsolver_umfpack, matrixinv_full, matrixinv_pardiso, matrixinv_pexsi, &
25 : matrixinv_rgf, neutlead_bs, neutlead_dos, rho_negf, rho_qtbm, rlaxisint_GaussChebyshev, &
26 : rlaxisint_readfromfile, rlaxisint_trapezoidal, transport_localscf, transport_negf, &
27 : transport_transmission
28 : USE input_keyword_types, ONLY: keyword_create,&
29 : keyword_release,&
30 : keyword_type
31 : USE input_section_types, ONLY: section_add_keyword,&
32 : section_add_subsection,&
33 : section_create,&
34 : section_release,&
35 : section_type
36 : USE input_val_types, ONLY: integer_t
37 : USE kinds, ONLY: dp
38 : USE string_utilities, ONLY: s2a
39 : #include "./base/base_uses.f90"
40 :
41 : IMPLICIT NONE
42 : PRIVATE
43 :
44 : CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_transport'
45 :
46 : PUBLIC :: create_transport_section
47 :
48 : CONTAINS
49 :
50 : ! **************************************************************************************************
51 : !> \brief creates the TRANSPORT section
52 : !> \param[inout] section the section to be created
53 : ! **************************************************************************************************
54 8444 : SUBROUTINE create_transport_section(section)
55 : TYPE(section_type), POINTER :: section
56 :
57 : TYPE(keyword_type), POINTER :: keyword
58 : TYPE(section_type), POINTER :: subsection
59 :
60 8444 : CPASSERT(.NOT. ASSOCIATED(section))
61 : CALL section_create(section, __LOCATION__, name="TRANSPORT", &
62 : description="Specifies the parameters for transport, sets parameters for the OMEN code, "// &
63 : "see also <https://nano-tcad.ee.ethz.ch>.", &
64 : citations=(/Bruck2014/), &
65 16888 : n_keywords=29, n_subsections=4, repeats=.FALSE.)
66 :
67 8444 : NULLIFY (keyword)
68 :
69 : CALL keyword_create( &
70 : keyword, __LOCATION__, name="TRANSPORT_METHOD", &
71 : description="Preferred method for transport calculations.", &
72 : usage="TRANSPORT_METHOD <method>", &
73 : default_i_val=transport_negf, &
74 : enum_c_vals=s2a("TRANSPORT", "LOCAL_SCF", "TRANSMISSION"), &
75 : enum_desc=s2a("self-consistent CP2K and OMEN transport calculations", &
76 : "CP2K valence Hamiltonian + OMEN self-consistent calculations on conduction electrons", &
77 : "self-consistent transmission calculations without applied bias voltage"), &
78 8444 : enum_i_vals=(/transport_negf, transport_localscf, transport_transmission/))
79 8444 : CALL section_add_keyword(section, keyword)
80 8444 : CALL keyword_release(keyword)
81 :
82 : CALL keyword_create( &
83 : keyword, __LOCATION__, name="QT_FORMALISM", &
84 : description="Preferred quantum transport formalism to compute the current and density.", &
85 : usage="QT_FORMALISM <method>", &
86 : default_i_val=rho_qtbm, &
87 : enum_c_vals=s2a("NEGF", "QTBM"), &
88 : enum_desc=s2a("The non-equilibrium Green's function formalism.", &
89 : "The quantum transmitting boundary method / wave-function formalism."), &
90 8444 : enum_i_vals=(/rho_negf, rho_qtbm/))
91 8444 : CALL section_add_keyword(section, keyword)
92 8444 : CALL keyword_release(keyword)
93 :
94 : CALL keyword_create(keyword, __LOCATION__, name="NUM_POLE", &
95 : description="The number of terms in the PEXSI's pole expansion method.", &
96 8444 : usage="NUM_POLE <integer>", default_i_val=64)
97 8444 : CALL section_add_keyword(section, keyword)
98 8444 : CALL keyword_release(keyword)
99 :
100 : CALL keyword_create(keyword, __LOCATION__, name="N_KPOINTS", &
101 : description="The number of k points for determination of the singularities.", &
102 8444 : usage="N_KPOINTS <integer>", default_i_val=64)
103 8444 : CALL section_add_keyword(section, keyword)
104 8444 : CALL keyword_release(keyword)
105 :
106 : CALL keyword_create(keyword, __LOCATION__, name="NUM_INTERVAL", &
107 : description="Max number of energy points per small interval.", &
108 8444 : usage="NUM_INTERVAL <integer>", default_i_val=10)
109 8444 : CALL section_add_keyword(section, keyword)
110 8444 : CALL keyword_release(keyword)
111 :
112 : CALL keyword_create(keyword, __LOCATION__, name="TASKS_PER_ENERGY_POINT", &
113 : description="Number of tasks per energy point. The value should be a divisor of the total "// &
114 : "number of MPI ranks.", &
115 8444 : usage="TASKS_PER_ENERGY_POINT <integer>", default_i_val=1)
116 8444 : CALL section_add_keyword(section, keyword)
117 8444 : CALL keyword_release(keyword)
118 :
119 : CALL keyword_create(keyword, __LOCATION__, name="TASKS_PER_POLE", &
120 : description="Number of tasks per pole in the pole expansion method. The value should be a "// &
121 : "divisor of the total number of MPI ranks.", &
122 8444 : usage="TASKS_PER_POLE <integer>", default_i_val=1)
123 8444 : CALL section_add_keyword(section, keyword)
124 8444 : CALL keyword_release(keyword)
125 :
126 : CALL keyword_create(keyword, __LOCATION__, name="GPUS_PER_POINT", &
127 : description="Number of GPUs per energy point for SplitSolve. Needs to be a power of two", &
128 8444 : usage="GPUS_PER_POINT <integer>", default_i_val=2)
129 8444 : CALL section_add_keyword(section, keyword)
130 8444 : CALL keyword_release(keyword)
131 :
132 : CALL keyword_create(keyword, __LOCATION__, name="COLZERO_THRESHOLD", &
133 : description="The smallest number that is not zero in the full diagonalization part.", &
134 8444 : usage="COLZERO_THRESHOLD <real>", default_r_val=1.0E-12_dp)
135 8444 : CALL section_add_keyword(section, keyword)
136 8444 : CALL keyword_release(keyword)
137 :
138 : CALL keyword_create(keyword, __LOCATION__, name="EPS_LIMIT", &
139 : description="The smallest eigenvalue that is kept.", &
140 8444 : usage="EPS_LIMIT <real>", default_r_val=1.0E-4_dp)
141 8444 : CALL section_add_keyword(section, keyword)
142 8444 : CALL keyword_release(keyword)
143 :
144 : CALL keyword_create(keyword, __LOCATION__, name="EPS_LIMIT_CC", &
145 : description="The smallest eigenvalue that is kept on the complex contour.", &
146 8444 : usage="EPS_LIMIT_CC <real>", default_r_val=1.0E-6_dp)
147 8444 : CALL section_add_keyword(section, keyword)
148 8444 : CALL keyword_release(keyword)
149 :
150 : CALL keyword_create(keyword, __LOCATION__, name="EPS_DECAY", &
151 : description="The smallest imaginary part that a decaying eigenvalue may have not to be "// &
152 : "considered as propagating.", &
153 8444 : usage="EPS_DECAY <real>", default_r_val=1.0E-4_dp)
154 8444 : CALL section_add_keyword(section, keyword)
155 8444 : CALL keyword_release(keyword)
156 :
157 : CALL keyword_create(keyword, __LOCATION__, name="EPS_SINGULARITY_CURVATURES", &
158 : description="Filter for degenerate bands in the bandstructure.", &
159 8444 : usage="EPS_SINGULARITY_CURVATURES <real>", default_r_val=1.0E-12_dp)
160 8444 : CALL section_add_keyword(section, keyword)
161 8444 : CALL keyword_release(keyword)
162 :
163 : CALL keyword_create(keyword, __LOCATION__, name="EPS_MU", &
164 : description="Accuracy to which the Fermi level should be determined.", &
165 8444 : usage="EPS_MU <real>", default_r_val=1.0E-6_dp)
166 8444 : CALL section_add_keyword(section, keyword)
167 8444 : CALL keyword_release(keyword)
168 :
169 : CALL keyword_create(keyword, __LOCATION__, name="EPS_EIGVAL_DEGEN", &
170 : description="Filter for degenerate bands in the injection vector.", &
171 8444 : usage="EPS_EIGVAL_DEGEN <real>", default_r_val=1.0E-6_dp)
172 8444 : CALL section_add_keyword(section, keyword)
173 8444 : CALL keyword_release(keyword)
174 :
175 : CALL keyword_create(keyword, __LOCATION__, name="EPS_FERMI", &
176 : description="Cutoff for the tail of the Fermi function.", &
177 8444 : usage="EPS_FERMI <real>", default_r_val=0.0_dp)
178 8444 : CALL section_add_keyword(section, keyword)
179 8444 : CALL keyword_release(keyword)
180 :
181 : CALL keyword_create(keyword, __LOCATION__, name="ENERGY_INTERVAL", &
182 : description="Distance between energy points in eV.", &
183 8444 : usage="ENERGY_INTERVAL <real>", default_r_val=1.0E-3_dp)
184 8444 : CALL section_add_keyword(section, keyword)
185 8444 : CALL keyword_release(keyword)
186 :
187 : CALL keyword_create(keyword, __LOCATION__, name="MIN_INTERVAL", &
188 : description="Smallest enery distance in energy vector.", &
189 8444 : usage="MIN_INTERVAL <real>", default_r_val=1.0E-4_dp)
190 8444 : CALL section_add_keyword(section, keyword)
191 8444 : CALL keyword_release(keyword)
192 :
193 : CALL keyword_create(keyword, __LOCATION__, name="TEMPERATURE", &
194 : description="Temperature.", &
195 : usage="TEMPERATURE [K] 300.0", &
196 : default_r_val=cp_unit_to_cp2k(value=300.0_dp, unit_str="K"), &
197 8444 : unit_str="K")
198 8444 : CALL section_add_keyword(section, keyword)
199 8444 : CALL keyword_release(keyword)
200 :
201 : CALL keyword_create(keyword, __LOCATION__, name="CSR_SCREENING", &
202 : description="Whether distance screening should be applied to improve sparsity of CSR matrices.", &
203 8444 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
204 8444 : CALL section_add_keyword(section, keyword)
205 8444 : CALL keyword_release(keyword)
206 :
207 : CALL keyword_create( &
208 : keyword, __LOCATION__, name="LINEAR_SOLVER", &
209 : description="Preferred solver for solving the linear system of equations.", &
210 : usage="LINEAR_SOLVER <solver>", &
211 : default_i_val=linsolver_full, &
212 : enum_c_vals=s2a("SplitSolve", "SuperLU", "MUMPS", "Full", "Banded", "PARDISO", "UMFPACK"), &
213 : enum_i_vals=(/linsolver_splitsolve, linsolver_superlu, linsolver_mumps, linsolver_full, linsolver_banded, &
214 8444 : linsolver_pardiso, linsolver_umfpack/))
215 8444 : CALL section_add_keyword(section, keyword)
216 8444 : CALL keyword_release(keyword)
217 :
218 : CALL keyword_create( &
219 : keyword, __LOCATION__, name="MATRIX_INVERSION_METHOD", &
220 : description="Preferred matrix inversion method.", &
221 : usage="MATRIX_INVERSION_METHOD <solver>", &
222 : default_i_val=matrixinv_full, &
223 : enum_c_vals=s2a("Full", "PEXSI", "PARDISO", "RGF"), &
224 8444 : enum_i_vals=(/matrixinv_full, matrixinv_pexsi, matrixinv_pardiso, matrixinv_rgf/))
225 8444 : CALL section_add_keyword(section, keyword)
226 8444 : CALL keyword_release(keyword)
227 :
228 : CALL keyword_create(keyword, __LOCATION__, name="INJECTION_METHOD", &
229 : description="Method to solve the eigenvalue problem for the open boundary conditions.", &
230 : usage="INJECTION_METHOD <method>", &
231 : default_i_val=injmethod_beyn, &
232 : enum_c_vals=s2a("EVP", "BEYN"), &
233 : enum_desc=s2a("Full eigenvalue solver.", &
234 : "Beyn eigenvalue solver."), &
235 8444 : enum_i_vals=(/injmethod_evp, injmethod_beyn/))
236 8444 : CALL section_add_keyword(section, keyword)
237 8444 : CALL keyword_release(keyword)
238 :
239 : CALL keyword_create( &
240 : keyword, __LOCATION__, name="CUTOUT", &
241 : description="The number of atoms at the beginning and the end of the structure where the density should "// &
242 : "not be changed.", &
243 : usage="CUTOUT <integer> <integer>", &
244 8444 : n_var=2, default_i_vals=(/0, 0/))
245 8444 : CALL section_add_keyword(section, keyword)
246 8444 : CALL keyword_release(keyword)
247 :
248 : CALL keyword_create(keyword, __LOCATION__, name="REAL_AXIS_INTEGRATION_METHOD", &
249 : description="Integration method for the real axis.", &
250 : usage="REAL_AXIS_INTEGRATION_METHOD <method>", &
251 : default_i_val=rlaxisint_GaussChebyshev, &
252 : enum_c_vals=s2a("Gauss_Chebyshev", "Trapezoidal_rule", "Read"), &
253 : enum_desc=s2a("Gauss-Chebyshev integration between singularity points.", &
254 : "Trapezoidal rule on the total range.", &
255 : "Read integration points from a file (named E.dat)."), &
256 8444 : enum_i_vals=(/rlaxisint_GaussChebyshev, rlaxisint_trapezoidal, rlaxisint_readfromfile/))
257 8444 : CALL section_add_keyword(section, keyword)
258 8444 : CALL keyword_release(keyword)
259 :
260 : CALL keyword_create(keyword, __LOCATION__, name="N_POINTS_INV", &
261 : description="Number of integration points for the sigma solver on the complex contour.", &
262 8444 : usage="N_POINTS_INV <integer>", default_i_val=64)
263 8444 : CALL section_add_keyword(section, keyword)
264 8444 : CALL keyword_release(keyword)
265 :
266 : CALL keyword_create(keyword, __LOCATION__, name="OBC_EQUILIBRIUM", &
267 : description="Compute the equilibrium density with open boundary conditions.", &
268 8444 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
269 8444 : CALL section_add_keyword(section, keyword)
270 8444 : CALL keyword_release(keyword)
271 :
272 : CALL keyword_create(keyword, __LOCATION__, name="CONTACT_FILLING", &
273 : description="Determination of the contact Fermi levels. Note that this keyword "// &
274 : "only works when the TRANSPORT_METHOD is specified as TRANSPORT.", &
275 : default_i_val=neutlead_bs, &
276 : enum_c_vals=s2a("BAND_STRUCTURE", "DOS"), &
277 : enum_desc=s2a("Determine the Fermi levels from the band structure.", &
278 : "Determine the Fermi levels from the density of states."), &
279 8444 : enum_i_vals=(/neutlead_bs, neutlead_dos/))
280 8444 : CALL section_add_keyword(section, keyword)
281 8444 : CALL keyword_release(keyword)
282 :
283 : CALL keyword_create(keyword, __LOCATION__, name="DENSITY_MIXING", &
284 : description="Mixing parameter for a density mixing in OMEN.", &
285 8444 : usage="DENSITY_MIXING <real>", default_r_val=1.0_dp)
286 8444 : CALL section_add_keyword(section, keyword)
287 8444 : CALL keyword_release(keyword)
288 :
289 8444 : NULLIFY (subsection)
290 :
291 8444 : CALL create_contact_section(subsection)
292 8444 : CALL section_add_subsection(section, subsection)
293 8444 : CALL section_release(subsection)
294 :
295 8444 : CALL create_beyn_section(subsection)
296 8444 : CALL section_add_subsection(section, subsection)
297 8444 : CALL section_release(subsection)
298 :
299 8444 : CALL create_pexsi_section(subsection)
300 8444 : CALL section_add_subsection(section, subsection)
301 8444 : CALL section_release(subsection)
302 :
303 8444 : CALL create_transport_print_section(subsection)
304 8444 : CALL section_add_subsection(section, subsection)
305 8444 : CALL section_release(subsection)
306 :
307 8444 : END SUBROUTINE create_transport_section
308 :
309 : ! **************************************************************************************************
310 : !> \brief Creates the section for creating contacts.
311 : !> \param[inout] section the section to be created
312 : ! **************************************************************************************************
313 8444 : SUBROUTINE create_contact_section(section)
314 : TYPE(section_type), POINTER :: section
315 :
316 : TYPE(keyword_type), POINTER :: keyword
317 :
318 8444 : CPASSERT(.NOT. ASSOCIATED(section))
319 : CALL section_create(section, __LOCATION__, name="CONTACT", &
320 : description="Parameters for defining device contacts.", &
321 8444 : n_keywords=5, n_subsections=0, repeats=.TRUE.)
322 :
323 8444 : NULLIFY (keyword)
324 :
325 : CALL keyword_create(keyword, __LOCATION__, name="BANDWIDTH", &
326 : description="The number of neighboring unit cells that one unit cell interacts with.", &
327 8444 : usage="BANDWIDTH <integer>", default_i_val=0)
328 8444 : CALL section_add_keyword(section, keyword)
329 8444 : CALL keyword_release(keyword)
330 :
331 : CALL keyword_create(keyword, __LOCATION__, name="START", &
332 : description="Index of the first atom in the contact unit cell. Set to 0 to define the contact "// &
333 : "unit cell as the first/last N_ATOMS of the structure (after cutout)", &
334 8444 : usage="START <integer>", default_i_val=0)
335 8444 : CALL section_add_keyword(section, keyword)
336 8444 : CALL keyword_release(keyword)
337 :
338 : CALL keyword_create(keyword, __LOCATION__, name="N_ATOMS", &
339 : description="Number of atoms in the contact unit cell.", &
340 8444 : usage="N_ATOMS <integer>", default_i_val=0)
341 8444 : CALL section_add_keyword(section, keyword)
342 8444 : CALL keyword_release(keyword)
343 :
344 : CALL keyword_create(keyword, __LOCATION__, name="INJECTION_SIGN", &
345 : description="Contact unit cell interacts with unit cells to the right (positive) or "// &
346 : "to the left (negative).", &
347 : usage="INJECTION_SIGN <integer>", &
348 : default_i_val=injsign_positive, &
349 : enum_c_vals=s2a("POSITIVE", "NEGATIVE"), &
350 : enum_desc=s2a("When the contact unit cell is at the upper left corner of the Hamiltonian.", &
351 : "When the contact unit cell is at the lower right corner of the Hamiltonian."), &
352 8444 : enum_i_vals=(/injsign_positive, injsign_negative/))
353 8444 : CALL section_add_keyword(section, keyword)
354 8444 : CALL keyword_release(keyword)
355 :
356 : CALL keyword_create(keyword, __LOCATION__, name="INJECTING_CONTACT", &
357 : description="whether or not the contact can inject electrons.", &
358 8444 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
359 8444 : CALL section_add_keyword(section, keyword)
360 8444 : CALL keyword_release(keyword)
361 :
362 8444 : END SUBROUTINE create_contact_section
363 :
364 : ! **************************************************************************************************
365 : !> \brief Creates the section for the Beyn eigenvalue solver.
366 : !> \param[inout] section the section to be created
367 : ! **************************************************************************************************
368 8444 : SUBROUTINE create_beyn_section(section)
369 : TYPE(section_type), POINTER :: section
370 :
371 : TYPE(keyword_type), POINTER :: keyword
372 :
373 8444 : CPASSERT(.NOT. ASSOCIATED(section))
374 : CALL section_create(section, __LOCATION__, name="BEYN", &
375 : description="Parameters for the Beyn eigenvalue solver.", &
376 8444 : n_keywords=6, n_subsections=0, repeats=.FALSE.)
377 :
378 8444 : NULLIFY (keyword)
379 :
380 : CALL keyword_create(keyword, __LOCATION__, name="N_RAND", &
381 : description="Number of random vectors as a fraction of the size of the unit cell.", &
382 8444 : usage="N_RAND <real>", default_r_val=1.0_dp)
383 8444 : CALL section_add_keyword(section, keyword)
384 8444 : CALL keyword_release(keyword)
385 :
386 : CALL keyword_create(keyword, __LOCATION__, name="N_RAND_CC", &
387 : description="Number of random vectors as a fraction of the size of the unit cell "// &
388 : "for the complex contour.", &
389 8444 : usage="N_RAND_CC <real>", default_r_val=1.0_dp)
390 8444 : CALL section_add_keyword(section, keyword)
391 8444 : CALL keyword_release(keyword)
392 :
393 : CALL keyword_create(keyword, __LOCATION__, name="SVD_CUTOFF", &
394 : description="Cutoff for the singular values in the Beyn solver.", &
395 8444 : usage="SVD_CUTOFF <real>", default_r_val=1.0_dp)
396 8444 : CALL section_add_keyword(section, keyword)
397 8444 : CALL keyword_release(keyword)
398 :
399 : CALL keyword_create(keyword, __LOCATION__, name="N_POINTS_BEYN", &
400 : description="Number of integration points per circle in the Beyn solver.", &
401 8444 : usage="N_POINTS_BEYN <integer>", default_i_val=32)
402 8444 : CALL section_add_keyword(section, keyword)
403 8444 : CALL keyword_release(keyword)
404 :
405 : CALL keyword_create(keyword, __LOCATION__, name="ONE_CIRCLE", &
406 : description="Set to .TRUE. if only one circle instead of two should be used in the Beyn solver.", &
407 8444 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
408 8444 : CALL section_add_keyword(section, keyword)
409 8444 : CALL keyword_release(keyword)
410 :
411 : CALL keyword_create(keyword, __LOCATION__, name="TASKS_PER_INTEGRATION_POINT", &
412 : description="Number of tasks per integration point.", &
413 8444 : usage="TASKS_PER_INTEGRATION_POINT <integer>", default_i_val=0)
414 8444 : CALL section_add_keyword(section, keyword)
415 8444 : CALL keyword_release(keyword)
416 :
417 8444 : END SUBROUTINE create_beyn_section
418 :
419 : ! **************************************************************************************************
420 : !> \brief Creates the section for the PEXSI solver.
421 : !> \param[inout] section the section to be created
422 : ! **************************************************************************************************
423 8444 : SUBROUTINE create_pexsi_section(section)
424 : TYPE(section_type), POINTER :: section
425 :
426 : TYPE(keyword_type), POINTER :: keyword
427 :
428 8444 : CPASSERT(.NOT. ASSOCIATED(section))
429 : CALL section_create(section, __LOCATION__, name="PEXSI", &
430 : description="Parameters for the PEXSI solver to be used within OMEN.", &
431 : n_keywords=4, n_subsections=0, repeats=.FALSE., &
432 8444 : deprecation_notice="Support for the PEXSI library is slated for removal.")
433 :
434 8444 : NULLIFY (keyword)
435 :
436 : CALL keyword_create(keyword, __LOCATION__, name="ORDERING", &
437 : description="Ordering strategy for factorization and selected inversion.", &
438 : enum_c_vals=s2a("PARALLEL", "SEQUENTIAL", "MULTIPLE_MINIMUM_DEGREE"), &
439 : enum_desc=s2a("Parallel ordering using ParMETIS/PT-SCOTCH (PARMETIS option in SuperLU_DIST)", &
440 : "Sequential ordering using METIS (METIS_AT_PLUS_A option in SuperLU_DIST)", &
441 : "Multiple minimum degree ordering (MMD_AT_PLUS_A option in SuperLU_DIST)"), &
442 : enum_i_vals=(/0, 1, 2/), &
443 8444 : usage="ORDERING <integer>", default_i_val=1)
444 8444 : CALL section_add_keyword(section, keyword)
445 8444 : CALL keyword_release(keyword)
446 :
447 : CALL keyword_create(keyword, __LOCATION__, name="ROW_ORDERING", &
448 : description="row permutation strategy for factorization and selected inversion.", &
449 : enum_c_vals=s2a("NOROWPERM", "LARGEDIAG"), &
450 : enum_desc=s2a("No row permutation (NOROWPERM option in SuperLU_DIST)", &
451 : "Make diagonal entry larger than off diagonal (LargeDiag option in SuperLU_DIST)"), &
452 : enum_i_vals=(/0, 1/), &
453 8444 : usage="ROW_ORDERING <integer>", default_i_val=0)
454 8444 : CALL section_add_keyword(section, keyword)
455 8444 : CALL keyword_release(keyword)
456 :
457 : CALL keyword_create(keyword, __LOCATION__, name="VERBOSITY", &
458 : description="The level of output information.", &
459 : enum_c_vals=s2a("SILENT", "BASIC", "DETAILED"), &
460 : enum_i_vals=(/0, 1, 2/), &
461 8444 : usage="VERBOSITY <integer>", default_i_val=0)
462 8444 : CALL section_add_keyword(section, keyword)
463 8444 : CALL keyword_release(keyword)
464 :
465 : CALL keyword_create(keyword, __LOCATION__, name="NP_SYMB_FACT", &
466 : description="Number of processors for PARMETIS/PT-SCOTCH. Only used if ORDERING is set to PARALLEL. "// &
467 : "If 0, the number of processors for PARMETIS/PT-SCOTCH will be set equal to the number of "// &
468 : "MPI ranks per pole. Note: if more than one processor is used, a segmentation fault may occur in the "// &
469 : "symbolic factorization phase.", &
470 8444 : usage="NP_SYMB_FACT <integer>", default_i_val=1)
471 8444 : CALL section_add_keyword(section, keyword)
472 8444 : CALL keyword_release(keyword)
473 :
474 8444 : END SUBROUTINE create_pexsi_section
475 :
476 : !**************************************************************************************************
477 : !> \brief Creates print section for transport calculations.
478 : !> \param[inout] section the section to be created
479 : ! **************************************************************************************************
480 8444 : SUBROUTINE create_transport_print_section(section)
481 : TYPE(section_type), POINTER :: section
482 :
483 : TYPE(keyword_type), POINTER :: keyword
484 : TYPE(section_type), POINTER :: print_key
485 :
486 8444 : CPASSERT(.NOT. ASSOCIATED(section))
487 : CALL section_create(section, __LOCATION__, name="PRINT", &
488 : description="Section of possible print options for transport calculations.", &
489 8444 : repeats=.FALSE.)
490 :
491 8444 : NULLIFY (keyword, print_key)
492 : CALL cp_print_key_section_create(print_key, __LOCATION__, "CURRENT", &
493 : description="Controls the printing of current into cube files.", &
494 8444 : print_level=high_print_level, filename="current")
495 :
496 : CALL keyword_create(keyword, __LOCATION__, name="stride", &
497 : description="The stride (X,Y,Z) used to write the cube file "// &
498 : "(larger values result in smaller cube files). You can provide 3 numbers (for X,Y,Z) or"// &
499 : " 1 number valid for all components.", &
500 8444 : usage="STRIDE 2 2 2", n_var=-1, default_i_vals=(/2, 2, 2/), type_of_var=integer_t)
501 8444 : CALL section_add_keyword(print_key, keyword)
502 8444 : CALL keyword_release(keyword)
503 : CALL keyword_create(keyword, __LOCATION__, name="APPEND", &
504 : description="append the cube files when they already exist", &
505 8444 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
506 8444 : CALL section_add_keyword(print_key, keyword)
507 8444 : CALL keyword_release(keyword)
508 :
509 8444 : CALL section_add_subsection(section, print_key)
510 8444 : CALL section_release(print_key)
511 :
512 8444 : END SUBROUTINE create_transport_print_section
513 :
514 : END MODULE input_cp2k_transport
|