Skip to main content
docs/images/banner.png

SynPlanner – a tool for synthesis planning

Docs | Tutorials | Paper | GUI demo

License Badge

SynPlanner is an open-source tool for retrosynthetic planning, designed to increase flexibility in training and developing customized retrosynthetic planning solutions from raw chemical data. It integrates Monte Carlo Tree Search (MCTS) with graph neural networks to evaluate applicable reaction rules (policy network) and the synthesizability of intermediate products (value network).

Overview

SynPlanner can be used for:

  • ⚒️ Standardizing and filtering reaction data

  • 📑 Extracting reaction rules (templates) with various options

  • 🧠 Training policy and value networks using supervised and reinforcement learning

  • 🔍 Performing retrosynthetic planning with different MCTS-based search strategies

  • 🖼️ Visualising found synthetic paths and working with graphical user interface

Installation

Conda (Linux)

SynPlanner can be installed using conda/mamba package managers. For more information on conda installation please refer to the official documentation.

To install SynPlanner, first clone the repository and move the package directory:

git clone https://github.com/Laboratoire-de-Chemoinformatique/SynPlanner.git
cd SynPlanner/

Next, create SynPlanner environment with synplan_linux.yaml file:

conda env create -f conda/synplan_linux.yaml
conda activate synplan
pip install .

After installation, SynPlanner can be added to Jupyter platform:

conda install ipykernel
python -m ipykernel install --user --name synplan --display-name "synplan"

Docker (CLI)

You can run the SynPlanner command-line interface inside a Docker container. Follow these steps to build, name, and test the image.

  1. Build the image

    Use the provided cli.Dockerfile to build a Linux AMD64 image. Name (tag) the image using the convention:

    <semver>-<interface>-<platform>

    For example, to build version 1.1.0 with the CLI interface on AMD64:

docker build \
  --platform linux/amd64 \
  -t synplan:1.1.0-cli-amd64 \
  -f cli.Dockerfile .
  1. Verify the image

    List your local images to confirm the tag:

docker images | grep synplan

You should see an entry similar to:

synplan 1.1.0-cli-amd64 …

  1. Run and test the CLI

    Launch a container to execute the --help command and confirm the CLI is working:

docker run --rm --platform linux/amd64 -it synplan:1.1.0-cli-amd64 --help
  1. Example: planning with Docker

    You can also mount a local directory for data persistence. For example:

docker run --rm \
  --platform linux/amd64 \
  -v "$(pwd)":/app \
  -w /app \
  synplan:1.1.0-cli-amd64 \
  planning \
    --config configs/planning.yaml \
    --targets tutorials/synplan_data/benchmarks/sascore/targets_with_sascore_1.5_2.5.smi \
    --reaction_rules tutorials/synplan_data/uspto/uspto_reaction_rules.pickle \
    --building_blocks tutorials/synplan_data/building_blocks/building_blocks_em_sa_ln.smi \
    --policy_network tutorials/synplan_data/uspto/weights/ranking_policy_network.ckpt \
    --results_dir tutorials/planning_results

Tutorials

Colab

Colab tutorials do not require the local installation of SynPlanner but their performance is limited by available computational resources in Google Colab

Currently, two tutorials are available:

  • Retrosynthetic planning can be used for retrosynthetic planning of any target molecule with pre-trained retrosynthetic models and advanced analysis of the search tree.

  • SynPlanner benchmarking can be used for retrosynthetic planning of many target molecules for benchmarking or comparison analysis.

Jupyter

Jupyter Tutorials requires the local installation of SynPlanner but can be executed with advanced computational resources on local servers

Currently, five tutorials are available:

Quick-start tutorials. These tutorials can be used for easy execution of the default SynPlanner pipeline:

  • SynPlanner pipeline presents the full pipeline of SynPlanner starting from raw reaction data and resulting in ready-to-use retrosynthetic planning.

Advanced tutorials. These tutorials provide advanced explanations and options for each step in the SynPlanner pipeline:

Command-line interface

SynPlanner pipeline can be accessed by neat command-line interface (CLI). For example, retrosynthetic planning of several target molecules with pre-trained models can performed with the following commands:

synplan download_all_data --save_to synplan_data
synplan planning --config configs/planning.yaml --targets synplan_data/benchmarks/sascore/targets_with_sascore_1.5_2.5.smi --reaction_rules synplan_data/uspto/uspto_reaction_rules.pickle --building_blocks synplan_data/building_blocks/building_blocks_em_sa_ln.smi --policy_network synplan_data/uspto/weights/ranking_policy_network.ckpt --results_dir planning_results

More details about CLI can be found in SynPlanner Documentaion

Contributing

Contributions are welcome, in the form of issues or pull requests.

If you have a question or want to report a bug, please submit an issue.

Maintainers

Contributors

Metadata

Release files for SynPlanner 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for SynPlanner 1.1.1
File Interpreter ABI Platform Actions
synplanner-1.1.1-py3-none-any.whl Python 3 none any Details for synplanner-1.1.1-py3-none-any.whl

Release files / synplanner-1.1.1-py3-none-any.whl

Download URL synplanner-1.1.1-py3-none-any.whl
Size 83.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bd09062a210d224d48f4f1603d83db930da2b6211cae7ae14dd4a7fbd79d7a99
BLAKE2b-256 checksum
How to use checksums
d4ac0cf8a10f0f8c40b5c6ac72e6cb8068c0dbb421acb2cda1eb1ac7065e66e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.10

Security for SynPlanner 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page