LCOV - code coverage report
Current view: top level - src - input_cp2k_negf.F (source / functions) Coverage Total Hit
Test: CP2K Regtests (git:ca6acae) Lines: 99.4 % 161 160
Test Date: 2026-01-02 06:29:53 Functions: 100.0 % 5 5

            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: cp_print_key_section_create,&
      16              :                                               debug_print_level,&
      17              :                                               high_print_level,&
      18              :                                               low_print_level,&
      19              :                                               medium_print_level,&
      20              :                                               silent_print_level
      21              :    USE input_constants,                 ONLY: negfint_method_cc,&
      22              :                                               negfint_method_simpson
      23              :    USE input_keyword_types,             ONLY: keyword_create,&
      24              :                                               keyword_release,&
      25              :                                               keyword_type
      26              :    USE input_section_types,             ONLY: section_add_keyword,&
      27              :                                               section_add_subsection,&
      28              :                                               section_create,&
      29              :                                               section_release,&
      30              :                                               section_type
      31              :    USE input_val_types,                 ONLY: char_t,&
      32              :                                               integer_t,&
      33              :                                               real_t
      34              :    USE kinds,                           ONLY: dp
      35              :    USE physcon,                         ONLY: kelvin
      36              :    USE qs_density_mixing_types,         ONLY: create_mixing_section
      37              :    USE string_utilities,                ONLY: s2a
      38              : #include "./base/base_uses.f90"
      39              : 
      40              :    IMPLICIT NONE
      41              :    PRIVATE
      42              : 
      43              :    CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_negf'
      44              : 
      45              :    PUBLIC :: create_negf_section
      46              : 
      47              : CONTAINS
      48              : 
      49              : ! **************************************************************************************************
      50              : !> \brief Create NEGF input section.
      51              : !> \param section input section
      52              : !> \par History
      53              : !>    * 02.2017 created [Sergey Chulkov]
      54              : ! **************************************************************************************************
      55         9296 :    SUBROUTINE create_negf_section(section)
      56              :       TYPE(section_type), POINTER                        :: section
      57              : 
      58              :       TYPE(keyword_type), POINTER                        :: keyword
      59              :       TYPE(section_type), POINTER                        :: print_key, subsection
      60              : 
      61         9296 :       CPASSERT(.NOT. ASSOCIATED(section))
      62              :       CALL section_create(section, __LOCATION__, name="NEGF", &
      63              :                           description="Parameters which control quantum transport calculation"// &
      64              :                           " based on Non-Equilibrium Green Function method.", &
      65              :                           citations=[Bailey2006, Papior2017], &
      66        27888 :                           n_keywords=18, n_subsections=6, repeats=.FALSE.)
      67              : 
      68         9296 :       NULLIFY (keyword, print_key, subsection)
      69              : 
      70         9296 :       CALL create_contact_section(subsection)
      71         9296 :       CALL section_add_subsection(section, subsection)
      72         9296 :       CALL section_release(subsection)
      73              : 
      74         9296 :       CALL create_atomlist_section(subsection, "SCATTERING_REGION", "Defines atoms which form the scattering region.", .FALSE.)
      75         9296 :       CALL section_add_subsection(section, subsection)
      76         9296 :       CALL section_release(subsection)
      77              : 
      78              :       ! mixing section
      79         9296 :       CALL create_mixing_section(subsection, ls_scf=.FALSE.)
      80         9296 :       CALL section_add_subsection(section, subsection)
      81         9296 :       CALL section_release(subsection)
      82              : 
      83              :       CALL keyword_create(keyword, __LOCATION__, name="DISABLE_CACHE", &
      84              :                           description="Do not keep contact self-energy matrices for future reuse", &
      85         9296 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
      86         9296 :       CALL section_add_keyword(section, keyword)
      87         9296 :       CALL keyword_release(keyword)
      88              : 
      89              :       ! convergence thresholds
      90              :       CALL keyword_create(keyword, __LOCATION__, name="EPS_DENSITY", &
      91              :                           description="Target accuracy for electronic density.", &
      92         9296 :                           n_var=1, type_of_var=real_t, default_r_val=1.0e-5_dp)
      93         9296 :       CALL section_add_keyword(section, keyword)
      94         9296 :       CALL keyword_release(keyword)
      95              : 
      96              :       CALL keyword_create(keyword, __LOCATION__, name="EPS_GREEN", &
      97              :                           description="Target accuracy for surface Green's functions.", &
      98         9296 :                           n_var=1, type_of_var=real_t, default_r_val=1.0e-5_dp)
      99         9296 :       CALL section_add_keyword(section, keyword)
     100         9296 :       CALL keyword_release(keyword)
     101              : 
     102              :       CALL keyword_create(keyword, __LOCATION__, name="EPS_SCF", &
     103              :                           description="Target accuracy for SCF convergence.", &
     104         9296 :                           n_var=1, type_of_var=real_t, default_r_val=1.0e-5_dp)
     105         9296 :       CALL section_add_keyword(section, keyword)
     106         9296 :       CALL keyword_release(keyword)
     107              : 
     108              :       CALL keyword_create(keyword, __LOCATION__, name="EPS_GEO", &
     109              :                           description="Accuracy in mapping atoms between different force environments.", &
     110              :                           n_var=1, type_of_var=real_t, unit_str="angstrom", &
     111         9296 :                           default_r_val=1.0e-6_dp)
     112         9296 :       CALL section_add_keyword(section, keyword)
     113         9296 :       CALL keyword_release(keyword)
     114              : 
     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         9296 :                           default_r_val=-5.0_dp)
     119         9296 :       CALL section_add_keyword(section, keyword)
     120         9296 :       CALL keyword_release(keyword)
     121              : 
     122              :       CALL keyword_create(keyword, __LOCATION__, name="ETA", &
     123              :                           description="Infinitesimal offset from the real axis.", &
     124              :                           n_var=1, type_of_var=real_t, unit_str="hartree", &
     125         9296 :                           default_r_val=1.0e-5_dp)
     126         9296 :       CALL section_add_keyword(section, keyword)
     127         9296 :       CALL keyword_release(keyword)
     128              : 
     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         9296 :                           default_r_val=0.2_dp)
     135         9296 :       CALL section_add_keyword(section, keyword)
     136         9296 :       CALL keyword_release(keyword)
     137              : 
     138              :       CALL keyword_create(keyword, __LOCATION__, name="DELTA_NPOLES", &
     139              :                           description="Number of poles of Fermi function to consider.", &
     140              :                           n_var=1, type_of_var=integer_t, &
     141         9296 :                           default_i_val=4)
     142         9296 :       CALL section_add_keyword(section, keyword)
     143         9296 :       CALL keyword_release(keyword)
     144              : 
     145              :       CALL keyword_create(keyword, __LOCATION__, name="GAMMA_KT", &
     146              :                           description="Offset from the axis (in terms of k*T)"// &
     147              :                           " where poles of the Fermi function reside.", &
     148              :                           n_var=1, type_of_var=integer_t, &
     149         9296 :                           default_i_val=20)
     150         9296 :       CALL section_add_keyword(section, keyword)
     151         9296 :       CALL keyword_release(keyword)
     152              : 
     153              :       CALL keyword_create(keyword, __LOCATION__, name="INTEGRATION_METHOD", &
     154              :                           description="Method to integrate Green's functions along a closed-circuit contour.", &
     155              :                           default_i_val=negfint_method_cc, &
     156              :                           enum_c_vals=s2a("CLENSHAW-CURTIS", "SIMPSON"), &
     157              :                           enum_desc=s2a( &
     158              :                           "Adaptive Clenshaw-Curtis quadrature method. Requires FFTW3 library.", &
     159              :                           "Adaptive Simpson method. Works without FFTW3."), &
     160         9296 :                           enum_i_vals=[negfint_method_cc, negfint_method_simpson])
     161         9296 :       CALL section_add_keyword(section, keyword)
     162         9296 :       CALL keyword_release(keyword)
     163              : 
     164              :       CALL keyword_create(keyword, __LOCATION__, name="INTEGRATION_MIN_POINTS", &
     165              :                           description="Initial (minimal) number of grid point for adaptive numerical integration.", &
     166              :                           n_var=1, type_of_var=integer_t, &
     167         9296 :                           default_i_val=16)
     168         9296 :       CALL section_add_keyword(section, keyword)
     169         9296 :       CALL keyword_release(keyword)
     170              : 
     171              :       CALL keyword_create(keyword, __LOCATION__, name="INTEGRATION_MAX_POINTS", &
     172              :                           description="Maximal number of grid point for adaptive numerical integration.", &
     173              :                           n_var=1, type_of_var=integer_t, &
     174         9296 :                           default_i_val=512)
     175         9296 :       CALL section_add_keyword(section, keyword)
     176         9296 :       CALL keyword_release(keyword)
     177              : 
     178              :       CALL keyword_create(keyword, __LOCATION__, name="MAX_SCF", &
     179              :                           description="Maximum number of SCF iterations to be performed.", &
     180              :                           n_var=1, type_of_var=integer_t, &
     181         9296 :                           default_i_val=30)
     182         9296 :       CALL section_add_keyword(section, keyword)
     183         9296 :       CALL keyword_release(keyword)
     184              : 
     185              :       CALL keyword_create(keyword, __LOCATION__, name="NPROC_POINT", &
     186              :                           description="Number of MPI processes to be used per energy point."// &
     187              :                           " Default is to use all processors (0).", &
     188              :                           n_var=1, type_of_var=integer_t, &
     189         9296 :                           default_i_val=0)
     190         9296 :       CALL section_add_keyword(section, keyword)
     191         9296 :       CALL keyword_release(keyword)
     192              : 
     193              :       CALL keyword_create(keyword, __LOCATION__, name="V_SHIFT", &
     194              :                           description="Initial value of the Hartree potential shift", &
     195              :                           n_var=1, type_of_var=real_t, unit_str="hartree", &
     196         9296 :                           default_r_val=0.0_dp)
     197         9296 :       CALL section_add_keyword(section, keyword)
     198         9296 :       CALL keyword_release(keyword)
     199              : 
     200              :       CALL keyword_create(keyword, __LOCATION__, name="V_SHIFT_OFFSET", &
     201              :                           description="Initial offset to determine the optimal shift in Hartree potential.", &
     202         9296 :                           n_var=1, type_of_var=real_t, default_r_val=0.10_dp)
     203         9296 :       CALL section_add_keyword(section, keyword)
     204         9296 :       CALL keyword_release(keyword)
     205              : 
     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         9296 :                           n_var=1, type_of_var=integer_t, default_i_val=30)
     209         9296 :       CALL section_add_keyword(section, keyword)
     210         9296 :       CALL keyword_release(keyword)
     211              : 
     212              :       ! PRINT subsection
     213              :       CALL section_create(subsection, __LOCATION__, "PRINT", "Printing of information during the NEGF.", &
     214         9296 :                           repeats=.FALSE.)
     215              : 
     216         9296 :       CALL create_print_program_run_info_section(print_key)
     217         9296 :       CALL section_add_subsection(subsection, print_key)
     218         9296 :       CALL section_release(print_key)
     219              : 
     220         9296 :       CALL create_print_dos_section(print_key, "DOS", "the Density of States (DOS) in the scattering region")
     221         9296 :       CALL section_add_subsection(subsection, print_key)
     222         9296 :       CALL section_release(print_key)
     223              : 
     224         9296 :       CALL create_print_dos_section(print_key, "TRANSMISSION", "the transmission coefficient")
     225         9296 :       CALL section_add_subsection(subsection, print_key)
     226         9296 :       CALL section_release(print_key)
     227              : 
     228         9296 :       CALL section_add_subsection(section, subsection)
     229         9296 :       CALL section_release(subsection)
     230              : 
     231         9296 :    END SUBROUTINE create_negf_section
     232              : 
     233              : ! **************************************************************************************************
     234              : !> \brief Create NEGF%CONTACT input section.
     235              : !> \param section input section
     236              : !> \par History
     237              : !>    * 09.2017 split from create_negf_section() [Sergey Chulkov]
     238              : ! **************************************************************************************************
     239         9296 :    SUBROUTINE create_contact_section(section)
     240              :       TYPE(section_type), POINTER                        :: section
     241              : 
     242              :       TYPE(keyword_type), POINTER                        :: keyword
     243              :       TYPE(section_type), POINTER                        :: print_key, subsection, subsection2
     244              : 
     245         9296 :       CPASSERT(.NOT. ASSOCIATED(section))
     246              : 
     247              :       CALL section_create(section, __LOCATION__, name="CONTACT", &
     248              :                           description="Section defining the contact region of NEGF setup.", &
     249         9296 :                           n_keywords=5, n_subsections=3, repeats=.TRUE.)
     250              : 
     251         9296 :       NULLIFY (keyword, print_key, subsection, subsection2)
     252              : 
     253              :       CALL create_atomlist_section(subsection, "BULK_REGION", &
     254         9296 :                                    "the bulk contact adjacent to the screening region.", .FALSE.)
     255         9296 :       CALL section_add_subsection(section, subsection)
     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         9296 :                                    "FORCE_EVAL_SECTION must be 0.", .TRUE.)
     260         9296 :       CALL section_add_subsection(subsection, subsection2)
     261         9296 :       CALL section_release(subsection2)
     262         9296 :       CALL section_release(subsection)
     263              : 
     264              :       CALL create_atomlist_section(subsection, "SCREENING_REGION", &
     265         9296 :                                    "the given contact adjacent to the scattering region.", .FALSE.)
     266         9296 :       CALL section_add_subsection(section, subsection)
     267         9296 :       CALL section_release(subsection)
     268              : 
     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         9296 :                           n_var=1, type_of_var=integer_t, default_i_val=0)
     272         9296 :       CALL section_add_keyword(section, keyword)
     273         9296 :       CALL keyword_release(keyword)
     274              : 
     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         9296 :                           default_r_val=0.0_dp)
     279         9296 :       CALL section_add_keyword(section, keyword)
     280         9296 :       CALL keyword_release(keyword)
     281              : 
     282              :       CALL keyword_create(keyword, __LOCATION__, name="FERMI_LEVEL", &
     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         9296 :                           default_r_val=0.0_dp)
     288         9296 :       CALL section_add_keyword(section, keyword)
     289         9296 :       CALL keyword_release(keyword)
     290              : 
     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         9296 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     296         9296 :       CALL section_add_keyword(section, keyword)
     297         9296 :       CALL keyword_release(keyword)
     298              : 
     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         9296 :                           default_r_val=0.0_dp)
     307         9296 :       CALL section_add_keyword(section, keyword)
     308         9296 :       CALL keyword_release(keyword)
     309              : 
     310              :       CALL keyword_create(keyword, __LOCATION__, name="TEMPERATURE", &
     311              :                           description="Electronic temperature.", &
     312              :                           n_var=1, type_of_var=real_t, unit_str="K", &
     313         9296 :                           default_r_val=300.0_dp/kelvin)
     314         9296 :       CALL section_add_keyword(section, keyword)
     315         9296 :       CALL keyword_release(keyword)
     316              : 
     317              :       ! PRINT subsection
     318              :       CALL section_create(subsection, __LOCATION__, "PRINT", "Print properties for the given contact.", &
     319         9296 :                           repeats=.FALSE.)
     320              : 
     321         9296 :       CALL create_print_dos_section(print_key, "DOS", "the Density of States (DOS)")
     322         9296 :       CALL section_add_subsection(subsection, print_key)
     323         9296 :       CALL section_release(print_key)
     324              : 
     325         9296 :       CALL section_add_subsection(section, subsection)
     326         9296 :       CALL section_release(subsection)
     327              : 
     328              :       ! RESTART subsection
     329              :       CALL section_create(subsection, __LOCATION__, "RESTART", &
     330         9296 :                           "Read and write restart files for the given contact.", repeats=.FALSE.)
     331              : 
     332              :       CALL keyword_create(keyword, __LOCATION__, name="FILENAME", &
     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 ", &
     339         9296 :                           default_lc_val="")
     340         9296 :       CALL section_add_keyword(subsection, keyword)
     341         9296 :       CALL keyword_release(keyword)
     342              : 
     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         9296 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     355         9296 :       CALL section_add_keyword(subsection, keyword)
     356         9296 :       CALL keyword_release(keyword)
     357              : 
     358         9296 :       CALL section_add_subsection(section, subsection)
     359         9296 :       CALL section_release(subsection)
     360              : 
     361         9296 :    END SUBROUTINE create_contact_section
     362              : 
     363              : ! **************************************************************************************************
     364              : !> \brief Create an atomic list section.
     365              : !> \param section              NEGF section
     366              : !> \param name                 name of the new section
     367              : !> \param description          section description
     368              : !> \param repeats              whether the section can be repeated
     369              : !> \par History
     370              : !>    * 02.2017 created [Sergey Chulkov]
     371              : ! **************************************************************************************************
     372        37184 :    SUBROUTINE create_atomlist_section(section, name, description, repeats)
     373              :       TYPE(section_type), POINTER                        :: section
     374              :       CHARACTER(len=*), INTENT(in)                       :: name, description
     375              :       LOGICAL, INTENT(in)                                :: repeats
     376              : 
     377              :       TYPE(keyword_type), POINTER                        :: keyword
     378              : 
     379            0 :       CPASSERT(.NOT. ASSOCIATED(section))
     380              : 
     381              :       CALL section_create(section, __LOCATION__, name=TRIM(ADJUSTL(name)), &
     382              :                           description="Atoms belonging to "//TRIM(ADJUSTL(description)), &
     383        37184 :                           n_keywords=2, n_subsections=0, repeats=repeats)
     384              : 
     385        37184 :       NULLIFY (keyword)
     386              : 
     387              :       CALL keyword_create(keyword, __LOCATION__, name="LIST", &
     388              :                           description="Specifies a list of atoms.", &
     389              :                           usage="LIST {integer} {integer} .. {integer}", repeats=.TRUE., &
     390        37184 :                           n_var=-1, type_of_var=integer_t)
     391        37184 :       CALL section_add_keyword(section, keyword)
     392        37184 :       CALL keyword_release(keyword)
     393              : 
     394              :       CALL keyword_create(keyword, __LOCATION__, name="MOLNAME", &
     395              :                           description="Specifies a list of named molecular fragments.", &
     396              :                           usage="MOLNAME WAT MEOH", repeats=.TRUE., &
     397        37184 :                           n_var=-1, type_of_var=char_t)
     398        37184 :       CALL section_add_keyword(section, keyword)
     399        37184 :       CALL keyword_release(keyword)
     400        37184 :    END SUBROUTINE create_atomlist_section
     401              : 
     402              : ! **************************************************************************************************
     403              : !> \brief Create the PROGRAM_RUN_INFO print section.
     404              : !> \param section              section to create
     405              : !> \par History
     406              : !>    * 11.2020 created [Dmitry Ryndyk]
     407              : ! **************************************************************************************************
     408         9296 :    SUBROUTINE create_print_program_run_info_section(section)
     409              : 
     410              :       TYPE(section_type), POINTER                        :: section
     411              : 
     412              :       TYPE(keyword_type), POINTER                        :: keyword
     413              : 
     414              :       CALL cp_print_key_section_create(section, __LOCATION__, "PROGRAM_RUN_INFO", &
     415              :                                        description="Controls the printing of basic information during the NEGF.", &
     416         9296 :                                        print_level=low_print_level, filename="__STD_OUT__")
     417         9296 :       NULLIFY (keyword)
     418              : 
     419              :       CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
     420              :                           description="Level starting at which this property is printed", &
     421              :                           usage="_SECTION_PARAMETERS_", &
     422              :                           default_i_val=low_print_level, lone_keyword_i_val=low_print_level, &
     423              :                           enum_c_vals=s2a("on", "off", "silent", "low", "medium", "high", "debug"), &
     424              :                           enum_i_vals=[silent_print_level - 1, debug_print_level + 1, &
     425              :                                        silent_print_level, low_print_level, &
     426         9296 :                                        medium_print_level, high_print_level, debug_print_level])
     427         9296 :       CALL section_add_keyword(section, keyword)
     428         9296 :       CALL keyword_release(keyword)
     429              : 
     430              :       CALL keyword_create(keyword, __LOCATION__, name="PRINT_LEVEL", &
     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", &
     436              :                           default_i_val=low_print_level, enum_c_vals= &
     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"), &
     441              :                           enum_i_vals=[silent_print_level, low_print_level, medium_print_level, &
     442        18592 :                                        high_print_level, debug_print_level])
     443         9296 :       CALL section_add_keyword(section, keyword)
     444         9296 :       CALL keyword_release(keyword)
     445              : 
     446         9296 :    END SUBROUTINE create_print_program_run_info_section
     447              : 
     448              : ! **************************************************************************************************
     449              : !> \brief Create the DOS print section.
     450              : !> \param section              section to create
     451              : !> \param name                 name of the new section
     452              : !> \param description          section description
     453              : !> \par History
     454              : !>    * 11.2017 created [Sergey Chulkov]
     455              : ! **************************************************************************************************
     456        27888 :    SUBROUTINE create_print_dos_section(section, name, description)
     457              :       TYPE(section_type), POINTER                        :: section
     458              :       CHARACTER(len=*), INTENT(in)                       :: name, description
     459              : 
     460              :       TYPE(keyword_type), POINTER                        :: keyword
     461              : 
     462              :       CALL cp_print_key_section_create(section, __LOCATION__, TRIM(ADJUSTL(name)), &
     463              :                                        description="Controls the printing of "//TRIM(ADJUSTL(description))//".", &
     464        27888 :                                        print_level=high_print_level, filename="__STD_OUT__")
     465        27888 :       NULLIFY (keyword)
     466              : 
     467              :       CALL keyword_create(keyword, __LOCATION__, name="FROM_ENERGY", &
     468              :                           description="Energy point to start with.", &
     469              :                           n_var=1, type_of_var=real_t, unit_str="hartree", &
     470        27888 :                           default_r_val=-1.0_dp)
     471        27888 :       CALL section_add_keyword(section, keyword)
     472        27888 :       CALL keyword_release(keyword)
     473              : 
     474              :       CALL keyword_create(keyword, __LOCATION__, name="TILL_ENERGY", &
     475              :                           description="Energy point to end with.", &
     476              :                           n_var=1, type_of_var=real_t, unit_str="hartree", &
     477        27888 :                           default_r_val=1.0_dp)
     478        27888 :       CALL section_add_keyword(section, keyword)
     479        27888 :       CALL keyword_release(keyword)
     480              : 
     481              :       CALL keyword_create(keyword, __LOCATION__, name="N_GRIDPOINTS", &
     482              :                           description="Number of points to compute.", &
     483        27888 :                           n_var=1, type_of_var=integer_t, default_i_val=201)
     484        27888 :       CALL section_add_keyword(section, keyword)
     485        27888 :       CALL keyword_release(keyword)
     486        27888 :    END SUBROUTINE create_print_dos_section
     487              : END MODULE input_cp2k_negf
        

Generated by: LCOV version 2.0-1