vibesketch.render.styles

Journal drawing parameters in print points; sources are also in formats.md.

RSC: Green Chemistry author guidelines, chemical structures. https://www.rsc.org/publishing/publish-with-us/publish-a-journal-article/green-chemistry Wiley: Journal of Computational Chemistry graphics FAQ (not all Wiley journals). https://onlinelibrary.wiley.com/page/journal/1096987x/homepage/graphics_faq_jcc.html

Functions

finish_svg(svg, drawer, mol, wedges, preset)

Apply independent stereo widths and physical hash spacing to RDKit SVG.

prepare(mol, preset)

Prepare a copy; measure dashed bonds as solid wedges for label clipping.

resolve(name)

Classes

Preset(name, bond, line, size, spacing, ...)

class vibesketch.render.styles.Preset(name: 'str', bond: 'float', line: 'float', size: 'int', spacing: 'float', bold: 'float', hash_spacing: 'float', margin: 'float', font: 'str' = 'Arial, Helvetica, sans-serif')[source]

Bases: object

Parameters:
name: str
bond: float
line: float
size: int
spacing: float
bold: float
hash_spacing: float
margin: float
font: str = 'Arial, Helvetica, sans-serif'
configure(options, mean_bond=1.0)[source]
Parameters:
Return type:

None

vibesketch.render.styles.resolve(name)[source]
Parameters:

name (str)

Return type:

Preset

vibesketch.render.styles.prepare(mol, preset)[source]

Prepare a copy; measure dashed bonds as solid wedges for label clipping.

RDKit has no independent bold-width/hash-spacing controls. Its measured wedge endpoints retain label clearance; finish_svg replaces only those bonds, preserving RDKit’s stereo assignment and all other graphics.

Parameters:
Return type:

tuple[Any, dict[int, bool]]

vibesketch.render.styles.finish_svg(svg, drawer, mol, wedges, preset)[source]

Apply independent stereo widths and physical hash spacing to RDKit SVG.

Parameters:
Return type:

str