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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
//! # chematic — Pure-Rust Cheminformatics
//!
//! **chematic** is a comprehensive cheminformatics toolkit written entirely in
//! Rust with zero C/C++ dependencies. It runs in browsers via WebAssembly,
//! in serverless functions, and in native Rust applications — all from the
//! same codebase.
//!
//! ## Feature highlights
//!
//! | Capability | Crate | Key API |
//! |---|---|---|
//! | SMILES parsing & writing | `smiles` | [`smiles::parse`] |
//! | SMARTS substructure search | `smarts` | [`smarts::find_matches`] |
//! | Maximum common substructure | `smarts` | [`smarts::find_mcs`] |
//! | 2D SVG depiction | `depict` | [`depict::depict_svg`] |
//! | SDF / MOL V2000 + V3000 I/O | `mol` | [`mol::parse_mol`], [`mol::parse_mol_v3000`] |
//! | CIP stereochemistry (R/S, E/Z) | `perception` | [`perception::assign_stereo_from_2d`] |
//! | Fingerprints (ECFP4/6, FCFP, MACCS, AtomPair) | `fp` | [`fp::ecfp4`], [`fp::maccs`] |
//! | Tanimoto / Dice similarity | `fp` | [`fp::BitVec2048::tanimoto`] |
//! | Molecular descriptors (LogP, TPSA, MW, …) | `chem` | [`chem::logp_crippen`], [`chem::tpsa`] |
//! | Exact / monoisotopic mass | `chem` | [`chem::exact_mass`] |
//! | Isotope distribution | `chem` | [`chem::isotope_distribution`] |
//! | Bemis–Murcko scaffold | `chem` | [`chem::murcko_scaffold`] |
//! | Structure standardization & salt stripping | `chem` | [`chem::standardize`], [`chem::largest_fragment`] |
//! | Canonical tautomers | `chem` | [`chem::canonical_tautomer`] |
//! | Reaction SMILES parsing | `rxn` | [`rxn::parse_reaction`] |
//! | SMIRKS template application | `rxn` | [`rxn::run_reactants`] |
//! | 3D coordinate generation | `threed` | [`threed::generate_coords`] |
//! | XYZ / PDB I/O | `threed` | [`threed::parse_xyz`], [`threed::parse_pdb_atoms`] |
//! | UFF-derived geometry minimization | `threed` | [`threed::minimize`] |
//!
//! ## Quick start
//!
//! Add to `Cargo.toml`:
//!
//! ```toml
//! [dependencies]
//! chematic = { version = "0.1", features = ["full"] }
//! ```
//!
//! Parse a molecule and compute properties:
//!
//! ```rust,ignore
//! use chematic::smiles;
//! use chematic::chem;
//! use chematic::depict;
//!
//! let mol = smiles::parse("CC(=O)Oc1ccccc1C(=O)O").unwrap(); // aspirin
//! println!("MW: {:.3}", chem::molecular_weight(&mol));
//! println!("LogP: {:.3}", chem::logp_crippen(&mol));
//! println!("TPSA: {:.1}", chem::tpsa(&mol));
//! let svg = depict::depict_svg(&mol);
//! ```
//!
//! ## Feature flags
//!
//! | Flag | Includes |
//! |---|---|
//! | `smiles` | SMILES parser + core molecule graph |
//! | `perception` | Aromaticity, ring perception, stereochemistry |
//! | `mol` | SDF / MOL V2000 + V3000 read/write |
//! | `depict` | 2D layout + SVG rendering |
//! | `fp` | ECFP, FCFP, MACCS, AtomPair fingerprints |
//! | `chem` | Descriptors, LogP, TPSA, scaffolds, standardization |
//! | `smarts` | SMARTS parser, substructure search, MCS |
//! | `rxn` | Reaction SMILES, SMIRKS transforms |
//! | `threed` | 3D coordinates, UFF minimization, XYZ/PDB I/O |
//! | `full` | All of the above |
pub use chematic_core as core;
pub use chematic_smiles as smiles;
pub use chematic_perception as perception;
pub use chematic_mol as mol;
pub use chematic_depict as depict;
pub use chematic_fp as fp;
pub use chematic_chem as chem;
pub use chematic_smarts as smarts;
pub use chematic_rxn as rxn;
pub use chematic_3d as threed;
pub use chematic_iupac as iupac;