Expand description
Shared depiction core for xpict.
Python under python/xpict/ is still the working engine. This crate holds
algorithms we are ready to share with PyO3 and WASM — start small, move
modules as they stabilize. See the crate README.md for the migration
rule.
Re-exports§
pub use align::kabsch_2d;pub use align::rigid_align_coords;pub use align::RigidTransform;pub use arrows::axis_aligned;pub use arrows::clip_box_edge;pub use arrows::edge_anchors;pub use arrows::edge_primitives as arrow_edge_primitives;pub use arrows::filleted_path_d;pub use arrows::shaft_path_d;pub use arrows::should_fillet;pub use arrows::simplify_route;pub use arrows::EdgePaintIn;pub use arrows::EdgePrim;pub use arrows::ANCHOR_GAP;pub use arrows::KINK_PX;pub use arrows::TURN_RADIUS;pub use bonds::bond_paths;pub use bonds::bond_strokes;pub use bonds::centered_displacements;pub use bonds::depict_order;pub use bonds::join_centered_multibonds;pub use bonds::line_intersect;pub use bonds::multi_bond_offset;pub use bonds::BondStrokes;pub use bonds::DrawnBond;pub use bonds::StrokePath;pub use colormap::colormap_rgb;pub use colormap::sample_colormap;pub use colormap::XENOSITE;pub use cxsmiles::apply_cx_by_index;pub use cxsmiles::cx_atom_labels;pub use cxsmiles::cx_source;pub use cxsmiles::smiles_base;pub use depict::depict_molecule;pub use doc::apply_star_labels;pub use doc::assign_mol_ids;pub use doc::compose_scheme;pub use doc::plan_edge;pub use doc::render_doc;pub use doc::resolve_mol_opts;pub use doc::validate_edges;pub use doc::AlignTo;pub use doc::AlignToSpec;pub use doc::CommonOpts;pub use doc::DepictSpec;pub use doc::DocPaint;pub use doc::EdgeArrow;pub use doc::EdgeNode;pub use doc::EdgeNodeKind;pub use doc::EdgeRouting;pub use doc::ForTypesPatch;pub use doc::Label;pub use doc::LabelItem;pub use doc::LabelLanes;pub use doc::LabelPlacement;pub use doc::LabelPos;pub use doc::LayoutAlgorithm;pub use doc::LayoutDirection;pub use doc::LayoutOpts;pub use doc::MolIds;pub use doc::MolNode;pub use doc::MolNodeKind;pub use doc::MolOpts;pub use doc::Node;pub use doc::NodeType;pub use doc::Opts;pub use doc::OptsPatch;pub use doc::ShadeSpec;pub use doc::ShadeStyle;pub use doc::TextNode;pub use doc::TextNodeKind;pub use doc::TypedOptsPatch;pub use edge::AlignOpts;pub use edge::CoordGenMoleculeResult;pub use edge::CoordMethod;pub use edge::EdgePlan;pub use edge::EdgeResult;pub use edge::EdgeTask;pub use edge::EdgeTaskResult;pub use edge::MolTemplate;pub use edge::MIN_MCS_ATOMS as EDGE_MIN_MCS_ATOMS;pub use elements::atomic_number;pub use elements::element_symbol;pub use elements::SYMBOLS;pub use elk::layout_json as elk_layout_json;pub use elk::scheme_layout_options;pub use elk::DiagramKind as ElkDiagramKind;pub use geom::capsule_halo_path_d;pub use geom::disk_halo_path_d;pub use geom::polygon_to_svg_d;pub use labels::compose_label;pub use labels::label_side;pub use labels::place_backbone;pub use labels::place_label;pub use labels::shorten_bond;pub use labels::split_label;pub use labels::AtomIn;pub use labels::BondIn;pub use labels::BondOut;pub use labels::LabelParts;pub use labels::LabelSide;pub use labels::PlacedLabel;pub use markup::parse_label_markup;pub use metrics::BOND_PX;pub use metrics::OFFSET_FRAC;pub use metrics::OFFSET_PX;pub use metrics::SCALE;pub use metrics::SHADE_FRAC;pub use metrics::STROKE_PX;pub use plotdot::PlotDot;pub use plotdot::ShadeDisk;pub use rings::apply_ring_interiors;pub use rings::bond_interior_normals;pub use rings::find_sssr;pub use rings::Ring;pub use scene::Layer;pub use scene::LayerName;pub use scene::MoleculeIn;pub use scene::Primitive;pub use scene::Scene;pub use scene::TextAnchor;pub use scene::Viewport;
Modules§
- align
- Rigid 2D alignment (Kabsch) — Indigo / no-RDKit fallback.
- arrows
- Reaction / network edge shafts in document space.
- bonds
- Bond strokes: skeleton centerlines, multi-bond offsets, stereo, joins.
- colormap
- Vendored xenosite colormap (from xenopict._cm_def / Python
_xenosite_cm). - cxsmiles
- ChemAxon CXSMILES atom-label helpers.
- depict
- Single-molecule depiction:
MoleculeIn→Scene. - doc
- Declarative document — plan (pass 1) + paint (pass 2) + scheme compose.
- edge
- EdgePlan / EdgeResult — host callback ABI (coord_gen / align).
- elements
- Periodic table: atomic number ↔ element symbol.
- elk
- Multi-molecule diagram placement via elkrs (native ELK).
- font
- Bundled Liberation Sans outlines (
ttf-parser). - geom
- Geometry for halos and ink (Shapely stand-in).
- labels
- Atom-label orientation and backbone bond insets.
- markup
- Chem-label markup →
ChemGlyphs. - metrics
- Depiction proportions (xenopict / RDKit house style).
- plotdot
- Concentric plot-dot shading (xenopict
PlotDotsemantics). - rings
- Practical SSSR and ring-interior normals for depiction.
- scene
- Drawable scene document — engine-neutral primitives shared by Python & JS.