CDDD models in ONNX format with automatic model downloading
Project description
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}
}
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
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 cddd_onnx-0.1.0.tar.gz.
File metadata
- Download URL: cddd_onnx-0.1.0.tar.gz
- Upload date:
- Size: 453.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abd441d006d61589fff77a70712b85c264c91290cfcd12801a998f07ad0faedd
|
|
| MD5 |
381fb3e23edd52d1cddf958cd18c3243
|
|
| BLAKE2b-256 |
bc277596d53b8773fa1436906ae847919de8f30652d057e60c093e8826ea585b
|
Provenance
The following attestation bundles were made for cddd_onnx-0.1.0.tar.gz:
Publisher:
publish.yml on sergsb/cddd-onnx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cddd_onnx-0.1.0.tar.gz -
Subject digest:
abd441d006d61589fff77a70712b85c264c91290cfcd12801a998f07ad0faedd - Sigstore transparency entry: 169094171
- Sigstore integration time:
-
Permalink:
sergsb/cddd-onnx@ae16be347e5dba98a6e6f98fd6ba5cd0ee8d4af1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/sergsb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ae16be347e5dba98a6e6f98fd6ba5cd0ee8d4af1 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file cddd_onnx-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cddd_onnx-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7711f7c9a913787fdfb1bb511347b2387472603a64a7f05e1451f434a664235
|
|
| MD5 |
9d5fbed4df2a190c0a43aafd7dbfe111
|
|
| BLAKE2b-256 |
a9c597c6f622497c809645a978135647270b2d08a6053db1e9fa3dca11818ac3
|
Provenance
The following attestation bundles were made for cddd_onnx-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on sergsb/cddd-onnx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cddd_onnx-0.1.0-py3-none-any.whl -
Subject digest:
d7711f7c9a913787fdfb1bb511347b2387472603a64a7f05e1451f434a664235 - Sigstore transparency entry: 169094175
- Sigstore integration time:
-
Permalink:
sergsb/cddd-onnx@ae16be347e5dba98a6e6f98fd6ba5cd0ee8d4af1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/sergsb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ae16be347e5dba98a6e6f98fd6ba5cd0ee8d4af1 -
Trigger Event:
workflow_dispatch
-
Statement type: