# AiZynthFinder
[![License](https://img.shields.io/github/license/MolecularAI/aizynthfinder)](https://github.com/MolecularAI/aizynthfinder/blob/master/LICENSE)
[![Tests](https://github.com/MolecularAI/aizynthfinder/workflows/tests/badge.svg)](https://github.com/MolecularAI/aizynthfinder/actions?workflow=tests)
[![codecov](https://codecov.io/gh/MolecularAI/aizynthfinder/branch/master/graph/badge.svg)](https://codecov.io/gh/MolecularAI/aizynthfinder)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![version](https://img.shields.io/github/v/release/MolecularAI/aizynthfinder)](https://github.com/MolecularAI/aizynthfinder/releases)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/MolecularAI/aizynthfinder/blob/master/contrib/notebook.ipynb)
AiZynthFinder is a tool for retrosynthetic planning. The 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.
An introduction video can be found here: [https://youtu.be/r9Dsxm-mcgA](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](https://www.anaconda.com/) or [miniconda](https://docs.conda.io/en/latest/miniconda.html) with python 3.6 - 3.9
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 env create -f https://raw.githubusercontent.com/MolecularAI/aizynthfinder/master/env-users.yml
And if you want to update the environment
conda env update -n aizynth-env -f https://raw.githubusercontent.com/MolecularAI/aizynthfinder/master/env-users.yml
The package is now installed in a new conda environment, that you need to activate each time you want to use it
conda activate aizynth-env
### 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
the `aizynthfinder` package is now installed in editable mode.
### Troubleshooting
If the above simple instructions does not work, here are the more detailed instructions. You might have to modify conda channels or similar if the dependencies fails to install on your OS.
First, install these conda packages
conda install -c conda-forge "rdkit=>2019.09.1" -y
conda install graphviz -y
Secondly, install the ``aizynthfinder`` package
python -m pip install https://github.com/MolecularAI/aizynthfinder/archive/v3.4.0.tar.gz
if you want to install the latest version
or, if you have cloned this repository
conda install poetry
python poetry
> Note on the graphviz installation: this package does not depend on any third-party python interfaces to graphviz but instead calls the `dot` executable directly. If the executable is not in the `$PATH` environmental variable, the generation of route images will not work. If unable to install it properly with the default conda channel, try using `-c anaconda`.
## Usage
The tool will install the ``aizynthcli`` and ``aizynthapp`` tools
as interfaces to the algorithm:
```
aizynthcli --config config.yml --smiles smiles.txt
aizynthapp --config config.yml
```
Consult the documentation [here](https://molecularai.github.io/aizynthfinder/) for more information.
To use the tool you need
1. A stock file
2. A trained rollout policy network (including the Keras model and the list of unique templates)
3. A trained filer policy network (optional)
Such files can be downloaded from [figshare](https://figshare.com/articles/AiZynthFinder_a_fast_robust_and_flexible_open-source_software_for_retrosynthetic_planning/12334577) and [here](https://figshare.com/articles/dataset/A_quick_policy_to_filter_reactions_based_on_feasibility_in_AI-guided_retrosynthetic_planning/13280507) 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
* [@SGenheden](https://www.github.com/SGenheden)
* [@EBjerrum](https://www.github.com/EBjerrum)
* [@A-Thakkar](https://www.github.com/A-Thakkar)
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. J. Cheminf. https://jcheminf.biomedcentral.com/articles/10.1186/s13321-020-00472-1
3. Genheden S, Engkvist O, Bjerrum E (2020) A Quick Policy to Filter Reactions Based on Feasibility in AI-Guided Retrosynthetic Planning. ChemRxiv. Preprint. https://doi.org/10.26434/chemrxiv.13280495.v1
4. Genheden S, Engkvist O, Bjerrum E (2021) Clustering of synthetic routes using tree edit distance. J. Chem. Inf. Model. 61:3899–3907 [https://doi.org/10.1021/acs.jcim.1c00232](https://doi.org/10.1021/acs.jcim.1c00232)
5. Genheden S, Engkvist O, Bjerrum E (2022) Fast prediction of distances between synthetic routes with deep learning. Mach. Learn. Sci. Technol. 3:015018 [https://doi.org/10.1088/2632-2153/ac4a91](https://doi.org/10.1088/2632-2153/ac4a91)
没有合适的资源?快使用搜索试试~ 我知道了~
逆合成规划的工具_python_代码_下载_retrosynthetic planning
共166个文件
py:118个
rst:10个
png:8个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 2 下载量 193 浏览量
2022-07-03
01:50:20
上传
评论
收藏 762KB ZIP 举报
温馨提示
AiZynthFinder 是一种逆合成规划工具。该算法基于蒙特卡洛树搜索,该搜索递归地将分子分解为可购买的前体。树搜索由一项策略指导,该策略通过利用在已知反应模板库上训练的神经网络来建议可能的前体。 更多详情、使用方法,请下载后阅读README.md文件
资源推荐
资源详情
资源评论
收起资源包目录
逆合成规划的工具_python_代码_下载_retrosynthetic planning (166个子文件)
CITATION.cff 2KB
dummy_sani_raw_template_library.csv 4KB
dummy2_raw_template_library.csv 3KB
dummy_raw_template_library.csv 3KB
dummy_noclass_raw_template_library.csv 3KB
make_false2_template_library.csv 2KB
make_false_template_library.csv 2KB
reaction_tree.dot 782B
.gitignore 2KB
full_search_tree.json.gz 80KB
notebook.ipynb 2KB
routes_for_clustering.json 6KB
andor_tree_for_clustering.json 5KB
tree_for_clustering.json 4KB
combined_example_tree.json 4KB
and_or_tree.json 4KB
branched_route.json 3KB
linear_route.json 1KB
LICENSE 1KB
poetry.lock 337KB
README.md 7KB
CHANGELOG.md 7KB
gui_results.png 105KB
gui_clustering.png 99KB
treesearch-seq.png 67KB
analysis-seq.png 45KB
gui_input.png 45KB
treesearch-rel.png 38KB
analysis-rel.png 31KB
line-desc.png 4KB
test_finder.py 21KB
test_cli.py 19KB
reaction.py 17KB
node.py 15KB
conftest.py 15KB
aizynthapp.py 15KB
reactiontree.py 13KB
routes.py 13KB
test_training.py 12KB
nodes.py 11KB
test_analysis.py 11KB
aizynthfinder.py 11KB
nodes.py 11KB
scorers.py 11KB
image.py 10KB
test_policy.py 10KB
stock.py 10KB
models.py 9KB
tree_analysis.py 9KB
aizynthcli.py 9KB
make_false_products.py 9KB
mol.py 8KB
test_stock.py 8KB
utils.py 8KB
test_score.py 8KB
andor_trees.py 8KB
keras_models.py 8KB
nodes.py 8KB
test_mcts_config.py 8KB
policies.py 7KB
search_tree.py 6KB
state.py 6KB
expansion_strategies.py 6KB
config.py 6KB
test_serialization.py 6KB
test_reactiontree.py 6KB
search_tree.py 5KB
search.py 5KB
filter_strategies.py 5KB
queries.py 5KB
preprocess_expansion.py 5KB
utils.py 5KB
search_tree.py 5KB
make_stock.py 5KB
test_retrostar_nodes.py 5KB
collection.py 4KB
test_reaction.py 4KB
serialization.py 4KB
test_collection.py 4KB
test_retrostar.py 4KB
clustering.py 4KB
files.py 4KB
test_node.py 4KB
test_file_utils.py 4KB
test_search.py 4KB
test_image.py 4KB
test_external_tf_models.py 4KB
collection.py 4KB
conftest.py 3KB
preprocess_filter.py 3KB
collection.py 3KB
preprocess_recommender.py 3KB
test_nodes.py 2KB
cost.py 2KB
utils.py 2KB
download_public_data.py 2KB
test_search.py 2KB
test_serialization.py 2KB
test_nodes.py 2KB
test_expander.py 2KB
共 166 条
- 1
- 2
资源评论
- weixin_529713542023-01-06资源有很好的参考价值,总算找到了自己需要的资源啦。
- genexfy2024-03-14资源很受用,资源主总结的很全面,内容与描述一致,解决了我当下的问题。
快撑死的鱼
- 粉丝: 1w+
- 资源: 9156
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功