30#include "./base/base_uses.f90"
35 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'input_cp2k_kpoints'
77 cpassert(.NOT.
ASSOCIATED(section))
79 description=
"Controls Brillouin-zone sampling with k-points.", &
80 n_keywords=1, n_subsections=0, repeats=.false.)
84 description=
"K-point generation scheme. Available options are:"//
newline// &
87 "- `MONKHORST-PACK`"//
newline// &
91 "For `MONKHORST-PACK` the number of k points in all 3 dimensions has to"// &
92 " be supplied along with the keyword. For `MACDONALD` also the list of shifts."// &
93 " E.g. `MONKHORST-PACK 12 12 8`, `MACDONALD 4 4 4 0.25 0.25 0.25`."// &
94 " `GENERAL` uses the explicitly listed k-points as supplied and does not apply"// &
95 " SYMMETRY_BACKEND or SYMMETRY_REDUCTION_METHOD.", &
96 usage=
"SCHEME {KPMETHOD} {integer} {integer} ..", &
98 n_var=-1, type_of_var=
char_t)
103 description=
"Specify kpoint coordinates and weight. ", &
104 usage=
"KPOINT x y z w", repeats=.true., &
105 n_var=4, type_of_var=
real_t)
110 description=
"Special k-points are defined either in units"// &
111 " of reciprocal lattice vectors or in Cartesian coordinates in units of 2Pi/len."// &
112 " B_VECTOR: in multiples of the reciprocal lattice vectors (b)."// &
113 " CART_ANGSTROM: In units of 2*Pi/Angstrom."// &
114 " CART_BOHR: In units of 2*Pi/Bohr.", &
115 usage=
"UNITS <value>", type_of_var=
char_t, default_c_val=
"B_VECTOR")
120 description=
"Use symmetry to reduce the number of kpoints.", &
121 usage=
"SYMMETRY <LOGICAL>", &
122 default_l_val=.false., lone_keyword_l_val=.true.)
127 description=
"Use the full, non-symmetry-reduced k-point grid.", &
128 usage=
"FULL_GRID <LOGICAL>", &
129 default_l_val=.false., lone_keyword_l_val=.true.)
133 CALL keyword_create(keyword, __location__, name=
"INVERSION_SYMMETRY_ONLY", &
134 description=
"Restrict k-point reduction to k-space inversion "// &
135 "(time-reversal) symmetry.", &
136 usage=
"INVERSION_SYMMETRY_ONLY <LOGICAL>", &
137 default_l_val=.false., lone_keyword_l_val=.true.)
141 CALL keyword_create(keyword, __location__, name=
"SYMMETRY_BACKEND", &
142 description=
"Select the backend used to provide and apply atomic "// &
143 "k-point symmetry operations. K290 is the established default. "// &
144 "SPGLIB uses the symmetry operations returned by SPGLIB, including "// &
145 "their fractional translations. This applies to Monkhorst-Pack and MacDonald "// &
146 "meshes. For GENERAL, the explicit k-point list is used as supplied. If "// &
147 "SYMMETRY_REDUCTION_METHOD is not specified, it follows the selected backend.", &
148 usage=
"SYMMETRY_BACKEND K290", type_of_var=
enum_t, &
149 enum_c_vals=
s2a(
"K290",
"SPGLIB"), &
151 enum_desc=
s2a(
"Use the existing K290 k-point symmetry backend.", &
152 "Use SPGLIB symmetry operations as k-point symmetry backend."), &
157 CALL keyword_create(keyword, __location__, name=
"SYMMETRY_REDUCTION_METHOD", &
158 description=
"Select the method used to reduce Monkhorst-Pack and MacDonald "// &
159 "k-point meshes when atomic symmetry is enabled. K290 is the established "// &
160 "default. SPGLIB uses the symmetry operations returned by SPGLIB for the "// &
161 "k-point reduction. GENERAL k-point lists are not reduced. With "// &
162 "SYMMETRY_BACKEND K290 this can be used as a comparison mode using K290 "// &
163 "operations for SPGLIB-generated mappings.", &
164 usage=
"SYMMETRY_REDUCTION_METHOD K290", type_of_var=
enum_t, &
165 enum_c_vals=
s2a(
"K290",
"SPGLIB"), &
167 enum_desc=
s2a(
"Use the existing K290 k-point symmetry reduction method.", &
168 "Use SPGLIB symmetry operations for k-point reduction."), &
174 description=
"Verbose output information.", &
175 usage=
"VERBOSE <LOGICAL>", &
176 default_l_val=.false., lone_keyword_l_val=.true.)
180 CALL keyword_create(keyword, __location__, name=
"EPS_SYMMETRY", variants=[
"EPS_GEO"], &
181 description=
"Accuracy in k-point symmetry determination."//
newline// &
182 "EPS_GEO is accepted as an alias.", &
183 usage=
"EPS_SYMMETRY <real>", &
184 default_r_val=1.0e-6_dp)
188 CALL keyword_create(keyword, __location__, name=
"PARALLEL_GROUP_SIZE", &
189 description=
"Number of MPI processes to be used for a single k-point."// &
190 " This number must divide the total number of processes."// &
191 " The number of groups must divide the total number of kpoints."// &
192 " Value=-1 (smallest possible number of processes per group, satisfying the constraints)."// &
193 " Value=0 (all processes)."// &
194 " Value=n (exactly n processes).", &
195 usage=
"PARALLEL_GROUP_SIZE <integer>", &
200 CALL keyword_create(keyword, __location__, name=
"WAVEFUNCTIONS", &
201 description=
"Select whether real or complex wavefunctions should be used "// &
202 "when allowed by the k-point set. REAL wavefunctions can only represent "// &
203 "Gamma or special k-points and symmetry operations with real Bloch phases. "// &
204 "Use COMPLEX for general atomic k-point symmetries with nontrivial phases.", &
205 usage=
"WAVEFUNCTIONS REAL", &
207 enum_c_vals=
s2a(
"REAL",
"COMPLEX"), &
208 enum_desc=
s2a(
"Use real wavefunctions (if possible by kpoints specified).", &
209 "Use complex wavefunctions (default)."), &
224 CHARACTER(LEN=*),
OPTIONAL :: section_name
226 CHARACTER(len=default_path_length) :: my_section_name
229 IF (
PRESENT(section_name))
THEN
230 my_section_name = section_name
232 my_section_name =
"KPOINT_SET"
235 cpassert(.NOT.
ASSOCIATED(section))
236 CALL section_create(section, __location__, name=my_section_name, &
237 description=
"Specifies a k-point line to be calculated.", &
238 n_keywords=0, n_subsections=0, repeats=.true.)
241 CALL keyword_create(keyword, __location__, name=
"SPECIAL_POINT", &
242 description=
"Name and coordinates of a special k-point", &
243 usage=
"SPECIAL_POINT GAMMA 0.0 0.0 0.0", n_var=-1, type_of_var=
char_t, repeats=.true.)
248 description=
"Number of k-points along the line.", &
254 description=
"Special k-points are defined either in units"// &
255 " of reciprocal lattice vectors or in Cartesian coordinates in units of 2Pi/len."// &
256 " B_VECTOR: in multiples of the reciprocal lattice vectors (b)."// &
257 " CART_ANGSTROM: In units of 2*Pi/Angstrom."// &
258 " CART_BOHR: In units of 2*Pi/Bohr.", &
259 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