-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from churnikov/101-fix-colab-notebook
Made jupyter notebook always pull latest version of AiZynthFinder
- Loading branch information
Showing
1 changed file
with
93 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,96 @@ | ||
{ | ||
"nbformat": 4, | ||
"nbformat_minor": 0, | ||
"metadata": { | ||
"colab": { | ||
"name": "AiZynthFinder.ipynb", | ||
"private_outputs": true, | ||
"provenance": [], | ||
"collapsed_sections": [], | ||
"toc_visible": true | ||
}, | ||
"kernelspec": { | ||
"name": "python3", | ||
"display_name": "Python 3" | ||
}, | ||
"accelerator": "GPU" | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": { | ||
"id": "ObD2YL7nM2_X" | ||
}, | ||
"source": [ | ||
"# AiZynthFinder\n", | ||
"\n", | ||
"Click the ▶ play button at the left of the **Installation** text below to install the application. The initial installation process may take a few minutes. After installation is done, jupyter notebooks kernel will automatically restart. Then run **Start application cell**. \n", | ||
"\n", | ||
"1. Enter the target compound [SMILES][1] code.\n", | ||
"3. Click the **Run Search** button to start the algorithm.\n", | ||
"4. Once it stops serching, click the **Show Reactions** button.\n", | ||
"\n", | ||
"[1]: https://en.wikipedia.org/wiki/Simplified_molecular-input_line-entry_system" | ||
] | ||
}, | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": { | ||
"id": "ObD2YL7nM2_X" | ||
}, | ||
"source": [ | ||
"# AiZynthFinder\n", | ||
"\n", | ||
"Click the ▶ play button at the left of the **Start** text below to run the application. The initial installation process may take a few minutes.\n", | ||
"\n", | ||
"1. Enter the target compound [SMILES][1] code.\n", | ||
"3. Click the **Run Search** button to start the algorithm.\n", | ||
"4. Once it stops serching, click the **Show Reactions** button.\n", | ||
"\n", | ||
"[1]: https://en.wikipedia.org/wiki/Simplified_molecular-input_line-entry_system" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"metadata": { | ||
"id": "beDP-CSNM429" | ||
}, | ||
"source": [ | ||
"#@title Start {display-mode: \"form\"}\n", | ||
"!curl --location --silent bit.ly/rdkit-colab | tar xz -C /\n", | ||
"!pip install --quiet graphviz\n", | ||
"!pip install --quiet https://github.com/MolecularAI/aizynthfinder/archive/v2.2.1.tar.gz\n", | ||
"!mkdir --parents data && download_public_data data\n", | ||
"from rdkit.Chem.Draw import IPythonConsole\n", | ||
"from aizynthfinder.interfaces import AiZynthApp\n", | ||
"application = AiZynthApp(\"./data/config.yml\")\n" | ||
], | ||
"execution_count": null, | ||
"outputs": [] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": { | ||
"id": "bwxusoogwlI9" | ||
}, | ||
"source": [ | ||
"# Bibliography\n", | ||
"\n", | ||
"_Genheden S, Thakkar A, Chadimova V, et al (2020) AiZynthFinder: a fast, robust and flexible open-source software for retrosynthetic planning. J. Cheminf. https://doi.org/10.1186/s13321-020-00472-1 ([GitHub](https://github.com/MolecularAI/aizynthfinder) & [Documentation](https://molecularai.github.io/aizynthfinder/html/index.html))_" | ||
] | ||
} | ||
] | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"#@title Installation -- Run this cell to install AiZynthFinder\n", | ||
"\n", | ||
"!pip install --quiet graphviz rdkit-pypi\n", | ||
"!(AIZ_LATEST_TAG=$(git -c 'versionsort.suffix=-' \\\n", | ||
" ls-remote --exit-code --refs --sort='version:refname' --tags https://github.com/MolecularAI/aizynthfinder '*.*.*' \\\n", | ||
" | tail --lines=1 \\\n", | ||
" | cut -f 3 -d /) \\\n", | ||
" && pip install --quiet https://github.com/MolecularAI/aizynthfinder/archive/${AIZ_LATEST_TAG}.tar.gz)\n", | ||
"print(\"Restarting kernel\")\n", | ||
"import os\n", | ||
"os._exit(00)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"id": "beDP-CSNM429" | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"#@title Start application. Run this cell after kernel restart {display-mode: \"form\"}\n", | ||
"\n", | ||
"!mkdir --parents data && download_public_data data\n", | ||
"from rdkit.Chem.Draw import IPythonConsole\n", | ||
"from aizynthfinder.interfaces import AiZynthApp\n", | ||
"application = AiZynthApp(\"./data/config.yml\")" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": { | ||
"id": "bwxusoogwlI9" | ||
}, | ||
"source": [ | ||
"# Bibliography\n", | ||
"\n", | ||
"_Genheden S, Thakkar A, Chadimova V, et al (2020) AiZynthFinder: a fast, robust and flexible open-source software for retrosynthetic planning. J. Cheminf. https://doi.org/10.1186/s13321-020-00472-1 ([GitHub](https://github.com/MolecularAI/aizynthfinder) & [Documentation](https://molecularai.github.io/aizynthfinder/html/index.html))_" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"accelerator": "GPU", | ||
"colab": { | ||
"collapsed_sections": [], | ||
"name": "AiZynthFinder.ipynb", | ||
"private_outputs": true, | ||
"provenance": [], | ||
"toc_visible": true | ||
}, | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.10.9" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 1 | ||
} |