29#include "./base/base_uses.f90"
34 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_harris'
50 cpassert(.NOT.
ASSOCIATED(section))
54 description=
"Sets the various options for the Harris method", &
55 n_keywords=15, n_subsections=0, repeats=.false.)
57 CALL keyword_create(keyword, __location__, name=
"_SECTION_PARAMETERS_", &
58 description=
"Controls the activation of the Harris method", &
59 usage=
"&HARRIS_METHOD T", &
60 default_l_val=.false., &
61 lone_keyword_l_val=.true.)
65 CALL keyword_create(keyword, __location__, name=
"ENERGY_FUNCTIONAL", &
66 description=
"Functional used in energy correction", &
67 usage=
"ENERGY_FUNCTIONAL HARRIS", &
69 enum_c_vals=
s2a(
"HARRIS"), &
70 enum_desc=
s2a(
"Harris functional"), &
75 CALL keyword_create(keyword, __location__, name=
"DENSITY_SOURCE", &
76 description=
"Method to create the input density", &
77 usage=
"DENSITY_SOURCE ATOMIC", &
79 enum_c_vals=
s2a(
"ATOMIC",
"CUBE",
"CUBE_FIT"), &
80 enum_desc=
s2a(
"Atomic densities", &
81 "Electron density read directly from a Gaussian cube file", &
82 "Cube density fitted by a constrained AO density matrix. "// &
83 "This dense reference method currently requires GPW, a "// &
84 "spin-restricted calculation, and the Gamma point"), &
90 description=
"Filename of the electron density in Gaussian cube format. "// &
91 "Used when DENSITY_SOURCE is CUBE or CUBE_FIT. The cube grid has to coincide with "// &
92 "the finest CP2K real-space grid.", &
93 usage=
"FILE_DENSITY <FILENAME>", &
94 type_of_var=
char_t, default_c_val=
"", n_var=1)
99 description=
"Objective used to reconstruct an AO density matrix for CUBE_FIT. "// &
100 "RELATIVE_ENTROPY uses the frozen H[n_cube] Fermi matrix as a physical prior. "// &
101 "The current implementation is a dense cubic reference method.", &
102 usage=
"FIT_METHOD LEAST_SQUARES", &
104 enum_c_vals=
s2a(
"LEAST_SQUARES",
"RELATIVE_ENTROPY"), &
105 enum_desc=
s2a(
"Constrained least-squares density fit", &
106 "Fermionic relative-entropy/Mermin reconstruction with H[n_cube] prior"), &
112 description=
"Maximum number of projected-gradient iterations for CUBE_FIT.", &
113 usage=
"FIT_MAX_ITER 50", default_i_val=50)
118 description=
"Target RMS error of the fitted density for CUBE_FIT.", &
119 usage=
"FIT_EPS 1.0E-3", default_r_val=1.0e-3_dp)
123 CALL keyword_create(keyword, __location__, name=
"FIT_STEP_SIZE", &
124 description=
"Initial spectral projected-gradient step size for CUBE_FIT.", &
125 usage=
"FIT_STEP_SIZE 1.0", default_r_val=1.0_dp)
129 CALL keyword_create(keyword, __location__, name=
"FIT_MAX_BACKTRACK", &
130 description=
"Maximum number of line-search reductions in each CUBE_FIT iteration.", &
131 usage=
"FIT_MAX_BACKTRACK 20", default_i_val=20)
135 CALL keyword_create(keyword, __location__, name=
"FIT_TEMPERATURE", &
136 description=
"Electronic temperature of the Fermi-matrix prior used by "// &
137 "FIT_METHOD RELATIVE_ENTROPY.", &
138 usage=
"FIT_TEMPERATURE [K] 300", &
139 default_r_val=300.0_dp/
kelvin, unit_str=
"K")
143 CALL keyword_create(keyword, __location__, name=
"FIT_RELATIVE_ENTROPY_WEIGHT", &
144 description=
"Weight multiplying the dimensionless fermionic relative entropy "// &
145 "in the regularized CUBE_FIT objective.", &
146 usage=
"FIT_RELATIVE_ENTROPY_WEIGHT 1.0E-3", default_r_val=1.0e-3_dp)
150 CALL keyword_create(keyword, __location__, name=
"DIRECT_DENSITY_MATRIX_ENERGY", &
151 description=
"Evaluate the fitted AO density matrix directly, without a NONSCF "// &
152 "eigensolver. Requires DENSITY_SOURCE CUBE_FIT. CP2K reports both the "// &
153 "consistent trial-density-matrix energy and a Harris-like energy based on "// &
154 "the original cube density.", &
155 usage=
"DIRECT_DENSITY_MATRIX_ENERGY T", default_l_val=.false., &
156 lone_keyword_l_val=.true.)
160 CALL keyword_create(keyword, __location__, name=
"ORBITAL_BASIS", &
161 description=
"Specifies the type of basis to be used for the energy functional. ", &
163 enum_c_vals=
s2a(
"ATOMIC_KIND_BASIS"), &
164 enum_desc=
s2a(
"Atomic kind orbital basis"), &
170 description=
"Additional output to debug Harris method forces.", &
171 usage=
"DEBUG_FORCES T", default_l_val=.false., lone_keyword_l_val=.true.)
175 description=
"Additional output to debug Harris method stress.", &
176 usage=
"DEBUG_STRESS T", default_l_val=.false., lone_keyword_l_val=.true.)
Defines the basic variable types.
integer, parameter, public dp
Definition of physical constants:
real(kind=dp), parameter, public kelvin
Utilities for string manipulations.