ChemPrep
A Python library and command-line tool for molecular fingerprinting, similarity calculations, and descriptor generation using RDKit.
Installation
pip install chemprep
Usage
As a Library
from chemprep.fingerprints import generate_fingerprint, get_available_fingerprints
from chemprep.similarity import calculate_similarity, get_available_similarity_metrics
from chemprep.descriptors import get_all_descriptors
# Get available fingerprints and similarity metrics
print(get_available_fingerprints())
print(get_available_similarity_metrics())
# Generate a fingerprint
smiles = "CCO"
fp = generate_fingerprint(smiles, fingerprint_type="Morgan")
print(fp)
# Calculate similarity
smiles1 = "CCO"
smiles2 = "CCN"
similarity = calculate_similarity(smiles1, smiles2, fingerprint_type="Morgan", similarity_metric="Tanimoto")
print(similarity)
# Generate descriptors
descriptors = get_all_descriptors(smiles)
print(descriptors)
Command-Line Interface
# Get help
chemprep --help
chemprep fingerprint --help
chemprep similarity --help
chemprep descriptors --help
# Generate a fingerprint for a single SMILES
chemprep fingerprint "CCO"
# Generate fingerprints from a file
chemprep fingerprint -i smiles.txt -t RDKit -o fingerprints.csv
# Calculate similarity
chemprep similarity "CCO" "CCN" -t Morgan -m Tanimoto
# Generate descriptors for a single SMILES
chemprep descriptors "CCO"
# Generate descriptors from a file
chemprep descriptors -i smiles.csv -o descriptors.csv
Development
Setup
git clone https://github.com/santuchal/ChemPrep.git
cd chemprep
pip install -e .[dev]
Running Tests
python -m unittest discover tests
Release files for chemprep 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| chemprep-0.1.0.tar.gz | 80.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chemprep-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 86.7 kB
Release files / chemprep-0.1.0.tar.gz
| Download URL | chemprep-0.1.0.tar.gz |
|---|---|
| Size | 80.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3358cc92fd41c8f7af0b895ee98b4c0377e4c93bf0310eae33492152798e264
|
|
BLAKE2b-256 checksum How to use checksums |
7624aa23d17d1bb603a664949ce228c0d1490e70bdea9f9c75eceb4c0259f7df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.2
|
Release files / chemprep-0.1.0-py3-none-any.whl
| Download URL | chemprep-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
729c76840f827fa2ae4c71607fb989c98004d48815823f8cfcd3a14806194d77
|
|
BLAKE2b-256 checksum How to use checksums |
dbb85df436f6daa459f55ecdbb263293c67bbcfb98cd488d731a4288f6bafa86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.2
|