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
- Read the official README for the workflow and dependency requirements, and consult the repository licence before planning use or redistribution.
- Obtain the repository, follow its documented environment setup, and use the README in
./datato locate the raw USPTO-50K or USPTO-MIT data. Check dataset permissions separately. - Follow the preprocessing instructions: use
Extract_from_train_data.pyto derive local templates, thenRun_preprocessing.pyto assign them to reactions. Inspect the generated template and split CSV files before training. - Follow the training section for
Train.pywith the selected dataset. For the documented USPTO_50K example, the checkpoint location isLocalRetro/models/LocalRetro_USPTO_50K.pth. - Follow the testing and decoding sections for
Test.pyandDecode_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.