vibesketch.render¶
Publication graphics from the document’s drawing.
SVG preserves the KET scene’s coordinates, repeated molecule occurrences, arrows and annotations. RDKit draws molecules with the selected journal preset. Documents without a drawing fall back to rows composed from their species/reactions. The server, SDK, CLI, MCP and browser all use the same export implementation.
PNG and PDF use the optional publication backend, with the same scene SVG.
Functions
|
Render SVG, PNG, PDF, EPS or EMF; PNG DPI defaults to 300 (36–2400). |
|
The drawing as an SVG figure, or reaction rows when no drawing exists. |
|
A PNG of the document's species side by side, for file previews. |
Exceptions
The document cannot be rendered in the requested format or style. |
|
This machine lacks a system library that RDKit's drawing code needs. |
- exception vibesketch.render.RenderRefused[source]¶
Bases:
ValueErrorThe document cannot be rendered in the requested format or style.
Bases:
RuntimeErrorThis machine lacks a system library that RDKit’s drawing code needs.
- vibesketch.render.render(document, fmt, *, style=None, dpi=300, stereo_labels=False, sequences=False)[source]¶
Render SVG, PNG, PDF, EPS or EMF; PNG DPI defaults to 300 (36–2400).
EPS and EMF, for office documents, are written by vibe-sketch itself from the same SVG with the text outlined (
vibesketch.render.vector).
- vibesketch.render.render_svg(document, *, style=None, stereo_labels=False, sequences=False)[source]¶
The drawing as an SVG figure, or reaction rows when no drawing exists.
With
stereo_labels, CIP descriptors and enhanced-stereo groups are printed beside the structures, freshly assigned (vibesketch.chem.cip). Withsequences, a species built from a sequence is printed as it, H-Tyr-Gly-OH or 5’-ACGU-3’, in place of its structure.
- vibesketch.render.thumbnail(document)[source]¶
A PNG of the document’s species side by side, for file previews.
The panels shrink so the longest side stays within 1024 pixels; one species fills a panel of 300 by 225. Returns the PNG, its width and its height. Raises
RenderRefusedfor a document without species andRenderUnavailablewithout the drawing libraries.
Modules
chemfig source for LaTeX: structures as a walk with angles, schemes with arrows. |
|
The reviewed Roboto font shared by publication SVG, PNG and PDF. |
|
Nanostructure depictions for figures, chemfig and the canvas (#138). |
|
Optional resvg/svg2pdf publication backend, always consuming the scene SVG. |
|
SVG from a KET scene, retaining each occurrence and its drawing coordinates. |
|
Journal drawing parameters in print points; sources are also in formats.md. |
|
Validated schematic surface images. |
|
EPS and EMF figures for office documents, from the publication SVG (#96). |