molprint-core 0.1.0

Core molecular graph representation, SMILES parser, and ring perception
Documentation
//! Core molecular representation, SMILES/SMARTS parsing, and perception algorithms.
//!
//! `molprint-core` provides the foundational data structures and parsers for the
//! molprint ecosystem:
//!
//! - [`MolGraph`] — a petgraph-based molecular graph with [`Atom`] and [`BondType`] data
//! - [`parse_smiles`] — parse a SMILES string into a [`MolGraph`]
//! - [`smarts::compile`] — compile a SMARTS pattern for substructure matching
//! - [`ring::find_sssr`] — smallest set of smallest rings (Horton algorithm)
//! - [`arom::perceive_aromaticity`] — aromaticity perception
//!
//! # Example
//!
//! ```
//! use molprint_core::{parse_smiles, Atom, Element};
//!
//! let mol = parse_smiles("c1ccccc1").unwrap();
//! assert_eq!(mol.node_count(), 6);
//! ```

pub mod arom;
pub mod mol;
pub mod ring;
pub mod smarts;
pub mod smiles;

pub use mol::atom::{Atom, Element};
pub use mol::bond::BondType;
pub use mol::graph::MolGraph;
pub use smiles::parse_smiles;