httk.atomistic.models.formula.api¶
The minimal canonical chemical-formula interface for httk-atomistic.
Classes¶
Abstract base class for the canonical chemical-formula interface. |
Module Contents¶
- class httk.atomistic.models.formula.api.ChemicalFormulaAPI¶
Bases:
abc.ABCAbstract base class for the canonical chemical-formula interface.
The concrete defaults keep backends that do not have provenance for optional formula metadata interoperable without requiring them to implement every accessor.
- property amounts: tuple[tuple[str, fractions.Fraction], Ellipsis]¶
- Abstractmethod:
Ordered
(label, exact amount)pairs for this chemical formula.Labels are element symbols in alphabetical order unless
is_anonymous, in which case they are OPTIMADE anonymous symbols in canonical (descending-coefficient) order.
- property is_anonymous: bool¶
Whether the formula labels are OPTIMADE anonymous symbols.
A backend that carries anonymous notation overrides this; a backend without that distinction inherits
False.
- property uncertainties: tuple[tuple[str, fractions.Fraction | None], Ellipsis]¶
Per-amount absolute uncertainties, or
Nonewhere exactness is unstated.
- property normalization_status: str¶
The formula’s normalization status derived from exactness and normalization.
- property diagnostics: tuple[httk.atomistic.models.formula.diagnostics.CompositionDiagnostic, Ellipsis]¶
Non-fatal structured diagnostics associated with the formula.