|
221 | 221 | " zcoor = [molConf.GetAtomPosition(c).z for c in range(len(molAtom))]\n", |
222 | 222 | " return [xcoor, ycoor, zcoor]\n", |
223 | 223 | "\n", |
224 | | - "def labogrid(coorList, scale=2):\n", |
| 224 | + "def labox(coorList, scale=2):\n", |
225 | 225 | " X, Y, Z = coorList[0], coorList[1], coorList[2]\n", |
226 | 226 | " range = [[min(X), max(X)],\n", |
227 | 227 | " [min(Y), max(Y)],\n", |
|
304 | 304 | " columns=INTER[BSI_key][BD_key][0])\n", |
305 | 305 | " if not DF.empty:\n", |
306 | 306 | " INTER_TYPE.extend([BD_key.upper()]*len(DF))\n", |
307 | | - " INTER_DF = INTER_DF.append(DF)\n", |
| 307 | + " INTER_DF = pd.concat([INTER_DF, DF], ignore_index=True)\n", |
308 | 308 | " INTER_DF = INTER_DF.assign(BOND=INTER_TYPE)\n", |
309 | 309 | " INTER_DF.reset_index(drop=True, inplace=True)\n", |
310 | 310 | " INTER_DF.to_csv(CSV_Ifile, index=False)\n", |
|
382 | 382 | " showChain=False, showResLabel=False, showVDW=False,\n", |
383 | 383 | " outline=False):\n", |
384 | 384 | " # Variables\n", |
385 | | - " mview = py3Dmol.view(1000,1500)\n", |
| 385 | + " mview = py3Dmol.view(width=960, height=640)\n", |
386 | 386 | " if model in \"none\":\n", |
387 | 387 | " model = cType = color = \"\"\n", |
388 | 388 | " if model in \"cartoon\":\n", |
|
391 | 391 | " cType, color = \"colorscheme\", color + \"Carbon\"\n", |
392 | 392 | "\n", |
393 | 393 | " # Protein Model\n", |
394 | | - " count = 1\n", |
| 394 | + " count = 0\n", |
395 | 395 | " prot_model = count\n", |
396 | 396 | " print(f\"+ Showing {os.path.basename(inputP)}\")\n", |
397 | 397 | " mol = open(inputP, \"r\").read()\n", |
|
451 | 451 | "\n", |
452 | 452 | "def VIEW_ELIG(inputE, showAtomLabel=False, outline=False):\n", |
453 | 453 | " # Variable\n", |
454 | | - " mview = py3Dmol.view(1000, 1500)\n", |
| 454 | + " mview = py3Dmol.view(width=960, height=640)\n", |
455 | 455 | "\n", |
456 | 456 | " # Experimental ligand model\n", |
457 | | - " count = 1\n", |
| 457 | + " count = 0\n", |
458 | 458 | " elig_model = count\n", |
459 | 459 | " print(f\"+ Showing {os.path.basename(inputE)}\")\n", |
460 | 460 | " mol = open(inputE, \"r\").read()\n", |
|
484 | 484 | "\n", |
485 | 485 | "def VIEW_LIG(inputL, showHs=False, showAtomLabel=False, outline=False):\n", |
486 | 486 | " # Variable\n", |
487 | | - " mview = py3Dmol.view(1000, 1500)\n", |
| 487 | + " mview = py3Dmol.view(width=960, height=640)\n", |
488 | 488 | "\n", |
489 | 489 | " # Ligand model\n", |
490 | | - " count = 1\n", |
| 490 | + " count = 0\n", |
491 | 491 | " lig_model = count\n", |
492 | 492 | " print(f\"+ Showing {os.path.basename(inputL)}\")\n", |
493 | 493 | " smi = open(inputL, \"r\").read()\n", |
|
525 | 525 | "\n", |
526 | 526 | "def VIEW_GRID(inputP, inputE, focusRes, center, size=[10, 10, 10]):\n", |
527 | 527 | " # Variable\n", |
528 | | - " mview = py3Dmol.view(1000, 1500)\n", |
| 528 | + " mview = py3Dmol.view(width=960, height=640)\n", |
529 | 529 | "\n", |
530 | 530 | " # Grid box\n", |
531 | 531 | " bxi, byi, bzi = center[0], center[1], center[2]\n", |
|
538 | 538 | " \"color\": \"skyBlue\", \"opacity\": 0.7})\n", |
539 | 539 | "\n", |
540 | 540 | " # Protein model\n", |
541 | | - " count = 1\n", |
| 541 | + " count = 0\n", |
542 | 542 | " prot_model = count\n", |
543 | 543 | " print(f\"+ Showing {os.path.basename(inputP)}\")\n", |
544 | 544 | " molA = open(inputP, \"r\").read()\n", |
|
585 | 585 | " showLig=False, showAllPose=False, showBestPose=False,\n", |
586 | 586 | " outline=False):\n", |
587 | 587 | " # Variables\n", |
588 | | - " mview = py3Dmol.view(1000,1500)\n", |
| 588 | + " mview = py3Dmol.view(width=960, height=640)\n", |
589 | 589 | " if model in \"none\":\n", |
590 | 590 | " model = cType = color = \"\"\n", |
591 | 591 | " if model in \"cartoon\":\n", |
|
594 | 594 | " cType, color = \"colorscheme\", color + \"Carbon\"\n", |
595 | 595 | "\n", |
596 | 596 | " # Protein model\n", |
597 | | - " count = 1\n", |
| 597 | + " count = 0\n", |
598 | 598 | " prot_model = count\n", |
599 | 599 | " print(f\"+ Showing {os.path.basename(inputP)}\")\n", |
600 | 600 | " molA = open(inputP, \"r\").read()\n", |
|
1098 | 1098 | "#@markdown Place the **< Gridbox >** at the center of binding site. \\\n", |
1099 | 1099 | "\n", |
1100 | 1100 | "Focus_residues = \"\" #@param {type:\"string\"}\n", |
1101 | | - "Method = \"LABOGRID\" #@param [\"LABOGRID\", \"eBoxSize\", \"eBoxSize-modified\", \"Autodock-Grid\", \"manual\"]\n", |
| 1101 | + "Method = \"LaBOX\" #@param [\"LaBOX\", \"eBoxSize\", \"eBoxSize-modified\", \"Autodock-Grid\", \"manual\"]\n", |
1102 | 1102 | "\n", |
1103 | 1103 | "#@markdown ---\n", |
1104 | 1104 | "\n", |
1105 | | - "if Method == \"LABOGRID\":\n", |
| 1105 | + "if Method == \"LaBOX\":\n", |
1106 | 1106 | " atomCoord = get_atom_coordinate(EXP_pdb_Dfile)\n", |
1107 | | - " grid = labogrid(atomCoord)\n", |
| 1107 | + " grid = labox(atomCoord)\n", |
1108 | 1108 | " Center, Size = grid[0], grid[1]\n", |
1109 | 1109 | "\n", |
1110 | 1110 | "if Method == \"eBoxSize\":\n", |
|
1398 | 1398 | "source": [ |
1399 | 1399 | "#@title **Show interaction profile of ligand** {run: \"auto\"}\n", |
1400 | 1400 | "\n", |
1401 | | - "Select_ligand = \"C26A6_2\" #@param {type : \"string\"}\n", |
| 1401 | + "Select_ligand = \"C26A6_1\" #@param {type : \"string\"}\n", |
1402 | 1402 | "LIG_inter_CSV_Ifile = os.path.join(INT_FLD, f\"{Select_ligand[:-2]}/{Select_ligand}_inter.csv\")\n", |
1403 | 1403 | "view_interaction(LIG_inter_CSV_Ifile, result=\"summary\")" |
1404 | 1404 | ], |
|
1549 | 1549 | ], |
1550 | 1550 | "provenance": [], |
1551 | 1551 | "mount_file_id": "1jj_nqfJuwJhZyR3x8vpiddRd-EWsuQVr", |
1552 | | - "authorship_tag": "ABX9TyOZmzKPcYq9ca4Vc0dM6ZFN", |
| 1552 | + "authorship_tag": "ABX9TyOJ7aq4YTm/SBv+Dyg23ETy", |
1553 | 1553 | "include_colab_link": true |
1554 | 1554 | }, |
1555 | 1555 | "kernelspec": { |
|
0 commit comments