httk.atomistic.models.formula.structure

Backend projecting a structure into its elemental composition.

Classes

StructureComposition

Project a structure only when composition data is accessed.

Module Contents

class httk.atomistic.models.formula.structure.StructureComposition(obj, **hints)

Bases: httk.atomistic.models.formula.backend.ChemicalFormulaBackend

Project a structure only when composition data is accessed.

Parameters:
  • obj (Any) – The structure to adapt.

  • **hints (Any) – Backend-selection hints.

property amounts: tuple[tuple[str, fractions.Fraction], Ellipsis]

Return the projected elemental amounts.

property uncertainties: tuple[tuple[str, fractions.Fraction | None], Ellipsis]

Return the projected amount precisions.

property complete: bool

Return whether all represented elemental material is known.

property exact: bool

Return whether the projected amounts are exact.

property normalized: bool

Return whether the projected composition is normalized.

property normalization_status: str

Return the projected composition’s normalization status.

property diagnostics: tuple[httk.atomistic.models.formula.diagnostics.CompositionDiagnostic, Ellipsis]

Return diagnostics produced during projection.

unwrap()

Return the original structure.