Expand description
Depiction proportions (xenopict / RDKit house style).
Keep in sync with python/xpict/draw/metrics.py.
Constants§
- BOND_PX
- Bond length in drawing / CSS-px units (alias of
SCALE). - CHAIN_
END_ GAP_ FRAC - CHAIN_
END_ GAP_ PX - END_
GAP_ FRAC - END_
GAP_ PX - FONT_
FRAC - Atom-label em as a fraction of bond length.
- FONT_PX
- FONT_
STEM_ EM - Liberation Sans Regular vertical stem width in em.
- FONT_
STEM_ EM_ BOLD - Liberation Sans Bold vertical stem width in em (measured on H).
- HALO_
FRAC - HALO_
GAP_ PX - Halo outline grow (half the label-gap air) + soft white fill.
- HALO_
OPACITY - HALO_
STROKE - HASH_
PER_ BOND - LABEL_
GAP_ FRAC - LABEL_
GAP_ PX - MARK_
FRAC - MARK_
HALO_ COLOR - xenopict mark halo
<use stroke="#555">. - MARK_
HALO_ OPACITY - MARK_
HALO_ STROKE_ FRAC - xenopict mark halo (
<use>):stroke-width: scale * 0.2, opacity 0.45. - MARK_
HALO_ STROKE_ PX - MARK_
OPACITY - MARK_
STROKE_ FRAC - xenopict mark layer:
stroke-width: scale * 0.1, opacity 0.7. - MARK_
STROKE_ PX - OFFSET_
FRAC - RDKit
multipleBondOffset. - OFFSET_
PX - PAD_
FRAC - PAD_PX
- SCALE
- xenopict
Xenopict.scale/ xenosite depiction"scale": 20. - SCRIPT_
SCALE - RDKit
DrawText::SUBS_SCALE/SUPER_SCALEfor H-counts and charges. - SHADE_
FRAC - STAR_
FRAC - Dummy / R-group
*height as a multiple of Liberation cap-height. - STROKE_
FRAC - Bond stroke as a fraction of bond length — tracks the label stem so ink
weight matches letter stems when
FONT_FRACchanges. - STROKE_
PX - WEDGE_
HALF_ PX - WEDGE_
WIDTH_ FRAC - Full wedge width at the fat end, as a fraction of bond length.
- WEIGHT_
AT_ ONE - Absolute ink multiplier at user-facing
weight = 1(house look). - WEIGHT_
MIN - Lowest user-facing
weight(maps to absolute ink1= Regular stem).
Functions§
- diagram_
weight - Map user-facing mol
weight→ absolute ink multiplier (≥ 1). - halo_
gap_ for_ weight - Outer halo buffer for mol
weight:HALO_GAP_PX× √ink. - halo_
stroke_ for_ weight - Halo stroke for mol
weight:HALO_STROKE× √ink (sublinear vs ink). - halo_
stroke_ from_ stroke - Halo stroke width tracks active bond ink (2×, same ratio as
HALO_FRAC). - hash_
count - Dash count scaling with drawn bond length (hashed wedges).
- label_
weight_ grow_ px - Outward glyph buffer (px) so absolute ink stems grow past Regular.
- label_
weight_ standoff_ px - Extra bond↔label standoff (px) when absolute ink exceeds Regular.
- stroke_
frac_ from_ stem - Bond stroke fraction from a stem width in em (rounded like
STROKE_FRAC). - stroke_
px_ for_ weight - Bond stroke in drawing px for user-facing mol
weight. - stroke_
px_ from_ stem - Bond stroke in drawing px keyed to a label stem.