:py:mod:`aiida_hubbard.calculations.functions.structure_relabel_kinds`
======================================================================

.. py:module:: aiida_hubbard.calculations.functions.structure_relabel_kinds

.. autoapi-nested-parse::

   Calculation function to relabel the kinds of a Hubbard structure.



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


Functions
~~~~~~~~~

.. autoapisummary::

   aiida_hubbard.calculations.functions.structure_relabel_kinds.structure_relabel_kinds
   aiida_hubbard.calculations.functions.structure_relabel_kinds.get_relabelled_symbol



.. py:function:: structure_relabel_kinds(hubbard_structure: aiida_quantumespresso.data.hubbard_structure.HubbardStructureData, hubbard: aiida.orm.Dict, magnetization: dict | None = None) -> aiida.orm.Dict

   Create a clone of the given structure but with new kinds, based on the new hubbard sites.

   :param hubbard_structure: ``HubbardStructureData`` instance.
   :param hubbard: the ``hubbard`` output Dict node of a ``HpCalculation``.
   :param magnetization: Dict instance containing the `starting_magnetization` QuantumESPRESSO inputs.
   :return: dict with keys:

       * ``hubbard_structure``: relabelled ``HubbardStructureData``
       * ``starting_magnetization``: updated magnetization as :class:`~aiida.orm.Dict` (if provided in inputs)



.. py:function:: get_relabelled_symbol(symbol: str, counter: int) -> str

   Return a relabelled symbol.

   .. warning:: this function produces up to 36 different chemical symbols.

   :param symbol: a chemical symbol, NOT a kind name
   :param counter: a integer to assing the new label. Up to 9 an interger
       is appended, while an *ascii uppercase letter* is used. Lower cases
       are discarded to avoid possible misleading names
   :return: a 3 digit length symbol (QuantumESPRESSO allows only up to 3)


