httk.atomistic.models.formula.diagnostics

Structured diagnostics produced while working with chemical formulas.

Classes

CompositionDiagnostic

Record a non-fatal issue encountered while projecting composition.

Module Contents

class httk.atomistic.models.formula.diagnostics.CompositionDiagnostic[source]

Record a non-fatal issue encountered while projecting composition.

Parameters:
  • code – The stable diagnostic code.

  • message – The human-readable diagnostic message.

  • subject – The composition subject involved, if any.

  • total – The calculated total, if applicable.

  • width – The precision width used for the diagnostic, if applicable.

code: str[source]
message: str[source]
subject: str | None = None[source]
total: fractions.Fraction | None = None[source]
width: fractions.Fraction | None = None[source]