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

.. py:module:: aiida_hubbard.workflows.hp.parallelize_qpoints

.. 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_qpoints.HpParallelizeQpointsWorkChain



Functions
~~~~~~~~~

.. autoapisummary::

   aiida_hubbard.workflows.hp.parallelize_qpoints.validate_inputs



Attributes
~~~~~~~~~~

.. autoapisummary::

   aiida_hubbard.workflows.hp.parallelize_qpoints.PwCalculation
   aiida_hubbard.workflows.hp.parallelize_qpoints.HpCalculation
   aiida_hubbard.workflows.hp.parallelize_qpoints.HpBaseWorkChain


.. py:data:: PwCalculation

   

.. py:data:: HpCalculation

   

.. py:data:: HpBaseWorkChain

   

.. py:function:: validate_inputs(inputs, _)

   Validate the top level namespace.


.. py:class:: HpParallelizeQpointsWorkChain(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 q points on a single Hubbard atom.

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

      Define the process specification.


   .. py:method:: run_init()

      Run an initialization `HpBaseWorkChain` that will determine the number of perturbations (q points).

      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_qpoints()

      Return whether there are more q points to run.


   .. py:method:: run_qpoints()

      Run a separate `HpBaseWorkChain` for each of the q points.


   .. py:method:: inspect_qpoints()

      Inspect each parallel qpoint `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.



