DirectMultiStep: Direct Route Generation for Multi-Step Retrosynthesis
DirectMultiStep is a novel multi-step first approach for generating retrosynthesis routes in chemistry. The project provides multiple models for different retrosynthesis generation approaches.
Quick Start
Online Demo
Try out our deployed models without any installation at models.batistalab.com.
Installation
You can install the package directly from PyPI:
Development
We welcome any contributions, feel free to clone the repo and create a PR. We recommend using uv:
Usage Example
Here's a quick example to generate a retrosynthesis route:
from directmultistep.generate import generate_routes
from pathlib import Path
# Generate a route for a target molecule
target = "CNCc1cc(-c2ccccc2F)n(S(=O)(=O)c2cccnc2)c1"
starting_material = "CN"
# Using flash model with starting material
paths = generate_routes(
target,
n_steps=2,
starting_material=starting_material,
model="flash",
beam_size=5,
config_path="path/to/config.yaml",
ckpt_dir="path/to/checkpoints"
)
# Or use explorer model to automatically determine steps
paths = generate_routes(
target,
starting_material=starting_material,
model="explorer",
beam_size=5,
config_path="path/to/config.yaml",
ckpt_dir="path/to/checkpoints"
)
License
- Code: MIT License
- Paper content (arXiv preprint): CC-BY 4.0