mhfp
Molecular MHFP fingerprints for cheminformatics applications
Decision gist · record as of 2026-08-14
Yes, if you need fast molecular similarity search and can accept an unmaintained package. The algorithm is well-published and the code is stable, but verify RDKit compatibility with your environment and confirm the license terms before use. Not recommended for new projects requiring ongoing support or frequent updates.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires RDKit (cheminformatics library) and NumPy; RDKit must be installed separately and may have system-level dependencies.
- Low install friction with no runtime dependencies beyond RDKit and NumPy.
- Package is abandoned (last commit 2023-02-16, 1275 days ago) with no active maintenance, so expect no bug fixes or updates.
License · maintenance · safety
(unclear) — License status is unclear—no SPDX identifier or raw license text provided. Verify the actual license terms at the repository before use in proprietary or copyleft-sensitive contexts.
last release 2023-02-16 (1275 days) · last repo commit 2023-02-16 · 98 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 86,738 downloads/mo, #13,842 on PyPI
Alternatives
Verify before relying
pip install mhfp
from mhfp.encoder import MHFPEncoder
mhfp_encoder = MHFPEncoder()
fp = mhfp_encoder.encode('CCOC1=C(C=C(C=C1)S(=O)(=O)N(C)C)C2=NC(=O)C3=C(N2)C(=NN3C)C(C)(C)C')
dist = MHFPEncoder.distance(fp, fp)- Whether the package's license is compatible with your use case (license status is unclear in the metadata).
- Current stability and compatibility with recent RDKit and NumPy versions, given the package has not been updated since 2023.
What it is and what it does
MHFP is a molecular fingerprinting algorithm that converts chemical structures (provided as SMILES strings or RDKit molecule objects) into compact hash-based representations suitable for fast similarity searching. It applies the MinHash method to circular substructures extracted from molecules, encoding structural detail up to six bonds (MHFP6). The fingerprints are designed to work with locality-sensitive hashing (LSH) for approximate nearest-neighbor search, enabling rapid retrieval of similar molecules from large chemical databases.
The package provides two main interfaces: MHFPEncoder for generating fingerprints and computing pairwise distances, and LSHForestHelper for building indexed structures that support fast approximate queries. It also includes SECFP (SMILES Extended Connectivity Fingerprint), a folded variant. The package is a thin Python wrapper around the fingerprinting logic and depends on RDKit for molecular parsing and NumPy for numerical operations.
Use it for
- Virtual screening: find structurally similar drug candidates from a chemical library given a query molecule.
- Analog recovery: identify known compounds similar to a novel structure in benchmarking or hit-to-lead workflows.
- Approximate nearest-neighbor search: retrieve the k most similar molecules from a large dataset without exhaustive comparison.
- Molecular clustering: group compounds by structural similarity using fingerprint distances.
- Ligand-based design: compare test molecules against a reference set to assess novelty or redundancy.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need fast molecular similarity search and can accept an unmaintained package.
The algorithm is well-published and the code is stable, but verify RDKit compatibility with your environment and confirm the license terms before use. Not recommended for new projects requiring ongoing support or frequent updates.
Install
mhfp on PyPI
Before you install
Low install friction with no runtime dependencies beyond RDKit and NumPy. Package is abandoned (last commit 2023-02-16, 1275 days ago) with no active maintenance, so expect no bug fixes or updates.
Requires RDKit (cheminformatics library) and NumPy; RDKit must be installed separately and may have system-level dependencies.
License in practice
License status is unclear—no SPDX identifier or raw license text provided. Verify the actual license terms at the repository before use in proprietary or copyleft-sensitive contexts.
Quickstart
pip install mhfp
from mhfp.encoder import MHFPEncoder
mhfp_encoder = MHFPEncoder()
fp = mhfp_encoder.encode('CCOC1=C(C=C(C=C1)S(=O)(=O)N(C)C)C2=NC(=O)C3=C(N2)C(=NN3C)C(C)(C)C')
dist = MHFPEncoder.distance(fp, fp)
Verify before relying
- Whether the package's license is compatible with your use case (license status is unclear in the metadata).
- Current stability and compatibility with recent RDKit and NumPy versions, given the package has not been updated since 2023.
Package facts
| License | Not declared unclear |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Abandoned 1,275 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 86,738 / month, #13,842 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: mhfp-1.9.6-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “molecular fingerprint minhash”
- mhfpEncodes molecular structures as MinHash fingerprints (MHFP6) for fast…
- prolifProLIF generates interaction fingerprints from molecular complexes in…
- datasketchProvides probabilistic data structures (MinHash, HyperLogLog, and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also aimsim-core · selfies · padelpy · nmslib · simhash · datasketch · prolif · rensa · voyager · PubChemPy