1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! # opensmiles
//!
//! A SMILES parser following the [OpenSMILES specification](http://opensmiles.org/opensmiles.html).
//!
//! ## Quick Start
//!
//! ```rust
//! use opensmiles::parse;
//!
//! let molecule = parse("CCO").unwrap(); // ethanol
//! println!("{}", molecule); // OCC
//! ```
//!
//! ## Parallel Parsing
//!
//! Enable the `parallel` feature for multi-threaded batch parsing:
//!
//! ```rust
//! # #[cfg(feature = "parallel")]
//! # {
//! use opensmiles::parse_batch;
//!
//! let smiles = vec!["CCO", "c1ccccc1", "CC(=O)O"];
//! let results = parse_batch(&smiles);
//! assert_eq!(results.len(), 3);
//! # }
//! ```
//!
//! ## Grammar
//!
//! This parser implements an LL(1) grammar based on the formal grammar
//! described at <https://depth-first.com/articles/2020/12/21/smiles-formal-grammar-revisited/>
/// Index type for atoms/nodes in a molecule graph.
///
/// Using `u32` allows molecules with up to ~4 billion atoms,
/// sufficient for any polymer simulation.
pub type NodeIndex = u32;
// Re-export public API
pub use *;
pub use *;
pub use *;
pub use *;