Skip to main content

Retrosynthetic route finding using neural network guided Monte-Carlo tree search

Project description

AiZynthFinder

License Tests codecov Code style: black version Open In Colab

AiZynthFinder is a tool for retrosynthetic planning. The default algorithm is based on a Monte Carlo tree search that recursively breaks down a molecule to purchasable precursors. The tree search is guided by a policy that suggests possible precursors by utilizing a neural network trained on a library of known reaction templates. This setup is completely customizable as the tool supports multiple search algorithms and expansion policies.

An introduction video can be found here: https://youtu.be/r9Dsxm-mcgA

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Linux, Windows or macOS platforms are supported - as long as the dependencies are supported on these platforms.

  • You have installed anaconda or miniconda with python 3.10 - 3.12

The tool has been developed on a Linux platform, but the software has been tested on Windows 10 and macOS Catalina.

Installation

For end-users

First time, execute the following command in a console or an Anaconda prompt

conda create "python>=3.10,<3.13" -n aizynth-env

To install, activate the environment and install the package using pypi

conda activate aizynth-env
python -m pip install aizynthfinder[all]

for a smaller package, without all the functionality, you can also type

python -m pip install aizynthfinder

For developers

First clone the repository using Git.

Then execute the following commands in the root of the repository

conda env create -f env-dev.yml
conda activate aizynth-dev
poetry install --all-extras

the aizynthfinder package is now installed in editable mode.

Usage

The tool will install the aizynthcli and aizynthapp tools as interfaces to the algorithm:

aizynthcli --config config_local.yml --smiles smiles.txt
aizynthapp --config config_local.yml

Consult the documentation here for more information.

To use the tool you need

1. A stock file
2. A trained expansion policy network
3. A trained filter policy network (optional)

Such files can be downloaded from figshare and here or they can be downloaded automatically using

download_public_data my_folder

where my_folder is the folder that you want download to. This will create a config.yml file that you can use with either aizynthcli or aizynthapp.

Development

Testing

Tests uses the pytest package, and is installed by poetry

Run the tests using:

pytest -v

The full command run on the CI server is available through an invoke command

invoke full-tests

Documentation generation

The documentation is generated by Sphinx from hand-written tutorials and docstrings

The HTML documentation can be generated by

invoke build-docs

Contributing

We welcome contributions, in the form of issues or pull requests.

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

To contribute with code to the project, follow these steps:

  1. Fork this repository.
  2. Create a branch: git checkout -b <branch_name>.
  3. Make your changes and commit them: git commit -m '<commit_message>'
  4. Push to the remote branch: git push
  5. Create the pull request.

Please use black package for formatting, and follow pep8 style guide.

Contributors

The contributors have limited time for support questions, but please do not hesitate to submit an issue (see above).

License

The software is licensed under the MIT license (see LICENSE file), and is free and provided as-is.

References

  1. Thakkar A, Kogej T, Reymond J-L, et al (2019) Datasets and their influence on the development of computer assisted synthesis planning tools in the pharmaceutical domain. Chem Sci. https://doi.org/10.1039/C9SC04944D
  2. Genheden S, Thakkar A, Chadimova V, et al (2020) AiZynthFinder: a fast, robust and flexible open-source software for retrosynthetic planning. ChemRxiv. Preprint. https://doi.org/10.26434/chemrxiv.12465371.v1

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aizynthfinder-4.4.1.tar.gz (97.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aizynthfinder-4.4.1-py3-none-any.whl (133.9 kB view details)

Uploaded Python 3

File details

Details for the file aizynthfinder-4.4.1.tar.gz.

File metadata

  • Download URL: aizynthfinder-4.4.1.tar.gz
  • Upload date:
  • Size: 97.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aizynthfinder-4.4.1.tar.gz
Algorithm Hash digest
SHA256 480062df22ba877c2c711268bb824858e0af004c644176c75d0471d5c148b706
MD5 d1072e5cdb952a284742b089f9b6ffcd
BLAKE2b-256 e08e9aca6fcc2d47c7c9b7616c11c4d804fe9806411d0138b309edc97cef9968

See more details on using hashes here.

File details

Details for the file aizynthfinder-4.4.1-py3-none-any.whl.

File metadata

  • Download URL: aizynthfinder-4.4.1-py3-none-any.whl
  • Upload date:
  • Size: 133.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aizynthfinder-4.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e1259cfc45610b4801d38ed512d31290aa13204bfd5df9fe601fe845ddcbe3d6
MD5 16c5b3507de84f0c7521214b29c6bd90
BLAKE2b-256 3ea5d633cd1f474b48d32eee7e5c191f1cef3ba02ff5d03890555bf115ffa582

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page