httk.atomistic.models.formula.formula

The canonical reduced chemical-formula value class.

Classes

ChemicalFormula

Store a strictly canonical reduced chemical formula.

Module Contents

class httk.atomistic.models.formula.formula.ChemicalFormula(backend, **hints)

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

Store a strictly canonical reduced chemical formula.

Parameters:

formula – The alphabetical formula text with greatest common divisor one.

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

Return the formula coefficients as exact amounts.