--- id: mhfp version: "1.9.6" license: unclear license_treatment: unclear maintenance: abandoned --- # mhfp — Molecular MHFP fingerprints for cheminformatics applications License: unclear · Maintenance: abandoned · Downloads: 86.7K/mo ## 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 above — verify before relying. Encodes molecular structures as MinHash fingerprints (MHFP6) for fast similarity search and nearest-neighbor queries using locality-sensitive hashing. 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 pip install mhfp uv add mhfp poetry add mhfp ## Installing mhfp 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. 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) Requires RDKit (cheminformatics library) and NumPy; RDKit must be installed separately and may have system-level dependencies. 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: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 86.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags molecular fingerprint minhash, cheminformatics similarity search, SMILES to fingerprint encoding, approximate nearest neighbor molecules, LSH forest molecular search, ECFP alternative fingerprint, molecule structure comparison, cheminformatics, molecular-fingerprints, similarity-search [View on SkillFed](https://skillfed.io/packages/mhfp) · [View on PyPI](https://pypi.org/project/mhfp/)