molprint_core/lib.rs
1//! Core molecular representation, SMILES/SMARTS parsing, and perception algorithms.
2//!
3//! `molprint-core` provides the foundational data structures and parsers for the
4//! molprint ecosystem:
5//!
6//! - [`MolGraph`] — a petgraph-based molecular graph with [`Atom`] and [`BondType`] data
7//! - [`parse_smiles`] — parse a SMILES string into a [`MolGraph`]
8//! - [`smarts::compile`] — compile a SMARTS pattern for substructure matching
9//! - [`ring::find_sssr`] — smallest set of smallest rings (Horton algorithm)
10//! - [`arom::perceive_aromaticity`] — aromaticity perception
11//!
12//! # Example
13//!
14//! ```
15//! use molprint_core::{parse_smiles, Atom, Element};
16//!
17//! let mol = parse_smiles("c1ccccc1").unwrap();
18//! assert_eq!(mol.node_count(), 6);
19//! ```
20
21pub mod arom;
22pub mod mol;
23pub mod ring;
24pub mod smarts;
25pub mod smiles;
26
27pub use mol::atom::{Atom, Element};
28pub use mol::bond::BondType;
29pub use mol::graph::MolGraph;
30pub use smiles::parse_smiles;