vibesketch.document.solids

Solids given by their formula as participants of a drawn reaction (#142).

A text on the canvas that is a formula marked as a solid, C(s), Fe3−xCrxO4(s) or γ-Al2O3, takes part in reactions as a molecule does: on a side, joined by plus signs, with a coefficient before it, or at the arrow as a reagent such as a catalyst. Derivation reads it as a species with a SolidFormula record and no molecular graph. Its molar mass takes part in stoichiometry and its atoms in the balance check (vibesketch.document.electrochem) when every count is a number; nothing is calculated for it.

Functions

solid_data(formula)

The species' solid record for a formula.

solid_refusal(writer, species)

Why a calculation cannot take a solid given by its formula.

solid_runs(text)

A solid's text as runs of (text, subscript), counts lowered; None for other text.

with_solids(scene)

scene with each solid's text as a fragment of its own, and their formulas.

vibesketch.document.solids.solid_data(formula)[source]

The species’ solid record for a formula.

Parameters:

formula (Formula)

Return type:

dict[str, Any]

vibesketch.document.solids.solid_refusal(writer, species)[source]

Why a calculation cannot take a solid given by its formula.

Parameters:
Return type:

list[str]

vibesketch.document.solids.solid_runs(text)[source]

A solid’s text as runs of (text, subscript), counts lowered; None for other text.

Parameters:

text (str)

Return type:

list[tuple[str, bool]] | None

vibesketch.document.solids.with_solids(scene)[source]

scene with each solid’s text as a fragment of its own, and their formulas.

The texts leave the scene’s texts, so they are read as participants, not as conditions or annotations; the fragments come after the molecules.

Parameters:

scene (KetScene)

Return type:

tuple[KetScene, dict[int, Formula]]