bands
This module, 'bands.py', contains recipes for performing bands and fermi surface calculations using the bands.x and fs.x binaries from Quantum ESPRESSO via the quacc library.
bands_flow ¶
bands_flow(
atoms: Atoms,
copy_files: (
SourceDirectory
| list[SourceDirectory]
| dict[SourceDirectory, Filenames]
),
run_bands_pp: bool = True,
run_fermi_surface: bool = False,
make_bandpath: bool = True,
line_density: float = 20,
force_gamma: bool = True,
job_params: dict[str, Any] | None = None,
job_decorators: (
dict[str, Callable | None] | None
) = None,
) -> EspressoBandsSchema
Function to compute bands structure and fermi surface using pw.x, bands.x and fs.x.
Consists of the following steps:
-
A pw.x non-self consistent calculation
- name: "bands_pw_job"
- job : quacc.recipes.espresso.bands.bands_pw_job
-
A bands.x post-processing calculation
- name: "bands_pp_job"
- job : quacc.recipes.espresso.bands.bands_pp_job
-
A fs.x calculation to obtain the fermi surface
- name: "fermi_surface_job"
- job : quacc.recipes.espresso.bands.fermi_surface_job
Parameters:
-
atoms
(Atoms
) –The Atoms object.
-
copy_files
(SourceDirectory | list[SourceDirectory] | dict[SourceDirectory, Filenames]
) –Files to copy (and decompress) from source to the runtime directory.
-
run_bands_pp
(bool
, default:True
) –If True, a bands.x post-processing calculation will be carried out. This allows to re-order bands and computes band-related properties.
-
run_fermi_surface
(bool
, default:False
) –If True, a fs.x calculation will be carried out. This allows to generate the fermi surface of your structure. It requires a uniform unshifted k-point grid bands calculation.
-
make_bandpath
(bool
, default:True
) –If True, it returns the primitive cell for your structure and generates the high symmetry k-path using Latmer-Munro approach. For more information look at pymatgen.symmetry.bandstructure.HighSymmKpath
-
line_density
(float
, default:20
) –Density of kpoints along the band path if make_bandpath is True For more information quacc.utils.kpts.convert_pmg_kpts
-
force_gamma
(bool
, default:True
) –Forces gamma-centered k-points when using make_bandpath For more information quacc.utils.kpts.convert_pmg_kpts
-
job_params
(dict[str, Any] | None
, default:None
) –Custom parameters to pass to each Job in the Flow. This is a dictionary where the keys are the names of the jobs and the values are dictionaries of parameters.
-
job_decorators
(dict[str, Callable | None] | None
, default:None
) –Custom decorators to apply to each Job in the Flow. This is a dictionary where the keys are the names of the jobs and the values are decorators.
Returns:
-
BandsSchema
–Dictionary of results from quacc.schemas.ase.Summarize.run. See the type-hint for the data structure.
Source code in quacc/recipes/espresso/bands.py
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 |
|
bands_pp_job ¶
bands_pp_job(
copy_files: (
SourceDirectory
| list[SourceDirectory]
| dict[SourceDirectory, Filenames]
| None
) = None,
prev_outdir: SourceDirectory | None = None,
test_run: bool = False,
additional_fields: dict[str, Any] | None = None,
**calc_kwargs
) -> RunSchema
Function to re-order bands and computes bands-related properties with bands.x. This allows one to get the bands structure in a more readable way.
Note
This requires a previous quacc.recipes.espresso.bands.bands_pw_job calculation.
Parameters:
-
copy_files
(SourceDirectory | list[SourceDirectory] | dict[SourceDirectory, Filenames] | None
, default:None
) –Source directory or directories to copy files from. If a
SourceDirectory
or a list ofSourceDirectory
is provided, this interface will automatically guess which files have to be copied over by looking at the binary andinput_data
. If a dict is provided, the mode is manual, keys are source directories and values are relative path to files or directories to copy. Glob patterns are supported. -
prev_outdir
(SourceDirectory | None
, default:None
) –The output directory of a previous calculation. If provided, Quantum Espresso will directly read the necessary files from this directory, eliminating the need to manually copy files. The directory will be ungzipped if necessary.
-
test_run
(bool
, default:False
) –If True, a test run is performed to check that the calculation input_data is correct or to generate some files/info if needed.
-
additional_fields
(dict[str, Any] | None
, default:None
) –Additional fields to add to the results dictionary.
-
**calc_kwargs
–Additional keyword arguments to pass to the Espresso calculator. Set a value to
quacc.Remove
to remove a pre-existing key entirely. See the docstring of quacc.calculators.espresso.espresso.Espresso for more information.
Returns:
-
RunSchema
–Dictionary of results from quacc.schemas.ase.Summarize.run. See the type-hint for the data structure.
Source code in quacc/recipes/espresso/bands.py
bands_pw_job ¶
bands_pw_job(
atoms: Atoms,
copy_files: (
SourceDirectory
| list[SourceDirectory]
| dict[SourceDirectory, Filenames]
| None
) = None,
prev_outdir: SourceDirectory | None = None,
make_bandpath: bool = True,
line_density: float = 20,
force_gamma: bool = True,
test_run: bool = False,
additional_fields: dict[str, Any] | None = None,
**calc_kwargs
) -> RunSchema
Function to carry out a basic bandstructure calculation with pw.x.
Note
First perform a normal SCF calculation quacc.recipes.espresso.core.static_job; then use this job if you are interested in calculating only the Kohn-Sham states for the given set of k-points
Parameters:
-
atoms
(Atoms
) –The Atoms object.
-
copy_files
(SourceDirectory | list[SourceDirectory] | dict[SourceDirectory, Filenames] | None
, default:None
) –Source directory or directories to copy files from. If a
SourceDirectory
or a list ofSourceDirectory
is provided, this interface will automatically guess which files have to be copied over by looking at the binary andinput_data
. If a dict is provided, the mode is manual, keys are source directories and values are relative path to files or directories to copy. Glob patterns are supported. -
prev_outdir
(SourceDirectory | None
, default:None
) –The output directory of a previous calculation. If provided, Quantum Espresso will directly read the necessary files from this directory, eliminating the need to manually copy files. The directory will be ungzipped if necessary.
-
make_bandpath
(bool
, default:True
) –If True, it returns the primitive cell for your structure and generates the high symmetry k-path using Latmer-Munro approach. For more information look at pymatgen.symmetry.bandstructure.HighSymmKpath
-
line_density
(float
, default:20
) –Density of kpoints along the band path if make_bandpath is True For more information quacc.utils.kpts.convert_pmg_kpts
-
force_gamma
(bool
, default:True
) –Forces gamma-centered k-points when using make_bandpath For more information quacc.utils.kpts.convert_pmg_kpts
-
test_run
(bool
, default:False
) –If True, a test run is performed to check that the calculation input_data is correct or to generate some files/info if needed.
-
additional_fields
(dict[str, Any] | None
, default:None
) –Additional fields to add to the results dictionary.
-
**calc_kwargs
–Additional keyword arguments to pass to the Espresso calculator. Set a value to
quacc.Remove
to remove a pre-existing key entirely. See the docstring of quacc.calculators.espresso.espresso.Espresso for more information.
Returns:
-
RunSchema
–Dictionary of results from quacc.schemas.ase.Summarize.run. See the type-hint for the data structure.
Source code in quacc/recipes/espresso/bands.py
fermi_surface_job ¶
fermi_surface_job(
copy_files: (
SourceDirectory
| list[SourceDirectory]
| dict[SourceDirectory, Filenames]
| None
) = None,
prev_outdir: SourceDirectory | None = None,
test_run: bool = False,
additional_fields: dict[str, Any] | None = None,
**calc_kwargs
) -> RunSchema
Function to retrieve the fermi surface with fs.x
Note
It requires a previous uniform unshifted k-point grid bands calculation.
Parameters:
-
copy_files
(SourceDirectory | list[SourceDirectory] | dict[SourceDirectory, Filenames] | None
, default:None
) –Source directory or directories to copy files from. If a
SourceDirectory
or a list ofSourceDirectory
is provided, this interface will automatically guess which files have to be copied over by looking at the binary andinput_data
. If a dict is provided, the mode is manual, keys are source directories and values are relative path to files or directories to copy. Glob patterns are supported. -
prev_outdir
(SourceDirectory | None
, default:None
) –The output directory of a previous calculation. If provided, Quantum Espresso will directly read the necessary files from this directory, eliminating the need to manually copy files. The directory will be ungzipped if necessary.
-
test_run
(bool
, default:False
) –If True, a test run is performed to check that the calculation input_data is correct or to generate some files/info if needed.
-
additional_fields
(dict[str, Any] | None
, default:None
) –Additional fields to add to the results dictionary.
-
**calc_kwargs
–Additional keyword arguments to pass to the Espresso calculator. Set a value to
quacc.Remove
to remove a pre-existing key entirely. See the docstring of quacc.calculators.espresso.espresso.Espresso for more information.
Returns:
-
RunSchema
–Dictionary of results from quacc.schemas.ase.Summarize.run. See the type-hint for the data structure.