Skip to main content

minimol-onnx

MiniMol molecular fingerprints, frozen into a portable ONNX graph. The goal is a straightforward install and a single call to get fingerprints, without the dependency conflicts of the original package.

Given the same featurized input, the fingerprints match the original MiniMol to within 6.4e-6 max absolute difference across 300 diverse molecules (1–190 atoms).

Install

pip install minimol-onnx

The 32 MB ONNX graph ships inside the wheel — no download step, no cache directory, works offline.

Use

from minimol_onnx import MinimolONNX

model = MinimolONNX()
fingerprints = model(["c1ccc(-c2cccnc2)cc1", "CCO"])   # (2, 512) float32

model accepts a single SMILES string or any iterable of them, and returns an (n, 512) float32 array. Batching is a performance knob only — results are identical either way.

MinimolONNX(
    model_path=...,             # override the bundled graph
    featurization_kwargs=...,   # dict, or path to JSON
    batch_size=100,
    providers=["CPUExecutionProvider"],   # any onnxruntime provider
)

For GPU inference, pip install minimol-onnx[gpu] and pass providers=["CUDAExecutionProvider"].

Dependencies

onnxruntime numpy scipy pandas networkx loguru rdkit datamol torch torch-geometric, verified against torch 2.13, numpy 2.4, scipy 1.17, pandas 3.0, onnxruntime 1.28. torch and torch-geometric are pulled in by the featurizer, not by inference. Torch runs entirely in onnxruntime but featurization still builds a PyG Data object, so the install is ~2 GB.

Development

The ONNX export pipeline lives in export/ and ships in the sdist. It needs an environment with minimol 1.3.5 and graphium 2.4.7 installed; see export/README.md.

git clone https://github.com/a-pouplin/minimol-onnx
cd minimol-onnx
pip install -e ".[dev]"
pytest

License and attribution

Apache-2.0 AND MIT. This package combines two upstream sources:

  • The vendored featurizer in minimol_onnx/minimol_feat/ derives from graphium 2.4.7 (Apache-2.0, Valence Labs / Recursion Pharmaceuticals / Graphcore), modified to drop the compiled extensions.
  • The weights in minimol_v1.onnx are exported from minimol 1.3.5 (MIT, Graphcore Ltd.) and are numerically unchanged.

See NOTICE for the full breakdown. If you use this, cite the original work:

@article{klaser2024minimol,
  title   = {{MiniMol}: A Parameter-Efficient Foundation Model for Molecular Learning},
  author  = {Kl{\"a}ser, Kerstin and Banaszewski, B{\l}a{\.z}ej and Maddrell-Mander, Samuel and
             McLean, Callum and M{\"u}ller, Luis and Parviz, Ali and Huang, Shenyang and
             Fitzgibbon, Andrew},
  journal = {arXiv preprint arXiv:2404.14986},
  year    = {2024},
  url     = {https://arxiv.org/abs/2404.14986}
}

Metadata

Release files for minimol-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)

Source distribution for minimol-onnx 0.1.0
File Size Uploaded Provenance Actions
minimol_onnx-0.1.0.tar.gz 19.3 MB With provenance Details for minimol_onnx-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for minimol-onnx 0.1.0
File Interpreter ABI Platform Actions
minimol_onnx-0.1.0-py3-none-any.whl Python 3 none any Details for minimol_onnx-0.1.0-py3-none-any.whl

Total release size: 38.0 MB

Release files / minimol_onnx-0.1.0.tar.gz

Download URL minimol_onnx-0.1.0.tar.gz
Size 19.3 MB
Tags Source
SHA-256 checksum
How to use checksums
0a669250da7bdea206d6780c00a3eb5784d100cb3a6267e9294bc170c53f6655
BLAKE2b-256 checksum
How to use checksums
f859aecf47d21faa54ba90b774032e9a21959c47b912cac1dfdfaab0cf3a295d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 15, 2026.

Transparency log

Release files / minimol_onnx-0.1.0-py3-none-any.whl

Download URL minimol_onnx-0.1.0-py3-none-any.whl
Size 18.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
105efbc8269976422e3529cea91616a8370d0ee23eb41160005a8c2dd4046200
BLAKE2b-256 checksum
How to use checksums
c30228484e6d6e67c391b21b273ec2f9d64c4e8e7b59a0ad278d5d35e395d96a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 15, 2026.

Transparency log

Security for minimol-onnx 0.1.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for minimol_onnx-0.1.0.tar.gz

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 Aug 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page