PyDompeKeyGen
A lightweight Python / RDKit implementation of DompéKeys — a set of 1,064 SMARTS-based structural keys for mapping chemical space, built for use as an interpretable molecular fingerprint.
DompéKeys were originally developed by scientists at Dompé farmaceutici as part of the EXSCALATE drug-discovery platform and published in the Journal of Cheminformatics (Manelfi, Tazzari, et al., 2024). This package provides a small, dependency-light way to generate the corresponding fingerprint for any RDKit molecule.
✨ Features
- 🧬 1,064 curated SMARTS keys spanning amino acids, acids, metal binders, toxicophores, ring systems, and generic pharmacophoric features (H-bond donors/acceptors, etc.), organized across 5 complexity levels.
- 🎯 Single-class API — one object, one method, one RDKit
ExplicitBitVectout. - ⚡ Fast startup — the SMARTS catalog is compiled once and cached to disk (
smarts.pkl), and automatically rebuilt if your installed RDKit version changes. - 🔍 Interpretable — every set bit maps back to a named, human-readable substructure.
📦 Installation
PyDompeKeyGen is not yet published to PyPI. Install it directly from GitHub:
pip install git+https://github.com/OlivierBeq/PyDompeKeyGen.git
Or clone and install locally for development:
git clone https://github.com/OlivierBeq/PyDompeKeyGen.git
cd PyDompeKeyGen
pip install -e .
Requires Python ≥ 3.10 and RDKit (installed automatically as a dependency).
🚀 Quick start
from rdkit import Chem
from pydompekeygen import PyDompeKeys
# Load the DompéKeys catalog (built once, then cached on disk)
dompekeys = PyDompeKeys()
# Generate a fingerprint for a molecule
mol = Chem.MolFromSmiles("CC(=O)Oc1ccccc1C(=O)O") # aspirin
fingerprint = dompekeys.GetFingerprint(mol)
print(f"{fingerprint.GetNumOnBits()} / {dompekeys.num_bits} keys matched")
See the usage guide for similarity calculations, converting fingerprints to NumPy arrays, batch processing, and inspecting which named keys matched.
📚 Documentation
| Document | Description |
|---|---|
| docs/usage.md | Practical guide: similarity search, NumPy conversion, batch processing, introspecting matched keys |
| docs/api.md | API reference for the PyDompeKeys class |
| docs/background.md | What DompéKeys are, the 5 complexity levels, and how to cite the original paper |
📖 Citation
If you use PyDompeKeyGen in published work, please cite the original DompéKeys paper:
Manelfi, C., Tazzari, V., Lunghini, F. et al. "DompeKeys": a set of novel substructure-based descriptors for efficient chemical space mapping, development and structural interpretation of machine learning models, and indexing of large databases. J Cheminform 16, 21 (2024). https://doi.org/10.1186/s13321-024-00813-4
See docs/background.md for a BibTeX entry.
🤝 Contributing
Issues and pull requests are welcome at github.com/OlivierBeq/PyDompeKeyGen.
⚖️ License
Released under the MIT License.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pydompekeygen-1.0.0.tar.gz.
File metadata
- Download URL: pydompekeygen-1.0.0.tar.gz
- Upload date:
- Size: 29.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd207c06b7a8d6aaa3ca329660d410a305caf46ced3673250ce4f10b115f6cdc
|
|
| MD5 |
b935dd1e88c6152608ab9339fc96020c
|
|
| BLAKE2b-256 |
5677a019b711624a53beaefd1984738574b42689ca337b846081487e215297d0
|
File details
Details for the file pydompekeygen-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pydompekeygen-1.0.0-py3-none-any.whl
- Upload date:
- Size: 22.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d1b416a7787190eb74c14dd4d0682b8691d308e7f9098eb804a45af7b2ffa94
|
|
| MD5 |
745d6619ac06b566dad98757d1cdec0a
|
|
| BLAKE2b-256 |
8a19b20af2ded793ed99e3322cebb43fb9edfd6fe7e05e6fb134a246be89bcdb
|