Skip to content

Commit cd9ef80

Browse files
committed
v.1.2.2
1 parent d0b5ff9 commit cd9ef80

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

notebooks/virtual_screening.ipynb

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
" zcoor = [molConf.GetAtomPosition(c).z for c in range(len(molAtom))]\n",
221221
" return [xcoor, ycoor, zcoor]\n",
222222
"\n",
223-
"def labogrid(coorList, scale=2):\n",
223+
"def labox(coorList, scale=2):\n",
224224
" X, Y, Z = coorList[0], coorList[1], coorList[2]\n",
225225
" range = [[min(X), max(X)],\n",
226226
" [min(Y), max(Y)],\n",
@@ -303,7 +303,7 @@
303303
" columns=INTER[BSI_key][BD_key][0])\n",
304304
" if not DF.empty:\n",
305305
" INTER_TYPE.extend([BD_key.upper()]*len(DF))\n",
306-
" INTER_DF = INTER_DF.append(DF)\n",
306+
" INTER_DF = pd.concat([INTER_DF, DF], ignore_index=True)\n",
307307
" INTER_DF = INTER_DF.assign(BOND=INTER_TYPE)\n",
308308
" INTER_DF.reset_index(drop=True, inplace=True)\n",
309309
" INTER_DF.to_csv(CSV_Ifile, index=False)\n",
@@ -381,7 +381,7 @@
381381
" showChain=False, showResLabel=False, showVDW=False,\n",
382382
" outline=False):\n",
383383
" # Variables\n",
384-
" mview = py3Dmol.view(1000,1500)\n",
384+
" mview = py3Dmol.view(width=960, height=640)\n",
385385
" if model in \"none\":\n",
386386
" model = cType = color = \"\"\n",
387387
" if model in \"cartoon\":\n",
@@ -390,7 +390,7 @@
390390
" cType, color = \"colorscheme\", color + \"Carbon\"\n",
391391
"\n",
392392
" # Protein Model\n",
393-
" count = 1\n",
393+
" count = 0\n",
394394
" prot_model = count\n",
395395
" print(f\"+ Showing {os.path.basename(inputP)}\")\n",
396396
" mol = open(inputP, \"r\").read()\n",
@@ -450,10 +450,10 @@
450450
"\n",
451451
"def VIEW_ELIG(inputE, showAtomLabel=False, outline=False):\n",
452452
" # Variable\n",
453-
" mview = py3Dmol.view(1000, 1500)\n",
453+
" mview = py3Dmol.view(width=960, height=640)\n",
454454
"\n",
455455
" # Experimental ligand model\n",
456-
" count = 1\n",
456+
" count = 0\n",
457457
" elig_model = count\n",
458458
" print(f\"+ Showing {os.path.basename(inputE)}\")\n",
459459
" mol = open(inputE, \"r\").read()\n",
@@ -483,10 +483,10 @@
483483
"\n",
484484
"def VIEW_LIG(inputL, showHs=False, showAtomLabel=False, outline=False):\n",
485485
" # Variable\n",
486-
" mview = py3Dmol.view(1000, 1500)\n",
486+
" mview = py3Dmol.view(width=960, height=640)\n",
487487
"\n",
488488
" # Ligand model\n",
489-
" count = 1\n",
489+
" count = 0\n",
490490
" lig_model = count\n",
491491
" print(f\"+ Showing {os.path.basename(inputL)}\")\n",
492492
" smi = open(inputL, \"r\").read()\n",
@@ -524,7 +524,7 @@
524524
"\n",
525525
"def VIEW_GRID(inputP, inputE, focusRes, center, size=[10, 10, 10]):\n",
526526
" # Variable\n",
527-
" mview = py3Dmol.view(1000, 1500)\n",
527+
" mview = py3Dmol.view(width=960, height=640)\n",
528528
"\n",
529529
" # Grid box\n",
530530
" bxi, byi, bzi = center[0], center[1], center[2]\n",
@@ -537,7 +537,7 @@
537537
" \"color\": \"skyBlue\", \"opacity\": 0.7})\n",
538538
"\n",
539539
" # Protein model\n",
540-
" count = 1\n",
540+
" count = 0\n",
541541
" prot_model = count\n",
542542
" print(f\"+ Showing {os.path.basename(inputP)}\")\n",
543543
" molA = open(inputP, \"r\").read()\n",
@@ -584,7 +584,7 @@
584584
" showLig=False, showAllPose=False, showBestPose=False,\n",
585585
" outline=False):\n",
586586
" # Variables\n",
587-
" mview = py3Dmol.view(1000, 1500)\n",
587+
" mview = py3Dmol.view(width=960, height=640)\n",
588588
" if model in \"none\":\n",
589589
" model = cType = color = \"\"\n",
590590
" if model in \"cartoon\":\n",
@@ -593,7 +593,7 @@
593593
" cType, color = \"colorscheme\", color + \"Carbon\"\n",
594594
"\n",
595595
" # Protein model\n",
596-
" count = 1\n",
596+
" count = 0\n",
597597
" prot_model = count\n",
598598
" print(f\"+ Showing {os.path.basename(inputP)}\")\n",
599599
" molA = open(inputP, \"r\").read()\n",
@@ -1129,13 +1129,13 @@
11291129
"#@markdown Place the **< Gridbox >** at the center of binding site. \\\n",
11301130
"\n",
11311131
"Focus_residues = \"\" #@param {type:\"string\"}\n",
1132-
"Method = \"LABOGRID\" #@param [\"LABOGRID\", \"eBoxSize\", \"eBoxSize-modified\", \"Autodock-Grid\", \"manual\"]\n",
1132+
"Method = \"LaBOX\" #@param [\"LaBOX\", \"eBoxSize\", \"eBoxSize-modified\", \"Autodock-Grid\", \"manual\"]\n",
11331133
"\n",
11341134
"#@markdown ---\n",
11351135
"\n",
1136-
"if Method == \"LABOGRID\":\n",
1136+
"if Method == \"LaBOX\":\n",
11371137
" atomCoord = get_atom_coordinate(EXP_pdb_Dfile)\n",
1138-
" grid = labogrid(atomCoord)\n",
1138+
" grid = labox(atomCoord)\n",
11391139
" Center, Size = grid[0], grid[1]\n",
11401140
"\n",
11411141
"if Method == \"eBoxSize\":\n",
@@ -1444,8 +1444,8 @@
14441444
"vina_rank = pd.DataFrame()\n",
14451445
"for N,ID in enumerate(lig_IDs):\n",
14461446
" out_sdf_Dfile = os.path.join(DCK_FLD, f\"{ID}/{ID}_output.sdf\")\n",
1447-
" vina_rank = vina_rank.append(get_score(out_sdf_Dfile, EXP_pose, result=\"first\"))\n",
1448-
"# vina_rank[\"SCORE\"].dtypes\n",
1447+
" vina_rank = pd.concat([vina_rank, get_score(out_sdf_Dfile, EXP_pose, result=\"first\")])\n",
1448+
"\n",
14491449
"vina_rank = vina_rank.sort_values(\"SCORE\", ascending=True, ignore_index=True)\n",
14501450
"rank_csv_Dfile = os.path.join(DCK_FLD, \"ranked_result.csv\")\n",
14511451
"vina_rank.to_csv(rank_csv_Dfile)\n",
@@ -1465,7 +1465,7 @@
14651465
"source": [
14661466
"#@title **Show docking result of ligand** {run : \"auto\"}\n",
14671467
"\n",
1468-
"Select_ligand = \"SB_4\" #@param {type:\"string\"}\n",
1468+
"Select_ligand = \"SB_5\" #@param {type:\"string\"}\n",
14691469
"LIG_out_csv_Dfile = os.path.join(DCK_FLD, f\"{Select_ligand}/{Select_ligand}_result.csv\")\n",
14701470
"ligResultDF = pd.read_csv(LIG_out_csv_Dfile)\n",
14711471
"ligResultDF"
@@ -1626,7 +1626,7 @@
16261626
],
16271627
"provenance": [],
16281628
"mount_file_id": "1r1k3mK4lzvKM8ZF4SeASkFazgOlfXKkU",
1629-
"authorship_tag": "ABX9TyPXRwapuJ0PS4hXigxFGnuU",
1629+
"authorship_tag": "ABX9TyM43DtsS8VeX6k+tXNJsZqY",
16301630
"include_colab_link": true
16311631
},
16321632
"kernelspec": {

0 commit comments

Comments
 (0)