30#include "./base/base_uses.f90"
35 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_kpoints'
78 cpassert(.NOT.
ASSOCIATED(section))
80 description=
"Controls Brillouin-zone sampling with k-points.", &
81 n_keywords=1, n_subsections=0, repeats=.false.)
85 description=
"K-point generation scheme. Available options are:"//
newline// &
88 "- `MONKHORST-PACK`"//
newline// &
92 "For `MONKHORST-PACK` the number of k points in all 3 dimensions has to"// &
93 " be supplied along with the keyword. For `MACDONALD` also the list of shifts."// &
94 " E.g. `MONKHORST-PACK 12 12 8`, `MACDONALD 4 4 4 0.25 0.25 0.25`."// &
95 " `GENERAL` uses explicitly listed k-points. If symmetry reduction is requested,"// &
96 " the explicit set must be equally weighted and closed under the selected operations.", &
97 usage=
"SCHEME {KPMETHOD} {integer} {integer} ..", &
99 n_var=-1, type_of_var=
char_t)
103 CALL keyword_create(keyword, __location__, name=
"GAMMA_CENTERED", &
104 description=
"Generate a gamma-centered variant of the "// &
105 "Monkhorst-Pack or MacDonald mesh. This shifts the original mesh so "// &
106 "it can include the Gamma point, and makes sense only when an "// &
107 "even number of subdivisions is used. For MacDonald meshes, the "// &
108 "explicit shift is applied after the gamma-centering shift.", &
109 usage=
"GAMMA_CENTERED <LOGICAL>", &
110 default_l_val=.false., lone_keyword_l_val=.true.)
115 description=
"Specify kpoint coordinates and weight. ", &
116 usage=
"KPOINT x y z w", repeats=.true., &
117 n_var=4, type_of_var=
real_t)
122 description=
"Special k-points are defined either in units"// &
123 " of reciprocal lattice vectors or in Cartesian coordinates in units of 2Pi/len."// &
124 " B_VECTOR: in multiples of the reciprocal lattice vectors (b)."// &
125 " CART_ANGSTROM: In units of 2*Pi/Angstrom."// &
126 " CART_BOHR: In units of 2*Pi/Bohr.", &
127 usage=
"UNITS <value>", type_of_var=
char_t, default_c_val=
"B_VECTOR")
132 description=
"Use symmetry to reduce the number of kpoints.", &
133 usage=
"SYMMETRY <LOGICAL>", &
134 default_l_val=.false., lone_keyword_l_val=.true.)
139 description=
"Use the full, non-symmetry-reduced k-point grid.", &
140 usage=
"FULL_GRID <LOGICAL>", &
141 default_l_val=.false., lone_keyword_l_val=.true.)
145 CALL keyword_create(keyword, __location__, name=
"INVERSION_SYMMETRY_ONLY", &
146 description=
"Restrict k-point reduction to k-space inversion "// &
147 "(time-reversal) symmetry.", &
148 usage=
"INVERSION_SYMMETRY_ONLY <LOGICAL>", &
149 default_l_val=.false., lone_keyword_l_val=.true.)
153 CALL keyword_create(keyword, __location__, name=
"DEBUG_FULL_KPOINT_SYMMETRY", &
154 description=
"Use full atomic k-point symmetry also for DEBUG finite-difference "// &
155 "points. This is an expert option: the default keeps finite-difference energies "// &
156 "on inversion/time-reversal symmetry to avoid comparing slightly different "// &
157 "irreducible k-point sets.", &
158 usage=
"DEBUG_FULL_KPOINT_SYMMETRY <LOGICAL>", &
159 default_l_val=.false., lone_keyword_l_val=.true.)
163 CALL keyword_create(keyword, __location__, name=
"SYMMETRY_BACKEND", &
164 description=
"Select the backend used to provide and apply atomic "// &
165 "k-point symmetry operations. K290 is the established default. "// &
166 "SPGLIB uses the symmetry operations returned by SPGLIB, including "// &
167 "their fractional translations. This applies to Monkhorst-Pack, MacDonald, and "// &
168 "closed GENERAL k-point sets. If "// &
169 "SYMMETRY_REDUCTION_METHOD is not specified, it follows the selected backend.", &
170 usage=
"SYMMETRY_BACKEND K290", type_of_var=
enum_t, &
171 enum_c_vals=
s2a(
"K290",
"SPGLIB"), &
173 enum_desc=
s2a(
"Use the existing K290 k-point symmetry backend.", &
174 "Use SPGLIB symmetry operations as k-point symmetry backend."), &
179 CALL keyword_create(keyword, __location__, name=
"SYMMETRY_REDUCTION_METHOD", &
180 description=
"Select the method used to reduce Monkhorst-Pack and MacDonald "// &
181 "k-point meshes when atomic symmetry is enabled. K290 is the established "// &
182 "default. SPGLIB uses the symmetry operations returned by SPGLIB for the "// &
183 "k-point reduction. GENERAL k-point lists can be reduced when the explicit set is "// &
184 "equally weighted and closed under the selected operations. With "// &
185 "SYMMETRY_BACKEND K290 this can be used as a comparison mode using K290 "// &
186 "operations for SPGLIB-generated mappings.", &
187 usage=
"SYMMETRY_REDUCTION_METHOD K290", type_of_var=
enum_t, &
188 enum_c_vals=
s2a(
"K290",
"SPGLIB"), &
190 enum_desc=
s2a(
"Use the existing K290 k-point symmetry reduction method.", &
191 "Use SPGLIB symmetry operations for k-point reduction."), &
197 description=
"Verbose output information.", &
198 usage=
"VERBOSE <LOGICAL>", &
199 default_l_val=.false., lone_keyword_l_val=.true.)
203 CALL keyword_create(keyword, __location__, name=
"EPS_SYMMETRY", variants=[
"EPS_GEO"], &
204 description=
"Accuracy in k-point symmetry determination."//
newline// &
205 "EPS_GEO is accepted as an alias.", &
206 usage=
"EPS_SYMMETRY <real>", &
207 default_r_val=1.0e-6_dp)
211 CALL keyword_create(keyword, __location__, name=
"PARALLEL_GROUP_SIZE", &
212 description=
"Number of MPI processes to be used for a single k-point."// &
213 " This number must divide the total number of processes."// &
214 " The number of groups must divide the total number of kpoints."// &
215 " Value=-1 (smallest possible number of processes per group, satisfying the constraints)."// &
216 " Value=0 (all processes)."// &
217 " Value=n (exactly n processes).", &
218 usage=
"PARALLEL_GROUP_SIZE <integer>", &
223 CALL keyword_create(keyword, __location__, name=
"WAVEFUNCTIONS", &
224 description=
"Select whether real or complex wavefunctions should be used "// &
225 "when allowed by the k-point set. REAL wavefunctions can only represent "// &
226 "Gamma or special k-points and symmetry operations with real Bloch phases. "// &
227 "Use COMPLEX for general atomic k-point symmetries with nontrivial phases.", &
228 usage=
"WAVEFUNCTIONS REAL", &
230 enum_c_vals=
s2a(
"REAL",
"COMPLEX"), &
231 enum_desc=
s2a(
"Use real wavefunctions (if possible by kpoints specified).", &
232 "Use complex wavefunctions (default)."), &
247 CHARACTER(LEN=*),
OPTIONAL :: section_name
249 CHARACTER(len=default_path_length) :: my_section_name
252 IF (
PRESENT(section_name))
THEN
253 my_section_name = section_name
255 my_section_name =
"KPOINT_SET"
258 cpassert(.NOT.
ASSOCIATED(section))
259 CALL section_create(section, __location__, name=my_section_name, &
260 description=
"Specifies a k-point line to be calculated.", &
261 n_keywords=0, n_subsections=0, repeats=.true.)
264 CALL keyword_create(keyword, __location__, name=
"SPECIAL_POINT", &
265 description=
"Name and coordinates of a special k-point", &
266 usage=
"SPECIAL_POINT GAMMA 0.0 0.0 0.0", n_var=-1, type_of_var=
char_t, repeats=.true.)
271 description=
"Number of k-points along the line.", &
277 description=
"Special k-points are defined either in units"// &
278 " of reciprocal lattice vectors or in Cartesian coordinates in units of 2Pi/len."// &
279 " B_VECTOR: in multiples of the reciprocal lattice vectors (b)."// &
280 " CART_ANGSTROM: In units of 2*Pi/Angstrom."// &
281 " CART_BOHR: In units of 2*Pi/Bohr.", &
282 usage=
"UNITS <value>", type_of_var=
char_t, default_c_val=
"B_VECTOR")
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public monkhorst1976
integer, save, public macdonald1978
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_path_length
Utilities for string manipulations.
character(len=1), parameter, public newline