Figures for papers¶
How to turn a drawing into the figure a journal prints: the journal styles, compound numbers, the export formats and what to send. Every step below is one command, one API call or one click, and the browser, the CLI, the SDK, the REST API and the MCP tools all produce the same figure from the same document.
Draw once, in the document’s style¶
A document carries a style.preset: acs-1996 (the default), rsc or
wiley. The preset fixes the bond length, the line width, the font size,
the hash spacing of wedges and the arrow proportions, so a scheme drawn for
one journal is re-rendered for another by changing the preset, not the
drawing. The values behind each preset, with their sources, are tabulated
on the file formats page.
Set the preset in the browser’s export panel, save it in the document, or override it for one export:
vibe-sketcher render scheme.qvf -o scheme.svg --style rsc
The SDK accepts render(document, "svg", style="rsc"), the REST export
routes ?style=rsc, and the MCP export tool style. An override never
changes the saved document.
Number the compounds¶
A compound number is the species’ label: 1, 2a, (S)-3, as it
appears in the text. Labels are printed under each structure in the scheme
and survive redrawing, because a species keeps its id, label and name when
its structure stays the same. Set them in the browser’s species panel, with
PATCH /api/documents/{id}/species/{species} (label), or with the
set_species MCP tool; vibe-sketcher info DOC lists them. Reagents drawn at
the arrow, conditions and the yield as printed (87%) belong to the
reaction and are drawn at the arrow.
Export the figure¶
Three formats cover what journals ask for:
Format |
When |
Needs |
|---|---|---|
SVG |
Line art for the manuscript and the supporting information; editable later. |
nothing beyond vibe-sketcher |
Vector figures for submission systems that want PDF; the drawing’s physical size in points, searchable text with an embedded subset of the bundled font. |
the publication extra |
|
PNG |
Raster, when the journal insists; 300 DPI by default, 600 for line art, with the print resolution recorded in the file. |
the publication extra |
Install the publication extra once, pip install 'vibesketch[publication]'
(see installation); the desktop
bundle includes it. Then:
vibe-sketcher render scheme.qvf -o scheme.pdf --style acs-1996
vibe-sketcher render scheme.qvf -o scheme.png --style acs-1996 --dpi 600
No system font and no network resource is used; the figure embeds the bundled Roboto face, so it looks the same on every machine. Text with a glyph the font lacks is refused with the code point rather than printed as a box. The limits, 36 to 2400 DPI and 40 million pixels, are described with the formats under PNG and PDF publication figures.
Figures also come out of the browser’s export panel, the SDK
(vibesketch.render.render and vibesketch.document.formats.export), the
REST routes GET /api/documents/{id}/export/{svg|png|pdf|eps|emf} and
POST /api/export/{format}, and the MCP export tool.
Stereodescriptors in a figure¶
--stereo-labels prints each structure’s CIP descriptors beside it, R/S
(r/s when pseudo-asymmetric) at stereocentres and E/Z at double bonds, with
enhanced-stereo groups (AND, OR) where the drawing has them:
vibe-sketcher render scheme.qvf -o scheme.pdf --stereo-labels
The descriptors are assigned afresh for every figure with the labeler
described under stereodescriptors, never copied
from labels stored in the drawing, so a figure cannot show an out-of-date
label. The REST export routes take ?stereo_labels=true, the MCP export
tool stereo_labels, the SDK render(..., stereo_labels=True), and the
browser’s export menu has SVG, PNG and PDF “with R/S, E/Z”.
Sequences in a figure¶
--sequences prints a peptide or nucleic acid imported from its sequence as
that sequence, in place of its structure: H-Tyr-Gly-Gly-Phe-Leu-OH in
IUPAC’s three-letter symbols with its termini, 5’-ACGU-3’ for RNA and
5’-d(ACGT)-3’ for DNA. Every other species is drawn as usual:
vibe-sketcher render peptides.qvf -o peptides.pdf --sequences
A peptide’s D-amino acids print as D-Ala and so on, and ornithine,
sarcosine, norleucine, norvaline and 2-aminobutanoic acid as Orn, Sar, Nle,
Nva and Abu, the symbols of the same IUPAC recommendations:
H-Tyr-D-Ala-Gly-Phe-Leu-OH. An acetyl cap prints as Ac- and an amide as -NH2
in place of H- and -OH, an N-methyl residue as MeAla and a phosphate on the
side chain as Ser(PO3H2): Ac-MeAla-Ser(PO3H2)-Gly-OH. A disulfide between two cysteines of the chain
is drawn as a bridge above them, as those recommendations draw cystine, one
bridge above another where they overlap. A peptide of several chains, such
as insulin, prints a line per chain in the HELM’s order, all starting at one
edge, with a line from each cysteine down to its partner in the next chain
for a disulfide between them. A sequence with another link, such as a
lactam, a disulfide between chains that are not printed one under the
other, or another monomer is refused with the reason, and is drawn as its
structure without the option. The REST export
routes take ?sequences=true, the MCP export tool sequences, the SDK
render(..., sequences=True), and the browser’s export menu has SVG, PNG and
PDF “with sequences”. See peptides and nucleic acids.
LaTeX manuscripts can also take the drawing as chemfig source,
vibe-sketcher convert scheme.qvf -o scheme.tex, a fragment to \input
that draws the scheme with the drawn angles; see chemfig for
LaTeX. Save editable documents as QVF.
CDXML carries an editable drawing to and
from ChemDraw and other drawing programs.
Shapes and TLC plates¶
The ▭, ◯ and ╱ tools draw a rectangle, an ellipse and a line by dragging, to box a species, ring a site or rule off part of a scheme. Figures print them unfilled in the preset’s line width, and the ellipse fills the box its two corners span. A polyline, an open path through two or more points, comes only from a KET file or the API, because the canvas engine has no polyline tool and cannot show one; figures print it like a line through each point in turn. The CDXML export refuses a polyline, and every export refuses an object the renderer does not know rather than leave it out.
Import ▸ TLC plate… draws a thin-layer chromatography plate beside the
drawing from lanes written as LABEL: Rf, Rf; LABEL: Rf, for example
SM: 0.62; co: 0.62, 0.31; P: 0.31:
a plate with a baseline and a solvent front;
in each lane a spot per Rf, Rf of the way from the baseline to the front, with its value beside it;
the lane’s label under the plate.
The plate is made of ordinary rectangles, lines, ellipses and text, so you can move, edit or delete its parts, and every figure prints it. It takes 1 to 12 lanes of up to six spots, each Rf from 0 to 1.
vibe-sketcher tlc scheme.vsk --lane SM:0.62 --lane co:0.62,0.31 --lane P:0.31
The SDK is vibesketch.document.tlc.with_tlc_plate; REST
POST /api/documents/{id}/tlc with lanes, MCP add_tlc_plate.
The chemfig export writes a drawing with
shapes as one TikZ picture, the molecules as \chemfig walks where they are
drawn.
Apparatus pictograms¶
Import ▸ Apparatus… draws a laboratory pictogram beside the drawing:
type its kind and, optionally, a label to put under it, for example
flask Reflux 2 h. The kinds are flask (round-bottom), conical-flask,
beaker, condenser, separatory-funnel, column, vial and hotplate,
and for electrochemistry and nanotube growth:
Kind |
Drawn |
|---|---|
|
A cell with its working, reference and counter electrodes, labelled WE, RE and CE |
|
A divided cell: two electrodes either side of a membrane |
|
An instrument with a display and WE, RE and CE terminals |
|
A furnace around a quartz tube with a sample boat, the gas flowing from |
|
A cylinder with its valve and outlet |
|
A lamp with its rays, labelled hν |
Like the TLC plate, a pictogram is vibe-sketcher’s own line art made of rectangles, ellipses and lines, so you can move or edit its parts and every figure prints it, the chemfig TikZ picture included. A pictogram is a schematic, not drawn to scale. The canvas has no arcs, so the round-bottom flask is a circle with its neck drawn on top.
vibe-sketcher apparatus scheme.vsk condenser --at 12,0 --scale 1.5 --label reflux
--at X,Y puts the pictogram’s bottom centre at that point of the drawing
(one unit is a bond length); without it the pictogram stands to the right of
everything drawn. --scale takes 0.25 to 4. The SDK is
vibesketch.document.apparatus.with_apparatus; REST
POST /api/documents/{id}/apparatus with kind and optional at, scale
and label; MCP add_apparatus. An unknown kind is refused with the list of
kinds.
Highlights¶
Mark atoms in colour to show where a reaction happens or which part of a molecule matters: select atoms on the canvas, pick a colour beside Mark selection in the Species heading and press it. Bonds between two marked atoms of one colour are marked with them, so marking a ring’s atoms marks the ring. The species card lists its marks, Show marks shows them on the canvas, and Clear removes a species’ marks. Marking atoms again in another colour moves them to it.
The colours are Okabe and Ito’s palette for colour-vision deficiency: orange, sky-blue, green, blue, vermillion and purple. Figures print each as an opaque, light tint under the line art, so structures stay legible in every journal preset and the colour is the same in SVG, PNG and PDF.
The canvas engine keeps no highlight in its drawing, so the marks are part
of the document (highlights, see the document format):
each names a species and its atoms by canonical rank, so a mark follows the
structure when it is redrawn, and every drawing of the species carries it.
On a symmetric molecule a redrawn structure may show a mark on an equivalent
atom. A species that leaves the drawing takes its marks with it.
vibe-sketcher highlight scheme.vsk --species m1 --atom 2 --atom 3 --colour orange
vibe-sketcher highlight scheme.vsk --clear
Atoms are numbered from 1 as in the species report (C2 is 2). The SDK is
vibesketch.document.highlights (with_highlight, without_highlights);
REST POST /api/documents/{id}/highlights and .../highlights/clear, MCP
highlight_atoms and clear_highlights.
Abbreviations¶
Draw a group such as Ph, Boc or OTf as its label: Abbreviate in the Species heading contracts every known group in the drawn structures, the species card lists the ones it holds, and its Expand draws their atoms again. The canvas engine’s own functional groups and its contract and expand commands make the same groups, so either way works.
Only the drawing changes. The structure keeps every atom where it was drawn,
so its SMILES, InChIKey, report, exports, 3D structure and calculations are
those of the full molecule; expanding gives the same drawing back. Figures
draw a contracted group as its label at the atom that carries the bond,
reversed when the bond leaves it to the right (TfO, EtO₂C), with stereo
descriptors assigned on the full structure; highlights on atoms inside the
group are not drawn. The chemfig export
writes the label too, so the bond meets its first atom reading east and its
last reading west (AcO-, -CF_{3}).
The known groups, largest first so Cbz wins over Bn and Bn over Ph, are TBDPS, Fmoc, Cbz, OTf, OTs, OMs, Ts, Tf, Ms, TIPS, TBS, TMS, Boc, PMB, Bz, Bn, Ph, THP and MOM from the Journal of Organic Chemistry’s standard abbreviations, then RDKit’s defaults (CO₂Et, tBu, iPr, Et, CF₃, CN, NO₂, CO₂H, OMe, OAc, NHAc, Ac, CHO and others). Contracting every group stops while most of each molecule is still drawn, RDKit’s 40 % rule, so a small molecule is not reduced to labels; naming a label contracts it wherever it occurs, so toluene can be drawn as PhMe.
vibe-sketcher abbreviate scheme.vsk # every known group
vibe-sketcher abbreviate scheme.vsk --species m2 --label Ph # one group of one species
vibe-sketcher abbreviate scheme.vsk --expand # atoms again
vibe-sketcher abbreviate scheme.vsk --list # known and drawn labels
The SDK is vibesketch.document.abbreviations (with_abbreviations,
without_abbreviations, abbreviation_labels); REST
GET /api/documents/{id}/abbreviations, POST .../abbreviations and
.../abbreviations/expand; MCP list_abbreviations,
contract_abbreviations and expand_abbreviations. In the .vsk file a
contracted group is a superatom (SUP) S-group of the canvas’s KET drawing.
MOL, SDF and RXN exports write it as a SUP S-group with its label and
attachment point, so programs that read S-groups show the label and the
others the full structure; importing such a file contracts the group again,
unless the file marks it expanded.
R-groups are planned.
Polymer repeat units¶
Draw a repeat unit with the canvas engine’s S-group tool (type SRU, with its subscript, usually n, and its connectivity). Figures draw the unit in brackets that cross the two bonds leaving it at their midpoints, with the subscript after the closing bracket and hh or eu beside it for head-to-head or either-unknown connectivity; head-to-tail, the default, adds nothing. This follows IUPAC’s “Graphic representations (chemical formulae) of macromolecules” (1994).
The other bracket types are drawn the same way:
S-group |
Label after the closing bracket |
|---|---|
Copolymer (COP) |
co, or alt, ran or block for its subtype, as IUPAC’s copolymer nomenclature (1985) writes them; hh or eu as for a repeat unit |
Multiple group (MUL) |
its multiplier, such as 3 |
Generic (GEN) |
nothing |
A copolymer, multiple or generic group with no bond leaving it is bracketed on its left and right. A bracket around another stands further out and taller, so a copolymer’s brackets enclose those of its repeat units.
A bracketed group is a drawing, not a structure: it is no species, so it has
no SMILES, report, 3D structure or calculation, and the Notes say so. It is a
generic structure of the document instead, with its
brackets in CXSMILES; vibe-sketcher generics DOC lists them. MOL and SDF
files carry the brackets both ways (file formats). Refused
with the reason: a repeat unit with other than two bonds leaving it, another
group with one or more than two, two brackets on the same atoms or
overlapping without one enclosing the other, three brackets across one bond,
and an unknown subtype, connectivity or multiplier. The chemfig
export writes a drawing with brackets as one
TikZ picture of the drawing, every bracket and label where the SVG figure has
them.
R-groups¶
Draw a generic structure with the canvas engine’s R-group tools: an R-group atom on the core, and each R-group’s definition with its substituents and their attachment points. Figures print an R-group atom as R1, R2 and so on (R when it has no number). Each definition is drawn where it lies on the canvas, with “R1 =” to its left and a wavy bond at every attachment point.
An R-group’s conditions, set in the canvas engine’s R-logic dialog, are printed below “R1 =” in the canvas engine’s own words:
Condition |
Printed |
|---|---|
Occurrence 1 to 3 |
R1=1-3 |
Occurrence more than 2 |
R1>2 |
Unsubstituted positions are hydrogen (rest H) |
R1>0 (RestH) |
R1 only together with R2 (if-then) |
IF R1>0, then THEN R2 below |
With no condition set nothing is printed: the group occurs at least once.
A core and its definitions are drawings, not structures: they are no species,
so they have no SMILES, report, 3D structure or calculation, and the Notes say
so. They are the document’s generic structures and R-group
definitions instead, with the substituent table and the
conditions; vibe-sketcher generics DOC lists them. A MOL export writes them as
a V3000 R-group file and reads such files back; SDF refuses them
(file formats). Figures refuse, with the reason, an atom that stands for several R-groups,
an occurrence that is not a count, span or bound, an if-then condition that
names no R-group number, and an R-group inside a definition, which they cannot
print yet. The chemfig export writes the core
and its definitions, conditions included, as one TikZ picture, as the figure
draws them.
Materials at a bond end¶
The structures of surface and nanotube chemistry end at a material: HOOC–CNT, Au–C6H4–NH2, SiO2–O–P(O)(OH)–R. Draw the material as an atom with a label of its own:
Type the label on an atom, such as
CNT,NPorSiO2. The canvas engine keeps any label that is not an element as a pseudo-atom.For a label that is an element’s symbol, such as
Aufor a gold surface, give a*atom the aliasAu; an atom labelledAuis a gold atom. Molfiles write such a label the same way, as anAatom with an alias, and a SMILES*is an attachment without a label.
The label may be up to 24 letters, digits, spaces and ( ) + . _ / -, and has
one single bond to the structure. Figures print it at the bond end as
written, on either side (SiO2 with its subscript, never reversed), in every
style preset, and the chemfig export sets it
as one atom.
A labelled structure is a generic structure of kind
labelled, not a species: it has no SMILES, report, 3D structure or
calculation, and the Notes say so. vibe-sketcher generics DOC lists it with
its labels. It survives KET, MOL, SDF and CDXML round trips; CDXML writes the
label as ChemDraw’s generic nickname.
To calculate the organic part, cap it explicitly: vibe-sketcher cap DOC g1 --cap H (or CH3) replaces every label with that cap and adds the result as
a species. Its automatic identifier skips IDs already used by surfaces and
other document records. The species records the structure, its labels and the cap, so it
is never mistaken for the drawn material; it stays while the labelled
structure is drawn and is removed, with a note, when it is not. Nothing is
capped unless asked.
Figures for office programs¶
Office programs take two vector formats, both written by vibe-sketcher itself from the same figure, so they need nothing installed:
Format |
When |
|---|---|
EMF |
Windows Enhanced Metafile: Word, PowerPoint and Excel insert it as an editable vector picture, on Windows and macOS. |
EPS |
Encapsulated PostScript: page-layout programs, LaTeX through |
Both are at the figure’s physical size in points, and their text is outlined from the bundled font, so they look the same on a machine without it (the text is shapes, not editable words). Colours, highlights, shapes and stereo labels come along; every line keeps the preset’s width.
vibe-sketcher render scheme.qvf -o scheme.emf
vibe-sketcher render schemes/*.qvf --out figures/ --format emf,eps
The browser’s Export menu has EPS and EMF, and three copies for pasting:
Copy as PNG: the figure at 300 DPI, which office programs paste at its print size;
Copy as SVG: the vector figure where the program takes SVG from the clipboard, and its markup as text otherwise;
Copy as MOL: the structures, for other chemistry programs.
To copy part of a drawing to another chemistry program, select it and use the canvas’s own copy (⌘C or Ctrl+C).
Render a paper’s figures at once¶
Keep one document per scheme and render them all with one style into one directory, in every format the submission needs:
vibe-sketcher render schemes/*.qvf --out figures/ --format svg,pdf --style acs-1996
Each document becomes figures/STEM.svg and figures/STEM.pdf, named
after the document. Every figure is attempted; a document that cannot be
read, a figure that is refused (a glyph the font lacks, a raster over the
pixel limit, a stereochemistry the export cannot express) or a missing
backend is reported on standard error with its reason, and the command
exits with status 3 when a figure was refused or 1 when a document could
not be read, an output could not be written or a backend is missing, so a
build script notices. Missing files, unreadable files and invalid text are
reported per document; the other documents are still rendered. If the
output directory cannot be created, the command fails before rendering. Two
documents with the same stem are refused before anything is written.
What to send a journal¶
Vector first. Send SVG or PDF for schemes and structures; they scale to the column width without loss. Send PNG only when the instructions require a raster, at 600 DPI for line art.
The journal’s style, from the document. Pick the preset the journal asks for and keep it in the document; the drawing does not change.
Column widths. Each journal states its single and double column widths in its author guidelines. A figure’s physical size is the SVG’s
widthandheightin points, which the PDF keeps; check it against the column rather than scaling the figure in a word processor.Fonts. The exports embed the bundled font, so nothing has to be installed on the journal’s side.
Keep the source. Keep the
.qvfor.vskwith the manuscript: it holds the drawing, the compound numbers and the style, and renders the same figure again for the revision.
Enumerated species¶
The properties panel’s Generate all R-group combinations adds all finite, constraint-valid species beside the original core and substituent definitions. The originals remain available for figures and editing. Products are ordinary species for publication figures, 3D generation and calculation inputs; the generic core itself remains a drawing, not a calculation target. See enumeration limits and interfaces.