aiida_hubbard.utils.validation#

Utilities for validating various data structures.

Module Contents#

Functions#

validate_parent_calculation(calculation)

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

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.

aiida_hubbard.utils.validation.validate_parent_calculation(calculation)[source]#

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

Parameters:

calculation – the calculation to validate

Raises:

ValueError – if the calculation is not a valid parent calculation for a HpCalculation

aiida_hubbard.utils.validation.validate_structure_kind_order(structure, hubbard_kinds)[source]#

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.

Parameters:
  • structure – StructureData node

  • hubbard_kinds – a list of Hubbard kinds