Skip to main content

Crate xpict_core

Crate xpict_core 

Source
Expand description

Shared depiction core for xpict.

Product path: doc::render (DepictSpec → Rendered[]). Language wrappers call this crate; they do not reimplement layout, paint, or SVG.

Re-exports§

pub use align_cost::cost_mapping;
pub use align_cost::cost_mapping_with_generators_limited;
pub use align_cost::mapping_cost;
pub use align_cost::signed_side;
pub use align_cost::substituents_same_side;
pub use align_cost::AtomChirality;
pub use align_cost::AtomFeat;
pub use align_cost::BondFeat;
pub use align_cost::EzStereo;
pub use align_cost::MappingResult;
pub use align_cost::MolGraph;
pub use align_cost::SearchLimits;
pub use align_cost::SearchStats;
pub use align_cost::ALIGN_HOUSE_MAX_STATES;
pub use align_cost::ALIGN_HOUSE_TIMEOUT_MS;
pub use align_cost::COST_BOND_ORDER;
pub use align_cost::COST_CHARGE_RADICAL;
pub use align_cost::COST_ELEMENT;
pub use align_cost::COST_UNMATCHED;
pub use align_layout::align_molecule_constrained;
pub use align_layout::hexagon_fit_max_dev;
pub use align_layout::mol_graph_from_layout;
pub use align_layout::ConstrainedAlignResult;
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::head_px;
pub use arrows::min_shaft_px;
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::is_aromatic_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 catmull::centripetal_catmull_rom_closed_path;
pub use catmull::centripetal_catmull_rom_open_path;
pub use catmull::open_catmull_end_frame;
pub use catmull::open_catmull_with_arrow;
pub use catmull::sample_open_catmull;
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_multicenters;
pub use cxsmiles::cx_source;
pub use cxsmiles::smiles_base;
pub use cxsmiles::Multicenter;
pub use debug_align::align_debug_query;
pub use debug_align::align_debug_template;
pub use debug_align::paint_align_debug;
pub use debug_align::DEBUG_ALIGN_BADGE;
pub use debug_align::DEBUG_ALIGN_OPACITY;
pub use debug_align::DEBUG_ALIGN_PALETTE;
pub use debug_align::DEBUG_ALIGN_UNMATCHED;
pub use debug_box::debug_rect;
pub use debug_box::label_debug_rect;
pub use debug_box::mol_debug_rect;
pub use debug_box::scene_debug_rect;
pub use debug_box::DEBUG_BOX_DASH;
pub use debug_box::DEBUG_BOX_STROKE;
pub use debug_box::DEBUG_BOX_STROKE_PX;
pub use depict::depict_molecule;
pub use depict::frame_offset;
pub use doc::annotations_from_overlay;
pub use doc::apply_star_labels;
pub use doc::assign_mol_ids;
pub use doc::canonicalize_overlay;
pub use doc::compose_scheme;
pub use doc::overlay_from_annotations;
pub use doc::plan_edge;
pub use doc::render_doc;
pub use doc::resolve_mol_opts;
pub use doc::validate_edges;
pub use doc::validate_shade_colormap;
pub use doc::AlignTo;
pub use doc::AlignToSpec;
pub use doc::Annotation;
pub use doc::AtomLabelDetailed;
pub use doc::AtomLabelSpec;
pub use doc::AtomNumberBy;
pub use doc::AtomNumberPolicy;
pub use doc::AtomNumberSpec;
pub use doc::CalloutField;
pub use doc::CalloutSpec;
pub use doc::CircleField;
pub use doc::CircleSpec;
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::FillSpec;
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::LabelRole;
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::MolOverlayFields;
pub use doc::MolText;
pub use doc::MolTextSpec;
pub use doc::Node;
pub use doc::NodeType;
pub use doc::Opts;
pub use doc::OptsPatch;
pub use doc::RegionField;
pub use doc::RegionSpec;
pub use doc::RegionStyle;
pub use doc::RegionTextPlace;
pub use doc::ShadeSpec;
pub use doc::ShadeStyle;
pub use doc::StrokeSpec;
pub use doc::TextNode;
pub use doc::TextNodeKind;
pub use doc::TypedOptsPatch;
pub use doc::Z_ATOMS;
pub use doc::Z_ATOM_LABEL;
pub use doc::Z_BACKGROUND;
pub use doc::Z_BONDS;
pub use doc::Z_CALLOUT;
pub use doc::Z_CIRCLE;
pub use doc::Z_HALO;
pub use doc::Z_NAME;
pub use doc::Z_REGION;
pub use doc::Z_SHADE;
pub use doc::process_edge_plan;
pub use doc::process_edge_plan_with_frames;
pub use doc::render;
pub use doc::DepictRendered;
pub use doc::SvgAtom as DepictSvgAtom;
pub use doc::SvgBond as DepictSvgBond;
pub use edge::AlignMode;
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::atom_display_label;
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::aromatic_ring_circles;
pub use rings::bond_interior_normals;
pub use rings::find_relevant_rings_from_adj;
pub use rings::find_sssr;
pub use rings::find_sssr_from_adj;
pub use rings::kekule_paint_orders;
pub use rings::Ring;
pub use rings::AROMATIC_CIRCLE_FRAC;
pub use scene::AlignDebug;
pub use scene::AlignDebugRole;
pub use scene::AromaticStyle;
pub use scene::Attach;
pub use scene::Layer;
pub use scene::LayerName;
pub use scene::MoleculeIn;
pub use scene::Primitive;
pub use scene::Scene;
pub use scene::SpokeIn;
pub use scene::TextAnchor;
pub use scene::Viewport;
pub use svg::scene_to_svg;
pub use svg::scene_to_svg_json;

Modules§

align_cost
Exact connected molecular alignment with atom-only branch-and-bound.
align_layout
Constrained CoordGen align: cost-map then soft-constrain query onto ref.
arrows
Reaction / network edge shafts in document space.
bonds
Bond strokes: skeleton centerlines, multi-bond offsets, stereo, joins.
catmull
Centripetal Catmull–Rom → cubic Bézier SVG d.
colormap
Vendored xenosite colormap (from xenopict._cm_def / Python _xenosite_cm).
cxsmiles
ChemAxon CXSMILES atom-label and multicenter (m:) helpers.
debug_align
Alignment debug overlays — what matched what.
debug_box
Debug bounding-box overlays for layout / margin inspection.
depict
Single-molecule depiction: MoleculeIn → Scene.
doc
Declarative document — one render entry for every spec.
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.
layout_coordgen
Chemistry-facing 2D layout via private CoordGen backend.
layout_spoke
Split CoordGen layout for ring-center spokes (CX m:).
markup
Chem-label markup → ChemGlyphs.
metrics
Depiction proportions (xenopict / RDKit house style).
plotdot
Concentric plot-dot shading (xenopict PlotDot semantics).
rings
Practical SSSR and ring-interior normals for depiction.
scene
Drawable scene document — engine-neutral primitives shared by Python & JS.
spokes
Ring-center spoke detection and rigid placement (CX m:).
svg
Scene → SVG. Hosts call this; they do not reimplement markup.