38#include "./base/base_uses.f90"
43 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_negf'
61 cpassert(.NOT.
ASSOCIATED(section))
63 description=
"Parameters which control quantum transport calculation"// &
64 " based on Non-Equilibrium Green Function method.", &
66 n_keywords=18, n_subsections=6, repeats=.false.)
68 NULLIFY (keyword, print_key, subsection)
70 CALL create_contact_section(subsection)
74 CALL create_atomlist_section(subsection,
"SCATTERING_REGION",
"Defines atoms which form the scattering region.", .false.)
84 description=
"Do not keep contact self-energy matrices for future reuse", &
85 default_l_val=.false., lone_keyword_l_val=.true.)
91 description=
"Target accuracy for electronic density.", &
92 n_var=1, type_of_var=
real_t, default_r_val=1.0e-5_dp)
97 description=
"Target accuracy for surface Green's functions.", &
98 n_var=1, type_of_var=
real_t, default_r_val=1.0e-5_dp)
103 description=
"Target accuracy for SCF convergence.", &
104 n_var=1, type_of_var=
real_t, default_r_val=1.0e-5_dp)
109 description=
"Accuracy in mapping atoms between different force environments.", &
110 n_var=1, type_of_var=
real_t, unit_str=
"angstrom", &
111 default_r_val=1.0e-6_dp)
115 CALL keyword_create(keyword, __location__, name=
"ENERGY_LBOUND", &
116 description=
"Lower bound energy of the conductance band.", &
117 n_var=1, type_of_var=
real_t, unit_str=
"hartree", &
118 default_r_val=-5.0_dp)
123 description=
"Infinitesimal offset from the real axis.", &
124 n_var=1, type_of_var=
real_t, unit_str=
"hartree", &
125 default_r_val=1.0e-5_dp)
129 CALL keyword_create(keyword, __location__, name=
"HOMO_LUMO_GAP", &
130 description=
"The gap between the HOMO and some fictitious LUMO. This option is used as"// &
131 " an initial offset to determine the actual Fermi level of bulk contacts."// &
132 " It does not need to be exact HOMO-LUMO gap, just some value to start with.", &
133 n_var=1, type_of_var=
real_t, unit_str=
"hartree", &
134 default_r_val=0.2_dp)
139 description=
"Number of poles of Fermi function to consider.", &
146 description=
"Offset from the axis (in terms of k*T)"// &
147 " where poles of the Fermi function reside.", &
153 CALL keyword_create(keyword, __location__, name=
"INTEGRATION_METHOD", &
154 description=
"Method to integrate Green's functions along a closed-circuit contour.", &
156 enum_c_vals=
s2a(
"CLENSHAW-CURTIS",
"SIMPSON"), &
158 "Adaptive Clenshaw-Curtis quadrature method. Requires FFTW3 library.", &
159 "Adaptive Simpson method. Works without FFTW3."), &
164 CALL keyword_create(keyword, __location__, name=
"INTEGRATION_MIN_POINTS", &
165 description=
"Initial (minimal) number of grid point for adaptive numerical integration.", &
171 CALL keyword_create(keyword, __location__, name=
"INTEGRATION_MAX_POINTS", &
172 description=
"Maximal number of grid point for adaptive numerical integration.", &
179 description=
"Maximum number of SCF iterations to be performed.", &
186 description=
"Number of MPI processes to be used per energy point."// &
187 " Default is to use all processors (0).", &
194 description=
"Initial value of the Hartree potential shift", &
195 n_var=1, type_of_var=
real_t, unit_str=
"hartree", &
196 default_r_val=0.0_dp)
200 CALL keyword_create(keyword, __location__, name=
"V_SHIFT_OFFSET", &
201 description=
"Initial offset to determine the optimal shift in Hartree potential.", &
202 n_var=1, type_of_var=
real_t, default_r_val=0.10_dp)
206 CALL keyword_create(keyword, __location__, name=
"V_SHIFT_MAX_ITERS", &
207 description=
"Maximal number of iteration to determine the optimal shift in Hartree potential.", &
208 n_var=1, type_of_var=
integer_t, default_i_val=30)
213 CALL section_create(subsection, __location__,
"PRINT",
"Printing of information during the NEGF.", &
216 CALL create_print_program_run_info_section(print_key)
220 CALL create_print_dos_section(print_key,
"DOS",
"the Density of States (DOS) in the scattering region")
224 CALL create_print_dos_section(print_key,
"TRANSMISSION",
"the transmission coefficient")
239 SUBROUTINE create_contact_section(section)
243 TYPE(
section_type),
POINTER :: print_key, subsection, subsection2
245 cpassert(.NOT.
ASSOCIATED(section))
248 description=
"Section defining the contact region of NEGF setup.", &
249 n_keywords=5, n_subsections=3, repeats=.true.)
251 NULLIFY (keyword, print_key, subsection, subsection2)
253 CALL create_atomlist_section(subsection,
"BULK_REGION", &
254 "the bulk contact adjacent to the screening region.", .false.)
256 CALL create_atomlist_section(subsection2,
"CELL", &
257 "a single bulk contact unit cell. Bulk Hamiltonian will be contstructed "// &
258 "using two such unit cells instead of performing k-point bulk calculation. "// &
259 "FORCE_EVAL_SECTION must be 0.", .true.)
264 CALL create_atomlist_section(subsection,
"SCREENING_REGION", &
265 "the given contact adjacent to the scattering region.", .false.)
269 CALL keyword_create(keyword, __location__, name=
"FORCE_EVAL_SECTION", &
270 description=
" Index of the FORCE_EVAL section which will be used for bulk calculation.", &
271 n_var=1, type_of_var=
integer_t, default_i_val=0)
275 CALL keyword_create(keyword, __location__, name=
"ELECTRIC_POTENTIAL", &
276 description=
"External electrostatic potential applied to the given contact.", &
277 n_var=1, type_of_var=
real_t, unit_str=
"hartree", &
278 default_r_val=0.0_dp)
283 description=
"Contact Fermi level at the given temperature."// &
284 " If this keyword is not given explicitly, the Fermi level"// &
285 " will be automatically computed prior the actual NEGF calculation.", &
286 n_var=1, type_of_var=
real_t, unit_str=
"hartree", &
287 default_r_val=0.0_dp)
291 CALL keyword_create(keyword, __location__, name=
"REFINE_FERMI_LEVEL", &
292 description=
"Compute the Fermi level using the value from the FERMI_LEVEL keyword"// &
293 " as a starting point. By default the Fermi level is computed only"// &
294 " when the keyword FERMI_LEVEL is not given explicitly.", &
295 default_l_val=.false., lone_keyword_l_val=.true.)
299 CALL keyword_create(keyword, __location__, name=
"FERMI_LEVEL_SHIFTED", &
300 description=
"Used to shift the zero-energy level of an electrode to the common zero-energy level."// &
301 " If this keyword is specified, the Fermi level,"// &
302 " calculated by standard DFT or NEGF (using the REFINE_FERMI_LEVEL keyword),"// &
303 " or previously specified using the FERMI_LEVEL keyword,"// &
304 " is changed to this value. All diagonal elements of the Hamiltonian are shifted accordingly.", &
305 n_var=1, type_of_var=
real_t, unit_str=
"hartree", &
306 default_r_val=0.0_dp)
311 description=
"Electronic temperature.", &
312 n_var=1, type_of_var=
real_t, unit_str=
"K", &
313 default_r_val=300.0_dp/
kelvin)
318 CALL section_create(subsection, __location__,
"PRINT",
"Print properties for the given contact.", &
321 CALL create_print_dos_section(print_key,
"DOS",
"the Density of States (DOS)")
330 "Read and write restart files for the given contact.", repeats=.false.)
333 description=
' Controls part of the filename for output. '// &
334 ' Use filename to obtain projectname-filename. '// &
335 ' Use ./filename to get filename.'// &
336 ' A middle name (contact number, type of matrix, spin if 2 spins) and extension '// &
337 ' are always added to the filename.', &
338 usage=
"FILENAME ./filename ", &
343 CALL keyword_create(keyword, __location__, name=
"READ_WRITE_HS", &
344 description=
"Requests reading of the electrode Hamiltonian and overlap matrices from a file."// &
345 " If at least one of these files doesn't exist, all Hamiltonian and overlap matrices"// &
346 " are calculated and saved. If no name is specified by FILENAME, the default file names are"// &
347 " projectname-Nn-H00, projectname-Nn-H01, projectname-Nn-S00, projectname-Nn-S01"// &
348 " for restricted calculations with identical spin population, or"// &
349 " projectname-Nn-H00-Ss, projectname-Nn-H01-Ss, projectname-Nn-S00-Ss, projectname-Nn-S01-Ss"// &
350 " for unrestricted calculations with two spin components,"// &
351 " where n is the number of the contact and s is the spin index."// &
352 " Otherwise, projectname is modified. Note that the code does not distinguish"// &
353 " between the files created by a separate electrode or the entire system.", &
354 default_l_val=.false., lone_keyword_l_val=.true.)
361 END SUBROUTINE create_contact_section
372 SUBROUTINE create_atomlist_section(section, name, description, repeats)
374 CHARACTER(len=*),
INTENT(in) :: name, description
375 LOGICAL,
INTENT(in) :: repeats
379 cpassert(.NOT.
ASSOCIATED(section))
381 CALL section_create(section, __location__, name=trim(adjustl(name)), &
382 description=
"Atoms belonging to "//trim(adjustl(description)), &
383 n_keywords=2, n_subsections=0, repeats=repeats)
388 description=
"Specifies a list of atoms.", &
389 usage=
"LIST {integer} {integer} .. {integer}", repeats=.true., &
395 description=
"Specifies a list of named molecular fragments.", &
396 usage=
"MOLNAME WAT MEOH", repeats=.true., &
397 n_var=-1, type_of_var=
char_t)
400 END SUBROUTINE create_atomlist_section
408 SUBROUTINE create_print_program_run_info_section(section)
415 description=
"Controls the printing of basic information during the NEGF.", &
419 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
420 description=
"Level starting at which this property is printed", &
421 usage=
"_SECTION_PARAMETERS_", &
423 enum_c_vals=
s2a(
"on",
"off",
"silent",
"low",
"medium",
"high",
"debug"), &
431 variants=[
"IOLEVEL"], &
432 description=
"Determines the verbose level for this section "// &
433 "additionally to GLOBAL%PRINT_LEVEL and SECTION_PARAMETERS, "// &
434 "which switch on printing.", &
435 usage=
"PRINT_LEVEL HIGH", &
437 s2a(
"SILENT",
"LOW",
"MEDIUM",
"HIGH",
"DEBUG"), &
438 enum_desc=
s2a(
"No output", &
439 "Little output",
"Quite some output",
"Lots of output", &
440 "Everything is written out, useful for debugging purposes only"), &
446 END SUBROUTINE create_print_program_run_info_section
456 SUBROUTINE create_print_dos_section(section, name, description)
458 CHARACTER(len=*),
INTENT(in) :: name, description
463 description=
"Controls the printing of "//trim(adjustl(description))//
".", &
468 description=
"Energy point to start with.", &
469 n_var=1, type_of_var=
real_t, unit_str=
"hartree", &
470 default_r_val=-1.0_dp)
475 description=
"Energy point to end with.", &
476 n_var=1, type_of_var=
real_t, unit_str=
"hartree", &
477 default_r_val=1.0_dp)
482 description=
"Number of points to compute.", &
483 n_var=1, type_of_var=
integer_t, default_i_val=201)
486 END SUBROUTINE create_print_dos_section
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public papior2017
integer, save, public bailey2006
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer, parameter, public debug_print_level
integer, parameter, public low_print_level
integer, parameter, public medium_print_level
integer, parameter, public high_print_level
integer, parameter, public silent_print_level
subroutine, public cp_print_key_section_create(print_key_section, location, name, description, print_level, each_iter_names, each_iter_values, add_last, filename, common_iter_levels, citations, unit_str)
creates a print_key section
Defines the basic variable types.
integer, parameter, public dp
Definition of physical constants:
real(kind=dp), parameter, public kelvin
module that contains the definitions of the scf types
subroutine, public create_mixing_section(section, ls_scf)
Create CP2K input section for the mixing of the density matrix to be used only with diagonalization m...
Utilities for string manipulations.