Skip to main content

A reaction-level embedding descriptor.

Project description

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},
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rxnemb-1.0.2.tar.gz (55.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rxnemb-1.0.2-py3-none-any.whl (55.3 MB view details)

Uploaded Python 3

File details

Details for the file rxnemb-1.0.2.tar.gz.

File metadata

  • Download URL: rxnemb-1.0.2.tar.gz
  • Upload date:
  • Size: 55.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rxnemb-1.0.2.tar.gz
Algorithm Hash digest
SHA256 886a0b36d893395d58e4f4a365e8a1d54955b16002337fd4de2f7ce91fa0a16e
MD5 df047298cdc9f991bc2dc1e721a19c61
BLAKE2b-256 3c028b087618714f3cf5d9b2ede284d30af0aa2cf2a03bed28093bff9f670cbf

See more details on using hashes here.

File details

Details for the file rxnemb-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: rxnemb-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 55.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rxnemb-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 824fad86034e6aa18ddf01224d1e9eacbb05f60b7e68ef94d90083e2da6ccddb
MD5 67014b19c20c0b8fb1a577df32505e42
BLAKE2b-256 8269339d783e16732b5731d7a7834b1aaba0dd9c55e7faff69b9a343da86c3f8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page