:py:mod:`aiida_hubbard.calculations.hp`
=======================================

.. py:module:: aiida_hubbard.calculations.hp

.. autoapi-nested-parse::

   `CalcJob` implementation for the hp.x code of Quantum ESPRESSO.



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

Classes
~~~~~~~

.. autoapisummary::

   aiida_hubbard.calculations.hp.HpCalculation



Functions
~~~~~~~~~

.. autoapisummary::

   aiida_hubbard.calculations.hp.validate_parent_scf
   aiida_hubbard.calculations.hp.validate_parent_hp
   aiida_hubbard.calculations.hp.validate_parameters
   aiida_hubbard.calculations.hp.validate_qpoints
   aiida_hubbard.calculations.hp.validate_inputs



Attributes
~~~~~~~~~~

.. autoapisummary::

   aiida_hubbard.calculations.hp.PwCalculation
   aiida_hubbard.calculations.hp.HubbardStructureData


.. py:data:: PwCalculation

   

.. py:data:: HubbardStructureData

   

.. py:function:: validate_parent_scf(parent_scf, _)

   Validate the `parent_scf` input.

   Make sure that it is created by a ``PwCalculation`` that was run with an ``HubbardStructureData``.


.. py:function:: validate_parent_hp(parent_hp, _)

   Validate the `parent_hp` input.

   Each entry in the `parent_hp` mapping should be a retrieved folder of a `HpCalculation`.


.. py:function:: validate_parameters(parameters, _)

   Validate the `parameters` input.


.. py:function:: validate_qpoints(qpoints, _)

   Validate the `qpoints` input.


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

   Validate inputs that depend on one another.


.. py:class:: HpCalculation(*args, **kwargs)


   Bases: :py:obj:`aiida_quantumespresso.calculations.CalcJob`

   `CalcJob` implementation for the hp.x code of Quantum ESPRESSO.

   .. py:attribute:: blocked_keywords
      :value: [('INPUTHP', 'iverbosity'), ('INPUTHP', 'prefix'), ('INPUTHP', 'outdir'), ('INPUTHP', 'nq1'),...

      

   .. py:attribute:: compulsory_namelists
      :value: ['INPUTHP']

      

   .. py:attribute:: prefix
      :value: 'aiida'

      

   .. py:attribute:: _default_symlink_usage
      :value: False

      

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

      Define the process specification.


   .. py:method:: filename_output_hubbard_chi()

      Return the relative output filename that contains chi.


   .. py:method:: filename_output_hubbard()

      Return the relative output filename that contains the Hubbard values and matrices.


   .. py:method:: filename_input_hubbard_parameters()

      Return the relative input filename for Hubbard parameters, for QuantumESPRESSO version below 7.1.


   .. py:method:: filename_output_hubbard_dat()

      Return the relative input filename for generalised Hubbard parameters, for QuantumESPRESSO v.7.2 onwards.


   .. py:method:: dirname_output()

      Return the relative directory name that contains raw output data.


   .. py:method:: dirname_output_hubbard()

      Return the relative directory name that contains raw output data written by hp.x.


   .. py:method:: dirname_output_scf()

      Return the relative directory name that contains raw output data written by pw.x.


   .. py:method:: prepare_for_submission(folder)

      Create the input files from the input nodes passed to this instance of the `CalcJob`.

      :param folder: an `aiida.common.folders.Folder` to temporarily write files on disk
      :return: `aiida.common.datastructures.CalcInfo` instance


   .. py:method:: get_retrieve_list() -> list[tuple]

      Return the `retrieve_list`.

      A `HpCalculation` can be parallelized over atoms by running individual calculations, but a final post-processing
      calculation will have to be performed to compute the final matrices. The final calculation that computes chi
      requires the perturbation files for all

      :returns: list of resource retrieval instructions


   .. py:method:: get_remote_copy_list(is_symlink) -> list[tuple]

      Return the `remote_{copy/symlink}_list`.

      :param is_symlink: whether to use symlink for the remote list
      :returns: list of resource copy instructions


   .. py:method:: get_local_copy_list() -> tuple[list, list]

      Return the `local_copy_list`.

      :returns: tuple,list of resource copy instructions


   .. py:method:: prepare_parameters() -> dict

      Prepare the parameters based on the input parameters.

      The returned input dictionary will contain all the necessary namelists and their flags that should be written to
      the input file of the calculation.

      :returns: a dictionary with input namelists and their flags


   .. py:method:: write_input_files(folder, parameters)

      Write the prepared `parameters` to the input file in the sandbox folder.

      :param folder: an :class:`aiida.common.folders.Folder` to temporarily write files on disk.
      :param parameters: a dictionary with input namelists and their flags.



