utils
espresso_prepare_dir ¶
Function that prepares the espresso dictionary for the calculation.
Parameters:
-
outdir
(str | Path
) –The output to be used for the espresso calculation
-
binary
(str
, default:'pw'
) –The binary to be used for the espresso calculation
Returns:
-
dict
–Input data for the espresso calculation
Source code in quacc/calculators/espresso/utils.py
get_pseudopotential_info ¶
get_pseudopotential_info(
pp_dict: dict[str, Any], atoms: Atoms
) -> tuple[float, float, dict[str, str]]
Function that parses the pseudopotentials and cutoffs from a preset file. The cutoffs are taken from the largest value of the cutoffs among the elements present.
Parameters:
-
pp_dict
(dict[str, Any]
) –The "pseudopotential" parameters returned by load_yaml_calc
-
atoms
(Atoms
) –The atoms object to get the elements from
Returns:
-
float
–The max(ecutwfc) value
-
float
–The max(ecutrho) value
-
dict[str, str]
–The pseudopotentials dictionary, e.g. {"O": "O.pbe-n-kjpaw_psl.0.1.UPF"}
Source code in quacc/calculators/espresso/utils.py
grid_copy_files ¶
grid_copy_files(
ph_input_data: dict[str, Any],
directory: str | Path,
qnum: int,
qpt: tuple[float, float, float],
) -> dict[SourceDirectory, Filenames]
Function that returns a dictionary of files to copy for the grid calculation.
Parameters:
-
ph_input_data
(dict[str, Any]
) –The input data for the ph calculation
-
directory
(str | Path
) –The directory name to copy the files from
-
qnum
(int
) –The q-point number
-
qpt
(tuple[float, float, float]
) –The q-point coordinates in QE units
Returns:
-
dict
–The dictionary of files to copy
Source code in quacc/calculators/espresso/utils.py
grid_prepare_repr ¶
Function that prepares the representations for the grid calculation.
Parameters:
-
patterns
(dict[str, Any]
) –The representation patterns dictionary from the ph_init_job_results
-
nblocks
(int
) –The number of blocks to group the representations in. See quacc.recipes.espresso.phonons.grid_phonon_flow.
Returns:
-
list
–The list of representations to do grouped in blocks if nblocks > 1
Source code in quacc/calculators/espresso/utils.py
prepare_copy_files ¶
prepare_copy_files(
parameters: dict[str, Any], binary: str = "pw"
) -> dict[SourceDirectory, Filenames]
Function that prepares the copy files for the espresso calculation.
Parameters:
-
parameters
(dict[str, Any]
) –The input data for the espresso calculation
-
binary
(str
, default:'pw'
) –The binary to use for the espresso calculation
Returns:
-
The modified dictionary
–
Source code in quacc/calculators/espresso/utils.py
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 |
|
remove_conflicting_kpts_kspacing ¶
remove_conflicting_kpts_kspacing(
to_change_dict: dict[str, Any],
reference_dict: dict[str, Any],
) -> dict[str, Any]
Parameters:
-
to_change_dict
(dict[str, Any]
) –The dictionary that will be changed
-
reference_dict
(dict[str, Any]
) –The reference dictionary that will remain intact
Returns:
-
dict
–The modified dictionary