38 #include "./base/base_uses.f90"
43 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_negf'
56 TYPE(section_type),
POINTER :: section
58 TYPE(keyword_type),
POINTER :: keyword
59 TYPE(section_type),
POINTER :: print_key, subsection
61 cpassert(.NOT.
ASSOCIATED(section))
63 description=
"Parameters which control quantum transport calculation"// &
64 " based on Non-Equilibrium Green's 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)
240 TYPE(section_type),
POINTER :: section
242 TYPE(keyword_type),
POINTER :: keyword
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.)
300 description=
"Electronic temperature.", &
301 n_var=1, type_of_var=
real_t, unit_str=
"K", &
302 default_r_val=300.0_dp/
kelvin)
307 CALL section_create(subsection, __location__,
"PRINT",
"Print properties for the given contact.", &
310 CALL create_print_dos_section(print_key,
"DOS",
"the Density of States (DOS)")
317 END SUBROUTINE create_contact_section
328 SUBROUTINE create_atomlist_section(section, name, description, repeats)
329 TYPE(section_type),
POINTER :: section
330 CHARACTER(len=*),
INTENT(in) :: name, description
331 LOGICAL,
INTENT(in) :: repeats
333 TYPE(keyword_type),
POINTER :: keyword
335 cpassert(.NOT.
ASSOCIATED(section))
337 CALL section_create(section, __location__, name=trim(adjustl(name)), &
338 description=
"Atoms belonging to "//trim(adjustl(description)), &
339 n_keywords=2, n_subsections=0, repeats=repeats)
344 description=
"Specifies a list of atoms.", &
345 usage=
"LIST {integer} {integer} .. {integer}", repeats=.true., &
351 description=
"Specifies a list of named molecular fragments.", &
352 usage=
"MOLNAME WAT MEOH", repeats=.true., &
353 n_var=-1, type_of_var=
char_t)
356 END SUBROUTINE create_atomlist_section
364 SUBROUTINE create_print_program_run_info_section(section)
366 TYPE(section_type),
POINTER :: section
368 TYPE(keyword_type),
POINTER :: keyword
371 description=
"Controls the printing of basic information during the NEGF.", &
375 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
376 description=
"Level starting at which this property is printed", &
377 usage=
"_SECTION_PARAMETERS_", &
379 enum_c_vals=s2a(
"on",
"off",
"silent",
"low",
"medium",
"high",
"debug"), &
387 variants=(/
"IOLEVEL"/), &
388 description=
"Determines the verbose level for this section "// &
389 "additionally to GLOBAL%PRINT_LEVEL and SECTION_PARAMETERS, "// &
390 "which switch on printing.", &
391 usage=
"PRINT_LEVEL HIGH", &
393 s2a(
"SILENT",
"LOW",
"MEDIUM",
"HIGH",
"DEBUG"), &
394 enum_desc=s2a(
"No output", &
395 "Little output",
"Quite some output",
"Lots of output", &
396 "Everything is written out, useful for debugging purposes only"), &
402 END SUBROUTINE create_print_program_run_info_section
412 SUBROUTINE create_print_dos_section(section, name, description)
413 TYPE(section_type),
POINTER :: section
414 CHARACTER(len=*),
INTENT(in) :: name, description
416 TYPE(keyword_type),
POINTER :: keyword
419 description=
"Controls the printing of "//trim(adjustl(description))//
".", &
424 description=
"Energy point to start with.", &
425 n_var=1, type_of_var=
real_t, unit_str=
"hartree", &
426 default_r_val=-1.0_dp)
431 description=
"Energy point to end with.", &
432 n_var=1, type_of_var=
real_t, unit_str=
"hartree", &
433 default_r_val=1.0_dp)
438 description=
"Number of points to compute.", &
439 n_var=1, type_of_var=
integer_t, default_i_val=201)
442 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.