:py:mod:`aiida_hubbard.utils.validation`
========================================

.. py:module:: aiida_hubbard.utils.validation

.. autoapi-nested-parse::

   Utilities for validating various data structures.



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


Functions
~~~~~~~~~

.. autoapisummary::

   aiida_hubbard.utils.validation.validate_parent_calculation
   aiida_hubbard.utils.validation.validate_structure_kind_order



.. py:function:: validate_parent_calculation(calculation)

   Validate whether the given calculation is a valid parent calculation for a HpCalculation.

   :param calculation: the calculation to validate
   :raises ValueError: if the calculation is not a valid parent calculation for a HpCalculation


.. py:function:: validate_structure_kind_order(structure, hubbard_kinds)

   Determine whether the kinds in the structure node have the right order for the given list of Hubbard U kinds.

   For the order to be right, means for the Hubbard kinds to come first in the list of kinds of the structure.

   :param structure: StructureData node
   :param hubbard_kinds: a list of Hubbard kinds


