Skip to main content

RXNEmb

PyPI - Downloads Python version
License: MIT

RXNEmb is a novel reaction-level embedding descriptor generated via the pre-trained model RXNGraphormer. It captures chemical bond formation and cleavage patterns, enabling data-driven reaction classification, mechanistic interpretation, and reaction space visualization.

🚀 Overview

The preprint paper is available at https://arxiv.org/pdf/2601.03689 .

🔧 Installation

pip install rxnemb

💡 Generate RXNEmb Descriptor

Basic Usage

Example 1: Generate reaction embeddings from SMILES list

from rxnemb import RXNEMB

# Initialize with CPU (default)
# To use GPU: device='cuda' or device='cuda:0'
generator = RXNEMB(device='cpu')

# prepare reaction SMILES
# here are some examples
rxn_smiles_lst = [
    "O=C(O)c1ccccc1.[Cl-]>>O=C(Cl)c1ccccc1",  
    "C1CCOC1.C1CCOC1.O.O=C(O)C(Br)c1ccccc1>>OCC(Br)c1ccccc1",
    # ... more 
]

# output
rxn_emb = generator.gen_rxn_emb(rxn_smiles_lst)
print(rxn_emb.shape) # torch.Size([2, 768])

Use Customized Model

If you want to train your own model from scratch, please refer to the instructions in the RXNGraphormer repository.

After training is done, you can load the model by specifying the path to the directory containing your model weights and configuration file:

from rxnemb import RXNEMB

generator = RXNEMB('/path/to/your/own/model')

📚 Citation

If you use RXNEmb in your research, please cite:

@misc{RXNEmb_liu2026,
      title={A Pre-trained Reaction Embedding Descriptor Capturing Bond Transformation Patterns}, 
      author={Weiqi Liu and Fenglei Cao and Yuan Qi and Li-Cheng Xu},
      date = {2026-01-07},
      eprint={2601.03689},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      doi = {10.48550/arXiv.2601.03689},
      url={https://arxiv.org/abs/2601.03689}, 
      pubstate = {prepublished},
}

Release files for rxnemb 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rxnemb 1.0.2
File Size Uploaded
rxnemb-1.0.2.tar.gz 55.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for rxnemb 1.0.2
File Interpreter ABI Platform
rxnemb-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 110.7 MB

Release files / rxnemb-1.0.2.tar.gz

Download URL rxnemb-1.0.2.tar.gz
Size 55.3 MB
Tags Source
SHA-256 checksum
How to use checksums
886a0b36d893395d58e4f4a365e8a1d54955b16002337fd4de2f7ce91fa0a16e
BLAKE2b-256 checksum
How to use checksums
3c028b087618714f3cf5d9b2ede284d30af0aa2cf2a03bed28093bff9f670cbf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / rxnemb-1.0.2-py3-none-any.whl

Download URL rxnemb-1.0.2-py3-none-any.whl
Size 55.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
824fad86034e6aa18ddf01224d1e9eacbb05f60b7e68ef94d90083e2da6ccddb
BLAKE2b-256 checksum
How to use checksums
8269339d783e16732b5731d7a7834b1aaba0dd9c55e7faff69b9a343da86c3f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

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