vibesketch.render.scene¶
SVG from a KET scene, retaining each occurrence and its drawing coordinates.
One KET bond-length unit is the preset bond length in print points. KET’s y axis points up; SVG’s points down. The transform is shared by molecules and annotations, independent of the normalized reaction/species catalogue.
Module Attributes
atom indices and a palette colour, per group. |
|
The shapes the canvas engine draws (Ketcher's simple objects). |
|
the canvas's, and KET's polyline, which reaches a document only from a KET file or the API because Ketcher 3.18 cannot draw it. |
|
The most points a polyline may have. |
Functions
|
RDKit's DrawMolecule highlight arguments: the atoms, and bonds within one group. |
|
Render a drawing, or return |
- vibesketch.render.scene.Marks¶
atom indices and a palette colour, per group.
- Type:
Highlights of a drawn molecule
- vibesketch.render.scene.highlight_options(mol, marks)[source]¶
RDKit’s DrawMolecule highlight arguments: the atoms, and bonds within one group.
- vibesketch.render.scene.CANVAS_SHAPES = ('rectangle', 'ellipse', 'line')¶
The shapes the canvas engine draws (Ketcher’s simple objects).
- vibesketch.render.scene.SHAPES = ('rectangle', 'ellipse', 'line', 'polyline')¶
the canvas’s, and KET’s polyline, which reaches a document only from a KET file or the API because Ketcher 3.18 cannot draw it.
- Type:
The shapes figures print
- vibesketch.render.scene.MAX_POLYLINE = 10000¶
The most points a polyline may have.
- vibesketch.render.scene.scene_svg(canvas, preset=Preset(name='acs-1996', bond=14.4, line=0.6, size=10, spacing=0.18, bold=2.0, hash_spacing=2.5, margin=0.95, font='Roboto, sans-serif', stereo_labels=False), marks=None, texts=None, nanostructures=None)[source]¶
Render a drawing, or return
Nonefor an empty canvas.textsgives, per molecule, text printed in its place, such as a peptide’s sequence;Nonedraws the structure.nanostructuresmaps species ids to the generated nanostructures the drawing’s pictures show.Unsupported chemistry or arrow modes are refused rather than omitted. Text is escaped plain text in the publication font, with line breaks kept.