Skip to main content

bigsmiles/
lib.rs

1//! # bigsmiles
2//!
3//! A BigSMILES parser for polymer and macromolecule notation.
4//!
5//! BigSMILES extends SMILES with stochastic objects `{...}` to represent
6//! repeat units in polymers.
7//!
8//! ## Quick Start
9//!
10//! ```rust
11//! use bigsmiles::parse;
12//!
13//! let polymer = parse("{[]CC(c1ccccc1)[]}").unwrap(); // polystyrene
14//! let pe = parse("CC{[$]CC[$]}CC").unwrap();          // dimethyl polyethylene
15//! println!("{}", pe);
16//! ```
17//!
18//! ## References
19//!
20//! - [BigSMILES Paper](https://pubs.acs.org/doi/10.1021/acscentsci.9b00476)
21//! - [BigSMILES Documentation](https://olsenlabmit.github.io/BigSMILES/docs/line_notation.html)
22
23// Re-export opensmiles for convenience
24pub use opensmiles;
25
26#[path = "ast/mod.rs"]
27pub mod ast;
28pub mod error;
29pub mod parser;
30
31// Re-export public API
32pub use ast::*;
33pub use error::*;
34pub use parser::parse;