diff --git a/CHANGELOG.md b/CHANGELOG.md index 132b27b..193281b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,31 +1,46 @@ # Change Log All notable changes to this repository will be documented in this file. +## [1.2.1] - 2023-08-12 +### Added ++ [basic_molecular_docking](https://github.com/RyanZR/labodock/blob/main/notebooks/basic_molecular_docking.ipynb) MAJOR Added `--cpu` parameter in %vina ++ [virtual_screening](https://github.com/RyanZR/labodock/blob/main/notebooks/virtual_screening.ipynb) MAJOR Added `--cpu` parameter in %vina + +### Changed ++ [basic_molecular_docking](https://github.com/RyanZR/labodock/blob/main/notebooks/basic_molecular_docking.ipynb) MAJOR Upgraded packages: py3Dmol 2.0.3, rdkit-pypi 2022.9.5, biopython 1.80, openbabel 3.1.1, zlib 1.2.13 ++ [basic_molecular_docking](https://github.com/RyanZR/labodock/blob/main/notebooks/basic_molecular_docking.ipynb) MINOR Renamed LABOGRID to [LaBOX](https://github.com/RyanZR/LaBOX) ++ [virtual_screening](https://github.com/RyanZR/labodock/blob/main/notebooks/virtual_screening.ipynb) MAJOR Upgraded packages: py3Dmol 2.0.3, rdkit-pypi 2022.9.5, biopython 1.80, openbabel 3.1.1, zlib 1.2.13 ++ [virtual_screening](https://github.com/RyanZR/labodock/blob/main/notebooks/virtual_screening.ipynb) MINOR Renamed LABOGRID to [LaBOX](https://github.com/RyanZR/LaBOX) + +### Fixed ++ [basic_molecular_docking](https://github.com/RyanZR/labodock/blob/main/notebooks/basic_molecular_docking.ipynb) MAJOR Fixed incomplete visualisation of protein-ligand interactions in `VIEW_PILE()` ++ [virtual_screening](https://github.com/RyanZR/labodock/blob/main/notebooks/virtual_screening.ipynb) MAJOR Fixed incomplete visualisation of protein-ligand interactions in `VIEW_PILE()` + ## [1.2.0] - 2023-02-12 ### Added -+ [basic_molecular_docking.ipynb](https://github.com/RyanZR/labodock/blob/main/notebooks/basic_molecular_docking.ipynb) MAJOR Added 5 methods for defining grid box -+ [basic_molecular_docking.ipynb](https://github.com/RyanZR/labodock/blob/main/notebooks/basic_molecular_docking.ipynb) MINOR Added `showHs` argument in `VIEW_LIG()` -+ [virtual_screening.ipynb](https://github.com/RyanZR/labodock/blob/main/notebooks/virtual_screening.ipynb) MAJOR Added 5 methods for defining grid box -+ [virtual_screening.ipynb](https://github.com/RyanZR/labodock/blob/main/notebooks/virtual_screening.ipynb) MINOR Added `showHs` argument in `VIEW_LIG()` ++ [basic_molecular_docking](https://github.com/RyanZR/labodock/blob/main/notebooks/basic_molecular_docking.ipynb) MAJOR Added 5 methods for defining grid box ++ [basic_molecular_docking](https://github.com/RyanZR/labodock/blob/main/notebooks/basic_molecular_docking.ipynb) MINOR Added `showHs` argument in `VIEW_LIG()` ++ [virtual_screening](https://github.com/RyanZR/labodock/blob/main/notebooks/virtual_screening.ipynb) MAJOR Added 5 methods for defining grid box ++ [virtual_screening](https://github.com/RyanZR/labodock/blob/main/notebooks/virtual_screening.ipynb) MINOR Added `showHs` argument in `VIEW_LIG()` ### Changed -+ [basic_molecular_docking.ipynb](https://github.com/RyanZR/labodock/blob/main/notebooks/basic_molecular_docking.ipynb) MINOR Removed `showBestPose` argument in `VIEW_PILE()` -+ [basic_molecular_docking.ipynb](https://github.com/RyanZR/labodock/blob/main/notebooks/basic_molecular_docking.ipynb) MINOR Removed `AllChem.MMFFOptimizeMolecule()` in `VIEW_LIG()` -+ [virtual_screening.ipynb](https://github.com/RyanZR/labodock/blob/main/notebooks/virtual_screening.ipynb) MINOR Removed `AllChem.MMFFOptimizeMolecule()` in `VIEW_LIG()` ++ [basic_molecular_docking](https://github.com/RyanZR/labodock/blob/main/notebooks/basic_molecular_docking.ipynb) MINOR Removed `showBestPose` argument in `VIEW_PILE()` ++ [basic_molecular_docking](https://github.com/RyanZR/labodock/blob/main/notebooks/basic_molecular_docking.ipynb) MINOR Removed `AllChem.MMFFOptimizeMolecule()` in `VIEW_LIG()` ++ [virtual_screening](https://github.com/RyanZR/labodock/blob/main/notebooks/virtual_screening.ipynb) MINOR Removed `AllChem.MMFFOptimizeMolecule()` in `VIEW_LIG()` ### Fixed -+ [basic_molecular_docking.ipynb](https://github.com/RyanZR/labodock/blob/main/notebooks/basic_molecular_docking.ipynb) MINOR Fixed spelling mistake in "Display 3D binding mode" section -+ [virtual_screening.ipynb](https://github.com/RyanZR/labodock/blob/main/notebooks/virtual_screening.ipynb) MINOR Fixed spelling mistake in "Display 3D binding mode" section ++ [basic_molecular_docking](https://github.com/RyanZR/labodock/blob/main/notebooks/basic_molecular_docking.ipynb) MINOR Fixed spelling mistake in "*Display 3D binding mode*" section ++ [virtual_screening](https://github.com/RyanZR/labodock/blob/main/notebooks/virtual_screening.ipynb) MINOR Fixed spelling mistake in "*Display 3D binding mode*" section ## [1.0.0] - 2023-02-08 ### Added -+ [basic_molecular_docking.ipynb](https://github.com/RyanZR/labodock/blob/main/notebooks/basic_molecular_docking.ipynb) MAJOR Added into 📁 notebooks. -+ [virtual_screening.ipynb](https://github.com/RyanZR/labodock/blob/main/notebooks/virtual_screening.ipynb) MAJOR Added into 📁 notebooks. ++ [basic_molecular_docking](https://github.com/RyanZR/labodock/blob/main/notebooks/basic_molecular_docking.ipynb) MAJOR Added into 📁 notebooks. ++ [virtual_screening](https://github.com/RyanZR/labodock/blob/main/notebooks/virtual_screening.ipynb) MAJOR Added into 📁 notebooks. ### Changed -+ [🍊MOUNTAIN_V2.ipynb](https://github.com/RyanZR/labodock/blob/main/deprecated/%F0%9F%8D%8AMOUNTAIN_V2.ipynb) MAJOR No longer support and preceded by [basic_molecular_docking.ipynb](https://github.com/RyanZR/labodock/blob/main/notebooks/basic_molecular_docking.ipynb). -+ [🍊UNION_V2.ipynb](https://github.com/RyanZR/labodock/blob/main/deprecated/%F0%9F%8D%8AUNION_V2.ipynb) MAJOR No longer support and preceded by [virtual_screening.ipynb](https://github.com/RyanZR/labodock/blob/main/notebooks/virtual_screening.ipynb). -+ [🍊PLIA_V2.ipynb](https://github.com/RyanZR/labodock/blob/main/deprecated/%F0%9F%8D%8APLIA_V2.ipynb) MAJOR No longer support but integrated into respective notebooks ++ [🍊MOUNTAIN_V2](https://github.com/RyanZR/labodock/blob/main/deprecated/%F0%9F%8D%8AMOUNTAIN_V2.ipynb) MAJOR No longer support and superseded by [basic_molecular_docking.ipynb](https://github.com/RyanZR/labodock/blob/main/notebooks/basic_molecular_docking.ipynb). ++ [🍊UNION_V2](https://github.com/RyanZR/labodock/blob/main/deprecated/%F0%9F%8D%8AUNION_V2.ipynb) MAJOR No longer support and superseded by [virtual_screening.ipynb](https://github.com/RyanZR/labodock/blob/main/notebooks/virtual_screening.ipynb). ++ [🍊PLIA_V2](https://github.com/RyanZR/labodock/blob/main/deprecated/%F0%9F%8D%8APLIA_V2.ipynb) MAJOR No longer support but integrated into respective notebooks ### Fixed -+ [basic_molecular_docking.ipynb](https://github.com/RyanZR/labodock/blob/main/notebooks/basic_molecular_docking.ipynb) MINOR Fixed bug in `VIEW_PILE()`. ++ [basic_molecular_docking](https://github.com/RyanZR/labodock/blob/main/notebooks/basic_molecular_docking.ipynb) MINOR Fixed bug in `VIEW_PILE()`. diff --git a/README.md b/README.md index a294711..359c02a 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,17 @@ ![LABODOCK](https://github.com/RyanZR/labodock/blob/main/res/labodock_banner.jpg) # Effortless Docking with Google Colab -[![status](https://img.shields.io/badge/status-stable-success)](https://github.com/RyanZR/labodock) -[![version](https://img.shields.io/badge/version-1.2.0-blue)](https://github.com/RyanZR/labodock/tree/main/notebooks) +> UPDATE: Fixed packages installation issues. MAJOR UPDATE in code base coming soon with better readability and optimisation. Stay tunned! + +[![status](https://img.shields.io/badge/status-pass-green)](https://github.com/RyanZR/labodock) +[![version](https://img.shields.io/badge/version-1.2.1-blue)](https://github.com/RyanZR/labodock/tree/main/notebooks) [![size](https://img.shields.io/github/repo-size/RyanZR/labodock)](https://github.com/RyanZR/labodock) [![license](https://img.shields.io/badge/license-MIT-informational)](https://github.com/RyanZR/labodock/blob/main/LICENSE) **LABODOCK** is a repository where you can find a collection of Jupyter Notebooks for conducting structure-based molecular docking protocols interactively using Autodock Vina and PLIP on Google Colab. The main goal is to demonstrate the power of cloud-computing for conducting docking operations in an effortless and automated manner. -+ [Basic Molecular docking](https://github.com/RyanZR/labodock/blob/main/notebooks/basic_molecular_docking.ipynb) ++ [Basic Molecular Docking](https://github.com/RyanZR/labodock/blob/main/notebooks/basic_molecular_docking.ipynb) + [Virtual Screening](https://github.com/RyanZR/labodock/blob/main/notebooks/virtual_screening.ipynb) **Important:** Do not use the `Run all` option. Run the `Install dependencies and softwares` cell individually and wait for the session to restart. **After that**, you can run all cells if you want. Thank you for your support. @@ -17,8 +19,8 @@ ## Features + Automated molecular docking operation -+ intuitive and interactive user interface -+ Five grid box defining methods: [LABOGRID](https://github.com/RyanZR/labogrid), [eBoxSize](https://github.com/michal-brylinski/eboxsize) ... ++ Intuitive and interactive user interface ++ Five grid box defining methods: [LaBOX](https://github.com/RyanZR/LaBOX), [eBoxSize](https://github.com/michal-brylinski/eboxsize) ... + Autodock Vina and Protein-Ligand Interaction Profiler integration + 3D Docking result and docking socres clustering diff --git a/notebooks/basic_molecular_docking.ipynb b/notebooks/basic_molecular_docking.ipynb index 42faba2..ed13b05 100644 --- a/notebooks/basic_molecular_docking.ipynb +++ b/notebooks/basic_molecular_docking.ipynb @@ -14,8 +14,8 @@ "cell_type": "markdown", "source": [ "# **BASIC MOLECULAR DOCKING**\n", - " \n", - "This Jupyter Notebook enables docking operation of a specifc ligand against the target protein of choice using **Autodock Vina 1.2.0** and **PLIP 2.2.2**. " + "\n", + "This Jupyter Notebook enables docking operation of a specifc ligand against the target protein of choice using **Autodock Vina 1.2.0** and **PLIP 2.2.2**." ], "metadata": { "id": "6aVJQbSoLSvz" @@ -52,28 +52,28 @@ "outputs": [], "source": [ "#@title **Install packages and dependencies**\n", - "#@markdown Thanks to **`mamba`**, the installation takes **less than 5 mins**. \\ \n", + "#@markdown Thanks to **`mamba`**, the installation takes **less than 5 mins**. \\\n", "#@markdown It will **restart** the kernel (session).\n", "\n", "# %%capture\n", "import contextlib\n", "with open(\"/content/installation.log\", \"w\") as i:\n", " with contextlib.redirect_stdout(i):\n", - " \n", - " !pip install py3Dmol==2.0.0.post2\n", + "\n", + " !pip install py3Dmol==2.0.3\n", " !pip install pybel==0.15.5\n", - " !pip install rdkit-pypi==2022.3.5\n", + " !pip install rdkit-pypi==2022.9.5\n", "\n", " !wget https://github.com/ccsb-scripps/AutoDock-Vina/releases/download/v1.2.0/vina_1.2.0_linux_x86_64 -O vina\n", " !chmod u+x vina\n", "\n", " !pip install condacolab\n", " import condacolab\n", - " condacolab.install_miniconda()\n", - " !conda install -c conda-forge mamba\n", - " !mamba install -c conda-forge -c bioconda mgltools=1.5.7 biopython=1.78 \\\n", - " openbabel=3.1.0 plip=2.2.2 zlib=1.2.11 xlsxwriter=3.0.3\n", - " \n", + " condacolab.install_mambaforge()\n", + "\n", + " !mamba install -c conda-forge -c bioconda mgltools=1.5.7 biopython=1.80 \\\n", + " openbabel=3.1.1 plip=2.2.2 zlib=1.2.13 xlsxwriter=3.0.3\n", + "\n", " !rm -r /content/sample_data /content/condacolab_install.log" ] }, @@ -131,7 +131,7 @@ "#@markdown Enter a **< Job Name >** without space.\\\n", "#@markdown This create a folder for protein, ligand, experimental and docking.\n", "\n", - "Job_name = \"6NCF_BMD\" #@param {type:\"string\"}\n", + "Job_name = \"7KNX\" #@param {type:\"string\"}\n", "assert not Job_name == \"\", \"Do not leave this blank.\"\n", "assert not any(c == \"/\" or c == \".\" for c in Job_name), \"Disallowed characters.\"\n", "\n", @@ -142,7 +142,7 @@ "EXP_FLD = os.path.join(WRK_DIR, \"EXPERIMENTAL\")\n", "DCK_FLD = os.path.join(WRK_DIR, \"DOCKING\")\n", "INT_FLD = os.path.join(WRK_DIR, \"INTERACTION\")\n", - " \n", + "\n", "folders = [WRK_DIR, PRT_FLD, LIG_FLD, EXP_FLD, DCK_FLD, INT_FLD]\n", "\n", "for f in folders:\n", @@ -163,27 +163,27 @@ "outputs": [], "source": [ "#@title **Set up utilities**\n", - "#@markdown This creates important variables and functions that will be utilized \n", + "#@markdown This creates important variables and functions that will be utilized\n", "#@markdown throughout the docking study.\n", "\n", "%alias vina /content/vina\n", "\n", - "COLORS = [\"red\", \"orange\", \"yellow\", \"lime\", \"green\", \"cyan\", \"teal\", \"blue\", \n", + "COLORS = [\"red\", \"orange\", \"yellow\", \"lime\", \"green\", \"cyan\", \"teal\", \"blue\",\n", " \"violet\", \"purple\", \"pink\", \"gray\", \"brown\", \"white\", \"black\"]\n", "\n", - "BOND_DICT = {\"hydrophobic\": [\"0x59e382\", \"GREEN\"], \n", + "BOND_DICT = {\"hydrophobic\": [\"0x59e382\", \"GREEN\"],\n", " \"hbond\": [\"0x59bee3\", \"LIGHT BLUE\"],\n", - " \"waterbridge\": [\"0x4c4cff\", \"BLUE\"], \n", - " \"saltbridge\": [\"0xefd033\", \"YELLOW\"], \n", - " \"pistacking\": [\"0xb559e3\", \"PURPLE\"], \n", - " \"pication\": [\"0xe359d8\", \"VIOLET\"], \n", - " \"halogen\": [\"0x59bee3\", \"LIGHT BLUE\"], \n", + " \"waterbridge\": [\"0x4c4cff\", \"BLUE\"],\n", + " \"saltbridge\": [\"0xefd033\", \"YELLOW\"],\n", + " \"pistacking\": [\"0xb559e3\", \"PURPLE\"],\n", + " \"pication\": [\"0xe359d8\", \"VIOLET\"],\n", + " \"halogen\": [\"0x59bee3\", \"LIGHT BLUE\"],\n", " \"metal\": [\"0xe35959\", \"ORANGE\"]}\n", "\n", "class Hide:\n", " def __enter__(self):\n", " self._original_stdout = sys.stdout\n", - " sys.stdout = open(os.devnull, \"w\") \n", + " sys.stdout = open(os.devnull, \"w\")\n", " def __exit__(self, exc_type, exc_val, exc_tb):\n", " sys.stdout.close()\n", " sys.stdout = self._original_stdout\n", @@ -192,7 +192,7 @@ "def chain_profilier(inputFile):\n", " parser = PDBParser()\n", " structure = parser.get_structure(\"X\", inputFile)\n", - " chain_obj = [s for s in structure.get_chains()] \n", + " chain_obj = [s for s in structure.get_chains()]\n", " chain_IDs = [c.get_id() for c in chain_obj]\n", " chain_len = len(chain_obj)\n", " return [chain_len, chain_IDs, chain_obj]\n", @@ -223,11 +223,11 @@ "\n", "def labogrid(coorList, scale=2):\n", " X, Y, Z = coorList[0], coorList[1], coorList[2]\n", - " range = [[min(X), max(X)], \n", - " [min(Y), max(Y)], \n", + " range = [[min(X), max(X)],\n", + " [min(Y), max(Y)],\n", " [min(Z), max(Z)]]\n", - " center = [np.round(np.mean(range[0]), 3), \n", - " np.round(np.mean(range[1]), 3), \n", + " center = [np.round(np.mean(range[0]), 3),\n", + " np.round(np.mean(range[1]), 3),\n", " np.round(np.mean(range[2]), 3)]\n", " size = [np.round(abs(range[0][0]-range[0][1])*scale, 3),\n", " np.round(abs(range[1][0]-range[1][1])*scale, 3),\n", @@ -240,9 +240,9 @@ " center = [np.round(np.mean(X), 3),\n", " np.round(np.mean(Y), 3),\n", " np.round(np.mean(Z), 3),]\n", - " dist = [(x-center[0])**2 + \n", - " (y-center[1])**2 + \n", - " (z-center[2])**2 \n", + " dist = [(x-center[0])**2 +\n", + " (y-center[1])**2 +\n", + " (z-center[2])**2\n", " for x,y,z in zip(X,Y,Z)]\n", " size = [np.round((math.sqrt(np.sum(dist)/len(X))/gyBoxRatio)*scale, 3)]*3\n", " return [center, size]\n", @@ -250,15 +250,15 @@ "def eboxsize_mod(coorList, scale=1):\n", " gyBoxRatio = 0.23\n", " X, Y, Z = coorList[0], coorList[1], coorList[2]\n", - " range = [[min(X), max(X)], \n", - " [min(Y), max(Y)], \n", + " range = [[min(X), max(X)],\n", + " [min(Y), max(Y)],\n", " [min(Z), max(Z)]]\n", - " center = [np.round(np.mean(range[0]), 3), \n", - " np.round(np.mean(range[1]), 3), \n", + " center = [np.round(np.mean(range[0]), 3),\n", + " np.round(np.mean(range[1]), 3),\n", " np.round(np.mean(range[2]), 3)]\n", - " dist = [(x-center[0])**2 + \n", - " (y-center[1])**2 + \n", - " (z-center[2])**2 \n", + " dist = [(x-center[0])**2 +\n", + " (y-center[1])**2 +\n", + " (z-center[2])**2\n", " for x,y,z in zip(X,Y,Z)]\n", " size = [np.round((math.sqrt(np.sum(dist)/len(X))/gyBoxRatio)*scale, 3)]*3\n", " return [center, size]\n", @@ -266,11 +266,11 @@ "def autodock_grid(coorList, scale=1):\n", " min_len = 22.5\n", " X, Y, Z = coorList[0], coorList[1], coorList[2]\n", - " range = [[min(X), max(X)], \n", - " [min(Y), max(Y)], \n", + " range = [[min(X), max(X)],\n", + " [min(Y), max(Y)],\n", " [min(Z), max(Z)]]\n", - " center = [np.round(np.mean(range[0]), 3), \n", - " np.round(np.mean(range[1]), 3), \n", + " center = [np.round(np.mean(range[0]), 3),\n", + " np.round(np.mean(range[1]), 3),\n", " np.round(np.mean(range[2]), 3)]\n", " size = [min_len]*3\n", " return [center, size]\n", @@ -282,8 +282,8 @@ " INTER_TYPE = []\n", " ID = os.path.basename(inputPL[:-7])\n", " CSV_Ifile = os.path.join(INT_FLD, f\"{ID[:-2]}/{ID}_inter.csv\")\n", - " COL = [\"RESNR\", \"RESTYPE\", \"RESCHAIN\", \"RESNR_LIG\", \"RESTYPE_LIG\", \n", - " \"RESCHAIN_LIG\", \"DIST\", \"LIGCARBONIDX\", \"PROTCARBONIDX\", \"LIGCOO\", \n", + " COL = [\"RESNR\", \"RESTYPE\", \"RESCHAIN\", \"RESNR_LIG\", \"RESTYPE_LIG\",\n", + " \"RESCHAIN_LIG\", \"DIST\", \"LIGCARBONIDX\", \"PROTCARBONIDX\", \"LIGCOO\",\n", " \"PROTCOO\"]\n", " INTER_DF = pd.DataFrame(columns=COL)\n", "\n", @@ -294,8 +294,8 @@ " BD_keys = BOND_DICT.keys()\n", " BSI_key = f\":\".join([str(x) for x in LIG.members[0]])\n", " BSI_val = protlig.interaction_sets[BSI_key]\n", - " BSR = BindingSiteReport(BSI_val) \n", - " INTER[BSI_key] = {k: [getattr(BSR, f\"{k}_features\")] + \n", + " BSR = BindingSiteReport(BSI_val)\n", + " INTER[BSI_key] = {k: [getattr(BSR, f\"{k}_features\")] +\n", " getattr(BSR, f\"{k}_info\")\n", " for k in tuple(BD_keys)}\n", " for BD_key in list(BD_keys):\n", @@ -314,10 +314,10 @@ " COLOR = []\n", " MIDCOO = []\n", " interaction = pd.read_csv(inputCSV, converters={\n", - " \"LIGCOO\": lambda x: ast.literal_eval(str(x)), \n", - " \"PROTCOO\": lambda x: ast.literal_eval(str(x)), \n", + " \"LIGCOO\": lambda x: ast.literal_eval(str(x)),\n", + " \"PROTCOO\": lambda x: ast.literal_eval(str(x)),\n", " \"BOND\": lambda x: x.lower()})\n", - " for LC, PC, BT in zip(interaction[\"LIGCOO\"], interaction[\"PROTCOO\"], \n", + " for LC, PC, BT in zip(interaction[\"LIGCOO\"], interaction[\"PROTCOO\"],\n", " interaction[\"BOND\"]):\n", " COLOR.append(BOND_DICT[BT][1])\n", " p1 = np.array([LC[0], LC[1], LC[2]])\n", @@ -328,7 +328,7 @@ " mid_x = np.round((LC[0] + PC[0]) / 2, 2)\n", " mid_y = np.round((LC[1] + PC[1]) / 2, 2)\n", " mid_z = np.round((LC[2] + PC[2]) / 2, 2)\n", - " p_mid = (mid_x, mid_y, mid_z) \n", + " p_mid = (mid_x, mid_y, mid_z)\n", " MIDCOO.append(p_mid)\n", " interaction[\"BOND\"] = interaction[\"BOND\"].str.upper()\n", " interaction[\"COLOR\"] = COLOR\n", @@ -349,13 +349,13 @@ " distances = []\n", " maxSubStr = rdFMCS.FindMCS([ref, target])\n", " a = ref.GetSubstructMatch(Chem.MolFromSmarts(maxSubStr.smartsString))\n", - " b = target.GetSubstructMatch(Chem.MolFromSmarts(maxSubStr.smartsString)) \n", + " b = target.GetSubstructMatch(Chem.MolFromSmarts(maxSubStr.smartsString))\n", " for atomA,atomB in list(zip(a, b)):\n", " pos_A = ref.GetConformer().GetAtomPosition(atomA)\n", " pos_B = target.GetConformer().GetAtomPosition(atomB)\n", " coord_A = np.array((pos_A.x, pos_A.y, pos_A.z))\n", " coord_B = np.array((pos_B.x, pos_B.y, pos_B.z))\n", - " dist_numpy = np.linalg.norm(coord_A - coord_B) \n", + " dist_numpy = np.linalg.norm(coord_A - coord_B)\n", " distances.append(dist_numpy)\n", " rmsd = np.round(math.sqrt(1/len(distances)*sum([i*i for i in distances])),3)\n", " return rmsd\n", @@ -371,15 +371,15 @@ " df[\"RMSD_UB_BP\"] = pd.to_numeric(df[\"RMSD_UB_BP\"])\n", " first = [\"ID\", \"SCORE\", \"RMSD_EL\"]\n", " full = [\"ID\", \"POSE\", \"SCORE\", \"RMSD_EL\", \"RMSD_LB_BP\", \"RMSD_UB_BP\"]\n", - " if result == \"first\": \n", + " if result == \"first\":\n", " return df[first].iloc[:1]\n", - " if result == \"full\": \n", + " if result == \"full\":\n", " return df[full]\n", "\n", "# Py3Dmol model viewer\n", "def VIEW_PROT(inputP, model=\"Cartoon\", color=\"white\", focusRes=\"\",\n", " focusResColor=\"white\", addStick=False, addLine=False,\n", - " showChain=False, showResLabel=False, showVDW=False, \n", + " showChain=False, showResLabel=False, showVDW=False,\n", " outline=False):\n", " # Variables\n", " mview = py3Dmol.view(1000,1500)\n", @@ -399,7 +399,7 @@ " mview.setStyle(\n", " {\"model\": prot_model},\n", " {model: {cType: color}})\n", - " \n", + "\n", " # Show chains\n", " chainLen = chain_profilier(inputP)[0]\n", " if showChain and chainLen > 1:\n", @@ -411,7 +411,7 @@ " f\"Chain {chr(65+n)}\",\n", " {\"fontColor\": c, \"backgroundOpacity\": 0.7, \"alignment\": \"topLeft\"},\n", " {\"and\": [{\"model\": prot_model}, {\"chain\": chr(65+n)}]})\n", - " \n", + "\n", " # Focus RES\n", " if focusRes != \"\":\n", " res = focusRes.split(\",\")\n", @@ -429,21 +429,21 @@ " \"fontSize\": 14,\n", " \"fontColor\": \"0x000000\",\n", " \"screenOffset\": {\"x\": 15, \"y\": 15}})\n", - " \n", + "\n", " # Show VDW surface\n", " if showVDW:\n", " mview.addSurface(\n", - " py3Dmol.VDW, \n", + " py3Dmol.VDW,\n", " {\"color\": \"white\", \"opacity\": 0.4},\n", " {\"model\": prot_model})\n", "\n", " # Show outline\n", " if outline:\n", " mview.setViewStyle(\n", - " {\"style\": \"outline\", \n", - " \"color\": \"black\", \n", + " {\"style\": \"outline\",\n", + " \"color\": \"black\",\n", " \"width\": 0.1})\n", - " \n", + "\n", " print(f\"\")\n", " mview.setBackgroundColor(\"0xFFFFFF\")\n", " mview.center({\"model\": prot_model})\n", @@ -462,19 +462,19 @@ " mview.setStyle(\n", " {\"model\": elig_model},\n", " {\"stick\": {\"colorscheme\": \"lightGrayCarbon\"}})\n", - " \n", + "\n", " # Label all atoms\n", " if showAtomLabel:\n", " mview.addPropertyLabels(\n", " \"atom\",\n", " {\"model\": elig_model},\n", " {\"backgroundOpacity\": 0.7, \"inFront\": True})\n", - " \n", + "\n", " # Show outline\n", " if outline:\n", " mview.setViewStyle(\n", - " {\"style\": \"outline\", \n", - " \"color\": \"black\", \n", + " {\"style\": \"outline\",\n", + " \"color\": \"black\",\n", " \"width\": 0.1})\n", "\n", " print(f\"\")\n", @@ -503,19 +503,19 @@ " mview.setStyle(\n", " {\"model\": lig_model},\n", " {\"stick\": {\"colorscheme\": \"lightGrayCarbon\"}})\n", - " \n", + "\n", " # Label all atoms\n", " if showAtomLabel:\n", " mview.addPropertyLabels(\n", " \"atom\",\n", " {\"model\": lig_model},\n", " {\"backgroundOpacity\": 0.7, \"inFront\": True})\n", - " \n", + "\n", " # Show outline\n", " if outline:\n", " mview.setViewStyle(\n", - " {\"style\": \"outline\", \n", - " \"color\": \"black\", \n", + " {\"style\": \"outline\",\n", + " \"color\": \"black\",\n", " \"width\": 0.1})\n", "\n", " print(f\"\")\n", @@ -533,8 +533,8 @@ " print(f\"+ Center: X {center[0]} Y {center[1]} Z {center[2]}\")\n", " print(f\"+ Size: W {size[0]} H {size[1]} D {size[2]}\")\n", " mview.addBox(\n", - " {\"center\":{\"x\":bxi, \"y\":byi, \"z\":bzi}, \n", - " \"dimensions\": {\"w\":bxf, \"h\":byf, \"d\":bzf}, \n", + " {\"center\":{\"x\":bxi, \"y\":byi, \"z\":bzi},\n", + " \"dimensions\": {\"w\":bxf, \"h\":byf, \"d\":bzf},\n", " \"color\": \"skyBlue\", \"opacity\": 0.7})\n", "\n", " # Protein model\n", @@ -546,7 +546,7 @@ " mview.setStyle(\n", " {\"model\": prot_model},\n", " {\"cartoon\": {\"color\": \"white\"}})\n", - " \n", + "\n", " # Experimental ligand model\n", " count += 1\n", " elig_model = count\n", @@ -556,12 +556,12 @@ " mview.setStyle(\n", " {\"model\": elig_model},\n", " {\"stick\": {\"colorscheme\": \"greenCarbon\"}})\n", - " \n", + "\n", " # Focus RES\n", " if focusRes != \"\":\n", " res = focusRes.split(\",\")\n", " mview.addStyle(\n", - " {\"and\": [{\"model\": prot_model}, {\"resi\": res}]}, \n", + " {\"and\": [{\"model\": prot_model}, {\"resi\": res}]},\n", " {\"stick\": {\"colorscheme\": \"orangeCarbon\", \"radius\": 0.15}})\n", " mview.addResLabels(\n", " {\"and\": [{\"model\": prot_model}, {\"resi\": res}]},\n", @@ -578,14 +578,13 @@ " mview.center({\"model\": elig_model})\n", " mview.show()\n", "\n", - "def VIEW_PILE(inputP, inputPP, inputL, inputE, inputCSV, model=\"Cartoon\", \n", - " color=\"white\", focusRes=\"\", focusResColor=\"white\", \n", - " showInter=False, showSubunit=False, showResLabel=False, \n", - " showVDW=False, showPartProt=False, showExpLig=False, \n", + "def VIEW_PILE(inputP, inputPP, inputL, inputE, inputCSV, model=\"Cartoon\",\n", + " color=\"white\", focusRes=\"\", focusResColor=\"white\",\n", + " showInter=False, showSubunit=False, showResLabel=False,\n", + " showVDW=False, showPartProt=False, showExpLig=False,\n", " showLig=False, showAllPose=False, showBestPose=False,\n", " outline=False):\n", " # Variables\n", - " resUQ = []\n", " mview = py3Dmol.view(1000,1500)\n", " if model in \"none\":\n", " model = cType = color = \"\"\n", @@ -595,7 +594,7 @@ " cType, color = \"colorscheme\", color + \"Carbon\"\n", "\n", " # Protein model\n", - " count = 1 \n", + " count = 1\n", " prot_model = count\n", " print(f\"+ Showing {os.path.basename(inputP)}\")\n", " molA = open(inputP, \"r\").read()\n", @@ -615,17 +614,17 @@ " f\"Subunit {chr(65+n)}\",\n", " {\"fontColor\": c, \"backgroundOpacity\": 0.7, \"alignment\": \"topLeft\"},\n", " {\"and\": [{\"model\": prot_model}, {\"chain\": chr(65+n)}]})\n", - " \n", + "\n", " # Focus RES\n", + " res = focusRes.split(',')\n", " if focusRes != \"\":\n", - " resUQ.extend([int(r) for r in focusRes.split(\",\")])\n", " mview.addStyle(\n", - " {\"and\": [{\"model\": prot_model}, {\"resi\": resUQ}]},\n", + " {\"and\": [{\"model\": prot_model}, {\"resi\": res}]},\n", " {\"stick\": {\"colorscheme\": focusResColor + \"Carbon\", \"radius\": 0.15}})\n", " # Label focused RES\n", " if showResLabel:\n", " mview.addResLabels(\n", - " {\"and\": [{\"model\": prot_model}, {\"resi\": resUQ}]},\n", + " {\"and\": [{\"model\": prot_model}, {\"resi\": res}]},\n", " {\"alignment\": \"bottomLeft\",\n", " \"showBackground\": False,\n", " \"inFront\": True,\n", @@ -633,7 +632,7 @@ " \"fontSize\": 14,\n", " \"fontColor\": \"0x000000\",\n", " \"screenOffset\": {\"x\": 15, \"y\": 15}})\n", - " \n", + "\n", " # Interactions\n", " if showInter:\n", " interaction = view_interaction(inputCSV, result=\"py3Dmol\")\n", @@ -643,34 +642,35 @@ " PROTCOO = interaction[\"PROTCOO\"]\n", " MIDCOO = interaction[\"MIDCOO\"]\n", " BOND = interaction[\"BOND\"]\n", + "\n", + " inter_res = list(set(RESNR) - set(res))\n", + " mview.addStyle(\n", + " {\"and\": [{\"model\": prot_model}, {\"resi\": inter_res}]},\n", + " {\"stick\": {\"colorscheme\": \"whiteCarbon\", \"radius\": 0.15}})\n", + " mview.addResLabels(\n", + " {\"and\": [{\"model\": prot_model}, {\"resi\": inter_res}]},\n", + " {\"alignment\": \"bottomLeft\", \"showBackground\": False,\n", + " \"inFront\": True, \"fixed\": False, \"fontSize\": 14,\n", + " \"fontColor\": \"0x000000\", \"screenOffset\": {\"x\": 15, \"y\": 15}})\n", + "\n", " for RN,DC,LC,PC,MC,BT in zip(RESNR, DIST_CALC, LIGCOO, PROTCOO, MIDCOO, BOND):\n", " BT = BT.lower()\n", - " if RN not in resUQ:\n", - " resUQ.append(RN)\n", - " mview.addStyle(\n", - " {\"and\": [{\"model\": prot_model}, {\"resi\": RN}]},\n", - " {\"stick\": {\"colorscheme\": \"whiteCarbon\", \"radius\": 0.15}})\n", - " mview.addResLabels(\n", - " {\"and\": [{\"model\": prot_model}, {\"resi\": RN}]},\n", - " {\"alignment\": \"bottomLeft\", \"showBackground\": False,\n", - " \"inFront\": True, \"fixed\": False, \"fontSize\": 14, \n", - " \"fontColor\": \"0x000000\", \"screenOffset\": {\"x\": 15, \"y\": 15}})\n", - " mview.addCylinder(\n", - " {\"start\": {\"x\": LC[0], \"y\": LC[1], \"z\": LC[2]},\n", - " \"end\": {\"x\": PC[0], \"y\": PC[1], \"z\": PC[2]}, \n", - " \"radius\": 0.05, \"fromCap\": 1, \"toCap\": 1, \n", - " \"color\": BOND_DICT[BT][0], \"dashed\": True})\n", - " mview.addLabel(\n", - " str(DC) + \" Å\",\n", - " {\"position\": {\"x\": MC[0], \"y\": MC[1], \"z\": MC[2]},\n", - " \"alignment\": \"bottomLeft\", \"inFront\": False, \"fixed\": False,\n", - " \"backgroundColor\": BOND_DICT[BT][0], \"fontSize\": 10,\n", - " \"screenOffset\": {\"x\": 5, \"y\": 5}})\n", + " mview.addCylinder(\n", + " {\"start\": {\"x\": LC[0], \"y\": LC[1], \"z\": LC[2]},\n", + " \"end\": {\"x\": PC[0], \"y\": PC[1], \"z\": PC[2]},\n", + " \"radius\": 0.05, \"fromCap\": 1, \"toCap\": 1,\n", + " \"color\": BOND_DICT[BT][0], \"dashed\": True})\n", + " mview.addLabel(\n", + " str(DC) + \" Å\",\n", + " {\"position\": {\"x\": MC[0], \"y\": MC[1], \"z\": MC[2]},\n", + " \"alignment\": \"bottomLeft\", \"inFront\": False, \"fixed\": False,\n", + " \"backgroundColor\": BOND_DICT[BT][0], \"fontSize\": 10,\n", + " \"screenOffset\": {\"x\": 5, \"y\": 5}})\n", "\n", " # Show VDW surface\n", " if showVDW:\n", " mview.addSurface(\n", - " py3Dmol.VDW, \n", + " py3Dmol.VDW,\n", " {\"color\": \"white\", \"opacity\": 0.4},\n", " {\"model\": prot_model})\n", "\n", @@ -687,7 +687,7 @@ " mview.addStyle(\n", " {\"model\": pprot_model},\n", " {\"stick\": {\"colorscheme\": \"yellowCarbon\"}})\n", - " \n", + "\n", " # Experimental ligand model\n", " if showExpLig:\n", " count += 1\n", @@ -698,7 +698,7 @@ " mview.setStyle(\n", " {\"model\": elig_model},\n", " {\"stick\": {\"color\": \"gray\"}})\n", - " \n", + "\n", " # Ligand model\n", " if showLig:\n", " count += 1\n", @@ -710,7 +710,7 @@ " {\"model\": lig_model},\n", " {\"stick\": {\"colorscheme\": \"orangeCarbon\"}})\n", "\n", - " # Show poses of selected ligand \n", + " # Show poses of selected ligand\n", " if showAllPose:\n", " pose = sorted([ os.path.join(os.path.dirname(inputL), f) for f in os.listdir(os.path.dirname(inputL)) if f.endswith(\".pdb\") ])\n", " pose.remove(inputL[len(DCK_FLD)+1:]) if inputL[len(DCK_FLD)+1:] in pose else None\n", @@ -727,7 +727,7 @@ " if outline:\n", " mview.setViewStyle(\n", " {\"style\": \"outline\", \"color\": \"black\", \"width\": 0.1})\n", - " \n", + "\n", " print(f\"\")\n", " mview.setBackgroundColor(\"0xFFFFFF\")\n", " mview.center({\"model\": lig_model})\n", @@ -760,7 +760,7 @@ "#@title **Generate protein PDB file**\n", "#@markdown Enter the **< PDB ID >** to download targeted protein.\n", "\n", - "PDB_ID = \"6NCF\" # @param {type:\"string\"}\n", + "PDB_ID = \"7KNX\" # @param {type:\"string\"}\n", "PDB_pdb = PDB_ID + \".pdb\"\n", "PDB_pdb_Pfile = os.path.join(PRT_FLD, PDB_pdb)\n", "\n", @@ -808,7 +808,7 @@ "#@title **Display 3D protein** { run: \"auto\" }\n", "#@markdown Enter the **< Protein >** to be viewed.\n", "\n", - "View = \"6NCF_prot_B\" #@param {type:\"string\"}\n", + "View = \"7KNX_prot_A\" #@param {type:\"string\"}\n", "Model = \"cartoon\" #@param [\"none\", \"line\", \"stick\", \"cartoon\"]\n", "Model_colour = \"white\" #@param [\"red\", \"orange\", \"yellow\", \"green\", \"blue\", \"violet\", \"purple\", \"white\"]\n", "Focus_residues = \"\" #@param {type:\"string\"}\n", @@ -839,14 +839,14 @@ }, "outputs": [], "source": [ - "#@title **Parameterise protein with Gasteiger charges** \n", + "#@title **Parameterise protein with Gasteiger charges**\n", "#@markdown Enter the **< Protein >** to be parameterised.\\\n", "#@markdown This generate a **`protein.pdbqt`** file after:\n", "#@markdown + Addition of Gasteiger Partial Charge\n", "#@markdown + Addition of polar hydrogens\n", "#@markdown + Removal of non-polar hydrogens\n", "\n", - "Target_protein = \"6NCF_prot_B\" #@param {type:\"string\"}\n", + "Target_protein = \"7KNX_prot_A\" #@param {type:\"string\"}\n", "PROT_pdb = Target_protein + \".pdb\"\n", "PROT_pdbqt = Target_protein + \".pdbqt\"\n", "PROT_pdb_Pfile = os.path.join(PRT_FLD, PROT_pdb)\n", @@ -885,10 +885,10 @@ "outputs": [], "source": [ "#@title **Generate experimental ligand PDB file**\n", - "#@markdown Enter the **< Keyword >** assigned to query for the experimental \n", - "#@markdown ligand in the **`pdb`** fle. \n", + "#@markdown Enter the **< Keyword >** assigned to query for the experimental\n", + "#@markdown ligand in the **`pdb`** fle.\n", "\n", - "Keyword = \"AF7\" #@param {type:\"string\"}\n", + "Keyword = \"QOV\" #@param {type:\"string\"}\n", "Elig_pdb = Keyword + \".pdb\"\n", "Elig_pdb_Efile = os.path.join(EXP_FLD, Elig_pdb)\n", "\n", @@ -928,15 +928,15 @@ "outputs": [], "source": [ "#@title **Display 3D ligand** {run: \"auto\"}\n", - "#@markdown Enter the **< Experimental Ligand >** to be viewed. \n", + "#@markdown Enter the **< Experimental Ligand >** to be viewed.\n", "\n", - "View = \"AF7_B\" #@param {type:\"string\"}\n", + "View = \"QOV_A\" #@param {type:\"string\"}\n", "Show_atom_labels = False #@param {type:\"boolean\"}\n", "View_outline = False #@param {type:\"boolean\"}\n", "eview_Efile = os.path.join(EXP_FLD, f\"{View}.pdb\")\n", "\n", - "VIEW_ELIG(inputE=eview_Efile, \n", - " showAtomLabel=Show_atom_labels, \n", + "VIEW_ELIG(inputE=eview_Efile,\n", + " showAtomLabel=Show_atom_labels,\n", " outline=View_outline)" ] }, @@ -952,7 +952,7 @@ "#@title **Choose exprimental ligand**\n", "#@markdown Enter the **< Target Experimental Ligand >** for later comparison.\n", "\n", - "Target_experimental_ligand = \"AF7_B\" #@param {type:\"string\"}\n", + "Target_experimental_ligand = \"QOV_A\" #@param {type:\"string\"}\n", "EXP_pdb = Target_experimental_ligand + \".pdb\"\n", "EXP_pdb_Efile = os.path.join(EXP_FLD, EXP_pdb)\n", "EXP_pdb_Dfile = os.path.join(DCK_FLD, EXP_pdb)\n", @@ -985,15 +985,15 @@ }, "outputs": [], "source": [ - "#@title **Generate SMILES file** \n", + "#@title **Generate SMILES file**\n", "#@markdown Enter the ligand **< ID >** and **< SMILES >** to be docked. \\\n", "#@markdown This generate **`smi`** file for the ligand.\n", "\n", - "Ligand_ID = \"AKBA\" #@param {type:\"string\"}\n", - "Ligand_SMILES = \"CC1CCC2(CCC3(C(=CC(=O)C4C3(CCC5C4(CCC(C5(C)C(=O)O)OC(=O)C)C)C)C2C1C)C)C\" #@param {type:\"string\"}\n", + "Ligand_ID = \"C26A6\" #@param {type:\"string\"}\n", + "Ligand_SMILES = \"CC1=NN2C=CC=C(C2=N1)NS(=O)(=O)C3=C(C=CC(=C3)Cl)OC\" #@param {type:\"string\"}\n", "\n", "LIG_ID = Ligand_ID\n", - "LIG_smi = LIG_ID + \".smi\" \n", + "LIG_smi = LIG_ID + \".smi\"\n", "LIG_mol2 = LIG_ID + \".mol2\"\n", "LIG_pdbqt = LIG_ID + \".pdbqt\"\n", "LIG_smi_Lfile = os.path.join(LIG_FLD, f\"{LIG_smi}\")\n", @@ -1016,17 +1016,17 @@ "outputs": [], "source": [ "#@title **Dispay 3D ligand** {run: \"auto\"}\n", - "#@markdown Enter the **< Ligand >** to be viewed. \n", + "#@markdown Enter the **< Ligand >** to be viewed.\n", "\n", - "View = \"AKBA\" #@param {type:\"string\"}\n", + "View = \"C26A6\" #@param {type:\"string\"}\n", "Show_atom_labels = False #@param {type:\"boolean\"}\n", "Show_hydrogens = False #@param {type:\"boolean\"}\n", "View_outline = False #@param {type:\"boolean\"}\n", "lview_Lfile = os.path.join(LIG_FLD, f\"{View}.smi\")\n", "\n", - "VIEW_LIG(inputL=lview_Lfile, \n", + "VIEW_LIG(inputL=lview_Lfile,\n", " showHs=Show_hydrogens,\n", - " showAtomLabel=Show_atom_labels, \n", + " showAtomLabel=Show_atom_labels,\n", " outline=View_outline)" ] }, @@ -1042,12 +1042,12 @@ "#@title **Parameterize ligand(s) with Gasteiger charges**\n", "#@markdown Select **< Force Field >** for energy minimization. \\\n", "#@markdown This generate **`ligand.mol2`** and **`ligand.pdbqt`** file after:\n", - "#@markdown + Energy minization at 10,000 iterations \n", + "#@markdown + Energy minization at 10,000 iterations\n", "#@markdown + Addition of Gasteiger Partial Charge\n", "#@markdown + Removal of non-polar hydrogens\n", "\n", - "# NOTE: The prepare_ligand4.py does not recognise the mol2 file location in \n", - "# LIGAND folder for some reason. Hence, the mol2 file was generated in \n", + "# NOTE: The prepare_ligand4.py does not recognise the mol2 file location in\n", + "# LIGAND folder for some reason. Hence, the mol2 file was generated in\n", "# /content/ and then move back into LIGAND folder after parameterization.\n", "\n", "Select_force_field = \"UFF\" #@param [\"GAFF\", \"Ghemical\", \"MMFF94\", \"MMFF94s\", \"UFF\"]\n", @@ -1056,7 +1056,7 @@ "LIG_mol2_DRfile = os.path.join(DIR, f\"{LIG_mol2}\")\n", "os.makedirs(LIG_Dfld, exist_ok=True)\n", "\n", - "with Hide(): \n", + "with Hide():\n", " !obabel $LIG_smi_Lfile -O $LIG_mol2_DRfile --gen3d --best --canonical \\\n", " --minimize --ff $Select_force_field --steps 10000 --sd\n", " !prepare_ligand4.py -l $LIG_mol2_DRfile -o $LIG_pdbqt_Dfile -U nphs_lps -v\n", @@ -1078,7 +1078,7 @@ "\n", "We then define search space on the target protein through the use of grid box, which often centered within the binding, active or allosteric site of target protein. The size should be sufficiently enough such that important binding residues are contained inside the box. Methods to define grid box include:\n", "\n", - "+ **`LABOGRID`** = Utilize the min and max XYZ coordinates of ligand [🔗](https://github.com/RyanZR/labogrid)\n", + "+ **`LaBOX`** = Utilize the min and max XYZ coordinates of ligand [🔗](https://github.com/RyanZR/LaBOX)\n", "+ **`eBoxSize`** = Utilize the radius of gyration of ligand [🔗](https://github.com/michal-brylinski/eboxsize)\n", "+ **`eBoxSize-modifed`** = Utilize `eBoxSize` but box center is calculated with `LABOGRID` method\n", "+ **`Autodock-Grid`** = 22.5 × 22.5 × 22.5 Å\n", @@ -1136,8 +1136,8 @@ "\n", "VIEW_GRID(inputP=PROT_pdb_Dfile,\n", " inputE=EXP_pdb_Dfile,\n", - " focusRes=Focus_residues, \n", - " center=Center, \n", + " focusRes=Focus_residues,\n", + " center=Center,\n", " size=Size)" ] }, @@ -1178,7 +1178,7 @@ "---\n", "# **Performing Molecular Docking**\n", "\n", - "Finally, we use Autodock Vina to perform the molecular docking on the target ligand. The process may take longer than 2 minutes, depending on the number of rotatable bond and level of exhaustiveness. " + "Finally, we use Autodock Vina to perform the molecular docking on the target ligand. The process may take longer than 2 minutes, depending on the number of rotatable bond and level of exhaustiveness." ] }, { @@ -1193,14 +1193,15 @@ "#@title **Run AutoDock Vina**\n", "#@markdown Select **< Exhaustiveness >** for molecular docking. (Default: 8)\\\n", "#@markdown Autodock Vina will performs molecular docking on targeted protein.\\\n", - "#@markdown This generate **`ligand_output.pdbqt`**. \n", + "#@markdown This generate **`ligand_output.pdbqt`**.\n", "\n", - "#@markdown **NOTE:** Compound with many rotatable bonds may required higher \n", - "#@markdown level of exhaustiveness to ensure accurate and consistent pose \n", + "#@markdown **NOTE:** Compound with many rotatable bonds may required higher\n", + "#@markdown level of exhaustiveness to ensure accurate and consistent pose\n", "#@markdown prediction.\n", "\n", "Exhaustiveness = 8 #@param {type:\"slider\", min:1, max:128, step:1}\n", "ex = Exhaustiveness\n", + "cpu_num = os.cpu_count()\n", "\n", "LIG_out_pdbqt = LIG_ID + \"_output.pdbqt\"\n", "LIG_out_sdf = LIG_ID + \"_output.sdf\"\n", @@ -1208,7 +1209,7 @@ "LIG_out_pdbqt_Dfile = os.path.join(DCK_FLD, f\"{LIG_ID}/{LIG_out_pdbqt}\")\n", "LIG_out_sdf_Dfile = os.path.join(DCK_FLD, f\"{LIG_ID}/{LIG_out_sdf}\")\n", "LIG_log_txt_Dfile = os.path.join(DCK_FLD, f\"{LIG_ID}/{LIG_log_txt}\")\n", - " \n", + "\n", "# -- Start docking --\n", "start = timeit.default_timer()\n", "with Hide():\n", @@ -1216,7 +1217,7 @@ " with contextlib.redirect_stdout(i):\n", " %vina --receptor $PROT_pdbqt_Dfile --ligand $LIG_pdbqt_Dfile \\\n", " --out $LIG_out_pdbqt_Dfile --config $CONF_Dfile \\\n", - " --exhaustiveness $ex --verbosity 2\n", + " --exhaustiveness $ex --cpu $cpu_num --verbosity 2\n", " with open(LIG_log_txt_Dfile, \"r\") as r:\n", " data = r.read().splitlines(True)\n", " with open(LIG_log_txt_Dfile, \"w\") as o:\n", @@ -1397,7 +1398,7 @@ "source": [ "#@title **Show interaction profile of ligand** {run: \"auto\"}\n", "\n", - "Select_ligand = \"AKBA_1\" #@param {type : \"string\"}\n", + "Select_ligand = \"C26A6_2\" #@param {type : \"string\"}\n", "LIG_inter_CSV_Ifile = os.path.join(INT_FLD, f\"{Select_ligand[:-2]}/{Select_ligand}_inter.csv\")\n", "view_interaction(LIG_inter_CSV_Ifile, result=\"summary\")" ], @@ -1420,10 +1421,10 @@ "#@title **Display 3D binding mode** { run: \"auto\" }\n", "\n", "#@markdown **PROTEIN MODEL**\n", - "View_protein = \"6NCF_prot_B\" #@param {type:\"string\"}\n", + "View_protein = \"7KNX_prot_A\" #@param {type:\"string\"}\n", "Model = \"none\" #@param [\"none\", \"line\", \"stick\", \"cartoon\"]\n", "Model_colour = \"white\" #@param [\"red\", \"orange\", \"yellow\", \"green\", \"blue\", \"violet\", \"purple\", \"white\"]\n", - "Focus_residues = \"200\" #@param {type:\"string\"}\n", + "Focus_residues = \"\" #@param {type:\"string\"}\n", "Residues_colour = \"white\" #@param [\"red\", \"orange\", \"yellow\", \"green\", \"blue\", \"violet\", \"purple\", \"white\"]\n", "Show_all_subunits = False #@param {type:\"boolean\"}\n", "Show_residues_label = True #@param {type:\"boolean\"}\n", @@ -1434,15 +1435,15 @@ "#@markdown ---\n", "\n", "#@markdown **LIGAND MODEL** \\\n", - "#@markdown Enter the **< Ligand >** to be viewed. \n", - "View_ligand = \"AKBA_1\" #@param {type:\"string\"}\n", - "View_experimental_ligand = \"AF7_B\" #@param {type:\"string\"}\n", + "#@markdown Enter the **< Ligand >** to be viewed.\n", + "View_ligand = \"C26A6_1\" #@param {type:\"string\"}\n", + "View_experimental_ligand = \"QOV_A\" #@param {type:\"string\"}\n", "Show_ligand = True #@param {type:\"boolean\"}\n", "Show_experimental_ligand = True #@param {type:\"boolean\"}\n", "Show_all_pose = False #@param {type:\"boolean\"}\n", "Show_best_pose = False #@param {type:\"boolean\"}\n", "\n", - "#@markdown --- \n", + "#@markdown ---\n", "\n", "#@markdown **PARTNER PROTEIN MODEL** \\\n", "#@markdown (OPTIONAL, upload to DOCKING FOLDER) \\\n", @@ -1458,7 +1459,7 @@ "iview_Ifile = os.path.join(INT_FLD, f\"{View_ligand[:-2]}/{View_ligand}_inter.csv\")\n", "\n", "VIEW_PILE(inputP=pview_Dfile,\n", - " inputPP=ppview_Dfile, \n", + " inputPP=ppview_Dfile,\n", " inputL=lview_Dfile,\n", " inputE=eview_Dfile,\n", " inputCSV=iview_Ifile,\n", @@ -1473,7 +1474,7 @@ " showPartProt=Show_partner_protein,\n", " showExpLig=Show_experimental_ligand,\n", " showLig=Show_ligand,\n", - " showAllPose=Show_all_pose, \n", + " showAllPose=Show_all_pose,\n", " showBestPose=Show_best_pose,\n", " outline=View_outline)" ] @@ -1488,7 +1489,7 @@ "---\n", "# **Save to Google Drive**\n", "\n", - "Save the docking result into Google Drive. " + "Save the docking result into Google Drive." ] }, { @@ -1548,7 +1549,7 @@ ], "provenance": [], "mount_file_id": "1jj_nqfJuwJhZyR3x8vpiddRd-EWsuQVr", - "authorship_tag": "ABX9TyMCAWVhyhcUP/ae4/2XuKgl", + "authorship_tag": "ABX9TyOZmzKPcYq9ca4Vc0dM6ZFN", "include_colab_link": true }, "kernelspec": { diff --git a/notebooks/virtual_screening.ipynb b/notebooks/virtual_screening.ipynb index b8fbc77..4126077 100644 --- a/notebooks/virtual_screening.ipynb +++ b/notebooks/virtual_screening.ipynb @@ -14,8 +14,8 @@ "cell_type": "markdown", "source": [ "# **VIRTUAL SCREENING**\n", - " \n", - "This Jupyter Notebook enables virtual screening operation on a large virtual chemical library against the target protein of choice using **Autodock Vina 1.2.0** and **PLIP 2.2.2**. " + "\n", + "This Jupyter Notebook enables virtual screening operation on a large virtual chemical library against the target protein of choice using **Autodock Vina 1.2.0** and **PLIP 2.2.2**." ], "metadata": { "id": "6aVJQbSoLSvz" @@ -52,28 +52,28 @@ "outputs": [], "source": [ "#@title **Install packages and dependencies**\n", - "#@markdown Thanks to **`mamba`**, the installation takes **less than 5 mins**. \\ \n", + "#@markdown Thanks to **`mamba`**, the installation takes **less than 5 mins**. \\\n", "#@markdown It will **restart** the kernel (session).\n", "\n", "%%capture\n", "import contextlib\n", "with open(\"/content/installation.log\", \"w\") as i:\n", " with contextlib.redirect_stdout(i):\n", - " \n", - " !pip install py3Dmol==2.0.0.post2\n", + "\n", + " !pip install py3Dmol==2.0.3\n", " !pip install pybel==0.15.5\n", - " !pip install rdkit-pypi==2022.3.5\n", + " !pip install rdkit-pypi==2022.9.5\n", "\n", " !wget https://github.com/ccsb-scripps/AutoDock-Vina/releases/download/v1.2.0/vina_1.2.0_linux_x86_64 -O vina\n", " !chmod u+x vina\n", "\n", " !pip install condacolab\n", " import condacolab\n", - " condacolab.install_miniconda()\n", - " !conda install -c conda-forge mamba\n", - " !mamba install -c conda-forge -c bioconda mgltools=1.5.7 biopython=1.78 \\\n", - " openbabel=3.1.0 plip=2.2.2 zlib=1.2.11 xlsxwriter=3.0.3\n", - " \n", + " condacolab.install_mambaforge()\n", + "\n", + " !mamba install -c conda-forge -c bioconda mgltools=1.5.7 biopython=1.80 \\\n", + " openbabel=3.1.1 plip=2.2.2 zlib=1.2.13 xlsxwriter=3.0.3\n", + "\n", " !rm -r /content/sample_data /content/condacolab_install.log" ] }, @@ -131,7 +131,7 @@ "#@markdown Enter a **< Job Name >** without space.\\\n", "#@markdown This create a folder for protein, ligand, experimental and docking.\n", "\n", - "Job_name = \"5YLU_VS\" #@param {type:\"string\"}\n", + "Job_name = \"7KNX_VS\" #@param {type:\"string\"}\n", "assert not Job_name == \"\", \"Do not leave this blank.\"\n", "assert not any(c == \"/\" or c == \".\" for c in Job_name), \"Disallowed characters.\"\n", "\n", @@ -142,7 +142,7 @@ "EXP_FLD = os.path.join(WRK_DIR, \"EXPERIMENTAL\")\n", "DCK_FLD = os.path.join(WRK_DIR, \"DOCKING\")\n", "INT_FLD = os.path.join(WRK_DIR, \"INTERACTION\")\n", - " \n", + "\n", "folders = [WRK_DIR, PRT_FLD, LIG_FLD, EXP_FLD, DCK_FLD, INT_FLD]\n", "\n", "for f in folders:\n", @@ -163,27 +163,27 @@ "outputs": [], "source": [ "#@title **Set up utilities**\n", - "#@markdown This creates important variables and functions that will be utilized \n", + "#@markdown This creates important variables and functions that will be utilized\n", "#@markdown throughout the docking study.\n", "\n", "%alias vina /content/vina\n", "\n", - "COLORS = [\"red\", \"orange\", \"yellow\", \"lime\", \"green\", \"cyan\", \"teal\", \"blue\", \n", + "COLORS = [\"red\", \"orange\", \"yellow\", \"lime\", \"green\", \"cyan\", \"teal\", \"blue\",\n", " \"violet\", \"purple\", \"pink\", \"gray\", \"brown\", \"white\", \"black\"]\n", "\n", - "BOND_DICT = {\"hydrophobic\": [\"0x59e382\", \"GREEN\"], \n", + "BOND_DICT = {\"hydrophobic\": [\"0x59e382\", \"GREEN\"],\n", " \"hbond\": [\"0x59bee3\", \"LIGHT BLUE\"],\n", - " \"waterbridge\": [\"0x4c4cff\", \"BLUE\"], \n", - " \"saltbridge\": [\"0xefd033\", \"YELLOW\"], \n", - " \"pistacking\": [\"0xb559e3\", \"PURPLE\"], \n", - " \"pication\": [\"0xe359d8\", \"VIOLET\"], \n", - " \"halogen\": [\"0x59bee3\", \"LIGHT BLUE\"], \n", + " \"waterbridge\": [\"0x4c4cff\", \"BLUE\"],\n", + " \"saltbridge\": [\"0xefd033\", \"YELLOW\"],\n", + " \"pistacking\": [\"0xb559e3\", \"PURPLE\"],\n", + " \"pication\": [\"0xe359d8\", \"VIOLET\"],\n", + " \"halogen\": [\"0x59bee3\", \"LIGHT BLUE\"],\n", " \"metal\": [\"0xe35959\", \"ORANGE\"]}\n", "\n", "class Hide:\n", " def __enter__(self):\n", " self._original_stdout = sys.stdout\n", - " sys.stdout = open(os.devnull, \"w\") \n", + " sys.stdout = open(os.devnull, \"w\")\n", " def __exit__(self, exc_type, exc_val, exc_tb):\n", " sys.stdout.close()\n", " sys.stdout = self._original_stdout\n", @@ -192,7 +192,7 @@ "def chain_profilier(inputFile):\n", " parser = PDBParser()\n", " structure = parser.get_structure(\"X\", inputFile)\n", - " chain_obj = [s for s in structure.get_chains()] \n", + " chain_obj = [s for s in structure.get_chains()]\n", " chain_IDs = [c.get_id() for c in chain_obj]\n", " chain_len = len(chain_obj)\n", " return [chain_len, chain_IDs, chain_obj]\n", @@ -222,11 +222,11 @@ "\n", "def labogrid(coorList, scale=2):\n", " X, Y, Z = coorList[0], coorList[1], coorList[2]\n", - " range = [[min(X), max(X)], \n", - " [min(Y), max(Y)], \n", + " range = [[min(X), max(X)],\n", + " [min(Y), max(Y)],\n", " [min(Z), max(Z)]]\n", - " center = [np.round(np.mean(range[0]), 3), \n", - " np.round(np.mean(range[1]), 3), \n", + " center = [np.round(np.mean(range[0]), 3),\n", + " np.round(np.mean(range[1]), 3),\n", " np.round(np.mean(range[2]), 3)]\n", " size = [np.round(abs(range[0][0]-range[0][1])*scale, 3),\n", " np.round(abs(range[1][0]-range[1][1])*scale, 3),\n", @@ -239,9 +239,9 @@ " center = [np.round(np.mean(X), 3),\n", " np.round(np.mean(Y), 3),\n", " np.round(np.mean(Z), 3),]\n", - " dist = [(x-center[0])**2 + \n", - " (y-center[1])**2 + \n", - " (z-center[2])**2 \n", + " dist = [(x-center[0])**2 +\n", + " (y-center[1])**2 +\n", + " (z-center[2])**2\n", " for x,y,z in zip(X,Y,Z)]\n", " size = [np.round((math.sqrt(np.sum(dist)/len(X))/gyBoxRatio)*scale, 3)]*3\n", " return [center, size]\n", @@ -249,15 +249,15 @@ "def eboxsize_mod(coorList, scale=1):\n", " gyBoxRatio = 0.23\n", " X, Y, Z = coorList[0], coorList[1], coorList[2]\n", - " range = [[min(X), max(X)], \n", - " [min(Y), max(Y)], \n", + " range = [[min(X), max(X)],\n", + " [min(Y), max(Y)],\n", " [min(Z), max(Z)]]\n", - " center = [np.round(np.mean(range[0]), 3), \n", - " np.round(np.mean(range[1]), 3), \n", + " center = [np.round(np.mean(range[0]), 3),\n", + " np.round(np.mean(range[1]), 3),\n", " np.round(np.mean(range[2]), 3)]\n", - " dist = [(x-center[0])**2 + \n", - " (y-center[1])**2 + \n", - " (z-center[2])**2 \n", + " dist = [(x-center[0])**2 +\n", + " (y-center[1])**2 +\n", + " (z-center[2])**2\n", " for x,y,z in zip(X,Y,Z)]\n", " size = [np.round((math.sqrt(np.sum(dist)/len(X))/gyBoxRatio)*scale, 3)]*3\n", " return [center, size]\n", @@ -265,15 +265,15 @@ "def autodock_grid(coorList, scale=1):\n", " min_len = 22.5\n", " X, Y, Z = coorList[0], coorList[1], coorList[2]\n", - " range = [[min(X), max(X)], \n", - " [min(Y), max(Y)], \n", + " range = [[min(X), max(X)],\n", + " [min(Y), max(Y)],\n", " [min(Z), max(Z)]]\n", - " center = [np.round(np.mean(range[0]), 3), \n", - " np.round(np.mean(range[1]), 3), \n", + " center = [np.round(np.mean(range[0]), 3),\n", + " np.round(np.mean(range[1]), 3),\n", " np.round(np.mean(range[2]), 3)]\n", " size = [min_len]*3\n", " return [center, size]\n", - " \n", + "\n", "# Binding interactions profiler\n", "def interaction_profiler(inputPL):\n", " protlig = PDBComplex()\n", @@ -281,8 +281,8 @@ " INTER_TYPE = []\n", " ID = os.path.basename(inputPL[:-7])\n", " CSV_Ifile = os.path.join(INT_FLD, f\"{ID[:-2]}/{ID}_inter.csv\")\n", - " COL = [\"RESNR\", \"RESTYPE\", \"RESCHAIN\", \"RESNR_LIG\", \"RESTYPE_LIG\", \n", - " \"RESCHAIN_LIG\", \"DIST\", \"LIGCARBONIDX\", \"PROTCARBONIDX\", \"LIGCOO\", \n", + " COL = [\"RESNR\", \"RESTYPE\", \"RESCHAIN\", \"RESNR_LIG\", \"RESTYPE_LIG\",\n", + " \"RESCHAIN_LIG\", \"DIST\", \"LIGCARBONIDX\", \"PROTCARBONIDX\", \"LIGCOO\",\n", " \"PROTCOO\"]\n", " INTER_DF = pd.DataFrame(columns=COL)\n", "\n", @@ -293,8 +293,8 @@ " BD_keys = BOND_DICT.keys()\n", " BSI_key = f\":\".join([str(x) for x in LIG.members[0]])\n", " BSI_val = protlig.interaction_sets[BSI_key]\n", - " BSR = BindingSiteReport(BSI_val) \n", - " INTER[BSI_key] = {k: [getattr(BSR, f\"{k}_features\")] + \n", + " BSR = BindingSiteReport(BSI_val)\n", + " INTER[BSI_key] = {k: [getattr(BSR, f\"{k}_features\")] +\n", " getattr(BSR, f\"{k}_info\")\n", " for k in tuple(BD_keys)}\n", " for BD_key in list(BD_keys):\n", @@ -313,10 +313,10 @@ " COLOR = []\n", " MIDCOO = []\n", " interaction = pd.read_csv(inputCSV, converters={\n", - " \"LIGCOO\": lambda x: ast.literal_eval(str(x)), \n", - " \"PROTCOO\": lambda x: ast.literal_eval(str(x)), \n", + " \"LIGCOO\": lambda x: ast.literal_eval(str(x)),\n", + " \"PROTCOO\": lambda x: ast.literal_eval(str(x)),\n", " \"BOND\": lambda x: x.lower()})\n", - " for LC, PC, BT in zip(interaction[\"LIGCOO\"], interaction[\"PROTCOO\"], \n", + " for LC, PC, BT in zip(interaction[\"LIGCOO\"], interaction[\"PROTCOO\"],\n", " interaction[\"BOND\"]):\n", " COLOR.append(BOND_DICT[BT][1])\n", " p1 = np.array([LC[0], LC[1], LC[2]])\n", @@ -327,7 +327,7 @@ " mid_x = np.round((LC[0] + PC[0]) / 2, 2)\n", " mid_y = np.round((LC[1] + PC[1]) / 2, 2)\n", " mid_z = np.round((LC[2] + PC[2]) / 2, 2)\n", - " p_mid = (mid_x, mid_y, mid_z) \n", + " p_mid = (mid_x, mid_y, mid_z)\n", " MIDCOO.append(p_mid)\n", " interaction[\"BOND\"] = interaction[\"BOND\"].str.upper()\n", " interaction[\"COLOR\"] = COLOR\n", @@ -348,13 +348,13 @@ " distances = []\n", " maxSubStr = rdFMCS.FindMCS([ref, target])\n", " a = ref.GetSubstructMatch(Chem.MolFromSmarts(maxSubStr.smartsString))\n", - " b = target.GetSubstructMatch(Chem.MolFromSmarts(maxSubStr.smartsString)) \n", + " b = target.GetSubstructMatch(Chem.MolFromSmarts(maxSubStr.smartsString))\n", " for atomA,atomB in list(zip(a, b)):\n", " pos_A = ref.GetConformer().GetAtomPosition(atomA)\n", " pos_B = target.GetConformer().GetAtomPosition(atomB)\n", " coord_A = np.array((pos_A.x, pos_A.y, pos_A.z))\n", " coord_B = np.array((pos_B.x, pos_B.y, pos_B.z))\n", - " dist_numpy = np.linalg.norm(coord_A - coord_B) \n", + " dist_numpy = np.linalg.norm(coord_A - coord_B)\n", " distances.append(dist_numpy)\n", " rmsd = np.round(math.sqrt(1/len(distances)*sum([i*i for i in distances])),3)\n", " return rmsd\n", @@ -370,15 +370,15 @@ " df[\"RMSD_UB_BP\"] = pd.to_numeric(df[\"RMSD_UB_BP\"])\n", " first = [\"ID\", \"SCORE\", \"RMSD_EL\"]\n", " full = [\"ID\", \"POSE\", \"SCORE\", \"RMSD_EL\", \"RMSD_LB_BP\", \"RMSD_UB_BP\"]\n", - " if result == \"first\": \n", + " if result == \"first\":\n", " return df[first].iloc[:1]\n", - " if result == \"full\": \n", + " if result == \"full\":\n", " return df[full]\n", "\n", "# Py3Dmol model viewer\n", "def VIEW_PROT(inputP, model=\"Cartoon\", color=\"white\", focusRes=\"\",\n", " focusResColor=\"white\", addStick=False, addLine=False,\n", - " showChain=False, showResLabel=False, showVDW=False, \n", + " showChain=False, showResLabel=False, showVDW=False,\n", " outline=False):\n", " # Variables\n", " mview = py3Dmol.view(1000,1500)\n", @@ -398,7 +398,7 @@ " mview.setStyle(\n", " {\"model\": prot_model},\n", " {model: {cType: color}})\n", - " \n", + "\n", " # Show chains\n", " chainLen = chain_profilier(inputP)[0]\n", " if showChain and chainLen > 1:\n", @@ -410,7 +410,7 @@ " f\"Chain {chr(65+n)}\",\n", " {\"fontColor\": c, \"backgroundOpacity\": 0.7, \"alignment\": \"topLeft\"},\n", " {\"and\": [{\"model\": prot_model}, {\"chain\": chr(65+n)}]})\n", - " \n", + "\n", " # Focus RES\n", " if focusRes != \"\":\n", " res = focusRes.split(\",\")\n", @@ -428,21 +428,21 @@ " \"fontSize\": 14,\n", " \"fontColor\": \"0x000000\",\n", " \"screenOffset\": {\"x\": 15, \"y\": 15}})\n", - " \n", + "\n", " # Show VDW surface\n", " if showVDW:\n", " mview.addSurface(\n", - " py3Dmol.VDW, \n", + " py3Dmol.VDW,\n", " {\"color\": \"white\", \"opacity\": 0.4},\n", " {\"model\": prot_model})\n", "\n", " # Show outline\n", " if outline:\n", " mview.setViewStyle(\n", - " {\"style\": \"outline\", \n", - " \"color\": \"black\", \n", + " {\"style\": \"outline\",\n", + " \"color\": \"black\",\n", " \"width\": 0.1})\n", - " \n", + "\n", " print(f\"\")\n", " mview.setBackgroundColor(\"0xFFFFFF\")\n", " mview.center({\"model\": prot_model})\n", @@ -461,19 +461,19 @@ " mview.setStyle(\n", " {\"model\": elig_model},\n", " {\"stick\": {\"colorscheme\": \"lightGrayCarbon\"}})\n", - " \n", + "\n", " # Label all atoms\n", " if showAtomLabel:\n", " mview.addPropertyLabels(\n", " \"atom\",\n", " {\"model\": elig_model},\n", " {\"backgroundOpacity\": 0.7, \"inFront\": True})\n", - " \n", + "\n", " # Show outline\n", " if outline:\n", " mview.setViewStyle(\n", - " {\"style\": \"outline\", \n", - " \"color\": \"black\", \n", + " {\"style\": \"outline\",\n", + " \"color\": \"black\",\n", " \"width\": 0.1})\n", "\n", " print(f\"\")\n", @@ -493,7 +493,7 @@ " mol = Chem.MolFromSmiles(smi)\n", " mol = Chem.AddHs(mol)\n", " AllChem.EmbedMolecule(mol)\n", - " \n", + "\n", " # Remove Hs\n", " if not showHs:\n", " mol = Chem.RemoveHs(mol)\n", @@ -502,19 +502,19 @@ " mview.setStyle(\n", " {\"model\": lig_model},\n", " {\"stick\": {\"colorscheme\": \"lightGrayCarbon\"}})\n", - " \n", + "\n", " # Label all atoms\n", " if showAtomLabel:\n", " mview.addPropertyLabels(\n", " \"atom\",\n", " {\"model\": lig_model},\n", " {\"backgroundOpacity\": 0.7, \"inFront\": True})\n", - " \n", + "\n", " # Show outline\n", " if outline:\n", " mview.setViewStyle(\n", - " {\"style\": \"outline\", \n", - " \"color\": \"black\", \n", + " {\"style\": \"outline\",\n", + " \"color\": \"black\",\n", " \"width\": 0.1})\n", "\n", " print(f\"\")\n", @@ -532,8 +532,8 @@ " print(f\"+ Center: X {center[0]} Y {center[1]} Z {center[2]}\")\n", " print(f\"+ Size: W {size[0]} H {size[1]} D {size[2]}\")\n", " mview.addBox(\n", - " {\"center\":{\"x\":bxi, \"y\":byi, \"z\":bzi}, \n", - " \"dimensions\": {\"w\":bxf, \"h\":byf, \"d\":bzf}, \n", + " {\"center\":{\"x\":bxi, \"y\":byi, \"z\":bzi},\n", + " \"dimensions\": {\"w\":bxf, \"h\":byf, \"d\":bzf},\n", " \"color\": \"skyBlue\", \"opacity\": 0.7})\n", "\n", " # Protein model\n", @@ -545,7 +545,7 @@ " mview.setStyle(\n", " {\"model\": prot_model},\n", " {\"cartoon\": {\"color\": \"white\"}})\n", - " \n", + "\n", " # Experimental ligand model\n", " count += 1\n", " elig_model = count\n", @@ -555,12 +555,12 @@ " mview.setStyle(\n", " {\"model\": elig_model},\n", " {\"stick\": {\"colorscheme\": \"greenCarbon\"}})\n", - " \n", + "\n", " # Focus RES\n", " if focusRes != \"\":\n", " res = focusRes.split(\",\")\n", " mview.addStyle(\n", - " {\"and\": [{\"model\": prot_model}, {\"resi\": res}]}, \n", + " {\"and\": [{\"model\": prot_model}, {\"resi\": res}]},\n", " {\"stick\": {\"colorscheme\": \"orangeCarbon\", \"radius\": 0.15}})\n", " mview.addResLabels(\n", " {\"and\": [{\"model\": prot_model}, {\"resi\": res}]},\n", @@ -577,14 +577,13 @@ " mview.center({\"model\": elig_model})\n", " mview.show()\n", "\n", - "def VIEW_PILE(inputP, inputPP, inputL, inputE, inputCSV, model=\"Cartoon\", \n", - " color=\"white\", focusRes=\"\", focusResColor=\"white\", \n", - " showInter=False, showSubunit=False, showResLabel=False, \n", - " showVDW=False, showPartProt=False, showExpLig=False, \n", + "def VIEW_PILE(inputP, inputPP, inputL, inputE, inputCSV, model=\"Cartoon\",\n", + " color=\"white\", focusRes=\"\", focusResColor=\"white\",\n", + " showInter=False, showSubunit=False, showResLabel=False,\n", + " showVDW=False, showPartProt=False, showExpLig=False,\n", " showLig=False, showAllPose=False, showBestPose=False,\n", " outline=False):\n", " # Variables\n", - " resUQ = []\n", " mview = py3Dmol.view(1000, 1500)\n", " if model in \"none\":\n", " model = cType = color = \"\"\n", @@ -594,7 +593,7 @@ " cType, color = \"colorscheme\", color + \"Carbon\"\n", "\n", " # Protein model\n", - " count = 1 \n", + " count = 1\n", " prot_model = count\n", " print(f\"+ Showing {os.path.basename(inputP)}\")\n", " molA = open(inputP, \"r\").read()\n", @@ -614,17 +613,17 @@ " f\"Subunit {chr(65+n)}\",\n", " {\"fontColor\": c, \"backgroundOpacity\": 0.7, \"alignment\": \"topLeft\"},\n", " {\"and\": [{\"model\": prot_model}, {\"chain\": chr(65+n)}]})\n", - " \n", + "\n", " # Focus RES\n", + " res = focusRes.split(',')\n", " if focusRes != \"\":\n", - " resUQ.extend([int(r) for r in focusRes.split(\",\")])\n", " mview.addStyle(\n", - " {\"and\": [{\"model\": prot_model}, {\"resi\": resUQ}]},\n", + " {\"and\": [{\"model\": prot_model}, {\"resi\": res}]},\n", " {\"stick\": {\"colorscheme\": focusResColor + \"Carbon\", \"radius\": 0.15}})\n", " # Label focused RES\n", " if showResLabel:\n", " mview.addResLabels(\n", - " {\"and\": [{\"model\": prot_model}, {\"resi\": resUQ}]},\n", + " {\"and\": [{\"model\": prot_model}, {\"resi\": res}]},\n", " {\"alignment\": \"bottomLeft\",\n", " \"showBackground\": False,\n", " \"inFront\": True,\n", @@ -632,7 +631,7 @@ " \"fontSize\": 14,\n", " \"fontColor\": \"0x000000\",\n", " \"screenOffset\": {\"x\": 15, \"y\": 15}})\n", - " \n", + "\n", " # Interactions\n", " if showInter:\n", " interaction = view_interaction(inputCSV, result=\"py3Dmol\")\n", @@ -642,34 +641,35 @@ " PROTCOO = interaction[\"PROTCOO\"]\n", " MIDCOO = interaction[\"MIDCOO\"]\n", " BOND = interaction[\"BOND\"]\n", + "\n", + " inter_res = list(set(RESNR) - set(res))\n", + " mview.addStyle(\n", + " {\"and\": [{\"model\": prot_model}, {\"resi\": inter_res}]},\n", + " {\"stick\": {\"colorscheme\": \"whiteCarbon\", \"radius\": 0.15}})\n", + " mview.addResLabels(\n", + " {\"and\": [{\"model\": prot_model}, {\"resi\": inter_res}]},\n", + " {\"alignment\": \"bottomLeft\", \"showBackground\": False,\n", + " \"inFront\": True, \"fixed\": False, \"fontSize\": 14,\n", + " \"fontColor\": \"0x000000\", \"screenOffset\": {\"x\": 15, \"y\": 15}})\n", + "\n", " for RN,DC,LC,PC,MC,BT in zip(RESNR, DIST_CALC, LIGCOO, PROTCOO, MIDCOO, BOND):\n", " BT = BT.lower()\n", - " if RN not in resUQ:\n", - " resUQ.append(RN)\n", - " mview.addStyle(\n", - " {\"and\": [{\"model\": prot_model}, {\"resi\": RN}]},\n", - " {\"stick\": {\"colorscheme\": \"whiteCarbon\", \"radius\": 0.15}})\n", - " mview.addResLabels(\n", - " {\"and\": [{\"model\": prot_model}, {\"resi\": RN}]},\n", - " {\"alignment\": \"bottomLeft\", \"showBackground\": False,\n", - " \"inFront\": True, \"fixed\": False, \"fontSize\": 14, \n", - " \"fontColor\": \"0x000000\", \"screenOffset\": {\"x\": 15, \"y\": 15}})\n", - " mview.addCylinder(\n", - " {\"start\": {\"x\": LC[0], \"y\": LC[1], \"z\": LC[2]},\n", - " \"end\": {\"x\": PC[0], \"y\": PC[1], \"z\": PC[2]}, \n", - " \"radius\": 0.05, \"fromCap\": 1, \"toCap\": 1, \n", - " \"color\": BOND_DICT[BT][0], \"dashed\": True})\n", - " mview.addLabel(\n", - " str(DC) + \" Å\",\n", - " {\"position\": {\"x\": MC[0], \"y\": MC[1], \"z\": MC[2]},\n", - " \"alignment\": \"bottomLeft\", \"inFront\": False, \"fixed\": False,\n", - " \"backgroundColor\": BOND_DICT[BT][0], \"fontSize\": 10,\n", - " \"screenOffset\": {\"x\": 5, \"y\": 5}})\n", + " mview.addCylinder(\n", + " {\"start\": {\"x\": LC[0], \"y\": LC[1], \"z\": LC[2]},\n", + " \"end\": {\"x\": PC[0], \"y\": PC[1], \"z\": PC[2]},\n", + " \"radius\": 0.05, \"fromCap\": 1, \"toCap\": 1,\n", + " \"color\": BOND_DICT[BT][0], \"dashed\": True})\n", + " mview.addLabel(\n", + " str(DC) + \" Å\",\n", + " {\"position\": {\"x\": MC[0], \"y\": MC[1], \"z\": MC[2]},\n", + " \"alignment\": \"bottomLeft\", \"inFront\": False, \"fixed\": False,\n", + " \"backgroundColor\": BOND_DICT[BT][0], \"fontSize\": 10,\n", + " \"screenOffset\": {\"x\": 5, \"y\": 5}})\n", "\n", " # Show VDW surface\n", " if showVDW:\n", " mview.addSurface(\n", - " py3Dmol.VDW, \n", + " py3Dmol.VDW,\n", " {\"color\": \"white\", \"opacity\": 0.4},\n", " {\"model\": prot_model})\n", "\n", @@ -686,7 +686,7 @@ " mview.addStyle(\n", " {\"model\": pprot_model},\n", " {\"stick\": {\"colorscheme\": \"yellowCarbon\"}})\n", - " \n", + "\n", " # Experimental ligand model\n", " if showExpLig:\n", " count += 1\n", @@ -697,7 +697,7 @@ " mview.setStyle(\n", " {\"model\": elig_model},\n", " {\"stick\": {\"color\": \"gray\"}})\n", - " \n", + "\n", " # Ligand model\n", " if showLig:\n", " count += 1\n", @@ -709,7 +709,7 @@ " {\"model\": lig_model},\n", " {\"stick\": {\"colorscheme\": \"orangeCarbon\"}})\n", "\n", - " # Show poses of selected ligand \n", + " # Show poses of selected ligand\n", " if showAllPose:\n", " pose = sorted([ os.path.join(os.path.dirname(inputL), f) for f in os.listdir(os.path.dirname(inputL)) if f.endswith(\".pdb\") ])\n", " pose.remove(inputL[len(DCK_FLD)+1:]) if inputL[len(DCK_FLD)+1:] in pose else None\n", @@ -722,10 +722,10 @@ " mview.setStyle(\n", " {\"model\": pose_model},\n", " {\"stick\": {\"color\": \"blue\", \"opacity\": 0.5, \"radius\": 0.2}})\n", - " \n", + "\n", " # Show all best poses of docked ligands\n", " if showBestPose:\n", - " pose = sorted([ f + \"_1.pdb\" for f in os.listdir(DCK_FLD) if os.path.isdir(os.path.join(DCK_FLD, f)) ]) \n", + " pose = sorted([ f + \"_1.pdb\" for f in os.listdir(DCK_FLD) if os.path.isdir(os.path.join(DCK_FLD, f)) ])\n", " pose.remove(inputL[len(DCK_FLD)+1:]) if inputL[len(DCK_FLD)+1:] in pose else None\n", " for f in pose:\n", " count += 1\n", @@ -740,7 +740,7 @@ " if outline:\n", " mview.setViewStyle(\n", " {\"style\": \"outline\", \"color\": \"black\", \"width\": 0.1})\n", - " \n", + "\n", " print(f\"\")\n", " mview.setBackgroundColor(\"0xFFFFFF\")\n", " mview.center({\"model\": lig_model})\n", @@ -773,7 +773,7 @@ "#@title **Generate protein PDB file**\n", "#@markdown Enter the **< PDB ID >** to download targeted protein.\n", "\n", - "PDB_ID = \"5YLU\" # @param {type:\"string\"}\n", + "PDB_ID = \"7KNX\" # @param {type:\"string\"}\n", "PDB_pdb = PDB_ID + \".pdb\"\n", "PDB_pdb_Pfile = os.path.join(PRT_FLD, PDB_pdb)\n", "\n", @@ -821,7 +821,7 @@ "#@title **Display 3D protein** { run: \"auto\" }\n", "#@markdown Enter the **< Protein >** to be viewed.\n", "\n", - "View = \"5YLU_prot_A\" #@param {type:\"string\"}\n", + "View = \"7KNX_prot_A\" #@param {type:\"string\"}\n", "Model = \"cartoon\" #@param [\"none\", \"line\", \"stick\", \"cartoon\"]\n", "Model_colour = \"white\" #@param [\"red\", \"orange\", \"yellow\", \"green\", \"blue\", \"violet\", \"purple\", \"white\"]\n", "Focus_residues = \"275-300\" #@param {type:\"string\"}\n", @@ -852,14 +852,14 @@ }, "outputs": [], "source": [ - "#@title **Parameterise protein with Gasteiger charges** \n", + "#@title **Parameterise protein with Gasteiger charges**\n", "#@markdown Enter the **< Protein >** to be parameterised.\\\n", "#@markdown This generate a **`protein.pdbqt`** file after:\n", "#@markdown + Addition of Gasteiger Partial Charge\n", "#@markdown + Addition of polar hydrogens\n", "#@markdown + Removal of non-polar hydrogens\n", "\n", - "Target_protein = \"5YLU_prot_A\" #@param {type:\"string\"}\n", + "Target_protein = \"7KNX_prot_A\" #@param {type:\"string\"}\n", "PROT_pdb = Target_protein + \".pdb\"\n", "PROT_pdbqt = Target_protein + \".pdbqt\"\n", "PROT_pdb_Pfile = os.path.join(PRT_FLD, PROT_pdb)\n", @@ -898,10 +898,10 @@ "outputs": [], "source": [ "#@title **Generate experimental ligand PDB file**\n", - "#@markdown Enter the **< Keyword >** assigned to query for the experimental \n", - "#@markdown ligand in the **`pdb`** fle. \n", + "#@markdown Enter the **< Keyword >** assigned to query for the experimental\n", + "#@markdown ligand in the **`pdb`** fle.\n", "\n", - "Keyword = \"HKT\" #@param {type:\"string\"}\n", + "Keyword = \"QOV\" #@param {type:\"string\"}\n", "Elig_pdb = Keyword + \".pdb\"\n", "Elig_pdb_Efile = os.path.join(EXP_FLD, Elig_pdb)\n", "\n", @@ -941,15 +941,15 @@ "outputs": [], "source": [ "#@title **Display 3D ligand** {run: \"auto\"}\n", - "#@markdown Enter the **< Experimental Ligand >** to be viewed. \n", + "#@markdown Enter the **< Experimental Ligand >** to be viewed.\n", "\n", - "View = \"HKT_A\" #@param {type:\"string\"}\n", + "View = \"QOV_A\" #@param {type:\"string\"}\n", "Show_atom_labels = False #@param {type:\"boolean\"}\n", "View_outline = False #@param {type:\"boolean\"}\n", "eview_Efile = os.path.join(EXP_FLD, f\"{View}.pdb\")\n", "\n", - "VIEW_ELIG(inputE=eview_Efile, \n", - " showAtomLabel=Show_atom_labels, \n", + "VIEW_ELIG(inputE=eview_Efile,\n", + " showAtomLabel=Show_atom_labels,\n", " outline=View_outline)" ] }, @@ -965,7 +965,7 @@ "#@title **Choose exprimental ligand**\n", "#@markdown Enter the **< Target Experimental Ligand >** for later comparison.\n", "\n", - "Target_experimental_ligand = \"HKT_A\" #@param {type:\"string\"}\n", + "Target_experimental_ligand = \"QOV_A\" #@param {type:\"string\"}\n", "EXP_pdb = Target_experimental_ligand + \".pdb\"\n", "EXP_pdb_Efile = os.path.join(EXP_FLD, EXP_pdb)\n", "EXP_pdb_Dfile = os.path.join(DCK_FLD, EXP_pdb)\n", @@ -1004,7 +1004,7 @@ "#@markdown + **`ID`** : The identity assigned on compound\n", "#@markdown + **`SMILES`** : The canonical / isometric SMILES notation\n", "\n", - "Compoud_library = \"chemical_library.csv\" #@param {type:\"string\"}\n", + "Compoud_library = \"ligand.csv\" #@param {type:\"string\"}\n", "\n", "CL_csv_Lfile = os.path.join(LIG_FLD, Compoud_library)\n", "ligDF = pd.read_csv(CL_csv_Lfile, dtype = str)[[\"ID\", \"SMILES\"]]\n", @@ -1021,7 +1021,7 @@ }, "outputs": [], "source": [ - "#@title **Generate SMILES files** \n", + "#@title **Generate SMILES files**\n", "#@markdown This generate **`smi`** file for each ligands in the virtual library.\n", "\n", "lig_IDs = tuple(ligDF[\"ID\"])\n", @@ -1044,17 +1044,17 @@ "outputs": [], "source": [ "#@title **Dispay 3D ligand** {run: \"auto\"}\n", - "#@markdown Enter the **< Ligand >** to be viewed. \n", + "#@markdown Enter the **< Ligand >** to be viewed.\n", "\n", - "View = \"SRPZ\" #@param {type:\"string\"}\n", + "View = \"SB_5\" #@param {type:\"string\"}\n", "Show_atom_labels = False #@param {type:\"boolean\"}\n", "Show_hydrogens = False #@param {type:\"boolean\"}\n", "View_outline = False #@param {type:\"boolean\"}\n", "lview_Lfile = os.path.join(LIG_FLD, f\"{View}.smi\")\n", "\n", - "VIEW_LIG(inputL=lview_Lfile, \n", + "VIEW_LIG(inputL=lview_Lfile,\n", " showHs=Show_hydrogens,\n", - " showAtomLabel=Show_atom_labels, \n", + " showAtomLabel=Show_atom_labels,\n", " outline=View_outline)" ] }, @@ -1070,12 +1070,12 @@ "#@title **Parameterize ligand(s) with Gasteiger charges**\n", "#@markdown Select **< Force Field >** for energy minimization. \\\n", "#@markdown This generate **`ligand.mol2`** and **`ligand.pdbqt`** file after:\n", - "#@markdown + Energy minization at 10,000 iterations \n", + "#@markdown + Energy minization at 10,000 iterations\n", "#@markdown + Addition of Gasteiger Partial Charge\n", "#@markdown + Removal of non-polar hydrogens\n", "\n", - "# NOTE: The prepare_ligand4.py does not recognise the file location in for some \n", - "# reason. Hence, the mol2 file was generated in /content/ and then move \n", + "# NOTE: The prepare_ligand4.py does not recognise the file location in for some\n", + "# reason. Hence, the mol2 file was generated in /content/ and then move\n", "# back into LIGAND folder after parameterization.\n", "\n", "Select_force_field = \"UFF\" #@param [\"GAFF\", \"Ghemical\", \"MMFF94\", \"MMFF94s\", \"UFF\"]\n", @@ -1087,7 +1087,7 @@ " mol2_file = os.path.join(DIR, f\"{ID}.mol2\")\n", " pdbqt_file = os.path.join(DCK_FLD, f\"{ID}/{ID}.pdbqt\")\n", "\n", - " with Hide(): \n", + " with Hide():\n", " !obabel $smi_file -O $mol2_file --gen3d --best --canonical --minimize \\\n", " --ff $Select_force_field --steps 10000 --sd\n", " !prepare_ligand4.py -l $mol2_file -o $pdbqt_file -U nphs_lps -v\n", @@ -1109,7 +1109,7 @@ "\n", "We then define search space on the target protein through the use of grid box, which often centered within the binding, active or allosteric site of target protein. The size should be sufficiently enough such that important binding residues are contained inside the box. Methods to define grid box include:\n", "\n", - "+ **`LABOGRID`** = Utilize the min and max XYZ coordinates of ligand [🔗](https://github.com/RyanZR/labogrid)\n", + "+ **`LaBOX`** = Utilize the min and max XYZ coordinates of ligand [🔗](https://github.com/RyanZR/LaBOX)\n", "+ **`eBoxSize`** = Utilize the radius of gyration of ligand [🔗](https://github.com/michal-brylinski/eboxsize)\n", "+ **`eBoxSize-modifed`** = Utilize `eBoxSize` but box center is calculated with `LABOGRID` method\n", "+ **`Autodock-Grid`** = 22.5 × 22.5 × 22.5 Å\n", @@ -1167,8 +1167,8 @@ "\n", "VIEW_GRID(inputP=PROT_pdb_Dfile,\n", " inputE=EXP_pdb_Dfile,\n", - " focusRes=Focus_residues, \n", - " center=Center, \n", + " focusRes=Focus_residues,\n", + " center=Center,\n", " size=Size)" ] }, @@ -1209,7 +1209,7 @@ "---\n", "# **Performing Molecular Docking**\n", "\n", - "Finally, we use Autodock Vina to perform the molecular docking on each ligands contained in the chemical library. This operation mimics the virtual screening process. Each molecule may take longer than 2 minutes, depending on the number of rotatable bond and level of exhaustiveness. " + "Finally, we use Autodock Vina to perform the molecular docking on each ligands contained in the chemical library. This operation mimics the virtual screening process. Each molecule may take longer than 2 minutes, depending on the number of rotatable bond and level of exhaustiveness." ] }, { @@ -1224,21 +1224,22 @@ "#@title **Run AutoDock Vina**\n", "#@markdown Select **< Exhaustiveness >** for molecular docking. (Default: 8)\\\n", "#@markdown Autodock Vina will performs molecular docking on targeted protein.\\\n", - "#@markdown This generate **`ligand_output.pdbqt`**. \n", + "#@markdown This generate **`ligand_output.pdbqt`**.\n", "\n", - "#@markdown **NOTE:** Compound with many rotatable bonds may required higher \n", - "#@markdown level of exhaustiveness to ensure accurate and consistent pose \n", + "#@markdown **NOTE:** Compound with many rotatable bonds may required higher\n", + "#@markdown level of exhaustiveness to ensure accurate and consistent pose\n", "#@markdown prediction.\n", "\n", "Exhaustiveness = 8 #@param {type:\"slider\", min:1, max:128, step:1}\n", "ex = Exhaustiveness\n", + "cpu_num = os.cpu_count()\n", "time_elp = N = 0\n", "\n", "for N,ID in enumerate(tqdm(lig_IDs)):\n", " pdbqt_Dfile = os.path.join(DCK_FLD, f\"{ID}/{ID}.pdbqt\")\n", " log_txt_Dfile = os.path.join(DCK_FLD, f\"{ID}/{ID}_log.txt\")\n", " out_pdbqt_Dfile = os.path.join(DCK_FLD, f\"{ID}/{ID}_output.pdbqt\")\n", - " \n", + "\n", " # -- Start docking --\n", " start = timeit.default_timer()\n", " with Hide():\n", @@ -1246,7 +1247,7 @@ " with contextlib.redirect_stdout(i):\n", " %vina --receptor $PROT_pdbqt_Dfile --ligand $pdbqt_Dfile \\\n", " --out $out_pdbqt_Dfile --config $CONF_Dfile \\\n", - " --exhaustiveness $ex --verbosity 2\n", + " --exhaustiveness $ex --cpu $cpu_num --verbosity 2\n", " with open(log_txt_Dfile, \"r\") as r:\n", " data = r.read().splitlines(True)\n", " with open(log_txt_Dfile, \"w\") as o:\n", @@ -1300,7 +1301,7 @@ " output.close()\n", "\n", " with Hide():\n", - " !obabel $out_pdbqt_Dfile -O $out_d_pdb_Dfile -m \n", + " !obabel $out_pdbqt_Dfile -O $out_d_pdb_Dfile -m\n", "\n", " lig_files = os.listdir(os.path.join(DCK_FLD, ID))\n", " pose_count += len(lig_files)-4\n", @@ -1464,7 +1465,7 @@ "source": [ "#@title **Show docking result of ligand** {run : \"auto\"}\n", "\n", - "Select_ligand = \"VNPZ\" #@param {type:\"string\"} \n", + "Select_ligand = \"SB_4\" #@param {type:\"string\"}\n", "LIG_out_csv_Dfile = os.path.join(DCK_FLD, f\"{Select_ligand}/{Select_ligand}_result.csv\")\n", "ligResultDF = pd.read_csv(LIG_out_csv_Dfile)\n", "ligResultDF" @@ -1475,7 +1476,7 @@ "source": [ "#@title **Show interaction profile of ligand** {run: \"auto\"}\n", "\n", - "Select_ligand = \"ABPZ_1\" #@param {type : \"string\"}\n", + "Select_ligand = \"SB_4_1\" #@param {type : \"string\"}\n", "LIG_inter_CSV_Ifile = os.path.join(INT_FLD, f\"{Select_ligand[:-2]}/{Select_ligand}_inter.csv\")\n", "view_interaction(LIG_inter_CSV_Ifile, result=\"summary\")" ], @@ -1498,10 +1499,10 @@ "#@title **Display 3D binding mode** { run: \"auto\" }\n", "\n", "#@markdown **PROTEIN MODEL**\n", - "View_protein = \"5YLU_prot_A\" #@param {type:\"string\"}\n", + "View_protein = \"7KNX_prot_A\" #@param {type:\"string\"}\n", "Model = \"none\" #@param [\"none\", \"line\", \"stick\", \"cartoon\"]\n", "Model_colour = \"white\" #@param [\"red\", \"orange\", \"yellow\", \"green\", \"blue\", \"violet\", \"purple\", \"white\"]\n", - "Focus_residues = \"200\" #@param {type:\"string\"}\n", + "Focus_residues = \"\" #@param {type:\"string\"}\n", "Residues_colour = \"white\" #@param [\"red\", \"orange\", \"yellow\", \"green\", \"blue\", \"violet\", \"purple\", \"white\"]\n", "Show_all_subunits = False #@param {type:\"boolean\"}\n", "Show_residues_label = True #@param {type:\"boolean\"}\n", @@ -1512,19 +1513,19 @@ "#@markdown ---\n", "\n", "#@markdown **LIGAND MODEL** \\\n", - "#@markdown Enter the **< Ligand >** to be viewed. \n", - "View_ligand = \"VNPZ_1\" #@param {type:\"string\"}\n", - "View_experimental_ligand = \"HKT_A\" #@param {type:\"string\"}\n", + "#@markdown Enter the **< Ligand >** to be viewed.\n", + "View_ligand = \"SB_4_1\" #@param {type:\"string\"}\n", + "View_experimental_ligand = \"QOV_A\" #@param {type:\"string\"}\n", "Show_ligand = True #@param {type:\"boolean\"}\n", "Show_experimental_ligand = True #@param {type:\"boolean\"}\n", "Show_all_pose = False #@param {type:\"boolean\"}\n", "Show_best_pose = False #@param {type:\"boolean\"}\n", "\n", - "#@markdown --- \n", + "#@markdown ---\n", "\n", "#@markdown **PARTNER PROTEIN MODEL** \\\n", "#@markdown (OPTIONAL, upload to DOCKING FOLDER) \\\n", - "#@markdown Enter the **< Partner Protein>** to be view. \n", + "#@markdown Enter the **< Partner Protein>** to be view.\n", "\n", "View_partner_protein = \"\" #@param {type:\"string\"}\n", "Show_partner_protein = False #@param {type:\"boolean\"}\n", @@ -1536,7 +1537,7 @@ "iview_Ifile = os.path.join(INT_FLD, f\"{View_ligand[:-2]}/{View_ligand}_inter.csv\")\n", "\n", "VIEW_PILE(inputP=pview_Dfile,\n", - " inputPP=ppview_Dfile, \n", + " inputPP=ppview_Dfile,\n", " inputL=lview_Dfile,\n", " inputE=eview_Dfile,\n", " inputCSV=iview_Ifile,\n", @@ -1551,7 +1552,7 @@ " showPartProt=Show_partner_protein,\n", " showExpLig=Show_experimental_ligand,\n", " showLig=Show_ligand,\n", - " showAllPose=Show_all_pose, \n", + " showAllPose=Show_all_pose,\n", " showBestPose=Show_best_pose,\n", " outline=View_outline)" ] @@ -1566,7 +1567,7 @@ "---\n", "# **Save to Google Drive**\n", "\n", - "Save the docking result into Google Drive. " + "Save the docking result into Google Drive." ] }, { @@ -1625,7 +1626,7 @@ ], "provenance": [], "mount_file_id": "1r1k3mK4lzvKM8ZF4SeASkFazgOlfXKkU", - "authorship_tag": "ABX9TyPcsB3EIr3/Y5vXO9vvOEc2", + "authorship_tag": "ABX9TyPXRwapuJ0PS4hXigxFGnuU", "include_colab_link": true }, "kernelspec": {