Skip to main content

chematic_fp/
lib.rs

1//! `chematic-fp` — molecular fingerprints for chematic.
2//!
3//! Provides:
4//! - **ECFP** (Extended Connectivity Fingerprints): Morgan-algorithm-based circular
5//!   fingerprints using FNV-1a hashing for reproducibility.
6//! - **MACCS 166-bit structural keys**: SMARTS-based structural key fingerprints.
7//! - **Topological path fingerprints**: DFS path enumeration up to a configurable length.
8//! - **AtomPair fingerprints**: atom-pair encoding with topological distances.
9//! - **Topological Torsion fingerprints**: four-atom path encoding.
10//! - **C-Series Reaction fingerprints**: Chemical transformation encoding (Phase 1)
11//! - **MHFP/SECFP**: MinHash fingerprints for fast approximate similarity searching (Phase 1)
12//! - **ERG**: Extended Reduced Graph fingerprints for functional group-based similarity (Phase 1)
13
14#![forbid(unsafe_code)]
15
16pub mod atom_pair;
17pub mod bitvec;
18pub mod bulk;
19pub mod ecfp;
20pub mod erg;
21pub mod fcfp;
22pub mod layered;
23pub mod lsh;
24pub mod maccs;
25pub mod map4;
26pub mod mhfp;
27pub mod path;
28pub mod pattern;
29pub mod pharmacophore_fp;
30pub mod reaction_fp;
31pub mod search;
32pub mod topo_path;
33
34pub use atom_pair::{atom_pair_fp, torsion_fp};
35pub use bitvec::{BitVec2048, BitVecN};
36pub use bulk::{tanimoto_matrix, tanimoto_slice, top_k_similar};
37pub use ecfp::{EcfpConfig, ecfp, ecfp4, ecfp6, morgan_fp_counts, tanimoto_ecfp4};
38pub use erg::{
39    ERG_VEC_LEN, ErgAtomType, ErgBondType, ErgConfig, ErgFingerprint, cosine_erg_vec, erg,
40    erg_extended, erg_vec, erg_with_config, tanimoto_erg, tanimoto_erg_vec,
41};
42pub use fcfp::{fcfp, fcfp4, fcfp6, tanimoto_fcfp4};
43pub use layered::{layered_fp, layered_fp_by_layer, tanimoto_layered};
44pub use lsh::MhfpLshIndex;
45pub use maccs::maccs;
46pub use map4::{Map4Config, map4, map4_default, tanimoto_map4};
47pub use mhfp::{MhfpConfig, MhfpFingerprint, mhfp, mhfp_128, mhfp_with_config, tanimoto_mhfp};
48pub use path::{RdkitPathConfig, rdkit_path_fp, rdkit_path_fp_with_config, tanimoto_rdkit_path};
49pub use pattern::{pattern_fp, tanimoto_pattern};
50pub use pharmacophore_fp::{
51    pharmacophore_feature_counts, pharmacophore_fp_2d, tanimoto_pharmacophore_2d,
52};
53pub use reaction_fp::{
54    ReactionFingerprint, ReactionFpConfig, reaction_fp, reaction_fp_ecfp4, reaction_fp_with_config,
55    tanimoto_reaction_fp,
56};
57pub use search::{FpType, nearest_neighbors, nearest_neighbors_from_fp};
58pub use topo_path::{TopoPathConfig, tanimoto_topo_path, topo_path};