CDDD-ONNX
This package provides CDDD (Continuous and Data-Driven Descriptors) models in ONNX format with automatic model downloading capabilities. This is an ONNX runtime version of the original CDDD package.
Limitations
- Currently, only the encoder model is implemented. The decoder uses TensorFlow-specific opcodes that are not supported by ONNX. I am working on a solution.
Installation
pip install cddd-onnx
Usage
Command Line Interface
Extract molecular descriptors from SMILES using the command line interface:
cddd-onnx --input smiles.smi --output descriptors.csv
For CSV files with a custom SMILES column header:
cddd-onnx --input molecules.csv --output descriptors.csv --smiles_header smiles_column
Python Interface
The format is the same as in the original CDDD package. Just import cddd_onnx instead of cddd:
from cddd_onnx import InferenceModel
# Create model instance
model = InferenceModel()
smiles_list = ["CCCCO", "CCCN", "CC1=CC=CC=C1"]
embeddings = model.seq_to_emb(smiles_list)
- The preprocessing stage is inside the seq_to_emb function, so you do not need to run it separately.
- Be aware that if the SMILES is out of AD, the preprocessor returns None, resulting in a row of NaNs for such compounds.
Input Formats
Supported input formats:
- CSV files with SMILES column
- SMI files (one SMILES per line)
Models
The models are automatically downloaded to ~/.cddd_onnx/models/ directory when first used.
Requirements
- onnxruntime
- numpy
- pandas
- tqdm
- rdkit
License
Citation
If you use this software, please cite the original CDDD paper:
@article{Winter2019,
title = {Learning continuous and data-driven molecular descriptors by translating equivalent chemical representations},
volume = {10},
ISSN = {2041-6539},
url = {http://dx.doi.org/10.1039/C8SC04175J},
DOI = {10.1039/c8sc04175j},
number = {6},
journal = {Chemical Science},
publisher = {Royal Society of Chemistry (RSC)},
author = {Winter, Robin and Montanari, Floriane and Noé, Frank and Clevert, Djork-Arné},
year = {2019},
pages = {1692–1701}
}
Metadata
Release files for cddd-onnx 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 | |
|---|---|---|---|
| cddd_onnx-0.1.0.tar.gz | 453.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cddd_onnx-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 462.5 kB
Release files / cddd_onnx-0.1.0.tar.gz
| Download URL | cddd_onnx-0.1.0.tar.gz |
|---|---|
| Size | 453.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
abd441d006d61589fff77a70712b85c264c91290cfcd12801a998f07ad0faedd
|
|
BLAKE2b-256 checksum How to use checksums |
bc277596d53b8773fa1436906ae847919de8f30652d057e60c093e8826ea585b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 5, 2025.
Transparency logRelease files / cddd_onnx-0.1.0-py3-none-any.whl
| Download URL | cddd_onnx-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d7711f7c9a913787fdfb1bb511347b2387472603a64a7f05e1451f434a664235
|
|
BLAKE2b-256 checksum How to use checksums |
a9c597c6f622497c809645a978135647270b2d08a6053db1e9fa3dca11818ac3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 5, 2025.
Transparency log