22#include "./base/base_uses.f90"
28 LOGICAL :: direct = .false.
29 LOGICAL :: sparse = .false.
30 REAL(kind=
dp) :: eps_diis = 1.0e-09_dp
31 REAL(kind=
dp) :: alpha = 0.75_dp
34 INTEGER :: max_diis = 500
35 INTEGER :: sparse_threshold = 256
38 CHARACTER(len=*),
PARAMETER,
PRIVATE :: modulen =
'eeq_input'
55 cpassert(.NOT.
ASSOCIATED(section))
57 description=
"Parameters needed for EEQ method and solver", &
58 n_keywords=1, n_subsections=1, repeats=.false.)
62 description=
"Use a direct method to solve the EEQ equations in PBC (matrix solver)", &
63 usage=
"DIRECT", default_l_val=.false., lone_keyword_l_val=.true.)
68 description=
"Use the matrix-free projected-CG solver for periodic EEQ. "// &
69 "The short-range response is stored sparsely and the translationally invariant "// &
70 "long-range Coulomb response is applied by the FFT-based SPME operator. "// &
71 "This path is shared by methods using CP2K EEQ charges, including GFN0-xTB "// &
72 "and the internal DFT-D4 implementation.", &
73 usage=
"SPARSE", default_l_val=.false., lone_keyword_l_val=.true.)
77 CALL keyword_create(keyword, __location__, name=
"SPARSE_THRESHOLD", &
78 description=
"Automatically use the sparse periodic EEQ solver at or above "// &
79 "this number of atoms for every method using CP2K EEQ charges. A non-positive "// &
80 "value disables automatic selection.", &
81 usage=
"SPARSE_THRESHOLD 256", default_i_val=256)
86 description=
"Accuracy for the iterative solver.", &
87 usage=
"EPS_DIIS 1.0E-10", default_r_val=1.0e-10_dp)
92 description=
"Step length of initial steepest descent steps.", &
93 usage=
"ALPHA 1.0", default_r_val=0.75_dp)
98 description=
"Max. number of iterations for EEQ solver.", &
99 usage=
"MAX_DIIS 100", default_i_val=500)
104 description=
"Max. number of DIIS vectors used.", &
105 usage=
"MDIIS 10", default_i_val=12)
110 description=
"Number of vectors accumulated before starting DIIS.", &
111 usage=
"SDIIS 4", default_i_val=3)
Defines the basic variable types.
integer, parameter, public dp