Skip to content

Commit

Permalink
Merge branch 'fixing_askcos' of github.com:volkamerlab/KinFragLib int…
Browse files Browse the repository at this point in the history
…o fixing_askcos
  • Loading branch information
kabu00002 committed May 13, 2024
2 parents b77e35f + 550b66c commit a9f207a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
"id": "c98ff012-da23-461c-80a6-a06063814536",
"metadata": {},
"source": [
"This notebook is filtering the fragments for pairwise retrosynthesizability using the web API from [ASKCOS](https://askcos.mit.edu/).\n",
"This notebook is filtering the fragments for pairwise retrosynthesizability using the web API from [ASKCOS](https://askcos.mit.edu/) ([Documenation](https://askcos-docs.mit.edu/)).\n",
"\n",
"**Note:** The ASKCOS results for the given KinFragLib data are already precomputed, thus for that ASKCOS does not need to be installed to succesfully run this notebook. However, if the notebook is executed on new data, the ASKCOS needs to be installed beforehand. To install ASKCOS, please follow the installtion given at [https://askcos-docs.mit.edu/](https://askcos-docs.mit.edu/guide/1-Introduction/1.1-Introduction.html). \n",
"\n",
"We build all valid fragment pairs and look if a retrosynthetic route can be found to create this pair from the fragments given. To reduce the number of requests we, first apply all filters from the previous notebooks."
]
Expand Down Expand Up @@ -1205,9 +1207,7 @@
"ASKCOS is used to check if for the fragment pairs a retrosynthetic route can be found. We will exclude all fragments without at least one retrosynthetic route found.\n",
"\n",
"For each fragment pair, we will start an ASKCOS query, requesting if ASKCOS can find a one step retrosynthetic route building this fragment pair. For all routes found, we will retrieve the children building the requested fragment pair and also the plausibility of this reaction.\n",
"Afterwards, we will compare the children retrieved from ASKCOS with the fragments building the pair. If the fragments are substructures of the children their `retro_count` is increased by one and the fragments, pair, children and plausibility are stored in the `mol_df` dataframe. If they are no substructures, we will store the information in the `diff_df` dataframe.\n",
"\n",
"[ASKCOS webpage for One-step Retrosynthesis](https://askcos.mit.edu/retro/)"
"Afterwards, we will compare the children retrieved from ASKCOS with the fragments building the pair. If the fragments are substructures of the children their `retro_count` is increased by one and the fragments, pair, children and plausibility are stored in the `mol_df` dataframe. If they are no substructures, we will store the information in the `diff_df` dataframe."
]
},
{
Expand All @@ -1218,7 +1218,7 @@
"ASKCOS query is started for fragment pairs which were not already requested (already requested fragment pairs can be found in [/data/filters/retrosynthesizability/retro.txt](https://github.com/sonjaleo/KinFragLib/blob/fragment_pairs/data/filters/retrosynthesizability/retro.txt)) and children retrieved from ASKCOS get compared with the fragments building the pairs.\n",
"Depending on the number of new queries and molecule comparisons this could run a long time (a query of 1000 fragment pairs takes about 1h 30min on an 8 core machine).\n",
"\n",
"Note: If your internet connection is instable, you might need to run this several times. When starting it again it will only compute the pairs which were not yet computed."
"**Note**: Make sure that ASKCOS is running if the input is changed (using `make start` within the `askcos2_core` directory which is obtained following the [installion](https://askcos-docs.mit.edu/guide/1-Introduction/1.1-Introduction.html))."
]
},
{
Expand Down Expand Up @@ -1261,14 +1261,6 @@
")"
]
},
{
"cell_type": "markdown",
"id": "d571d72e-5a14-4e0b-91eb-c22ebbaeaa8b",
"metadata": {},
"source": [
"Note: if not all fragment pairs were requested, please run this function again."
]
},
{
"cell_type": "markdown",
"id": "23ffbc33-356a-4d1c-860a-bc372b5454f3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -535,11 +535,9 @@
"Afterwards, we will compare the children retrieved from ASKCOS with the fragments building the pair. If the fragments are substructures of the children their `retro_count` is increased by one and the fragments, pair, children and plausibility are stored in the `mol_df` dataframe. If they are no substructures, we will store the information in the `diff_df` dataframe.\n",
"If plots are activated a barplot with the number of rejected and accepted fragments grouped by the number of retrosynthetic routes found and the molecules of the rejected fragments and the <=10 fragments with the most retrosynthetic routes found.\n",
"\n",
"[ASKCOS webpage for one-step retrosynthesis](https://askcos.mit.edu/retro/)\n",
"\n",
"For a closer look at the functionality of this filtering step, please check `/notebooks/custom_kinfraglib/1_4_custom_filters_pairwise_retrosynthesizability.ipynb`\n",
"\n",
"**Note:** This function might run a long time if you accepted more/other fragments in the previous filter steps than with the default settings."
"**Note**: Make sure that ASKCOS is running if the input is changed (using `make start` within the `askcos2_core` directory which is obtained following the [installion](https://askcos-docs.mit.edu/guide/1-Introduction/1.1-Introduction.html))."
]
},
{
Expand Down
4 changes: 3 additions & 1 deletion notebooks/custom_kinfraglib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ single filtering steps and modify the parameters.
### `2_2_custom_filters_analysis.ipynb`
This notebook analyzes the custom-filtered fragment library and compares it with the pre-filtered and the reduced fragment set from the previous study.
### `2_3_custom_filters_paper.ipynb`
This notebook contains all the code used to generate figures for the CustomKinFragLib paper.
This notebook contains all the code used to generate figures for the CustomKinFragLib paper.
## Requirements
To succesfully apply the pairwise retrosynthesizability filters in `1_4_custom_filters_pairwise_retrosynthesizability.ipynb` and `2_1_custom_filters_pipeline.ipynb`, the ASCKOS API might need to be installed following the [Documenation](https://askcos-docs.mit.edu/guide/1-Introduction/1.1-Introduction.html). Note that for the data used in the notebooks, neccessary results from ASKCOS are already precomputed. Thus, ASKCOS does not need to be installed in that case. However, if the data is modified ASCKOS needs to be installed and running (using `make start` within the `askcos2_core` directory which is obtained following the [installion](https://askcos-docs.mit.edu/guide/1-Introduction/1.1-Introduction.html)).

0 comments on commit a9f207a

Please sign in to comment.