LCOV - code coverage report
Current view: top level - src - input_cp2k_as.F (source / functions) Coverage Total Hit
Test: CP2K Regtests (git:06f838d) Lines: 100.0 % 151 151
Test Date: 2026-06-05 07:04:50 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 function that build the active space section of the input
      10              : !> \par History
      11              : !>      10.2005 moved out of input_cp2k [fawzi]
      12              : !>      07.2024 moved out of input_cp2k_dft [JGH]
      13              : !> \author fawzi
      14              : ! **************************************************************************************************
      15              : MODULE input_cp2k_as
      16              :    USE cp_output_handling,              ONLY: 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: &
      23              :         casci_canonical, eri_method_full_gpw, eri_method_gpw_ht, eri_operator_coulomb, &
      24              :         eri_operator_erf, eri_operator_erfc, eri_operator_gaussian, eri_operator_lr_trunc, &
      25              :         eri_operator_trunc, eri_operator_yukawa, fci_solver, gaussian, manual_selection, &
      26              :         mao_projection, no_solver, qiskit_solver, wannier_projection
      27              :    USE input_cp2k_loc,                  ONLY: create_localize_section
      28              :    USE input_cp2k_xc,                   ONLY: create_xc_section
      29              :    USE input_keyword_types,             ONLY: keyword_create,&
      30              :                                               keyword_release,&
      31              :                                               keyword_type
      32              :    USE input_section_types,             ONLY: section_add_keyword,&
      33              :                                               section_add_subsection,&
      34              :                                               section_create,&
      35              :                                               section_release,&
      36              :                                               section_type
      37              :    USE input_val_types,                 ONLY: char_t,&
      38              :                                               integer_t,&
      39              :                                               lchar_t,&
      40              :                                               logical_t,&
      41              :                                               real_t
      42              :    USE kinds,                           ONLY: dp
      43              :    USE qs_density_mixing_types,         ONLY: create_mixing_section
      44              :    USE string_utilities,                ONLY: s2a
      45              : #include "./base/base_uses.f90"
      46              : 
      47              :    IMPLICIT NONE
      48              :    PRIVATE
      49              : 
      50              :    CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_as'
      51              : 
      52              :    PUBLIC :: create_active_space_section
      53              : 
      54              : CONTAINS
      55              : 
      56              : ! **************************************************************************************************
      57              : !> \brief      Create CP2K input section for the calculation of an active space Hamiltonian
      58              : !> \param section ...
      59              : !> \par History:
      60              : !>      - Creation 06.04.2016
      61              : !> \author     JHU
      62              : ! **************************************************************************************************
      63        10278 :    SUBROUTINE create_active_space_section(section)
      64              : 
      65              :       TYPE(section_type), POINTER                        :: section
      66              : 
      67              :       TYPE(keyword_type), POINTER                        :: keyword
      68              :       TYPE(section_type), POINTER                        :: print_key, subsection
      69              : 
      70        10278 :       CPASSERT(.NOT. ASSOCIATED(section))
      71              : 
      72              :       CALL section_create(section, __LOCATION__, name="ACTIVE_SPACE", &
      73              :                           description="Define parameters and method to calculate an electronic active space", &
      74        10278 :                           n_keywords=1, n_subsections=0, repeats=.FALSE.)
      75              : 
      76        10278 :       NULLIFY (keyword, subsection, print_key)
      77              : 
      78              :       CALL keyword_create(keyword, __LOCATION__, &
      79              :                           name="_SECTION_PARAMETERS_", &
      80              :                           description="Controls the activation of the ACTIVE_SPACE section", &
      81              :                           usage="&ACTIVE_SPACE ON", &
      82              :                           default_l_val=.FALSE., &
      83        10278 :                           lone_keyword_l_val=.TRUE.)
      84        10278 :       CALL section_add_keyword(section, keyword)
      85        10278 :       CALL keyword_release(keyword)
      86              : 
      87              :       CALL keyword_create(keyword, __LOCATION__, name="ACTIVE_ELECTRONS", &
      88              :                           description="The number of active electrons in the CAS space", &
      89        10278 :                           usage="ACTIVE_ELECTRONS 4", n_var=1, default_i_val=-1, type_of_var=integer_t)
      90        10278 :       CALL section_add_keyword(section, keyword)
      91        10278 :       CALL keyword_release(keyword)
      92              : 
      93              :       CALL keyword_create(keyword, __LOCATION__, name="ACTIVE_ORBITALS", &
      94              :                           description="The number of active orbitals defining the CAS space.", &
      95        10278 :                           usage="ACTIVE_ORBITALS 2", n_var=1, default_i_val=-1, type_of_var=integer_t)
      96        10278 :       CALL section_add_keyword(section, keyword)
      97        10278 :       CALL keyword_release(keyword)
      98              : 
      99              :       CALL keyword_create(keyword, __LOCATION__, name="ACTIVE_ORBITAL_INDICES", &
     100              :                           description="The indices of the active orbitals. Requires ORBITAL_SELECTION MANUAL! "// &
     101              :                           "Need to be as many indices as active orbitals times the number of spin "// &
     102              :                           "channels (2 if ROKS or UKS/LSD else 1).", &
     103              :                           usage="ACTIVE_ORBITAL_INDICES 2 3 {...}", n_var=-1, default_i_vals=[-1], &
     104        10278 :                           type_of_var=integer_t)
     105        10278 :       CALL section_add_keyword(section, keyword)
     106        10278 :       CALL keyword_release(keyword)
     107              : 
     108              :       CALL cp_print_key_section_create(print_key, __LOCATION__, "FCIDUMP", &
     109              :                                        description="Controls the writing of a file in FCIDUMP format.", &
     110        10278 :                                        print_level=high_print_level, filename="")
     111        10278 :       CALL section_add_subsection(section, print_key)
     112        10278 :       CALL section_release(print_key)
     113              : 
     114              :       CALL keyword_create(keyword, __LOCATION__, name="ORBITAL_SELECTION", &
     115              :                           description="Method used to select active space orbitals.", &
     116              :                           usage="ORBITAL_SELECTION CANONICAL", &
     117              :                           default_i_val=casci_canonical, &
     118              :                           enum_c_vals=s2a("CANONICAL", "WANNIER_PROJECTION", "MAO", "MANUAL"), &
     119              :                           enum_i_vals=[casci_canonical, wannier_projection, mao_projection, manual_selection], &
     120              :                           enum_desc=s2a("Select orbitals using energy ordering of canoncial orbitals", &
     121              :                                         "Select orbitals from projected Wannier functions", &
     122              :                                         "Select orbitals from modified atomic orbitals", &
     123        10278 :                                         "Select orbitals manually via ACTIVE_ORBITAL_INDICES"))
     124              : 
     125        10278 :       CALL section_add_keyword(section, keyword)
     126        10278 :       CALL keyword_release(keyword)
     127              : 
     128              :       CALL keyword_create(keyword, __LOCATION__, name="SUBSPACE_ATOM", &
     129              :                           description="Number of atom that defines the subspace to be projected on.", &
     130              :                           usage="SUBSPACE_ATOM x", default_i_val=-1, &
     131        10278 :                           type_of_var=integer_t)
     132        10278 :       CALL section_add_keyword(section, keyword)
     133        10278 :       CALL keyword_release(keyword)
     134              : 
     135              :       CALL keyword_create(keyword, __LOCATION__, name="SUBSPACE_SHELL", &
     136              :                           description="Shell definition for subsapce.", &
     137              :                           usage="SUBSPACE_SHELL 3d4s", default_c_val="X", &
     138        10278 :                           type_of_var=char_t)
     139        10278 :       CALL section_add_keyword(section, keyword)
     140        10278 :       CALL keyword_release(keyword)
     141              : 
     142              :       CALL keyword_create(keyword, __LOCATION__, name="SCF_EMBEDDING", &
     143              :                           description="Whether to turn on the self-consistent embedding scheme", &
     144        10278 :                           default_l_val=.FALSE., lone_keyword_l_val=.FALSE.)
     145        10278 :       CALL section_add_keyword(section, keyword)
     146        10278 :       CALL keyword_release(keyword)
     147              : 
     148              :       CALL keyword_create(keyword, __LOCATION__, name="QCSCHEMA", &
     149              :                           description="Name of the QCSchema file, may include a path", &
     150              :                           usage="QCSCHEMA <FILENAME>", &
     151              :                           type_of_var=lchar_t, repeats=.FALSE., &
     152        10278 :                           default_lc_val="")
     153        10278 :       CALL section_add_keyword(section, keyword)
     154        10278 :       CALL keyword_release(keyword)
     155              : 
     156              :       CALL keyword_create(keyword, __LOCATION__, name="AS_SOLVER", &
     157              :                           description="The active space solver for the embedding approach", &
     158              :                           usage="AS_SOLVER FCI", &
     159              :                           default_i_val=no_solver, &
     160              :                           enum_c_vals=s2a("NONE", "QISKIT", "FCI"), &
     161              :                           enum_i_vals=[no_solver, qiskit_solver, fci_solver], &
     162              :                           enum_desc=s2a("NO solver, used to produce FCIDUMP/QCSchema files", &
     163              :                                         "QISKIT active space solver", &
     164        10278 :                                         "LibFCI full-CI active space solver"))
     165        10278 :       CALL section_add_keyword(section, keyword)
     166        10278 :       CALL keyword_release(keyword)
     167              : 
     168              :       CALL keyword_create(keyword, __LOCATION__, name="EPS_ITER", &
     169              :                           description="Energy convergence threshold of the DFT embedding scheme.", &
     170              :                           usage="EPS_ITER 1.0E-6 ", type_of_var=real_t, &
     171        10278 :                           default_r_val=1.0E-6_dp)
     172        10278 :       CALL section_add_keyword(section, keyword)
     173        10278 :       CALL keyword_release(keyword)
     174              : 
     175              :       CALL keyword_create(keyword, __LOCATION__, name="ALPHA", &
     176              :                           description="Fraction of new density to be mixed with previous one in SCF embedding. "// &
     177              :                           "Kept for backwards compatibility; prefer ACTIVE_SPACE%MIXING%ALPHA.", &
     178              :                           usage="ALPHA 0.25", type_of_var=real_t, &
     179        10278 :                           default_r_val=0.8_dp)
     180        10278 :       CALL section_add_keyword(section, keyword)
     181        10278 :       CALL keyword_release(keyword)
     182              : 
     183              :       CALL keyword_create(keyword, __LOCATION__, name="MAX_ITER", &
     184              :                           description="Max number of iterations for the DFT embedding scheme.", &
     185              :                           usage="MAX_ITER 50", type_of_var=integer_t, &
     186        10278 :                           default_i_val=50)
     187        10278 :       CALL section_add_keyword(section, keyword)
     188        10278 :       CALL keyword_release(keyword)
     189              : 
     190        10278 :       CALL create_print_orb_section(subsection)
     191        10278 :       CALL section_add_subsection(section, subsection)
     192        10278 :       CALL section_release(subsection)
     193              : 
     194        10278 :       CALL create_eri_section(subsection)
     195        10278 :       CALL section_add_subsection(section, subsection)
     196        10278 :       CALL section_release(subsection)
     197              : 
     198        10278 :       CALL create_eri_gpw(subsection)
     199        10278 :       CALL section_add_subsection(section, subsection)
     200        10278 :       CALL section_release(subsection)
     201              : 
     202        10278 :       CALL create_localize_section(subsection)
     203        10278 :       CALL section_add_subsection(section, subsection)
     204        10278 :       CALL section_release(subsection)
     205              : 
     206        10278 :       CALL create_mixing_section(subsection)
     207        10278 :       CALL section_add_subsection(section, subsection)
     208        10278 :       CALL section_release(subsection)
     209              : 
     210        10278 :       CALL create_socket_section(subsection)
     211        10278 :       CALL section_add_subsection(section, subsection)
     212        10278 :       CALL section_release(subsection)
     213              : 
     214        10278 :       CALL create_xc_section(subsection)
     215        10278 :       CALL section_add_subsection(section, subsection)
     216        10278 :       CALL section_release(subsection)
     217              : 
     218        10278 :    END SUBROUTINE create_active_space_section
     219              : 
     220              : ! **************************************************************************************************
     221              : !> \brief ...
     222              : !> \param section ...
     223              : ! **************************************************************************************************
     224        10278 :    SUBROUTINE create_socket_section(section)
     225              :       TYPE(section_type), POINTER                        :: section
     226              : 
     227              :       TYPE(keyword_type), POINTER                        :: keyword
     228              : 
     229        10278 :       CPASSERT(.NOT. ASSOCIATED(section))
     230              :       CALL section_create(section, __LOCATION__, name="SOCKET", &
     231              :                           description="Parameters to set up the socket communicating to the external active space solver.", &
     232        10278 :                           n_keywords=3, n_subsections=0, repeats=.FALSE.)
     233              : 
     234        10278 :       NULLIFY (keyword)
     235              :       CALL keyword_create(keyword, __LOCATION__, name="INET", &
     236              :                           description="Use an INET socket rather than a UNIX socket.", &
     237              :                           usage="INET <LOGICAL>", &
     238        10278 :                           default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
     239        10278 :       CALL section_add_keyword(section, keyword)
     240        10278 :       CALL keyword_release(keyword)
     241              : 
     242              :       CALL keyword_create(keyword, __LOCATION__, name="PORT", &
     243              :                           description="Port number for the socket client.", &
     244              :                           usage="port <INTEGER>", &
     245        10278 :                           default_i_val=12345)
     246        10278 :       CALL section_add_keyword(section, keyword)
     247        10278 :       CALL keyword_release(keyword)
     248              : 
     249              :       CALL keyword_create(keyword, __LOCATION__, name="HOST", &
     250              :                           description="Host name for the socket client.", &
     251              :                           usage="host <HOSTNAME>", &
     252        10278 :                           default_c_val="embedding_socket")
     253        10278 :       CALL section_add_keyword(section, keyword)
     254        10278 :       CALL keyword_release(keyword)
     255              : 
     256        10278 :    END SUBROUTINE create_socket_section
     257              : 
     258              : ! **************************************************************************************************
     259              : !> \brief ...
     260              : !> \param section ...
     261              : ! **************************************************************************************************
     262        10278 :    SUBROUTINE create_print_orb_section(section)
     263              :       TYPE(section_type), POINTER                        :: section
     264              : 
     265              :       TYPE(keyword_type), POINTER                        :: keyword
     266              : 
     267        10278 :       CPASSERT(.NOT. ASSOCIATED(section))
     268              :       CALL section_create(section, __LOCATION__, name="PRINT_ORBITAL_CUBES", &
     269              :                           description="Controls printing of active orbital cube files.", &
     270        10278 :                           n_keywords=5, n_subsections=0, repeats=.FALSE.)
     271              : 
     272        10278 :       NULLIFY (keyword)
     273              :       CALL keyword_create(keyword, __LOCATION__, name="FILENAME", &
     274              :                           description="Body of Filename for the cube files.", &
     275              :                           usage="FILENAME {name}", default_c_val="ActiveOrbital", &
     276        10278 :                           type_of_var=char_t)
     277        10278 :       CALL section_add_keyword(section, keyword)
     278        10278 :       CALL keyword_release(keyword)
     279              : 
     280              :       CALL keyword_create(keyword, __LOCATION__, name="ALIST", &
     281              :                           description="List of alpha orbitals to be printed. -1 defaults to all values", &
     282              :                           usage="ALIST {1 2 3 ...}", n_var=-1, default_i_vals=[-1], &
     283        10278 :                           lone_keyword_i_val=-1, type_of_var=integer_t)
     284        10278 :       CALL section_add_keyword(section, keyword)
     285        10278 :       CALL keyword_release(keyword)
     286              : 
     287              :       CALL keyword_create(keyword, __LOCATION__, name="BLIST", &
     288              :                           description="List of beta orbitals to be printed. -1 defaults to all values", &
     289              :                           usage="BLIST {1 2 3 ...}", n_var=-1, default_i_vals=[-1], &
     290        10278 :                           lone_keyword_i_val=-1, type_of_var=integer_t)
     291        10278 :       CALL section_add_keyword(section, keyword)
     292        10278 :       CALL keyword_release(keyword)
     293              : 
     294              :       CALL keyword_create(keyword, __LOCATION__, name="STRIDE", &
     295              :                           description="The stride (X,Y,Z) used to write the cube file"// &
     296              :                           " (larger values result in smaller cube files)."// &
     297              :                           " You can provide 3 numbers (for X,Y,Z) or 1 number valid for all components", &
     298              :                           usage="STRIDE {2 2 2}", n_var=-1, default_i_vals=[2, 2, 2], &
     299        10278 :                           type_of_var=integer_t)
     300        10278 :       CALL section_add_keyword(section, keyword)
     301        10278 :       CALL keyword_release(keyword)
     302              : 
     303              :       CALL keyword_create(keyword, __LOCATION__, name="STOP_AFTER_CUBES", &
     304              :                           description="Whether to stop the computation after printing the cubes.", &
     305        10278 :                           default_l_val=.FALSE., lone_keyword_l_val=.FALSE.)
     306        10278 :       CALL section_add_keyword(section, keyword)
     307        10278 :       CALL keyword_release(keyword)
     308              : 
     309        10278 :    END SUBROUTINE create_print_orb_section
     310              : 
     311              : ! **************************************************************************************************
     312              : !> \brief ...
     313              : !> \param section ...
     314              : ! **************************************************************************************************
     315        10278 :    SUBROUTINE create_eri_section(section)
     316              :       TYPE(section_type), POINTER                        :: section
     317              : 
     318              :       TYPE(keyword_type), POINTER                        :: keyword
     319              : 
     320        10278 :       CPASSERT(.NOT. ASSOCIATED(section))
     321              :       CALL section_create(section, __LOCATION__, name="ERI", &
     322              :                           description="Parameters for the electron repulsion integrals.", &
     323        10278 :                           n_keywords=5, n_subsections=0, repeats=.FALSE.)
     324              : 
     325        10278 :       NULLIFY (keyword)
     326              :       CALL keyword_create(keyword, __LOCATION__, name="METHOD", &
     327              :                           description="Method used in ERI calculation.", &
     328              :                           usage="METHOD FULL_GPW", &
     329              :                           enum_c_vals=s2a("FULL_GPW", "GPW_HALF_TRANSFORM"), &
     330              :                           enum_i_vals=[eri_method_full_gpw, eri_method_gpw_ht], &
     331              :                           enum_desc=s2a("Use the GPW approach with MOs", &
     332              :                                         "Use the GPW approach for half-transformed MO ERIs"), &
     333        10278 :                           default_i_val=eri_method_full_gpw)
     334        10278 :       CALL section_add_keyword(section, keyword)
     335        10278 :       CALL keyword_release(keyword)
     336              : 
     337              :       CALL keyword_create(keyword, __LOCATION__, name="OPERATOR", &
     338              :                           description="Operator used in ERI calculation.", &
     339              :                           usage="OPERATOR LONGRANGE", &
     340              :                           enum_c_vals=s2a("COULOMB", "YUKAWA", "LONGRANGE", &
     341              :                                           "SHORTRANGE", "GAUSSIAN", "TRUNCATED", "LR_TRUNC"), &
     342              :                           enum_i_vals=[eri_operator_coulomb, eri_operator_yukawa, &
     343              :                                        eri_operator_erf, eri_operator_erfc, eri_operator_gaussian, &
     344              :                                        eri_operator_trunc, eri_operator_lr_trunc], &
     345              :                           enum_desc=s2a("Coulomb operator: 1/r", &
     346              :                                         "Yukawa operator: exp(-omega*R)/R", &
     347              :                                         "Longrange operator: erf(omega*R)/R", &
     348              :                                         "Shortrange operator: erfc(omega*R)/R", &
     349              :                                         "Gaussian operator: exp(-omega*R2)/R", &
     350              :                                         "Truncated Coulomb operator: if (R < R_c) 1/R else 0)", &
     351              :                                         "Truncated longrange operator: if (R < R_c) erf(omega*R)/R else 0"), &
     352        10278 :                           default_i_val=eri_operator_coulomb)
     353        10278 :       CALL section_add_keyword(section, keyword)
     354        10278 :       CALL keyword_release(keyword)
     355              : 
     356              :       CALL keyword_create(keyword, __LOCATION__, name="PERIODICITY", &
     357              :                           description="Periodicity used for operators in ERI calclulation.", &
     358              :                           usage="PERIODICITY 1 1 1", n_var=-1, default_i_vals=[0, 0, 0], &
     359        10278 :                           type_of_var=integer_t)
     360        10278 :       CALL section_add_keyword(section, keyword)
     361        10278 :       CALL keyword_release(keyword)
     362              : 
     363              :       CALL keyword_create(keyword, __LOCATION__, name="OMEGA", &
     364              :                           description="Range-separation parameter for ERI operator.", &
     365              :                           usage="OMEGA 0.25", type_of_var=real_t, &
     366        10278 :                           default_r_val=0.4_dp)
     367        10278 :       CALL section_add_keyword(section, keyword)
     368        10278 :       CALL keyword_release(keyword)
     369              : 
     370              :       CALL keyword_create(keyword, __LOCATION__, name="CUTOFF_RADIUS", &
     371              :                           description="Cutoff radius (in Angstroms) for the truncated 1/r and "// &
     372              :                           "longrange potentials. "// &
     373              :                           "Only valid when doing truncated calculations.", &
     374              :                           usage="CUTOFF_RADIUS 10.0", type_of_var=real_t, &
     375        10278 :                           unit_str="angstrom", default_r_val=0.0_dp)
     376        10278 :       CALL section_add_keyword(section, keyword)
     377        10278 :       CALL keyword_release(keyword)
     378              : 
     379              :       CALL keyword_create( &
     380              :          keyword, __LOCATION__, name="EPS_INTEGRAL", &
     381              :          description="Accuracy of ERIs that will be stored.", &
     382              :          usage="EPS_INTEGRAL 1.0E-10 ", type_of_var=real_t, &
     383        10278 :          default_r_val=1.0E-12_dp)
     384        10278 :       CALL section_add_keyword(section, keyword)
     385        10278 :       CALL keyword_release(keyword)
     386              : 
     387        10278 :    END SUBROUTINE create_eri_section
     388              : 
     389              : ! **************************************************************************************************
     390              : !> \brief ...
     391              : !> \param section ...
     392              : ! **************************************************************************************************
     393        10278 :    SUBROUTINE create_eri_gpw(section)
     394              :       TYPE(section_type), POINTER                        :: section
     395              : 
     396              :       TYPE(keyword_type), POINTER                        :: keyword
     397              : 
     398        10278 :       CPASSERT(.NOT. ASSOCIATED(section))
     399              :       CALL section_create(section, __LOCATION__, name="ERI_GPW", &
     400              :                           description="Parameters for the GPW approach to electron repulsion integrals.", &
     401        10278 :                           n_keywords=5, n_subsections=0, repeats=.FALSE.)
     402              : 
     403        10278 :       NULLIFY (keyword)
     404              :       CALL keyword_create(keyword, __LOCATION__, name="EPS_GRID", &
     405              :                           description="Determines a threshold for the GPW based integration", &
     406              :                           usage="EPS_GRID 1.0E-9 ", type_of_var=real_t, &
     407        10278 :                           default_r_val=1.0E-8_dp)
     408        10278 :       CALL section_add_keyword(section, keyword)
     409        10278 :       CALL keyword_release(keyword)
     410              : 
     411              :       CALL keyword_create(keyword, __LOCATION__, name="EPS_FILTER", &
     412              :                           description="Determines a threshold for the sparse matrix multiplications if METHOD "// &
     413              :                           "GPW_HALF_TRANSFORM is used", &
     414              :                           usage="EPS_FILTER 1.0E-9 ", type_of_var=real_t, &
     415        10278 :                           default_r_val=1.0E-9_dp)
     416        10278 :       CALL section_add_keyword(section, keyword)
     417        10278 :       CALL keyword_release(keyword)
     418              : 
     419              :       CALL keyword_create(keyword, __LOCATION__, name="CUTOFF", &
     420              :                           description="The cutoff of the finest grid level in the GPW integration.", &
     421              :                           usage="CUTOFF 300", type_of_var=real_t, &
     422        10278 :                           default_r_val=300.0_dp)
     423        10278 :       CALL section_add_keyword(section, keyword)
     424        10278 :       CALL keyword_release(keyword)
     425              : 
     426              :       CALL keyword_create(keyword, __LOCATION__, name="REL_CUTOFF", &
     427              :                           variants=["RELATIVE_CUTOFF"], &
     428              :                           description="Determines the grid at which a Gaussian is mapped.", &
     429              :                           usage="REL_CUTOFF 50", type_of_var=real_t, &
     430        20556 :                           default_r_val=50.0_dp)
     431        10278 :       CALL section_add_keyword(section, keyword)
     432        10278 :       CALL keyword_release(keyword)
     433              : 
     434              :       CALL keyword_create(keyword, __LOCATION__, name="STORE_WFN", &
     435              :                           variants=["STORE_WAVEFUNCTION"], &
     436              :                           description="Store wavefunction in real space representation for integration.", &
     437              :                           usage="STORE_WFN  T", type_of_var=logical_t, &
     438        20556 :                           default_l_val=.TRUE., lone_keyword_l_val=.TRUE.)
     439        10278 :       CALL section_add_keyword(section, keyword)
     440        10278 :       CALL keyword_release(keyword)
     441              : 
     442              :       CALL keyword_create(keyword, __LOCATION__, name="GROUP_SIZE", &
     443              :                           description="Sets the size of a subgroup for ERI calculation, "// &
     444              :                           "each of which with a full set of work grids, arrays or orbitals "// &
     445              :                           "depending on the method of grids (work grids, arrays, orbitals). "// &
     446              :                           "Small numbers reduce communication but increase the memory demands. "// &
     447              :                           "A negative number indicates all processes (default).", &
     448              :                           usage="GROUP_SIZE 2", type_of_var=integer_t, &
     449        10278 :                           default_i_val=-1)
     450        10278 :       CALL section_add_keyword(section, keyword)
     451        10278 :       CALL keyword_release(keyword)
     452              : 
     453              :       CALL keyword_create(keyword, __LOCATION__, name="PRINT_LEVEL", &
     454              :                           variants=["IOLEVEL"], &
     455              :                           description="How much output is written by the individual groups.", &
     456              :                           usage="PRINT_LEVEL HIGH", &
     457              :                           default_i_val=silent_print_level, enum_c_vals= &
     458              :                           s2a("SILENT", "LOW", "MEDIUM", "HIGH", "DEBUG"), &
     459              :                           enum_desc=s2a("Almost no output", &
     460              :                                         "Little output", "Quite some output", "Lots of output", &
     461              :                                         "Everything is written out, useful for debugging purposes only"), &
     462              :                           enum_i_vals=[silent_print_level, low_print_level, medium_print_level, &
     463        20556 :                                        high_print_level, debug_print_level])
     464        10278 :       CALL section_add_keyword(section, keyword)
     465        10278 :       CALL keyword_release(keyword)
     466              : 
     467        10278 :    END SUBROUTINE create_eri_gpw
     468              : 
     469              : END MODULE input_cp2k_as
        

Generated by: LCOV version 2.0-1