aiida_quantumespresso.workflows.pdos
#
Workchain to run Quantum ESPRESSO calculations that generate DoS and PDoS for a structure.
This requires four computations:
SCF (pw.x), to generate the initial wavefunction.
NSCF (pw.x), to generate eigenvalues, generally with a denser k-point mesh and tetrahedra occupations.
Total DoS (dos.x), to generate total densities of state.
Partial DoS (projwfc.x), to generate partial densities of state, by projecting wavefunctions onto atomic orbitals.
Additional functionality:
Setting
'align_to_fermi': True
in the inputs will ensure that the energy range is centred around the Fermi energy when Emin and Emax are provided for both the dos and projwfc inputs. This is useful when you are only interested in a certain energy range around the Fermi energy. By default the energy range is extracted from the NSCF calculation.
Storage memory management:
The wavefunction file(s) created by the nscf calculation can get very large (>100Gb).
These files must be copied to dos and projwfc calculations, so storage memory limits can easily be exceeded.
If this is an issue, setting the input serial_clean
to True
will not run these calculations in parallel,
but instead run in serial and clean directories when they are no longer required:
Run the scf workchain
Run the nscf workchain, then clean the scf calculation directories
Run the dos calculation, then clean its directory
Run the projwfc calculation, then clean its directory
Setting the input clean_workdir
to True
, will clean any remaining directories, after the whole workchain has
terminated.
Also note that projwfc will fail if the scf/nscf calculations were run with a different number of procs/pools and
wf_collect=.false.
(this setting is deprecated in newer version of QE).
Related Resources:
Warning
For QE v6.1, there is an issue using tetrahedra
occupations, as is recommended for nscf
,
and both dos.x
and projwfc.x
will raise errors when reading the xml file
(see this post).
Module Contents#
Classes#
A WorkChain to compute Total & Partial Density of States of a structure, using Quantum Espresso. |
Functions#
Return the |
|
|
Validate the top level namespace. |
|
Validate the scf parameters. |
|
Validate the nscf parameters. |
|
Validate DOS parameters. |
|
Validate DOS parameters. |
|
Clean the remote directory of a |
|
Clean all remote directories of a workchain's descendant calculations. |
Attributes#
- aiida_quantumespresso.workflows.pdos.get_parameter_schema()[source]#
Return the
PdosWorkChain
input parameter schema.
- aiida_quantumespresso.workflows.pdos.validate_inputs(value, _)[source]#
Validate the top level namespace.
Check that either the scf or nscf.pw.parent_folder inputs is provided.
Check that the Emin, Emax and DeltaE inputs are the same for the dos and projwfc namespaces.
Check that Emin and Emax are provided in case align_to_fermi is set to True.
- aiida_quantumespresso.workflows.pdos.validate_dos(value, _)[source]#
Validate DOS parameters.
shared: Emin | Emax | DeltaE
dos.x only: ngauss | degauss | bz_sum
projwfc.x only: ngauss | degauss | pawproj | n_proj_boxes | irmin(3,n_proj_boxes) | irmax(3,n_proj_boxes)
- aiida_quantumespresso.workflows.pdos.validate_projwfc(value, _)[source]#
Validate DOS parameters.
shared: Emin | Emax | DeltaE
dos.x only: ngauss | degauss | bz_sum
projwfc.x only: ngauss | degauss | pawproj | n_proj_boxes | irmin(3,n_proj_boxes) | irmax(3,n_proj_boxes)
- aiida_quantumespresso.workflows.pdos.clean_calcjob_remote(node)[source]#
Clean the remote directory of a
CalcJobNode
.
- aiida_quantumespresso.workflows.pdos.clean_workchain_calcs(workchain)[source]#
Clean all remote directories of a workchain’s descendant calculations.
- class aiida_quantumespresso.workflows.pdos.PdosWorkChain(inputs: dict | None = None, logger: logging.Logger | None = None, runner: aiida.engine.runners.Runner | None = None, enable_persistence: bool = True)[source]#
Bases:
aiida_quantumespresso.workflows.protocols.utils.ProtocolMixin
,aiida.engine.WorkChain
A WorkChain to compute Total & Partial Density of States of a structure, using Quantum Espresso.
- classmethod get_protocol_filepath()[source]#
Return
pathlib.Path
to the.yaml
file that defines the protocols.
- classmethod get_builder_from_protocol(pw_code, dos_code, projwfc_code, structure, protocol=None, overrides=None, options=None, **kwargs)[source]#
Return a builder prepopulated with inputs selected according to the chosen protocol.
- Parameters:
pw_code – the
Code
instance configured for thequantumespresso.pw
plugin.dos_code – the
Code
instance configured for thequantumespresso.dos
plugin.projwfc_code – the
Code
instance configured for thequantumespresso.projwfc
plugin.structure – the
StructureData
instance to use.protocol – protocol to use, if not specified, the default will be used.
overrides – optional dictionary of inputs to override the defaults of the protocol.
options – A dictionary of options that will be recursively set for the
metadata.options
input of all theCalcJobs
that are nested in this work chain.kwargs – additional keyword arguments that will be passed to the
get_builder_from_protocol
of all the sub processes that are called by this workchain.
- Returns:
a process builder instance with all inputs defined ready for launch.
- setup()[source]#
Initialize context variables that are used during the logical flow of the workchain.
- serial_clean()[source]#
Return whether dos and projwfc calculations should be run in serial.
The calculation remote folders will be cleaned before the next process step.
- run_nscf()[source]#
Run an NSCF calculation, to generate eigenvalues with a denser k-point mesh.
This calculation modifies the base scf calculation inputs by:
Using the parent folder from the scf calculation.
Replacing the kpoints, if an alternative is specified for nscf.
Changing
SYSTEM.occupations
to ‘tetrahedra’.Changing
SYSTEM.nosym
to True, to avoid generation of additional k-points in low symmetry cases.Replace the
pw.metadata.options
, if an alternative is specified for nscf.
- _generate_projwfc_inputs()[source]#
Run Projwfc calculation, to generate partial Densities of State.
- inspect_dos_serial()[source]#
Verify that the DOS calculation finished successfully, then clean its remote directory.
- inspect_projwfc_serial()[source]#
Verify that the Projwfc calculation finished successfully, then clean its remote directory.