aiida_hubbard.workflows.hp.main#

Work chain to run a Quantum ESPRESSO hp.x calculation.

Module Contents#

Classes#

HpWorkChain

Work chain to run a Quantum ESPRESSO hp.x calculation.

Functions#

validate_inputs(inputs, _)

Validate the top level namespace.

Attributes#

aiida_hubbard.workflows.hp.main.HpBaseWorkChain[source]#
aiida_hubbard.workflows.hp.main.HpParallelizeAtomsWorkChain[source]#
aiida_hubbard.workflows.hp.main.validate_inputs(inputs, _)[source]#

Validate the top level namespace.

class aiida_hubbard.workflows.hp.main.HpWorkChain(inputs: dict | None = None, logger: logging.Logger | None = None, runner: aiida.engine.runners.Runner | None = None, enable_persistence: bool = True)[source]#

Bases: aiida.engine.WorkChain, aiida_quantumespresso.workflows.protocols.utils.ProtocolMixin

Work chain to run a Quantum ESPRESSO hp.x calculation.

If the parallelize_atoms input is set to True, the calculation will be parallelized over the Hubbard atoms by running the HpParallelizeAtomsWorkChain. When parallelizing over atoms, if the parallelize_qpoints is True, each HpParallelizeAtomsWorkChain will be parallelized over its perturbations (q points) running the HpParallelizeQpointsWorkChain. Otherwise a single HpBaseWorkChain will be launched that will compute every Hubbard atom, and every q point in serial.

Important

q point parallelization is only possible when parallelization over atoms is performed.

classmethod define(spec)[source]#

Define the process specification.

classmethod get_protocol_filepath()[source]#

Return pathlib.Path to the .yaml file that defines the protocols.

classmethod get_builder_from_protocol(code, protocol=None, parent_scf_folder=None, overrides=None, options=None, **_)[source]#

Return a builder prepopulated with inputs selected according to the chosen protocol.

Parameters:
  • code – the Code instance configured for the quantumespresso.hp plugin.

  • protocol – protocol to use, if not specified, the default will be used.

  • parent_scf_folder – the parent RemoteData of the respective SCF calcualtion.

  • 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 the CalcJobs that are nested in this work chain.

Returns:

a process builder instance with all inputs defined ready for launch.

validate_qpoints()[source]#

Validate the inputs related to q-points.

Either an explicit KpointsData with given mesh/path, or a desired q-points distance should be specified. In the case of the latter, the KpointsData will be constructed for the input StructureData using the create_kpoints_from_distance calculation function.

should_parallelize_atoms()[source]#

Return whether the calculation should be parallelized over atoms.

run_base_workchain()[source]#

Run the HpBaseWorkChain.

run_parallel_workchain()[source]#

Run the HpParallelizeAtomsWorkChain.

inspect_workchain()[source]#

Verify that the child workchain has finished successfully.

results()[source]#

Retrieve the results from the completed sub workchain.

on_terminated()[source]#

Clean the working directories of all child calculations if clean_workdir=True in the inputs.