Line data Source code
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 Input section for NEGF based quantum transport calculations.
10 : ! **************************************************************************************************
11 :
12 : MODULE input_cp2k_negf
13 : USE bibliography, ONLY: Bailey2006,&
14 : Papior2017
15 : USE cp_output_handling, ONLY: add_last_numeric,&
16 : cp_print_key_section_create,&
17 : debug_print_level,&
18 : high_print_level,&
19 : low_print_level,&
20 : medium_print_level,&
21 : silent_print_level
22 : USE input_constants, ONLY: negfint_method_cc,&
23 : negfint_method_simpson
24 : USE input_keyword_types, ONLY: keyword_create,&
25 : keyword_release,&
26 : keyword_type
27 : USE input_section_types, ONLY: section_add_keyword,&
28 : section_add_subsection,&
29 : section_create,&
30 : section_release,&
31 : section_type
32 : USE input_val_types, ONLY: char_t,&
33 : integer_t,&
34 : real_t
35 : USE kinds, ONLY: dp
36 : USE physcon, ONLY: kelvin
37 : USE qs_density_mixing_types, ONLY: create_mixing_section
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_negf'
45 :
46 : PUBLIC :: create_negf_section
47 :
48 : CONTAINS
49 :
50 : ! **************************************************************************************************
51 : !> \brief Create NEGF input section.
52 : !> \param section input section
53 : !> \par History
54 : !> * 02.2017 created [Sergey Chulkov]
55 : ! **************************************************************************************************
56 9520 : SUBROUTINE create_negf_section(section)
57 : TYPE(section_type), POINTER :: section
58 :
59 : TYPE(keyword_type), POINTER :: keyword
60 : TYPE(section_type), POINTER :: print_key, subsection
61 :
62 9520 : CPASSERT(.NOT. ASSOCIATED(section))
63 : CALL section_create(section, __LOCATION__, name="NEGF", &
64 : description="Parameters which control quantum transport calculation"// &
65 : " based on Non-Equilibrium Green Function method.", &
66 : citations=[Bailey2006, Papior2017], &
67 28560 : n_keywords=18, n_subsections=6, repeats=.FALSE.)
68 :
69 9520 : NULLIFY (keyword, print_key, subsection)
70 :
71 9520 : CALL create_contact_section(subsection)
72 9520 : CALL section_add_subsection(section, subsection)
73 9520 : CALL section_release(subsection)
74 :
75 9520 : CALL create_scattering_region_section(subsection)
76 9520 : CALL section_add_subsection(section, subsection)
77 9520 : CALL section_release(subsection)
78 :
79 : ! mixing section
80 9520 : CALL create_mixing_section(subsection, ls_scf=.FALSE.)
81 9520 : CALL section_add_subsection(section, subsection)
82 9520 : CALL section_release(subsection)
83 :
84 : CALL keyword_create(keyword, __LOCATION__, name="DISABLE_CACHE", &
85 : description="Do not keep contact self-energy matrices for future reuse", &
86 9520 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
87 9520 : CALL section_add_keyword(section, keyword)
88 9520 : CALL keyword_release(keyword)
89 :
90 : ! convergence thresholds
91 : CALL keyword_create(keyword, __LOCATION__, name="EPS_DENSITY", &
92 : description="Target accuracy for electronic density.", &
93 9520 : n_var=1, type_of_var=real_t, default_r_val=1.0e-5_dp)
94 9520 : CALL section_add_keyword(section, keyword)
95 9520 : CALL keyword_release(keyword)
96 :
97 : CALL keyword_create(keyword, __LOCATION__, name="EPS_GREEN", &
98 : description="Target accuracy for surface Green's functions.", &
99 9520 : n_var=1, type_of_var=real_t, default_r_val=1.0e-5_dp)
100 9520 : CALL section_add_keyword(section, keyword)
101 9520 : CALL keyword_release(keyword)
102 :
103 : CALL keyword_create(keyword, __LOCATION__, name="EPS_SCF", &
104 : description="Target accuracy for SCF convergence.", &
105 9520 : n_var=1, type_of_var=real_t, default_r_val=1.0e-5_dp)
106 9520 : CALL section_add_keyword(section, keyword)
107 9520 : CALL keyword_release(keyword)
108 :
109 : CALL keyword_create(keyword, __LOCATION__, name="EPS_GEO", &
110 : description="Accuracy in mapping atoms between different force environments.", &
111 : n_var=1, type_of_var=real_t, unit_str="angstrom", &
112 9520 : default_r_val=1.0e-6_dp)
113 9520 : CALL section_add_keyword(section, keyword)
114 9520 : CALL keyword_release(keyword)
115 :
116 : CALL keyword_create(keyword, __LOCATION__, name="ENERGY_LBOUND", &
117 : description="Lower bound energy of the conductance band.", &
118 : n_var=1, type_of_var=real_t, unit_str="hartree", &
119 9520 : default_r_val=-5.0_dp)
120 9520 : CALL section_add_keyword(section, keyword)
121 9520 : CALL keyword_release(keyword)
122 :
123 : CALL keyword_create(keyword, __LOCATION__, name="ETA", &
124 : description="Infinitesimal offset from the real axis.", &
125 : n_var=1, type_of_var=real_t, unit_str="hartree", &
126 9520 : default_r_val=1.0e-5_dp)
127 9520 : CALL section_add_keyword(section, keyword)
128 9520 : CALL keyword_release(keyword)
129 :
130 : CALL keyword_create(keyword, __LOCATION__, name="HOMO_LUMO_GAP", &
131 : description="The gap between the HOMO and some fictitious LUMO. This option is used as"// &
132 : " an initial offset to determine the actual Fermi level of bulk contacts."// &
133 : " It does not need to be exact HOMO-LUMO gap, just some value to start with.", &
134 : n_var=1, type_of_var=real_t, unit_str="hartree", &
135 9520 : default_r_val=0.2_dp)
136 9520 : CALL section_add_keyword(section, keyword)
137 9520 : CALL keyword_release(keyword)
138 :
139 : CALL keyword_create(keyword, __LOCATION__, name="DELTA_NPOLES", &
140 : description="Number of poles of Fermi function to consider.", &
141 : n_var=1, type_of_var=integer_t, &
142 9520 : default_i_val=4)
143 9520 : CALL section_add_keyword(section, keyword)
144 9520 : CALL keyword_release(keyword)
145 :
146 : CALL keyword_create(keyword, __LOCATION__, name="GAMMA_KT", &
147 : description="Offset from the axis (in terms of k*T)"// &
148 : " where poles of the Fermi function reside.", &
149 : n_var=1, type_of_var=integer_t, &
150 9520 : default_i_val=20)
151 9520 : CALL section_add_keyword(section, keyword)
152 9520 : CALL keyword_release(keyword)
153 :
154 : CALL keyword_create(keyword, __LOCATION__, name="INTEGRATION_METHOD", &
155 : description="Method to integrate Green's functions along a closed-circuit contour.", &
156 : default_i_val=negfint_method_cc, &
157 : enum_c_vals=s2a("CLENSHAW-CURTIS", "SIMPSON"), &
158 : enum_desc=s2a( &
159 : "Adaptive Clenshaw-Curtis quadrature method. Requires FFTW3 library.", &
160 : "Adaptive Simpson method. Works without FFTW3."), &
161 9520 : enum_i_vals=[negfint_method_cc, negfint_method_simpson])
162 9520 : CALL section_add_keyword(section, keyword)
163 9520 : CALL keyword_release(keyword)
164 :
165 : CALL keyword_create(keyword, __LOCATION__, name="INTEGRATION_MIN_POINTS", &
166 : description="Initial (minimal) number of grid point for adaptive numerical integration.", &
167 : n_var=1, type_of_var=integer_t, &
168 9520 : default_i_val=16)
169 9520 : CALL section_add_keyword(section, keyword)
170 9520 : CALL keyword_release(keyword)
171 :
172 : CALL keyword_create(keyword, __LOCATION__, name="INTEGRATION_MAX_POINTS", &
173 : description="Maximal number of grid point for adaptive numerical integration.", &
174 : n_var=1, type_of_var=integer_t, &
175 9520 : default_i_val=512)
176 9520 : CALL section_add_keyword(section, keyword)
177 9520 : CALL keyword_release(keyword)
178 :
179 : CALL keyword_create(keyword, __LOCATION__, name="MAX_SCF", &
180 : description="Maximum number of SCF iterations to be performed.", &
181 : n_var=1, type_of_var=integer_t, &
182 9520 : default_i_val=30)
183 9520 : CALL section_add_keyword(section, keyword)
184 9520 : CALL keyword_release(keyword)
185 :
186 : CALL keyword_create(keyword, __LOCATION__, name="NPROC_POINT", &
187 : description="Number of MPI processes to be used per energy point."// &
188 : " Default is to use all processors (0).", &
189 : n_var=1, type_of_var=integer_t, &
190 9520 : default_i_val=0)
191 9520 : CALL section_add_keyword(section, keyword)
192 9520 : CALL keyword_release(keyword)
193 :
194 : CALL keyword_create(keyword, __LOCATION__, name="V_SHIFT", &
195 : description="Initial value of the Hartree potential shift", &
196 : n_var=1, type_of_var=real_t, unit_str="hartree", &
197 9520 : default_r_val=0.0_dp)
198 9520 : CALL section_add_keyword(section, keyword)
199 9520 : CALL keyword_release(keyword)
200 :
201 : CALL keyword_create(keyword, __LOCATION__, name="V_SHIFT_OFFSET", &
202 : description="Initial offset to determine the optimal shift in Hartree potential.", &
203 9520 : n_var=1, type_of_var=real_t, default_r_val=0.10_dp)
204 9520 : CALL section_add_keyword(section, keyword)
205 9520 : CALL keyword_release(keyword)
206 :
207 : CALL keyword_create(keyword, __LOCATION__, name="V_SHIFT_MAX_ITERS", &
208 : description="Maximal number of iteration to determine the optimal shift in Hartree potential.", &
209 9520 : n_var=1, type_of_var=integer_t, default_i_val=30)
210 9520 : CALL section_add_keyword(section, keyword)
211 9520 : CALL keyword_release(keyword)
212 : CALL keyword_create(keyword, __LOCATION__, name="UPDATE_HS", &
213 : description="Change the atomic Hamiltonian during NEGF self-consistent cycle."// &
214 : " If .FALSE., only the density matrix is updated.", &
215 9520 : default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
216 9520 : CALL section_add_keyword(section, keyword)
217 9520 : CALL keyword_release(keyword)
218 :
219 : ! PRINT subsection
220 : CALL section_create(subsection, __LOCATION__, "PRINT", "Printing of information during the NEGF.", &
221 9520 : repeats=.FALSE.)
222 :
223 9520 : CALL create_print_program_run_info_section(print_key)
224 9520 : CALL section_add_subsection(subsection, print_key)
225 9520 : CALL section_release(print_key)
226 :
227 9520 : CALL create_print_dos_section(print_key, "DOS", "the Density of States (DOS) in the scattering region")
228 9520 : CALL section_add_subsection(subsection, print_key)
229 9520 : CALL section_release(print_key)
230 :
231 9520 : CALL create_print_dos_section(print_key, "TRANSMISSION", "the transmission coefficient")
232 9520 : CALL section_add_subsection(subsection, print_key)
233 9520 : CALL section_release(print_key)
234 :
235 : ! RESTART subsection
236 : CALL cp_print_key_section_create(print_key, __LOCATION__, "RESTART", &
237 : description="Controls the dumping of the restart files during NEGF SCF."// &
238 : " By default keeps a short history of three restarts.", &
239 : print_level=low_print_level, common_iter_levels=3, &
240 : each_iter_names=s2a("NEGF_SCF"), each_iter_values=[20], &
241 9520 : add_last=add_last_numeric, filename="RESTART")
242 9520 : CALL section_add_subsection(subsection, print_key)
243 9520 : CALL section_release(print_key)
244 :
245 9520 : CALL section_add_subsection(section, subsection)
246 9520 : CALL section_release(subsection)
247 :
248 9520 : END SUBROUTINE create_negf_section
249 :
250 : ! **************************************************************************************************
251 : !> \brief Create NEGF%CONTACT input section.
252 : !> \param section input section
253 : !> \par History
254 : !> * 09.2017 split from create_negf_section() [Sergey Chulkov]
255 : ! **************************************************************************************************
256 9520 : SUBROUTINE create_contact_section(section)
257 : TYPE(section_type), POINTER :: section
258 :
259 : TYPE(keyword_type), POINTER :: keyword
260 : TYPE(section_type), POINTER :: print_key, subsection, subsection2
261 :
262 9520 : CPASSERT(.NOT. ASSOCIATED(section))
263 :
264 : CALL section_create(section, __LOCATION__, name="CONTACT", &
265 : description="Section defining the contact region of NEGF setup.", &
266 9520 : n_keywords=5, n_subsections=3, repeats=.TRUE.)
267 :
268 9520 : NULLIFY (keyword, print_key, subsection, subsection2)
269 :
270 : CALL create_atomlist_section(subsection, "BULK_REGION", &
271 9520 : "the bulk contact adjacent to the screening region.", .FALSE.)
272 9520 : CALL section_add_subsection(section, subsection)
273 : CALL create_atomlist_section(subsection2, "CELL", &
274 : "a single bulk contact unit cell. Bulk Hamiltonian will be contstructed "// &
275 : "using two such unit cells instead of performing k-point bulk calculation. "// &
276 9520 : "FORCE_EVAL_SECTION must be 0.", .TRUE.)
277 9520 : CALL section_add_subsection(subsection, subsection2)
278 9520 : CALL section_release(subsection2)
279 9520 : CALL section_release(subsection)
280 :
281 : CALL create_atomlist_section(subsection, "SCREENING_REGION", &
282 9520 : "the given contact adjacent to the scattering region.", .FALSE.)
283 9520 : CALL section_add_subsection(section, subsection)
284 9520 : CALL section_release(subsection)
285 :
286 : CALL keyword_create(keyword, __LOCATION__, name="FORCE_EVAL_SECTION", &
287 : description=" Index of the FORCE_EVAL section which will be used for bulk calculation.", &
288 9520 : n_var=1, type_of_var=integer_t, default_i_val=0)
289 9520 : CALL section_add_keyword(section, keyword)
290 9520 : CALL keyword_release(keyword)
291 :
292 : CALL keyword_create(keyword, __LOCATION__, name="ELECTRIC_POTENTIAL", &
293 : description="External electrostatic potential applied to the given contact.", &
294 : n_var=1, type_of_var=real_t, unit_str="hartree", &
295 9520 : default_r_val=0.0_dp)
296 9520 : CALL section_add_keyword(section, keyword)
297 9520 : CALL keyword_release(keyword)
298 :
299 : CALL keyword_create(keyword, __LOCATION__, name="FERMI_LEVEL", &
300 : description="Contact Fermi level at the given temperature."// &
301 : " If this keyword is not given explicitly, the Fermi level"// &
302 : " will be automatically computed prior the actual NEGF calculation.", &
303 : n_var=1, type_of_var=real_t, unit_str="hartree", &
304 9520 : default_r_val=0.0_dp)
305 9520 : CALL section_add_keyword(section, keyword)
306 9520 : CALL keyword_release(keyword)
307 :
308 : CALL keyword_create(keyword, __LOCATION__, name="REFINE_FERMI_LEVEL", &
309 : description="Compute the Fermi level using the value from the FERMI_LEVEL keyword"// &
310 : " as a starting point. By default the Fermi level is computed only"// &
311 : " when the keyword FERMI_LEVEL is not given explicitly.", &
312 9520 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
313 9520 : CALL section_add_keyword(section, keyword)
314 9520 : CALL keyword_release(keyword)
315 :
316 : CALL keyword_create(keyword, __LOCATION__, name="FERMI_LEVEL_SHIFTED", &
317 : description="Used to shift the zero-energy level of an electrode to the common zero-energy level."// &
318 : " If this keyword is specified, the Fermi level,"// &
319 : " calculated by standard DFT or NEGF (using the REFINE_FERMI_LEVEL keyword),"// &
320 : " or previously specified using the FERMI_LEVEL keyword,"// &
321 : " is changed to this value. All diagonal elements of the Hamiltonian are shifted accordingly.", &
322 : n_var=1, type_of_var=real_t, unit_str="hartree", &
323 9520 : default_r_val=0.0_dp)
324 9520 : CALL section_add_keyword(section, keyword)
325 9520 : CALL keyword_release(keyword)
326 :
327 : CALL keyword_create(keyword, __LOCATION__, name="TEMPERATURE", &
328 : description="Electronic temperature.", &
329 : n_var=1, type_of_var=real_t, unit_str="K", &
330 9520 : default_r_val=300.0_dp/kelvin)
331 9520 : CALL section_add_keyword(section, keyword)
332 9520 : CALL keyword_release(keyword)
333 :
334 : ! PRINT subsection
335 : CALL section_create(subsection, __LOCATION__, "PRINT", "Print properties for the given contact.", &
336 9520 : repeats=.FALSE.)
337 :
338 9520 : CALL create_print_dos_section(print_key, "DOS", "the Density of States (DOS)")
339 9520 : CALL section_add_subsection(subsection, print_key)
340 9520 : CALL section_release(print_key)
341 :
342 9520 : CALL section_add_subsection(section, subsection)
343 9520 : CALL section_release(subsection)
344 :
345 : ! RESTART subsection
346 : CALL section_create(subsection, __LOCATION__, "RESTART", &
347 9520 : "Controls reading and writing of the restart files for the specified contact.", repeats=.FALSE.)
348 :
349 : CALL keyword_create(keyword, __LOCATION__, name="FILENAME", &
350 : description=' Controls part of the filename for output. '// &
351 : ' Use filename to obtain projectname-filename. '// &
352 : ' Use ./filename to get filename.'// &
353 : ' A middle name (contact number, type of matrix, spin if 2 spins) and extension '// &
354 : ' are always added to the filename.', &
355 : usage="FILENAME ./filename ", &
356 9520 : default_lc_val="")
357 9520 : CALL section_add_keyword(subsection, keyword)
358 9520 : CALL keyword_release(keyword)
359 :
360 : CALL keyword_create(keyword, __LOCATION__, name="READ_WRITE_HS", &
361 : description="Requests reading of the electrode Hamiltonian and overlap matrices from a file."// &
362 : " If at least one of these files doesn't exist, all Hamiltonian and overlap matrices"// &
363 : " are calculated and saved. If no name is specified by FILENAME, the default file names are"// &
364 : " projectname-Nn-H00, projectname-Nn-H01, projectname-Nn-S00, projectname-Nn-S01"// &
365 : " for restricted calculations with identical spin population, or"// &
366 : " projectname-Nn-H00-Ss, projectname-Nn-H01-Ss, projectname-Nn-S00-Ss, projectname-Nn-S01-Ss"// &
367 : " for unrestricted calculations with two spin components,"// &
368 : " where n is the number of the contact and s is the spin index."// &
369 : " Otherwise, projectname is modified. Note that the code does not distinguish"// &
370 : " between the files created by a separate electrode or the entire system.", &
371 9520 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
372 9520 : CALL section_add_keyword(subsection, keyword)
373 9520 : CALL keyword_release(keyword)
374 :
375 9520 : CALL section_add_subsection(section, subsection)
376 9520 : CALL section_release(subsection)
377 :
378 9520 : END SUBROUTINE create_contact_section
379 :
380 : ! **************************************************************************************************
381 : !> \brief Create a scattering region section.
382 : !> \param section NEGF section
383 : !> \par History
384 : !> * 02.2026 created [Dmitry Ryndyk]
385 : ! **************************************************************************************************
386 9520 : SUBROUTINE create_scattering_region_section(section)
387 : TYPE(section_type), POINTER :: section
388 :
389 : TYPE(keyword_type), POINTER :: keyword
390 : TYPE(section_type), POINTER :: subsection
391 :
392 9520 : CPASSERT(.NOT. ASSOCIATED(section))
393 :
394 : CALL section_create(section, __LOCATION__, name="SCATTERING_REGION", &
395 : description="Section defining the scattering region of NEGF setup.", &
396 9520 : n_keywords=2, n_subsections=1, repeats=.FALSE.)
397 :
398 9520 : NULLIFY (keyword, subsection)
399 :
400 : CALL keyword_create(keyword, __LOCATION__, name="LIST", &
401 : description="Specifies a list of atoms.", &
402 : usage="LIST {integer} {integer} .. {integer}", repeats=.TRUE., &
403 9520 : n_var=-1, type_of_var=integer_t)
404 9520 : CALL section_add_keyword(section, keyword)
405 9520 : CALL keyword_release(keyword)
406 :
407 : CALL keyword_create(keyword, __LOCATION__, name="MOLNAME", &
408 : description="Specifies a list of named molecular fragments.", &
409 : usage="MOLNAME WAT MEOH", repeats=.TRUE., &
410 9520 : n_var=-1, type_of_var=char_t)
411 9520 : CALL section_add_keyword(section, keyword)
412 9520 : CALL keyword_release(keyword)
413 :
414 : ! RESTART subsection
415 : CALL section_create(subsection, __LOCATION__, "RESTART", &
416 : "Controls reading and writing of the initial restart files for the scattering region,"// &
417 9520 : " including the coupling to the electrodes.", repeats=.FALSE.)
418 : CALL keyword_create(keyword, __LOCATION__, name="FILENAME", &
419 : description=' Controls part of the filename. '// &
420 : ' Use filename to obtain projectname-filename. '// &
421 : ' Use ./filename to get filename.'// &
422 : ' A middle name (type of matrix, contact number for coupling matrices, spin if 2 spins)'// &
423 : ' and extension are always added to the filename.', &
424 : usage="FILENAME ./filename ", &
425 9520 : default_lc_val="")
426 9520 : CALL section_add_keyword(subsection, keyword)
427 9520 : CALL keyword_release(keyword)
428 : CALL keyword_create(keyword, __LOCATION__, name="READ_WRITE_HS", &
429 : description="Requests reading of the Hamiltonian and overlap matrices from a file."// &
430 : " For the scattering region, including the coupling to the electrodes."// &
431 : " If at least one of these files doesn't exist, all Hamiltonian and overlap matrices"// &
432 : " are calculated and saved. If no name is specified by FILENAME, the default file names are"// &
433 : " projectname-H, projectname-H-Nn, projectname-S, projectname-S-Nn"// &
434 : " for restricted calculations with identical spin population, or"// &
435 : " projectname-H-Ss, projectname-H-Nn-Ss, projectname-S-Ss, projectname-S-Nn-Ss"// &
436 : " for unrestricted calculations with two spin components,"// &
437 : " where n is the number of the contact and s is the spin index."// &
438 : " Otherwise, projectname is modified.", &
439 9520 : default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
440 9520 : CALL section_add_keyword(subsection, keyword)
441 9520 : CALL keyword_release(keyword)
442 9520 : CALL section_add_subsection(section, subsection)
443 9520 : CALL section_release(subsection)
444 :
445 9520 : END SUBROUTINE create_scattering_region_section
446 :
447 : ! **************************************************************************************************
448 : !> \brief Create an atomic list section.
449 : !> \param section NEGF section
450 : !> \param name name of the new section
451 : !> \param description section description
452 : !> \param repeats whether the section can be repeated
453 : !> \par History
454 : !> * 02.2017 created [Sergey Chulkov]
455 : ! **************************************************************************************************
456 28560 : SUBROUTINE create_atomlist_section(section, name, description, repeats)
457 : TYPE(section_type), POINTER :: section
458 : CHARACTER(len=*), INTENT(in) :: name, description
459 : LOGICAL, INTENT(in) :: repeats
460 :
461 : TYPE(keyword_type), POINTER :: keyword
462 :
463 0 : CPASSERT(.NOT. ASSOCIATED(section))
464 :
465 : CALL section_create(section, __LOCATION__, name=TRIM(ADJUSTL(name)), &
466 : description="Atoms belonging to "//TRIM(ADJUSTL(description)), &
467 28560 : n_keywords=2, n_subsections=0, repeats=repeats)
468 :
469 28560 : NULLIFY (keyword)
470 :
471 : CALL keyword_create(keyword, __LOCATION__, name="LIST", &
472 : description="Specifies a list of atoms.", &
473 : usage="LIST {integer} {integer} .. {integer}", repeats=.TRUE., &
474 28560 : n_var=-1, type_of_var=integer_t)
475 28560 : CALL section_add_keyword(section, keyword)
476 28560 : CALL keyword_release(keyword)
477 :
478 : CALL keyword_create(keyword, __LOCATION__, name="MOLNAME", &
479 : description="Specifies a list of named molecular fragments.", &
480 : usage="MOLNAME WAT MEOH", repeats=.TRUE., &
481 28560 : n_var=-1, type_of_var=char_t)
482 28560 : CALL section_add_keyword(section, keyword)
483 28560 : CALL keyword_release(keyword)
484 28560 : END SUBROUTINE create_atomlist_section
485 :
486 : ! **************************************************************************************************
487 : !> \brief Create the PROGRAM_RUN_INFO print section.
488 : !> \param section section to create
489 : !> \par History
490 : !> * 11.2020 created [Dmitry Ryndyk]
491 : ! **************************************************************************************************
492 9520 : SUBROUTINE create_print_program_run_info_section(section)
493 :
494 : TYPE(section_type), POINTER :: section
495 :
496 : TYPE(keyword_type), POINTER :: keyword
497 :
498 : CALL cp_print_key_section_create(section, __LOCATION__, "PROGRAM_RUN_INFO", &
499 : description="Controls the printing of basic information during the NEGF.", &
500 9520 : print_level=low_print_level, filename="__STD_OUT__")
501 9520 : NULLIFY (keyword)
502 :
503 : CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
504 : description="Level starting at which this property is printed", &
505 : usage="_SECTION_PARAMETERS_", &
506 : default_i_val=low_print_level, lone_keyword_i_val=low_print_level, &
507 : enum_c_vals=s2a("on", "off", "silent", "low", "medium", "high", "debug"), &
508 : enum_i_vals=[silent_print_level - 1, debug_print_level + 1, &
509 : silent_print_level, low_print_level, &
510 9520 : medium_print_level, high_print_level, debug_print_level])
511 9520 : CALL section_add_keyword(section, keyword)
512 9520 : CALL keyword_release(keyword)
513 :
514 : CALL keyword_create(keyword, __LOCATION__, name="PRINT_LEVEL", &
515 : variants=["IOLEVEL"], &
516 : description="Determines the verbose level for this section "// &
517 : "additionally to GLOBAL%PRINT_LEVEL and SECTION_PARAMETERS, "// &
518 : "which switch on printing.", &
519 : usage="PRINT_LEVEL HIGH", &
520 : default_i_val=low_print_level, enum_c_vals= &
521 : s2a("SILENT", "LOW", "MEDIUM", "HIGH", "DEBUG"), &
522 : enum_desc=s2a("No output", &
523 : "Little output", "Quite some output", "Lots of output", &
524 : "Everything is written out, useful for debugging purposes only"), &
525 : enum_i_vals=[silent_print_level, low_print_level, medium_print_level, &
526 19040 : high_print_level, debug_print_level])
527 9520 : CALL section_add_keyword(section, keyword)
528 9520 : CALL keyword_release(keyword)
529 :
530 9520 : END SUBROUTINE create_print_program_run_info_section
531 :
532 : ! **************************************************************************************************
533 : !> \brief Create the DOS/TRANSMISSION print section.
534 : !> \param section section to create
535 : !> \param name name of the new section
536 : !> \param description section description
537 : !> \par History
538 : !> * 11.2017 created [Sergey Chulkov]
539 : ! **************************************************************************************************
540 28560 : SUBROUTINE create_print_dos_section(section, name, description)
541 : TYPE(section_type), POINTER :: section
542 : CHARACTER(len=*), INTENT(in) :: name, description
543 :
544 : TYPE(keyword_type), POINTER :: keyword
545 :
546 : CALL cp_print_key_section_create(section, __LOCATION__, TRIM(ADJUSTL(name)), &
547 : description="Controls the printing of "//TRIM(ADJUSTL(description))//".", &
548 28560 : print_level=high_print_level, filename="__STD_OUT__")
549 28560 : NULLIFY (keyword)
550 :
551 : CALL keyword_create(keyword, __LOCATION__, name="FROM_ENERGY", &
552 : description="Energy point to start with.", &
553 : n_var=1, type_of_var=real_t, unit_str="hartree", &
554 28560 : default_r_val=-1.0_dp)
555 28560 : CALL section_add_keyword(section, keyword)
556 28560 : CALL keyword_release(keyword)
557 :
558 : CALL keyword_create(keyword, __LOCATION__, name="TILL_ENERGY", &
559 : description="Energy point to end with.", &
560 : n_var=1, type_of_var=real_t, unit_str="hartree", &
561 28560 : default_r_val=1.0_dp)
562 28560 : CALL section_add_keyword(section, keyword)
563 28560 : CALL keyword_release(keyword)
564 :
565 : CALL keyword_create(keyword, __LOCATION__, name="N_GRIDPOINTS", &
566 : description="Number of points to compute.", &
567 28560 : n_var=1, type_of_var=integer_t, default_i_val=201)
568 28560 : CALL section_add_keyword(section, keyword)
569 28560 : CALL keyword_release(keyword)
570 28560 : END SUBROUTINE create_print_dos_section
571 : END MODULE input_cp2k_negf
|