Expand description
§opensmiles
A SMILES parser following the OpenSMILES specification.
§Quick Start
use opensmiles::parse;
let molecule = parse("CCO").unwrap(); // ethanol
println!("{}", molecule); // OCC§Parallel Parsing
Enable the parallel feature for multi-threaded batch parsing:
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/
Re-exports§
Modules§
Enums§
- Atom
Error - Errors that can occur when creating or manipulating an atom.
- Bond
Error - Errors that can occur when creating or manipulating an atom.
- Molecule
Error - Errors that can occur when building a molecule.
- Node
Error - Errors that can occur when creating or manipulating a node.
- Parser
Error - Errors that can occur when parsing a SMILES string.
Type Aliases§
- Node
Index - Index type for atoms/nodes in a molecule graph.