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.1

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.1
File Size Uploaded Provenance Actions
minimol_onnx-0.1.1.tar.gz 19.3 MB With provenance Details for minimol_onnx-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 38.0 MB

Release files / minimol_onnx-0.1.1.tar.gz

Download URL minimol_onnx-0.1.1.tar.gz
Size 19.3 MB
Tags Source
SHA-256 checksum
How to use checksums
ec41e061801fcf5a0a1266aff8f84c5e04e901b3d3fe1f59329594be03b0ec16
BLAKE2b-256 checksum
How to use checksums
42109fe06029b90b27ab1d3864e41575660723ffc7131dd75640a76b97c03481
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.1-py3-none-any.whl

Download URL minimol_onnx-0.1.1-py3-none-any.whl
Size 18.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
56ec52189a8bbe8324168c3b8a38f16e3b839dd29ad022c58a7a337c58e5a587
BLAKE2b-256 checksum
How to use checksums
52e573899e55412ba57bab19811c41ac3c4e9b9d83a7c88ff9911a4edded2451
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.1

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.1.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.1 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