molprint
Molecular fingerprint computation and similarity search in Rust — fast enough for large-scale screening, accurate enough to match RDKit bit-for-bit.
- MACCS-166 structural keys (100% RDKit-accurate on ChEMBL 10k)
- Morgan/ECFP fingerprints (configurable radius, 512–4096 bit)
- Tanimoto, Dice, Cosine similarity via POPCNT
- Parallel threshold and top-k screening via Rayon
- FPS, SDF, SMILES file I/O (chemfp-compatible)
Install
From a release binary — download from Releases, unpack, and place molprint on your PATH.
macOS note: binaries are ad-hoc signed but not notarized. After downloading, clear the quarantine flag once:
From source:
CLI
# Compute fingerprints
# Similarity search
Output: tab-separated id\tsimilarity, sorted by descending score.
Library
use parse_smiles;
use ;
use tanimoto;
let mol_a = parse_smiles.unwrap; // benzene
let mol_b = parse_smiles.unwrap; // pyridine
let fp = new;
let sim = tanimoto;
println!; // 0.600
Benchmarks
Measured on Apple M-series, Rust 1.94, --release. Run cargo bench to reproduce.
| Tanimoto (2048-bit) | 36 ns |
| Morgan ECFP4 | ~700k mol/s |
| MACCS-166 | ~535k mol/s |
| Screening 100k compounds | 826 µs / query |
Workspace
| Crate | Role |
|---|---|
molprint-core |
SMILES parser, molecular graph, ring perception, SMARTS |
molprint-fp |
Morgan and MACCS fingerprint algorithms |
molprint-search |
Similarity metrics and parallel screening |
molprint-io |
FPS, SDF, SMILES file I/O |
molprint-cli |
CLI tool |
License
MIT