Skip to main content

Crate chematic_depict

Crate chematic_depict 

Source
Expand description

chematic-depict — 2D SVG depiction engine for chematic.

Entry point: depict_svg(mol) returns an SVG string.

Re-exports§

pub use eps::render_eps;
pub use eps::render_eps_opts;
pub use grid::depict_svg_grid;
pub use grid::depict_svg_grid_with_opts;
pub use layout::BOND_LEN;
pub use layout::Layout;
pub use layout::Point;
pub use layout::compute_layout;
pub use layout::detect_crossings;
pub use layout::suggest_bond_direction;
pub use png::render_png;
pub use png::render_png_opts;
pub use reaction_svg::depict_reaction_svg;
pub use reaction_svg::depict_reaction_svg_opts;
pub use svg::AtomLabel;
pub use svg::HPosition;
pub use svg::RenderOptions;
pub use svg::atom_color;
pub use svg::atom_color_rgb;
pub use svg::atom_display_label;
pub use svg::atom_label_with_h;
pub use svg::render_svg;
pub use svg::render_svg_highlighted;
pub use svg::render_svg_opts;
pub use svg::render_svg_with_metadata;
pub use similarity_map::similarity_map_svg;
pub use similarity_map::similarity_map_svg_opts;

Modules§

eps
PostScript EPS renderer for molecular 2D layouts.
grid
SVG grid depiction for multiple molecules.
layout
2D coordinate generation for molecular depiction.
png
PNG depiction via tiny-skia rasterization.
reaction_svg
SVG rendering of chemical reactions.
similarity_map
SimilarityMap: atom-colored SVG where each atom is tinted by a scalar weight.
svg
SVG serializer for molecular 2D layouts.

Structs§

DepictAtom
A single atom’s drawing data.
DepictBond
A single bond’s drawing data.
DepictData
Structured depiction data — use this to drive egui/canvas renderers instead of parsing SVG output.

Enums§

DepictBondKind
Visual bond type for rendering.

Functions§

compute_depict_data
Compute structured depiction data for mol using auto-generated 2D layout.
depict_data_with_coords
Compute structured depiction data for mol using caller-supplied coordinates.
depict_eps
Compute a 2D layout and render it as an EPS string.
depict_eps_opts
Compute a 2D layout and render it as EPS with full style control.
depict_svg
Compute a 2D layout and render it as an SVG string.
depict_svg_highlighted
Compute a 2D layout and render it as an SVG with highlighted atoms/bonds.
depict_svg_opts
Compute a 2D layout and render it as an SVG with full style control.