Skip to content

LocalRetro

Shuan Chen / Yousung Jung's group at KAIST (now in SNU)

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

Catalog updated ·

Overview

LocalRetro implements retrosynthesis prediction using local reaction templates. The README attributes its development to Yousung Jung's group at KAIST, now at SNU, and links the publication “Deep Retrosynthetic Reaction Prediction using Local Reactivity and Global Attention.” Its documented role is a dataset-based research workflow: derive templates from reaction training data, train a predictive model, and decode test-set predictions into candidate reactants.

The workflow begins with raw USPTO-50K or USPTO-MIT data, whose download instructions are delegated to the repository's data README. Preprocessing first extracts atom and bond templates plus template information, with reaction-class mappings produced when the relevant class file exists. A second stage assigns those templates to the raw data and writes training, validation, test and labeled-data CSV files. Training produces a model checkpoint; testing produces a raw prediction file that a separate decoding step converts into reactant outputs, including a class-specific output location.

The README lists Python, Numpy, PyTorch, RDKit, DGL and DGLLife as requirements and provides an example environment setup. Those instructions are source-described requirements, not evidence of current compatibility. The source excerpts document dataset training and testing rather than an interactive prediction service or a custom-molecule interface. They also distinguish stereo-aware and stereo-unaware evaluation metrics, so any proposed reproduction should specify its scoring convention. The repository code carries a noncommercial, share-alike licence; this entry does not establish separate permissions for external datasets or model weights.

Key Features

  • Extracts local atom and bond reaction templates from training data, alongside template information and conditional reaction-class mappings.
  • Assigns derived templates to raw reaction data and generates preprocessed training, validation, test and labeled-data CSV files.
  • Provides a dataset-specific training workflow that saves a LocalRetro model checkpoint.
  • Runs test-set prediction and saves raw predictions for a separate decoding stage.
  • Decodes raw predictions into candidate reactants, with standard and class-specific output locations.
  • Documents stereo-aware and stereo-unaware evaluation conventions and updates to the atom-pair function and activation function.

Use Cases

  • Intended evaluation: reproduce the documented USPTO-50K or USPTO-MIT training-to-decoding workflow and inspect the resulting reactant predictions.
  • Intended evaluation: examine extracted atom and bond template inventories to study how training reactions are represented locally.
  • Intended evaluation: compare prediction scoring under stereo-aware and stereo-unaware conventions while keeping the dataset and model setup fixed.

How to Use

  1. Read the official README for the workflow and dependency requirements, and consult the repository licence before planning use or redistribution.
  2. Obtain the repository, follow its documented environment setup, and use the README in ./data to locate the raw USPTO-50K or USPTO-MIT data. Check dataset permissions separately.
  3. Follow the preprocessing instructions: use Extract_from_train_data.py to derive local templates, then Run_preprocessing.py to assign them to reactions. Inspect the generated template and split CSV files before training.
  4. Follow the training section for Train.py with the selected dataset. For the documented USPTO_50K example, the checkpoint location is LocalRetro/models/LocalRetro_USPTO_50K.pth.
  5. Follow the testing and decoding sections for Test.py and Decode_predictions.py. Inspect both raw and decoded outputs; for a proposed evaluation, record the dataset, checkpoint and stereochemistry scoring convention rather than assuming the two metrics are interchangeable.

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

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

Open sourcePython

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.

Licensing

Reading Code, Weight and Data Licences Separately

Build a component-by-component licensing record for chemistry AI workflows, separating software, model weights, datasets and hosted services while keeping missing evidence and unresolved conditions visible.