Skip to content

Commit

Permalink
updated sutsom kinfraglib
Browse files Browse the repository at this point in the history
  • Loading branch information
kabu00002 committed May 13, 2024
2 parents a588b6c + ccd65cd commit 4ef05c8
Show file tree
Hide file tree
Showing 9 changed files with 19,862 additions and 9,877 deletions.
10,950 changes: 6,790 additions & 4,160 deletions data/fragment_library_custom_filtered/AP.sdf

Large diffs are not rendered by default.

394 changes: 323 additions & 71 deletions data/fragment_library_custom_filtered/B1.sdf

Large diffs are not rendered by default.

6,717 changes: 4,835 additions & 1,882 deletions data/fragment_library_custom_filtered/FP.sdf

Large diffs are not rendered by default.

4,448 changes: 2,687 additions & 1,761 deletions data/fragment_library_custom_filtered/GA.sdf

Large diffs are not rendered by default.

6,095 changes: 4,624 additions & 1,471 deletions data/fragment_library_custom_filtered/SE.sdf

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion kinfraglib/filters/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,13 @@ def start_pipeline(
os.makedirs(dir)

PATH_DATA_CUSTOM = pathlib.Path(dir) # define Path to custom data

# to prevent showing personal paths in the notebooks
dir_print_version = str(dir).split("../../")[1] if len(str(dir).split("../../")) == 2 else dir

print(
"Your custom kinfraglib, the chosen parameters log file and the filtering results will be stored in " + str(PATH_DATA_CUSTOM) # noqa E501
"Your custom kinfraglib, the chosen parameters log file and the filtering results will be stored in "
+ dir_print_version # noqa E501
)
# save chosen parameters in created timestamp dir to save log file and created library
param_list = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,31 @@
},
"metadata": {}
},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[0;31mSignature:\u001b[0m \u001b[0mfilters\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mretro\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_valid_fragment_pairs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfragment_library\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mDocstring:\u001b[0m\n",
"Gets all possible fragment pairs and validates if their bond type, BRICS environment type\n",
"and adjacent subpockets are matching. Then it creates the SMILES string from the combined\n",
"pairs.\n",
"\n",
"Parameters\n",
"----------\n",
"fragment_libray : dict\n",
" fragments organized in subpockets including all information\n",
"\n",
"Returns\n",
"-------\n",
"DataFrame\n",
" SMILES from valid paired fragments.\n",
"\u001b[0;31mFile:\u001b[0m ~/KinFragLib/kinfraglib/filters/retro.py\n",
"\u001b[0;31mType:\u001b[0m function"
]
}
],
"source": [
"?filters.retro.get_valid_fragment_pairs"
]
Expand Down Expand Up @@ -1155,13 +1179,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Number of fragments: 778\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Number of fragments: 778\n",
"Number of unique pairs: 46415\n"
]
}
Expand Down Expand Up @@ -1221,32 +1239,14 @@
"name": "stdout",
"output_type": "stream",
"text": [
"ASKCOS query started for 0 fragments.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"ASKCOS query started for 0 fragments.\n",
"ASKCOS query finished.\n",
"Comparing ASKCOS children with fragments..\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Checking if all fragment pairs were requested..\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Comparing ASKCOS children with fragments..\n",
"Checking if all fragment pairs were requested..\n",
"All fragment pairs were requested.\n",
"Done.\n",
"CPU times: user 7min 57s, sys: 4.61 s, total: 8min 2s\n",
"Wall time: 9min 59s\n"
"CPU times: user 10min 3s, sys: 4.8 s, total: 10min 8s\n",
"Wall time: 12min 21s\n"
]
}
],
Expand Down Expand Up @@ -3272,7 +3272,19 @@
},
"metadata": {}
},
"outputs": [],
"outputs": [
{
"ename": "",
"evalue": "",
"output_type": "error",
"traceback": [
"\u001b[1;31mThe Kernel crashed while executing code in the current cell or a previous cell. \n",
"\u001b[1;31mPlease review the code in the cell(s) to identify a possible cause of the failure. \n",
"\u001b[1;31mClick <a href='https://aka.ms/vscodeJupyterKernelCrash'>here</a> for more info. \n",
"\u001b[1;31mView Jupyter <a href='command:jupyter.viewOutput'>log</a> for further details."
]
}
],
"source": [
"filters.retro.save_fragment_library_to_sdfs(\n",
" PATH_DATA_CUSTOM,\n",
Expand Down
Loading

0 comments on commit 4ef05c8

Please sign in to comment.