Fingerprints & Similarity
Calculate Morgan, RDKit, and pattern fingerprints for similarity searching and substructure screening.
Fingerprints let you encode molecular structure as bit vectors for similarity searching and substructure screening across a library. The fingerprint type (Morgan, RDKit topological, or pattern), its radius and bit count, and the similarity metric are what most affect which compounds surface as hits.
Common fingerprints
- Morgan:
AllChem.GetMorganFingerprintAsBitVect(mol, radius=2, nBits=2048) - RDKit topological:
Chem.RDKFingerprint(mol, fpSize=2048) - Pattern:
Chem.PatternFingerprint(mol)
Substructure screening
- Precompute pattern fingerprints for the library.
- Filter by
HasSubstructMatchonly on candidates that pass fingerprint screening.
Batch performance tips
- Use bit vectors (
ExplicitBitVect) and avoid converting to hex strings during scoring. - Chunk large libraries and parallelize scoring if CPU allows.
- Persist fingerprints to disk (e.g.,
.fpviaDataStructs.BitVectToBinaryText) to skip recompute.
Was this page helpful?