A Python library for molecular fingerprinting and similarity calculations.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
chemprep-0.1.0.tar.gz
(80.7 kB
view details)
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 chemprep-0.1.0.tar.gz.
File metadata
- Download URL: chemprep-0.1.0.tar.gz
- Upload date:
- Size: 80.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3358cc92fd41c8f7af0b895ee98b4c0377e4c93bf0310eae33492152798e264
|
|
| MD5 |
5846672656f35d64adaa14c9d74bfd04
|
|
| BLAKE2b-256 |
7624aa23d17d1bb603a664949ce228c0d1490e70bdea9f9c75eceb4c0259f7df
|
File details
Details for the file chemprep-0.1.0-py3-none-any.whl.
File metadata
- Download URL: chemprep-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
729c76840f827fa2ae4c71607fb989c98004d48815823f8cfcd3a14806194d77
|
|
| MD5 |
0012eb0473712f93524836810040403f
|
|
| BLAKE2b-256 |
dbb85df436f6daa459f55ecdbb263293c67bbcfb98cd488d731a4288f6bafa86
|