Skip to content

RetroXpert

RetroXpert is a two-stage retrosynthesis research implementation that predicts product bond disconnections, then generates reactants from synthons using an OpenNMT-based model.

Catalog updated ·

Overview

RetroXpert provides the reference implementation for the NeurIPS2020 paper “RetroXpert: Decompose Retrosynthesis Prediction Like A Chemist.” It separates retrosynthesis prediction into product bond disconnection and subsequent reactant generation. Its documented workflow supports research on these stages individually and as a connected prediction pipeline, rather than presenting a ready-made synthesis planning service.

The first stage preprocesses the USPTO-50K dataset into labels and DGL graphs, extracts semi-template patterns, and trains an EGAT model to predict bond disconnections. The documented training example includes reaction categories. Intermediate processing converts the results into OpenNMT-formatted data and generates synthons from predicted disconnections. Errors from the first-stage training predictions can also be used to augment second-stage training data. The reactant-generation stage includes preprocessing, training, checkpoint averaging, translation, and prediction scoring.

Atom-mapped reactions and their conversion to SMILES are important implementation details. The README documents an information leak in which atom ordering and mapping numbers exposed reaction-atom information during synthon preparation. It recommends revised product canonicalization that also reassigns mapping numbers. This makes preprocessing choices central to any evaluation of the repository. Later reported results are accompanied by a statement that revised implementation and paper updates would follow; the source excerpts do not establish that those updates were completed. The dependency guidance describes the authors’ environment, not verified compatibility with current package releases.

Key Features

  • Preprocesses USPTO-50K reactions into labels and DGL graphs for product bond-disconnection prediction.
  • Extracts semi-template patterns from training data and identifies patterns across the dataset.
  • Provides EGAT training and evaluation workflows with reaction-category information.
  • Generates synthons from first-stage bond-disconnection predictions and formats data for OpenNMT.
  • Uses first-stage training errors to augment data for second-stage reactant generation.
  • Documents an OpenNMT reactant-generation workflow with checkpoint averaging, translation, and scoring.

Use Cases

  • Intended evaluation: study how product bond-disconnection errors affect downstream reactant predictions in a two-stage retrosynthesis pipeline.
  • Intended evaluation: compare atom-ordering and mapping-number preprocessing choices when checking for information leakage in USPTO-based experiments.
  • Intended evaluation: investigate whether training-data augmentation based on first-stage errors changes second-stage prediction behavior.

How to Use

  1. Read the official README, including the information-leak notices, before selecting an experimental workflow. Treat the later result update separately from the implementation instructions.
  2. Inspect the repository requirements and bundled OpenNMT-py installation guidance. The README lists the authors’ dependency environment; assess suitability for your environment rather than assuming current compatibility.
  3. Review the revised canonicalization implementation, which the README recommends for USPTO preprocessing. Check how atom order and mapping numbers are handled.
  4. Follow the README’s first-stage sequence: prepare labels and graphs, extract semi-template patterns, train EGAT, and evaluate bond-disconnection predictions with the documented reaction-category setting.
  5. Prepare OpenNMT data, predicted synthons, and training-error augmentation. Then follow the documented second-stage preprocessing, training, checkpoint averaging, translation, and scoring sequence. For an intended evaluation, record preprocessing choices alongside scores and inspect both intermediate disconnections and generated reactants.

Related resources

AiZynthFinder is a Python retrosynthetic planning toolkit that uses neural-network-guided search to propose routes from target molecules to precursors in a configured stock.

Open sourcePython

Retrosynthesis

LocalRetro is a research implementation for retrosynthesis prediction using local reaction templates, with workflows for template extraction, model training, testing and decoding predicted reactants.

Python

Retrosynthesis

Related guides

Retrosynthesis

Planning a Retrosynthesis Tool Evaluation

Build a bounded evaluation of retrosynthesis planning, single-step prediction and atom mapping, with explicit inputs, scoring rules and expert review—without treating generated routes as validated laboratory procedures.