httk.atomistic.models.formula.api ================================= .. py:module:: httk.atomistic.models.formula.api .. autoapi-nested-parse:: The minimal canonical chemical-formula interface for httk-atomistic. Classes ------- .. autoapisummary:: httk.atomistic.models.formula.api.ChemicalFormulaAPI Module Contents --------------- .. py:class:: ChemicalFormulaAPI Bases: :py:obj:`abc.ABC` Abstract 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. .. py:property:: amounts :type: 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. .. py:property:: is_anonymous :type: bool Whether the formula labels are OPTIMADE anonymous symbols. A backend that carries anonymous notation overrides this; a backend without that distinction inherits ``False``. .. py:property:: uncertainties :type: tuple[tuple[str, fractions.Fraction | None], Ellipsis] Per-amount absolute uncertainties, or ``None`` where exactness is unstated. .. py:property:: complete :type: bool Whether the formula accounts for all represented elemental material. .. py:property:: exact :type: bool Whether all formula amounts are exact rather than precision-bounded. .. py:property:: normalized :type: bool Whether the formula is normalized within the stated precision. .. py:property:: normalization_status :type: str The formula's normalization status derived from exactness and normalization. .. py:property:: diagnostics :type: tuple[httk.atomistic.models.formula.diagnostics.CompositionDiagnostic, Ellipsis] Non-fatal structured diagnostics associated with the formula.