:py:mod:`aiida_hubbard.workflows.hp.parallelize_atoms`
======================================================

.. py:module:: aiida_hubbard.workflows.hp.parallelize_atoms

.. autoapi-nested-parse::

   Work chain to launch a Quantum Espresso hp.x calculation parallelizing over the Hubbard atoms.



Module Contents
---------------

Classes
~~~~~~~

.. autoapisummary::

   aiida_hubbard.workflows.hp.parallelize_atoms.HpParallelizeAtomsWorkChain




Attributes
~~~~~~~~~~

.. autoapisummary::

   aiida_hubbard.workflows.hp.parallelize_atoms.PwCalculation
   aiida_hubbard.workflows.hp.parallelize_atoms.HpCalculation
   aiida_hubbard.workflows.hp.parallelize_atoms.HpBaseWorkChain
   aiida_hubbard.workflows.hp.parallelize_atoms.HpParallelizeQpointsWorkChain


.. py:data:: PwCalculation

   

.. py:data:: HpCalculation

   

.. py:data:: HpBaseWorkChain

   

.. py:data:: HpParallelizeQpointsWorkChain

   

.. py:class:: HpParallelizeAtomsWorkChain(inputs: dict | None = None, logger: logging.Logger | None = None, runner: aiida.engine.runners.Runner | None = None, enable_persistence: bool = True)


   Bases: :py:obj:`aiida.engine.WorkChain`

   Work chain to launch a Quantum Espresso hp.x calculation parallelizing over the Hubbard atoms.

   .. py:method:: define(spec)
      :classmethod:

      Define the process specification.


   .. py:method:: run_init()

      Run an initialization `HpBaseWorkChain` to that will determine which kinds need to be perturbed.

      By performing an `initialization_only` calculation only the symmetry analysis will be performed to determine
      which kinds are to be perturbed. This information is parsed and can be used to determine exactly how many
      `HpBaseWorkChains` have to be launched in parallel.


   .. py:method:: inspect_init()

      Inspect the initialization `HpBaseWorkChain`.


   .. py:method:: should_run_atoms()

      Return whether there are more atoms to run.


   .. py:method:: run_atoms()

      Run a separate `HpBaseWorkChain` for each of the defined Hubbard atoms.


   .. py:method:: inspect_atoms()

      Inspect each parallel atom `HpBaseWorkChain`.


   .. py:method:: run_final()

      Perform the final `HpCalculation` to collect the various components of the chi matrices.


   .. py:method:: inspect_final()

      Inspect the final `HpBaseWorkChain`.


   .. py:method:: results()

      Retrieve the results from the final matrix collection workchain.


   .. py:method:: on_terminated()

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



