httk.atomistic.models.formula.plain

Backend wrapping a raw elemental-composition mapping.

Classes

PlainComposition

Wrap a mapping of real element symbols to composition amounts.

Module Contents

class httk.atomistic.models.formula.plain.PlainComposition(obj, **hints)

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

Wrap a mapping of real element symbols to composition amounts.

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

Return the elemental amounts in canonical symbol order.

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

Return the amount precisions in canonical symbol order.

property complete: bool

Return whether all represented elemental material is known.

property exact: bool

Return whether all elemental amounts are exact.

property normalized: bool

Return whether the composition is normalized within precision.

property normalization_status: str

Return the composition’s normalization status.

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

Return non-fatal diagnostics associated with the composition.

unwrap()

Return the original elemental amount mapping.