vibe-sketcherDocumentation

vibesketcher.render.solid_reactions

Editable SVG figures of solid-state and surface reaction schemes (#192).

One row per step: reactants, an arrow with the conditions above and below it, the products, and the step kind at the right. Every participant label is its own <text> element carrying the participant ID (data-participant) and every step its own <g> (data-step), so a vector editor can move and retype them. The text sizes and line widths come from the document’s figure style preset, as in the molecular reaction figures; nothing is drawn from a geometry, so schematic paper schemes need none.

Labels print digits after a letter or a closing bracket as subscripts (H2O -> H₂O), and ^ starts a superscript that runs to the next space or _ (e^-, O^2-).

Functions

label_spans(label)

label as runs of (base | sub | sup, text).

scheme_svg(document[, steps, style])

The scheme's steps (all, or those named) as one editable SVG.

vibesketcher.render.solid_reactions.label_spans(label)[source]

label as runs of (base | sub | sup, text).

Parameters:

label (str)

Return type:

list[tuple[str, str]]

vibesketcher.render.solid_reactions.scheme_svg(document, steps=None, *, style=None)[source]

The scheme’s steps (all, or those named) as one editable SVG.

Parameters:
Return type:

str