https://github.com/delalamo/af2_conformations
Revision 3e5c100feb987a94f096a5d8c739f0370e254e99 authored by Diego del Alamo on 23 November 2021, 05:28:49 UTC, committed by GitHub on 23 November 2021, 05:28:49 UTC
1 parent fd9cbe7
Tip revision: 3e5c100feb987a94f096a5d8c739f0370e254e99 authored by Diego del Alamo on 23 November 2021, 05:28:49 UTC
Update README.md
Update README.md
Tip revision: 3e5c100
choose_templates.ipynb
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "1-Hs48uFzsYx"
},
"source": [
"[](https://colab.research.google.com/github/delalamo/af2_conformations/blob/main/notebooks/choose_templates.ipynb)\n",
"\n",
"# Conformationally selective AlphaFold predictions\n",
"\n",
"This notebook provides an interface for predicting the structures of proteins using AlphaFold [1]. It simplifies the use of custom templates for the prediction of specific conformations. **Its intended audience are users familiar with Python.** The code borrows heavily from ColabFold [2], and makes use of the same MMSeqs2 API for retrieval of sequence alignments and templates [3,4]. Users of this notebook should cite these publications (listed below).\n",
"\n",
"The fundamental differences between this notebook and those provided by DeepMind and ColabFold are that 1) it simplifies the tuning of specific parameters by exposing them directly to the user, and 2) it allows users to specify which templates should be retrieved from the PDB and used for modeling. The former is useful when various parameters need to be chosen (e.g. MSA depth), while the latter allows targeting of specific conformational subspaces.\n",
"\n",
"Some notes and caveats:\n",
"* Template subsampling is turned on by default. This should have no impact for predictions using four or fewer total templates (turned off in AlphaFold and ColabFold).\n",
"* Currently only the structures of monomers can be predicted.\n",
"* Relax is disabled. If you plan on evaluating these structures using an energy function, be sure to minimize them using OpenMM [5] or Rosetta [6] beforehand.\n",
"* Not all PDBs are in the MMSeqs2 template database. There is a chance that PDBs of interest will not be retrieved.\n",
"* Templates are aligned based on sequence similarity, not structural similarity. This may pose a problem when using distantly related proteins as templates.\n",
"* We removed many of the bells and whistles of other colab notebooks, including pLDDT-based model ranking, visualization of sequence alignment coverage, progress bars, etc.\n",
"\n",
"Models can be downloaded either at the end of the run or incrementally while the program is still running. For the latter, click the folder icon on the left sidebar, hovering over the file of interest and click the three vertical dots, and select \"download\"."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "form",
"colab": {
"base_uri": "https://localhost:8080/"
},
"collapsed": true,
"id": "7iS51RcjffzJ",
"jupyter": {
"outputs_hidden": true
},
"outputId": "8322a12c-3a48-41c5-8c8d-751e285eb5d0"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Collecting biopython\n",
" Downloading biopython-1.79-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (2.3 MB)\n",
"Collecting dm-haiku\n",
" Downloading dm_haiku-0.0.5-py3-none-any.whl (287 kB)\n",
"Collecting ml-collections\n",
" Downloading ml_collections-0.1.0-py3-none-any.whl (88 kB)\n",
"Requirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (from biopython) (1.19.5)\n",
"Requirement already satisfied: tabulate>=0.8.9 in /usr/local/lib/python3.7/dist-packages (from dm-haiku) (0.8.9)\n",
"Requirement already satisfied: typing-extensions in /usr/local/lib/python3.7/dist-packages (from dm-haiku) (3.10.0.2)\n",
"Collecting jmp>=0.0.2\n",
" Downloading jmp-0.0.2-py3-none-any.whl (16 kB)\n",
"Requirement already satisfied: absl-py>=0.7.1 in /usr/local/lib/python3.7/dist-packages (from dm-haiku) (0.12.0)\n",
"Requirement already satisfied: six in /usr/local/lib/python3.7/dist-packages (from absl-py>=0.7.1->dm-haiku) (1.15.0)\n",
"Requirement already satisfied: contextlib2 in /usr/local/lib/python3.7/dist-packages (from ml-collections) (0.5.5)\n",
"Requirement already satisfied: PyYAML in /usr/local/lib/python3.7/dist-packages (from ml-collections) (3.13)\n",
"Installing collected packages: jmp, ml-collections, dm-haiku, biopython\n",
"Successfully installed biopython-1.79 dm-haiku-0.0.5 jmp-0.0.2 ml-collections-0.1.0\n",
"Branch 'notebook' set up to track remote branch 'notebook' from 'origin'.\n",
"Get:1 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/ InRelease [3,626 B]\n",
"Ign:2 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 InRelease\n",
"Ign:3 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 InRelease\n",
"Hit:4 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 Release\n",
"Hit:5 http://archive.ubuntu.com/ubuntu bionic InRelease\n",
"Get:6 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]\n",
"Get:7 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]\n",
"Get:8 http://ppa.launchpad.net/c2d4u.team/c2d4u4.0+/ubuntu bionic InRelease [15.9 kB]\n",
"Hit:9 http://ppa.launchpad.net/cran/libgit2/ubuntu bionic InRelease\n",
"Hit:10 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 Release\n",
"Hit:11 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu bionic InRelease\n",
"Get:12 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]\n",
"Hit:14 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic InRelease\n",
"Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [2,222 kB]\n",
"Get:17 http://ppa.launchpad.net/c2d4u.team/c2d4u4.0+/ubuntu bionic/main Sources [1,812 kB]\n",
"Get:18 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [2,867 kB]\n",
"Get:19 http://ppa.launchpad.net/c2d4u.team/c2d4u4.0+/ubuntu bionic/main amd64 Packages [928 kB]\n",
"Fetched 8,101 kB in 6s (1,274 kB/s)\n",
"Reading package lists...\n",
"Reading package lists...\n",
"Building dependency tree...\n",
"Reading state information...\n",
"zlib1g is already the newest version (1:1.2.11.dfsg-0ubuntu2).\n",
"curl is already the newest version (7.58.0-2ubuntu3.16).\n",
"The following additional packages will be installed:\n",
" libjq1 libonig4 libsigsegv2\n",
"Suggested packages:\n",
" gawk-doc\n",
"The following NEW packages will be installed:\n",
" gawk jq libjq1 libonig4 libsigsegv2\n",
"0 upgraded, 5 newly installed, 0 to remove and 39 not upgraded.\n",
"Need to get 692 kB of archives.\n",
"After this operation, 2,526 kB of additional disk space will be used.\n",
"Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 libsigsegv2 amd64 2.12-1 [14.7 kB]\n",
"Get:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 gawk amd64 1:4.1.4+dfsg-1build1 [401 kB]\n",
"Get:3 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libonig4 amd64 6.7.0-1 [119 kB]\n",
"Get:4 http://archive.ubuntu.com/ubuntu bionic/universe amd64 libjq1 amd64 1.5+dfsg-2 [111 kB]\n",
"Get:5 http://archive.ubuntu.com/ubuntu bionic/universe amd64 jq amd64 1.5+dfsg-2 [45.6 kB]\n",
"Fetched 692 kB in 2s (307 kB/s)\n",
"Selecting previously unselected package libsigsegv2:amd64.\n",
"(Reading database ... 155222 files and directories currently installed.)\n",
"Preparing to unpack .../libsigsegv2_2.12-1_amd64.deb ...\n",
"Unpacking libsigsegv2:amd64 (2.12-1) ...\n",
"Setting up libsigsegv2:amd64 (2.12-1) ...\n",
"Selecting previously unselected package gawk.\n",
"(Reading database ... 155229 files and directories currently installed.)\n",
"Preparing to unpack .../gawk_1%3a4.1.4+dfsg-1build1_amd64.deb ...\n",
"Unpacking gawk (1:4.1.4+dfsg-1build1) ...\n",
"Selecting previously unselected package libonig4:amd64.\n",
"Preparing to unpack .../libonig4_6.7.0-1_amd64.deb ...\n",
"Unpacking libonig4:amd64 (6.7.0-1) ...\n",
"Selecting previously unselected package libjq1:amd64.\n",
"Preparing to unpack .../libjq1_1.5+dfsg-2_amd64.deb ...\n",
"Unpacking libjq1:amd64 (1.5+dfsg-2) ...\n",
"Selecting previously unselected package jq.\n",
"Preparing to unpack .../jq_1.5+dfsg-2_amd64.deb ...\n",
"Unpacking jq (1.5+dfsg-2) ...\n",
"Setting up libonig4:amd64 (6.7.0-1) ...\n",
"Setting up gawk (1:4.1.4+dfsg-1build1) ...\n",
"Setting up libjq1:amd64 (1.5+dfsg-2) ...\n",
"Setting up jq (1.5+dfsg-2) ...\n",
"Processing triggers for man-db (2.8.3-2ubuntu0.1) ...\n",
"Processing triggers for libc-bin (2.27-3ubuntu1.3) ...\n",
"/sbin/ldconfig.real: /usr/local/lib/python3.7/dist-packages/ideep4py/lib/libmkldnn.so.0 is not a symbolic link\n",
"\n",
"Collecting package metadata (current_repodata.json): ...working... done \n",
"Solving environment: ...working... done\n",
"\n",
"## Package Plan ##\n",
"\n",
" environment location: /usr/local\n",
"\n",
" added / updated specs:\n",
" - hhsuite=3.3.0\n",
" - kalign3=3.2.2\n",
" - python=3.7\n",
"\n",
"\n",
"The following packages will be downloaded:\n",
"\n",
" package | build\n",
" ---------------------------|-----------------\n",
" ca-certificates-2021.10.8 | ha878542_0 139 KB conda-forge\n",
" certifi-2021.10.8 | py37h89c1867_1 145 KB conda-forge\n",
" cffi-1.14.6 | py37h400218f_0 223 KB\n",
" charset-normalizer-2.0.7 | pyhd8ed1ab_0 33 KB conda-forge\n",
" conda-4.10.3 | py37h89c1867_4 3.0 MB conda-forge\n",
" conda-package-handling-1.7.3| py37h5e8e339_0 921 KB conda-forge\n",
" cryptography-35.0.0 | py37h5d9358c_0 1.5 MB conda-forge\n",
" hhsuite-3.3.0 |py37pl5262h21043fe_2 26.7 MB bioconda\n",
" kalign3-3.2.2 | h779adbc_2 83 KB bioconda\n",
" openssl-1.1.1l | h7f8727e_0 2.5 MB\n",
" perl-5.26.2 | h36c2ea0_1008 15.4 MB conda-forge\n",
" pip-21.3.1 | pyhd8ed1ab_0 1.2 MB conda-forge\n",
" pycosat-0.6.3 |py37h5e8e339_1006 107 KB conda-forge\n",
" pyopenssl-21.0.0 | pyhd8ed1ab_0 48 KB conda-forge\n",
" pysocks-1.7.1 | py37h89c1867_4 28 KB conda-forge\n",
" python-3.7.11 | h12debd9_0 45.3 MB\n",
" python_abi-3.7 | 2_cp37m 4 KB conda-forge\n",
" requests-2.26.0 | pyhd3eb1b0_0 59 KB\n",
" ruamel_yaml-0.15.80 |py37h5e8e339_1004 270 KB conda-forge\n",
" setuptools-59.2.0 | py37h89c1867_0 1.0 MB conda-forge\n",
" urllib3-1.25.8 | py37hc8dfbb8_1 160 KB conda-forge\n",
" ------------------------------------------------------------\n",
" Total: 98.9 MB\n",
"\n",
"The following NEW packages will be INSTALLED:\n",
"\n",
" charset-normalizer conda-forge/noarch::charset-normalizer-2.0.7-pyhd8ed1ab_0\n",
" hhsuite bioconda/linux-64::hhsuite-3.3.0-py37pl5262h21043fe_2\n",
" kalign3 bioconda/linux-64::kalign3-3.2.2-h779adbc_2\n",
" perl conda-forge/linux-64::perl-5.26.2-h36c2ea0_1008\n",
" python_abi conda-forge/linux-64::python_abi-3.7-2_cp37m\n",
"\n",
"The following packages will be REMOVED:\n",
"\n",
" brotlipy-0.7.0-py39h27cfd23_1003\n",
" chardet-4.0.0-py39h06a4308_1003\n",
"\n",
"The following packages will be UPDATED:\n",
"\n",
" ca-certificates pkgs/main::ca-certificates-2021.7.5-h~ --> conda-forge::ca-certificates-2021.10.8-ha878542_0\n",
" certifi pkgs/main::certifi-2021.5.30-py39h06a~ --> conda-forge::certifi-2021.10.8-py37h89c1867_1\n",
" conda pkgs/main::conda-4.10.3-py39h06a4308_0 --> conda-forge::conda-4.10.3-py37h89c1867_4\n",
" cryptography pkgs/main::cryptography-3.4.7-py39hd2~ --> conda-forge::cryptography-35.0.0-py37h5d9358c_0\n",
" openssl 1.1.1k-h27cfd23_0 --> 1.1.1l-h7f8727e_0\n",
" pip pkgs/main/linux-64::pip-21.1.3-py39h0~ --> conda-forge/noarch::pip-21.3.1-pyhd8ed1ab_0\n",
" pycosat pkgs/main::pycosat-0.6.3-py39h27cfd23~ --> conda-forge::pycosat-0.6.3-py37h5e8e339_1006\n",
" pyopenssl pkgs/main::pyopenssl-20.0.1-pyhd3eb1b~ --> conda-forge::pyopenssl-21.0.0-pyhd8ed1ab_0\n",
" pysocks pkgs/main::pysocks-1.7.1-py39h06a4308~ --> conda-forge::pysocks-1.7.1-py37h89c1867_4\n",
" requests 2.25.1-pyhd3eb1b0_0 --> 2.26.0-pyhd3eb1b0_0\n",
" setuptools pkgs/main::setuptools-52.0.0-py39h06a~ --> conda-forge::setuptools-59.2.0-py37h89c1867_0\n",
"\n",
"The following packages will be SUPERSEDED by a higher-priority channel:\n",
"\n",
" conda-package-han~ pkgs/main::conda-package-handling-1.7~ --> conda-forge::conda-package-handling-1.7.3-py37h5e8e339_0\n",
" ruamel_yaml pkgs/main::ruamel_yaml-0.15.100-py39h~ --> conda-forge::ruamel_yaml-0.15.80-py37h5e8e339_1004\n",
" urllib3 pkgs/main/noarch::urllib3-1.26.6-pyhd~ --> conda-forge/linux-64::urllib3-1.25.8-py37hc8dfbb8_1\n",
"\n",
"The following packages will be DOWNGRADED:\n",
"\n",
" cffi 1.14.6-py39h400218f_0 --> 1.14.6-py37h400218f_0\n",
" python 3.9.5-h12debd9_4 --> 3.7.11-h12debd9_0\n",
"\n",
"\n",
"Preparing transaction: ...working... done\n",
"Verifying transaction: ...working... done\n",
"Executing transaction: ...working... done\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Cloning into 'af2_conformations'...\n",
"Switched to a new branch 'notebook'\n",
"Cloning into 'alphafold'...\n",
"Note: checking out '1d43aaff941c84dc56311076b58795797e49107b'.\n",
"\n",
"You are in 'detached HEAD' state. You can look around, make experimental\n",
"changes and commit them, and you can discard any commits you make in this\n",
"state without impacting any branches by performing another checkout.\n",
"\n",
"If you want to create a new branch to retain commits you create, you may\n",
"do so (now or later) by using -b with the checkout command again. Example:\n",
"\n",
" git checkout -b <new-branch-name>\n",
"\n",
"HEAD is now at 1d43aaf Accept any ordering given by ListDir in the assert.\n"
]
}
],
"source": [
"#@title Set up Colab environment (1 of 2)\n",
"%%bash\n",
"\n",
"pip install biopython dm-haiku ml-collections\n",
"\n",
"# get templates\n",
"git clone https://github.com/delalamo/af2_conformations.git\n",
"\n",
"# get AF2\n",
"git clone https://github.com/deepmind/alphafold.git\n",
"( cd alphafold; git checkout 1d43aaff941c84dc56311076b58795797e49107b )\n",
"\n",
"mv alphafold alphafold_\n",
"mv alphafold_/alphafold .\n",
"rm -r alphafold_\n",
"# remove \"END\" from PDBs, otherwise biopython complains\n",
"sed -i \"s/pdb_lines.append('END')//\" /content/alphafold/common/protein.py\n",
"sed -i \"s/pdb_lines.append('ENDMDL')//\" /content/alphafold/common/protein.py\n",
"\n",
"# download model params (~1 min)\n",
"mkdir params\n",
"curl -fsSL https://storage.googleapis.com/alphafold/alphafold_params_2021-07-14.tar | tar x -C params\n",
"\n",
"# download libraries for interfacing with MMseqs2 API\n",
"apt-get -y update\n",
"apt-get -y install jq curl zlib1g gawk\n",
"\n",
"# setup conda\n",
"wget -qnc https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh\n",
"bash Miniconda3-latest-Linux-x86_64.sh -bfp /usr/local 2>&1 1>/dev/null\n",
"rm Miniconda3-latest-Linux-x86_64.sh\n",
"\n",
"# setup template search\n",
"conda install -q -y -c conda-forge -c bioconda kalign3=3.2.2 hhsuite=3.3.0 python=3.7"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "form",
"id": "zBcw1SX3ZGJH"
},
"outputs": [],
"source": [
"#@title Set up Colab environment (2 of 2)\n",
"\n",
"from google.colab import files\n",
"\n",
"from af2_conformations.scripts import predict\n",
"from af2_conformations.scripts import util\n",
"from af2_conformations.scripts import mmseqs2\n",
"\n",
"import random\n",
"import os\n",
"\n",
"from absl import logging\n",
"logging.set_verbosity(logging.DEBUG)"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "gJx1y_Fx3iMz"
},
"source": [
"Once everything has been installed, the code below can be modified and executed."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "qREPMYc5UTYm",
"outputId": "1d60963a-d5f3-499b-e342-8d7133bc3180"
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"DEBUG:absl:ID: hruUTlhiL4nBtw-UNTrXC5D1FvAONwQ_iUJq5g\n",
"INFO:absl:seq\tpdb\tcid\tevalue\n",
"INFO:absl:101\t6LB8_A\t0.378\t2.409E-59\n",
"INFO:absl:101\t6LB8_C\t0.378\t2.409E-59\n",
"INFO:absl:101\t4PK0_A\t0.329\t1.599E-58\n",
"INFO:absl:101\t6FW2_A\t0.425\t1.599E-58\n",
"INFO:absl:Launching subprocess \"hhsearch -i /tmp/tmp2biwfkkg/query.a3m -o /tmp/tmp2biwfkkg/output.hhr -maxseq 1000000 -d T4_lysozyme_bdd05_env/templates_101/pdb70\"\n",
"INFO:absl:Started HHsearch query\n",
"INFO:absl:Finished HHsearch query in 0.979 seconds\n",
"INFO:absl:Searching for template for: None\n",
"WARNING:absl:Template structure not in release dates dict: 4pk0\n",
"INFO:absl:Reading PDB entry from T4_lysozyme_bdd05_env/templates_101/4pk0.cif. Query: MNIFEMLRIDEGLRLKIYKDTEGYYTIGIGHLLTKSPSLNAAKSELDKAIGRNCNGVITKDEAEKLFNQDVDAAVRGILRNAKLKPVYDSLDAVRRCALINMVFQMGETGVAGFTNSLRMLQQKRWDEAAVNLAKSRWYNQTPNRAKRVITTFRTGTWDAYKNL, template: MNIFEMLRIDEGLRLKIYKDTEGYYTIGIGHLLTKSPSLNAAKSELDKAIGRNTNGVITKDEAEKLFNQDVDAAVRGILRNAKLKPVYDSLDAVRRAALINMVFQMGETGVAGFTNSLRMLQQKRWDEAAVNLAKSRWYNQTPNRAKRVITTFRTGTWDAYKNL\n",
"INFO:absl:Found an exact template match 4pk0_A.\n",
"WARNING:absl:Template structure not in release dates dict: 6lb8\n",
"INFO:absl:Reading PDB entry from T4_lysozyme_bdd05_env/templates_101/6lb8.cif. Query: MNIFEMLRIDEGLRLKIYKDTEGYYTIGIGHLLTKSPSLNAAKSELDKAIGRNCNGVITKDEAEKLFNQDVDAAVRGILRNAKLKPVYDSLDAVRRCALINMVFQMGETGVAGFTNSLRMLQQKRWDEAAVNLAKSRWYNQTPNRAKRVITTFRTGTWDAYKNL, template: MNIFEMLRIDEGLRLKIYKDTEGYYTIGIGHLLTKSPSLNAAKSELDKAIGRNTNGVITKDEAEKLFNQDVDAAVRGILRNAKLKPVYDSLDAVRRAALINMVFQMGETGVAGFTNSLRMLQQKRWDEAAVNLAKSRWYNQTPNRAKRVITTFRTGTWDAY\n",
"INFO:absl:Found an exact template match 6lb8_C.\n",
"WARNING:absl:Template structure not in release dates dict: 6lb8\n",
"INFO:absl:Reading PDB entry from T4_lysozyme_bdd05_env/templates_101/6lb8.cif. Query: MNIFEMLRIDEGLRLKIYKDTEGYYTIGIGHLLTKSPSLNAAKSELDKAIGRNCNGVITKDEAEKLFNQDVDAAVRGILRNAKLKPVYDSLDAVRRCALINMVFQMGETGVAGFTNSLRMLQQKRWDEAAVNLAKSRWYNQTPNRAKRVITTFRTGTWDAYKNL, template: MNIFEMLRIDEGLRLKIYKDTEGYYTIGIGHLLTKSPSLNAAKSELDKAIGRNTNGVITKDEAEKLFNQDVDAAVRGILRNAKLKPVYDSLDAVRRAALINMVFQMGETGVAGFTNSLRMLQQKRWDEAAVNLAKSRWYNQTPNRAKRVITTFRTGTWDAY\n",
"INFO:absl:Found an exact template match 6lb8_A.\n",
"WARNING:absl:Template structure not in release dates dict: 6fw2\n",
"INFO:absl:Reading PDB entry from T4_lysozyme_bdd05_env/templates_101/6fw2.cif. Query: MNIFEMLRIDEGLRLKIYKDTEGYYTIGIGHLLTKSPSLNAAKSELDKAIGRNCNGVITKDEAEKLFNQDVDAAVRGILRNAKLKPVYDSLDAVRRCALINMVFQMGETGVAGFTNSLRMLQQKRWDEAAVNLAKSRWYNQTPNRAKRVITTFRTGTWDAYKNL, template: NIFEMLRIDEGLRLKIYKDTEGYYTIGIGHLLTKSPSLNAAKSELDKAIGRNCNGVITKDEAEKLFNQDVDAAVRGILRNAKLKPVYDSLDAVRRCALINMVFQMGETGVAGFTNSLRMLQQKRWDEAAVNLAKSRWYNQTPNRAKRVITTFRTGTWDAYT\n",
"INFO:absl:Found an exact template match 6fw2_A.\n",
"DEBUG:absl:Prediction parameters:\n",
"DEBUG:absl:\tModel ID: 1\n",
"DEBUG:absl:\tUsing templates: True\n",
"DEBUG:absl:\tMaximum number of MSA clusters: 8\n",
"DEBUG:absl:\tMaximum number of extra MSA clusters: 16\n",
"DEBUG:absl:\tMaximum number of recycling iterations: 1\n",
"DEBUG:absl:Initializing backend 'interpreter'\n",
"DEBUG:absl:Backend 'interpreter' initialized\n",
"DEBUG:absl:Initializing backend 'cpu'\n",
"DEBUG:absl:Backend 'cpu' initialized\n",
"DEBUG:absl:Initializing backend 'tpu_driver'\n",
"INFO:absl:Unable to initialize backend 'tpu_driver': NOT_FOUND: Unable to find driver in registry given worker: \n",
"DEBUG:absl:Initializing backend 'gpu'\n",
"DEBUG:absl:Backend 'gpu' initialized\n",
"DEBUG:absl:Initializing backend 'tpu'\n",
"INFO:absl:Unable to initialize backend 'tpu': INVALID_ARGUMENT: TpuPlatform is not available.\n",
"INFO:absl:Running predict with shape(feat) = {'aatype': (2, 164), 'residue_index': (2, 164), 'seq_length': (2,), 'template_aatype': (2, 4, 164), 'template_all_atom_masks': (2, 4, 164, 37), 'template_all_atom_positions': (2, 4, 164, 37, 3), 'template_sum_probs': (2, 4, 1), 'is_distillation': (2,), 'seq_mask': (2, 164), 'msa_mask': (2, 4, 164), 'msa_row_mask': (2, 4), 'random_crop_to_size_seed': (2, 2), 'template_mask': (2, 4), 'template_pseudo_beta': (2, 4, 164, 3), 'template_pseudo_beta_mask': (2, 4, 164), 'atom14_atom_exists': (2, 164, 14), 'residx_atom14_to_atom37': (2, 164, 14), 'residx_atom37_to_atom14': (2, 164, 37), 'atom37_atom_exists': (2, 164, 37), 'extra_msa': (2, 16, 164), 'extra_msa_mask': (2, 16, 164), 'extra_msa_row_mask': (2, 16), 'bert_mask': (2, 4, 164), 'true_msa': (2, 4, 164), 'extra_has_deletion': (2, 16, 164), 'extra_deletion_value': (2, 16, 164), 'msa_feat': (2, 4, 164, 49), 'target_feat': (2, 164, 22)}\n",
"DEBUG:absl:Compiling <lambda> (139617514837728) for args (ShapedArray(int32[]), ShapedArray(uint32[])).\n",
"DEBUG:absl:Compiling apply_fn (139618362155648) for args (ShapedArray(float32[64]), ShapedArray(float32[128,64]), ShapedArray(float32[48,8,32]), ShapedArray(float32[48,256,8,32]), ShapedArray(float32[48,256,8,32]), ShapedArray(float32[48,256]), ShapedArray(float32[48,8,32,256]), ShapedArray(float32[48,256,8,32]), ShapedArray(float32[48,256,8,32]), ShapedArray(float32[48,256]), ShapedArray(float32[48,256]), ShapedArray(float32[48,128,8]), ShapedArray(float32[48,8,32]), ShapedArray(float32[48,256,8,32]), ShapedArray(float32[48,256,8,32]), ShapedArray(float32[48,256]), ShapedArray(float32[48,8,32,256]), ShapedArray(float32[48,256,8,32]), ShapedArray(float32[48,256,8,32]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,256]), ShapedArray(float32[48,256]), ShapedArray(float32[48,256]), ShapedArray(float32[48,256]), ShapedArray(float32[48,1024]), ShapedArray(float32[48,256,1024]), ShapedArray(float32[48,256]), ShapedArray(float32[48,1024,256]), ShapedArray(float32[48,128]), ShapedArray(float32[48,32,32,128]), ShapedArray(float32[48,256]), ShapedArray(float32[48,256]), ShapedArray(float32[48,32]), ShapedArray(float32[48,256,32]), ShapedArray(float32[48,32]), ShapedArray(float32[48,256,32]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,512]), ShapedArray(float32[48,128,512]), ShapedArray(float32[48,128]), ShapedArray(float32[48,512,128]), ShapedArray(float32[48,128,4]), ShapedArray(float32[48,4,32]), ShapedArray(float32[48,128,4,32]), ShapedArray(float32[48,128,4,32]), ShapedArray(float32[48,128]), ShapedArray(float32[48,4,32,128]), ShapedArray(float32[48,128,4,32]), ShapedArray(float32[48,128,4,32]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128,4]), ShapedArray(float32[48,4,32]), ShapedArray(float32[48,128,4,32]), ShapedArray(float32[48,128,4,32]), ShapedArray(float32[48,128]), ShapedArray(float32[48,4,32,128]), ShapedArray(float32[48,128,4,32]), ShapedArray(float32[48,128,4,32]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128,128]), ShapedArray(float32[64]), ShapedArray(float32[25,64]), ShapedArray(float32[4,8,8]), ShapedArray(float32[4,64,8,8]), ShapedArray(float32[4,64,8]), ShapedArray(float32[4,64]), ShapedArray(float32[4,8,8,64]), ShapedArray(float32[4,64,8,8]), ShapedArray(float32[4,64,8]), ShapedArray(float32[4,64]), ShapedArray(float32[4,64]), ShapedArray(float32[4,128,8]), ShapedArray(float32[4,8,8]), ShapedArray(float32[4,64,8,8]), ShapedArray(float32[4,64,8,8]), ShapedArray(float32[4,64]), ShapedArray(float32[4,8,8,64]), ShapedArray(float32[4,64,8,8]), ShapedArray(float32[4,64,8,8]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,64]), ShapedArray(float32[4,64]), ShapedArray(float32[4,64]), ShapedArray(float32[4,64]), ShapedArray(float32[4,256]), ShapedArray(float32[4,64,256]), ShapedArray(float32[4,64]), ShapedArray(float32[4,256,64]), ShapedArray(float32[4,128]), ShapedArray(float32[4,32,32,128]), ShapedArray(float32[4,64]), ShapedArray(float32[4,64]), ShapedArray(float32[4,32]), ShapedArray(float32[4,64,32]), ShapedArray(float32[4,32]), ShapedArray(float32[4,64,32]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,512]), ShapedArray(float32[4,128,512]), ShapedArray(float32[4,128]), ShapedArray(float32[4,512,128]), ShapedArray(float32[4,128,4]), ShapedArray(float32[4,4,32]), ShapedArray(float32[4,128,4,32]), ShapedArray(float32[4,128,4,32]), ShapedArray(float32[4,128]), ShapedArray(float32[4,4,32,128]), ShapedArray(float32[4,128,4,32]), ShapedArray(float32[4,128,4,32]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128,4]), ShapedArray(float32[4,4,32]), ShapedArray(float32[4,128,4,32]), ShapedArray(float32[4,128,4,32]), ShapedArray(float32[4,128]), ShapedArray(float32[4,4,32,128]), ShapedArray(float32[4,128,4,32]), ShapedArray(float32[4,128,4,32]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128,128]), ShapedArray(float32[128]), ShapedArray(float32[22,128]), ShapedArray(float32[128]), ShapedArray(float32[65,128]), ShapedArray(float32[256]), ShapedArray(float32[22,256]), ShapedArray(float32[256]), ShapedArray(float32[49,256]), ShapedArray(float32[256]), ShapedArray(float32[256]), ShapedArray(float32[128]), ShapedArray(float32[128]), ShapedArray(float32[128]), ShapedArray(float32[15,128]), ShapedArray(float32[128]), ShapedArray(float32[22,128]), ShapedArray(float32[384]), ShapedArray(float32[256,384]), ShapedArray(float32[64,4,16]), ShapedArray(float32[128]), ShapedArray(float32[4,16,128]), ShapedArray(float32[128,4,16]), ShapedArray(float32[64,4,16]), ShapedArray(float32[64]), ShapedArray(float32[88,64]), ShapedArray(float32[64]), ShapedArray(float32[64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,128]), ShapedArray(float32[2,64,128]), ShapedArray(float32[2,64]), ShapedArray(float32[2,128,64]), ShapedArray(float32[2,64,4]), ShapedArray(float32[2,4,16]), ShapedArray(float32[2,64,4,16]), ShapedArray(float32[2,64,4,16]), ShapedArray(float32[2,64]), ShapedArray(float32[2,4,16,64]), ShapedArray(float32[2,64,4,16]), ShapedArray(float32[2,64,4,16]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64,4]), ShapedArray(float32[2,4,16]), ShapedArray(float32[2,64,4,16]), ShapedArray(float32[2,64,4,16]), ShapedArray(float32[2,64]), ShapedArray(float32[2,4,16,64]), ShapedArray(float32[2,64,4,16]), ShapedArray(float32[2,64,4,16]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64,64]), ShapedArray(float32[256]), ShapedArray(float32[256,256]), ShapedArray(float32[256]), ShapedArray(float32[57,256]), ShapedArray(float32[37]), ShapedArray(float32[384,37]), ShapedArray(float32[23]), ShapedArray(float32[256,23]), ShapedArray(float32[64]), ShapedArray(float32[128,64]), ShapedArray(float32[128]), ShapedArray(float32[384,128]), ShapedArray(float32[128]), ShapedArray(float32[128,128]), ShapedArray(float32[384]), ShapedArray(float32[384]), ShapedArray(float32[50]), ShapedArray(float32[128,50]), ShapedArray(float32[6]), ShapedArray(float32[384,6]), ShapedArray(float32[384]), ShapedArray(float32[384]), ShapedArray(float32[12]), ShapedArray(float32[12]), ShapedArray(float32[128,12]), ShapedArray(float32[432]), ShapedArray(float32[384,432]), ShapedArray(float32[384]), ShapedArray(float32[384,384]), ShapedArray(float32[384]), ShapedArray(float32[2112,384]), ShapedArray(float32[144]), ShapedArray(float32[384,144]), ShapedArray(float32[192]), ShapedArray(float32[384,192]), ShapedArray(float32[128]), ShapedArray(float32[384,128]), ShapedArray(float32[128]), ShapedArray(float32[384,128]), ShapedArray(float32[128]), ShapedArray(float32[128,128]), ShapedArray(float32[128]), ShapedArray(float32[128,128]), ShapedArray(float32[128]), ShapedArray(float32[128,128]), ShapedArray(float32[128]), ShapedArray(float32[128,128]), ShapedArray(float32[14]), ShapedArray(float32[128,14]), ShapedArray(float32[384]), ShapedArray(float32[384,384]), ShapedArray(float32[384]), ShapedArray(float32[384,384]), ShapedArray(float32[384]), ShapedArray(float32[384,384]), ShapedArray(float32[384]), ShapedArray(float32[384]), ShapedArray(float32[384]), ShapedArray(float32[384,384]), ShapedArray(float32[128]), ShapedArray(float32[128]), ShapedArray(float32[384]), ShapedArray(float32[384]), ShapedArray(uint32[2]), ShapedArray(int32[2,164]), ShapedArray(float32[2,164,14]), ShapedArray(float32[2,164,37]), ShapedArray(float32[2,4,164]), ShapedArray(float32[2,16,164]), ShapedArray(float32[2,16,164]), ShapedArray(int32[2,16,164]), ShapedArray(float32[2,16,164]), ShapedArray(float32[2,16]), ShapedArray(float32[2]), ShapedArray(float32[2,4,164,49]), ShapedArray(float32[2,4,164]), ShapedArray(float32[2,4]), ShapedArray(int32[2,2]), ShapedArray(int32[2,164]), ShapedArray(int32[2,164,14]), ShapedArray(int32[2,164,37]), ShapedArray(int32[2]), ShapedArray(float32[2,164]), ShapedArray(float32[2,164,22]), ShapedArray(int32[2,4,164]), ShapedArray(float32[2,4,164,37]), ShapedArray(float32[2,4,164,37,3]), ShapedArray(float32[2,4]), ShapedArray(float32[2,4,164,3]), ShapedArray(float32[2,4,164]), ShapedArray(float32[2,4,1]), ShapedArray(int32[2,4,164])).\n",
"DEBUG:absl:Compiling <lambda> (139600040764112) for args (ShapedArray(float32[164,50]), ShapedArray(float32[164,1])).\n",
"DEBUG:absl:Compiling <lambda> (139600040763552) for args (ShapedArray(float32[164,164,64]), ShapedArray(float32[164,164,1])).\n",
"DEBUG:absl:Compiling <lambda> (139600040763552) for args (ShapedArray(float32[]), ShapedArray(float32[])).\n",
"DEBUG:absl:Compiling true_divide (139600040777680) for args (ShapedArray(float32[]), ShapedArray(int32[], weak_type=True)).\n",
"DEBUG:absl:Compiling fn (139600040780896) for args (ShapedArray(float32[63]), ShapedArray(float32[])).\n",
"DEBUG:absl:Compiling fn (139618307909984) for args (ShapedArray(float32[]), ShapedArray(float32[])).\n",
"INFO:absl:Output shape was {'distogram': {'bin_edges': (63,), 'logits': (164, 164, 64)}, 'experimentally_resolved': {'logits': (164, 37)}, 'masked_msa': {'logits': (4, 164, 23)}, 'predicted_aligned_error': (164, 164), 'predicted_lddt': {'logits': (164, 50)}, 'structure_module': {'final_atom_mask': (164, 37), 'final_atom_positions': (164, 37, 3)}, 'plddt': (164,), 'aligned_confidence_probs': (164, 164, 64), 'max_predicted_aligned_error': (), 'ptm': ()}\n",
"INFO:absl:Launching subprocess \"hhsearch -i /tmp/tmpreew52sv/query.a3m -o /tmp/tmpreew52sv/output.hhr -maxseq 1000000 -d T4_lysozyme_bdd05_env/templates_101/pdb70\"\n",
"INFO:absl:Started HHsearch query\n",
"INFO:absl:Finished HHsearch query in 0.991 seconds\n",
"INFO:absl:Searching for template for: None\n",
"WARNING:absl:Template structure not in release dates dict: 4pk0\n",
"INFO:absl:Reading PDB entry from T4_lysozyme_bdd05_env/templates_101/4pk0.cif. Query: MNIFEMLRIDEGLRLKIYKDTEGYYTIGIGHLLTKSPSLNAAKSELDKAIGRNCNGVITKDEAEKLFNQDVDAAVRGILRNAKLKPVYDSLDAVRRCALINMVFQMGETGVAGFTNSLRMLQQKRWDEAAVNLAKSRWYNQTPNRAKRVITTFRTGTWDAYKNL, template: MNIFEMLRIDEGLRLKIYKDTEGYYTIGIGHLLTKSPSLNAAKSELDKAIGRNTNGVITKDEAEKLFNQDVDAAVRGILRNAKLKPVYDSLDAVRRAALINMVFQMGETGVAGFTNSLRMLQQKRWDEAAVNLAKSRWYNQTPNRAKRVITTFRTGTWDAYKNL\n",
"INFO:absl:Found an exact template match 4pk0_A.\n",
"WARNING:absl:Template structure not in release dates dict: 6lb8\n",
"INFO:absl:Reading PDB entry from T4_lysozyme_bdd05_env/templates_101/6lb8.cif. Query: MNIFEMLRIDEGLRLKIYKDTEGYYTIGIGHLLTKSPSLNAAKSELDKAIGRNCNGVITKDEAEKLFNQDVDAAVRGILRNAKLKPVYDSLDAVRRCALINMVFQMGETGVAGFTNSLRMLQQKRWDEAAVNLAKSRWYNQTPNRAKRVITTFRTGTWDAYKNL, template: MNIFEMLRIDEGLRLKIYKDTEGYYTIGIGHLLTKSPSLNAAKSELDKAIGRNTNGVITKDEAEKLFNQDVDAAVRGILRNAKLKPVYDSLDAVRRAALINMVFQMGETGVAGFTNSLRMLQQKRWDEAAVNLAKSRWYNQTPNRAKRVITTFRTGTWDAY\n",
"INFO:absl:Found an exact template match 6lb8_C.\n",
"WARNING:absl:Template structure not in release dates dict: 6lb8\n",
"INFO:absl:Reading PDB entry from T4_lysozyme_bdd05_env/templates_101/6lb8.cif. Query: MNIFEMLRIDEGLRLKIYKDTEGYYTIGIGHLLTKSPSLNAAKSELDKAIGRNCNGVITKDEAEKLFNQDVDAAVRGILRNAKLKPVYDSLDAVRRCALINMVFQMGETGVAGFTNSLRMLQQKRWDEAAVNLAKSRWYNQTPNRAKRVITTFRTGTWDAYKNL, template: MNIFEMLRIDEGLRLKIYKDTEGYYTIGIGHLLTKSPSLNAAKSELDKAIGRNTNGVITKDEAEKLFNQDVDAAVRGILRNAKLKPVYDSLDAVRRAALINMVFQMGETGVAGFTNSLRMLQQKRWDEAAVNLAKSRWYNQTPNRAKRVITTFRTGTWDAY\n",
"INFO:absl:Found an exact template match 6lb8_A.\n",
"WARNING:absl:Template structure not in release dates dict: 6fw2\n",
"INFO:absl:Reading PDB entry from T4_lysozyme_bdd05_env/templates_101/6fw2.cif. Query: MNIFEMLRIDEGLRLKIYKDTEGYYTIGIGHLLTKSPSLNAAKSELDKAIGRNCNGVITKDEAEKLFNQDVDAAVRGILRNAKLKPVYDSLDAVRRCALINMVFQMGETGVAGFTNSLRMLQQKRWDEAAVNLAKSRWYNQTPNRAKRVITTFRTGTWDAYKNL, template: NIFEMLRIDEGLRLKIYKDTEGYYTIGIGHLLTKSPSLNAAKSELDKAIGRNCNGVITKDEAEKLFNQDVDAAVRGILRNAKLKPVYDSLDAVRRCALINMVFQMGETGVAGFTNSLRMLQQKRWDEAAVNLAKSRWYNQTPNRAKRVITTFRTGTWDAYT\n",
"INFO:absl:Found an exact template match 6fw2_A.\n",
"DEBUG:absl:Prediction parameters:\n",
"DEBUG:absl:\tModel ID: 2\n",
"DEBUG:absl:\tUsing templates: True\n",
"DEBUG:absl:\tMaximum number of MSA clusters: 8\n",
"DEBUG:absl:\tMaximum number of extra MSA clusters: 16\n",
"DEBUG:absl:\tMaximum number of recycling iterations: 1\n",
"INFO:absl:Running predict with shape(feat) = {'aatype': (2, 164), 'residue_index': (2, 164), 'seq_length': (2,), 'template_aatype': (2, 4, 164), 'template_all_atom_masks': (2, 4, 164, 37), 'template_all_atom_positions': (2, 4, 164, 37, 3), 'template_sum_probs': (2, 4, 1), 'is_distillation': (2,), 'seq_mask': (2, 164), 'msa_mask': (2, 4, 164), 'msa_row_mask': (2, 4), 'random_crop_to_size_seed': (2, 2), 'template_mask': (2, 4), 'template_pseudo_beta': (2, 4, 164, 3), 'template_pseudo_beta_mask': (2, 4, 164), 'atom14_atom_exists': (2, 164, 14), 'residx_atom14_to_atom37': (2, 164, 14), 'residx_atom37_to_atom14': (2, 164, 37), 'atom37_atom_exists': (2, 164, 37), 'extra_msa': (2, 16, 164), 'extra_msa_mask': (2, 16, 164), 'extra_msa_row_mask': (2, 16), 'bert_mask': (2, 4, 164), 'true_msa': (2, 4, 164), 'extra_has_deletion': (2, 16, 164), 'extra_deletion_value': (2, 16, 164), 'msa_feat': (2, 4, 164, 49), 'target_feat': (2, 164, 22)}\n",
"DEBUG:absl:Compiling apply_fn (139599938558224) for args (ShapedArray(float32[64]), ShapedArray(float32[128,64]), ShapedArray(float32[48,8,32]), ShapedArray(float32[48,256,8,32]), ShapedArray(float32[48,256,8,32]), ShapedArray(float32[48,256]), ShapedArray(float32[48,8,32,256]), ShapedArray(float32[48,256,8,32]), ShapedArray(float32[48,256,8,32]), ShapedArray(float32[48,256]), ShapedArray(float32[48,256]), ShapedArray(float32[48,128,8]), ShapedArray(float32[48,8,32]), ShapedArray(float32[48,256,8,32]), ShapedArray(float32[48,256,8,32]), ShapedArray(float32[48,256]), ShapedArray(float32[48,8,32,256]), ShapedArray(float32[48,256,8,32]), ShapedArray(float32[48,256,8,32]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,256]), ShapedArray(float32[48,256]), ShapedArray(float32[48,256]), ShapedArray(float32[48,256]), ShapedArray(float32[48,1024]), ShapedArray(float32[48,256,1024]), ShapedArray(float32[48,256]), ShapedArray(float32[48,1024,256]), ShapedArray(float32[48,128]), ShapedArray(float32[48,32,32,128]), ShapedArray(float32[48,256]), ShapedArray(float32[48,256]), ShapedArray(float32[48,32]), ShapedArray(float32[48,256,32]), ShapedArray(float32[48,32]), ShapedArray(float32[48,256,32]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,512]), ShapedArray(float32[48,128,512]), ShapedArray(float32[48,128]), ShapedArray(float32[48,512,128]), ShapedArray(float32[48,128,4]), ShapedArray(float32[48,4,32]), ShapedArray(float32[48,128,4,32]), ShapedArray(float32[48,128,4,32]), ShapedArray(float32[48,128]), ShapedArray(float32[48,4,32,128]), ShapedArray(float32[48,128,4,32]), ShapedArray(float32[48,128,4,32]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128,4]), ShapedArray(float32[48,4,32]), ShapedArray(float32[48,128,4,32]), ShapedArray(float32[48,128,4,32]), ShapedArray(float32[48,128]), ShapedArray(float32[48,4,32,128]), ShapedArray(float32[48,128,4,32]), ShapedArray(float32[48,128,4,32]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128,128]), ShapedArray(float32[48,128]), ShapedArray(float32[48,128,128]), ShapedArray(float32[64]), ShapedArray(float32[25,64]), ShapedArray(float32[4,8,8]), ShapedArray(float32[4,64,8,8]), ShapedArray(float32[4,64,8]), ShapedArray(float32[4,64]), ShapedArray(float32[4,8,8,64]), ShapedArray(float32[4,64,8,8]), ShapedArray(float32[4,64,8]), ShapedArray(float32[4,64]), ShapedArray(float32[4,64]), ShapedArray(float32[4,128,8]), ShapedArray(float32[4,8,8]), ShapedArray(float32[4,64,8,8]), ShapedArray(float32[4,64,8,8]), ShapedArray(float32[4,64]), ShapedArray(float32[4,8,8,64]), ShapedArray(float32[4,64,8,8]), ShapedArray(float32[4,64,8,8]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,64]), ShapedArray(float32[4,64]), ShapedArray(float32[4,64]), ShapedArray(float32[4,64]), ShapedArray(float32[4,256]), ShapedArray(float32[4,64,256]), ShapedArray(float32[4,64]), ShapedArray(float32[4,256,64]), ShapedArray(float32[4,128]), ShapedArray(float32[4,32,32,128]), ShapedArray(float32[4,64]), ShapedArray(float32[4,64]), ShapedArray(float32[4,32]), ShapedArray(float32[4,64,32]), ShapedArray(float32[4,32]), ShapedArray(float32[4,64,32]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,512]), ShapedArray(float32[4,128,512]), ShapedArray(float32[4,128]), ShapedArray(float32[4,512,128]), ShapedArray(float32[4,128,4]), ShapedArray(float32[4,4,32]), ShapedArray(float32[4,128,4,32]), ShapedArray(float32[4,128,4,32]), ShapedArray(float32[4,128]), ShapedArray(float32[4,4,32,128]), ShapedArray(float32[4,128,4,32]), ShapedArray(float32[4,128,4,32]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128,4]), ShapedArray(float32[4,4,32]), ShapedArray(float32[4,128,4,32]), ShapedArray(float32[4,128,4,32]), ShapedArray(float32[4,128]), ShapedArray(float32[4,4,32,128]), ShapedArray(float32[4,128,4,32]), ShapedArray(float32[4,128,4,32]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128,128]), ShapedArray(float32[4,128]), ShapedArray(float32[4,128,128]), ShapedArray(float32[128]), ShapedArray(float32[22,128]), ShapedArray(float32[128]), ShapedArray(float32[65,128]), ShapedArray(float32[256]), ShapedArray(float32[22,256]), ShapedArray(float32[256]), ShapedArray(float32[49,256]), ShapedArray(float32[256]), ShapedArray(float32[256]), ShapedArray(float32[128]), ShapedArray(float32[128]), ShapedArray(float32[128]), ShapedArray(float32[15,128]), ShapedArray(float32[128]), ShapedArray(float32[22,128]), ShapedArray(float32[384]), ShapedArray(float32[256,384]), ShapedArray(float32[64,4,16]), ShapedArray(float32[128]), ShapedArray(float32[4,16,128]), ShapedArray(float32[128,4,16]), ShapedArray(float32[64,4,16]), ShapedArray(float32[64]), ShapedArray(float32[88,64]), ShapedArray(float32[64]), ShapedArray(float32[64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,128]), ShapedArray(float32[2,64,128]), ShapedArray(float32[2,64]), ShapedArray(float32[2,128,64]), ShapedArray(float32[2,64,4]), ShapedArray(float32[2,4,16]), ShapedArray(float32[2,64,4,16]), ShapedArray(float32[2,64,4,16]), ShapedArray(float32[2,64]), ShapedArray(float32[2,4,16,64]), ShapedArray(float32[2,64,4,16]), ShapedArray(float32[2,64,4,16]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64,4]), ShapedArray(float32[2,4,16]), ShapedArray(float32[2,64,4,16]), ShapedArray(float32[2,64,4,16]), ShapedArray(float32[2,64]), ShapedArray(float32[2,4,16,64]), ShapedArray(float32[2,64,4,16]), ShapedArray(float32[2,64,4,16]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64,64]), ShapedArray(float32[2,64]), ShapedArray(float32[2,64,64]), ShapedArray(float32[256]), ShapedArray(float32[256,256]), ShapedArray(float32[256]), ShapedArray(float32[57,256]), ShapedArray(float32[37]), ShapedArray(float32[384,37]), ShapedArray(float32[23]), ShapedArray(float32[256,23]), ShapedArray(float32[64]), ShapedArray(float32[128,64]), ShapedArray(float32[128]), ShapedArray(float32[384,128]), ShapedArray(float32[128]), ShapedArray(float32[128,128]), ShapedArray(float32[384]), ShapedArray(float32[384]), ShapedArray(float32[50]), ShapedArray(float32[128,50]), ShapedArray(float32[6]), ShapedArray(float32[384,6]), ShapedArray(float32[384]), ShapedArray(float32[384]), ShapedArray(float32[12]), ShapedArray(float32[12]), ShapedArray(float32[128,12]), ShapedArray(float32[432]), ShapedArray(float32[384,432]), ShapedArray(float32[384]), ShapedArray(float32[384,384]), ShapedArray(float32[384]), ShapedArray(float32[2112,384]), ShapedArray(float32[144]), ShapedArray(float32[384,144]), ShapedArray(float32[192]), ShapedArray(float32[384,192]), ShapedArray(float32[128]), ShapedArray(float32[384,128]), ShapedArray(float32[128]), ShapedArray(float32[384,128]), ShapedArray(float32[128]), ShapedArray(float32[128,128]), ShapedArray(float32[128]), ShapedArray(float32[128,128]), ShapedArray(float32[128]), ShapedArray(float32[128,128]), ShapedArray(float32[128]), ShapedArray(float32[128,128]), ShapedArray(float32[14]), ShapedArray(float32[128,14]), ShapedArray(float32[384]), ShapedArray(float32[384,384]), ShapedArray(float32[384]), ShapedArray(float32[384,384]), ShapedArray(float32[384]), ShapedArray(float32[384,384]), ShapedArray(float32[384]), ShapedArray(float32[384]), ShapedArray(float32[384]), ShapedArray(float32[384,384]), ShapedArray(float32[128]), ShapedArray(float32[128]), ShapedArray(float32[384]), ShapedArray(float32[384]), ShapedArray(uint32[2]), ShapedArray(int32[2,164]), ShapedArray(float32[2,164,14]), ShapedArray(float32[2,164,37]), ShapedArray(float32[2,4,164]), ShapedArray(float32[2,16,164]), ShapedArray(float32[2,16,164]), ShapedArray(int32[2,16,164]), ShapedArray(float32[2,16,164]), ShapedArray(float32[2,16]), ShapedArray(float32[2]), ShapedArray(float32[2,4,164,49]), ShapedArray(float32[2,4,164]), ShapedArray(float32[2,4]), ShapedArray(int32[2,2]), ShapedArray(int32[2,164]), ShapedArray(int32[2,164,14]), ShapedArray(int32[2,164,37]), ShapedArray(int32[2]), ShapedArray(float32[2,164]), ShapedArray(float32[2,164,22]), ShapedArray(int32[2,4,164]), ShapedArray(float32[2,4,164,37]), ShapedArray(float32[2,4,164,37,3]), ShapedArray(float32[2,4]), ShapedArray(float32[2,4,164,3]), ShapedArray(float32[2,4,164]), ShapedArray(float32[2,4,1]), ShapedArray(int32[2,4,164])).\n"
]
}
],
"source": [
"jobname = 'T4_lysozyme'\n",
"sequence = (\"MNIFEMLRIDEGLRLKIYKDTEGYYTIGIGHLLTKSPSLNAAKSELDKAIGRNCNGVIT\"\n",
" \"KDEAEKLFNQDVDAAVRGILRNAKLKPVYDSLDAVRRCALINMVFQMGETGVAGFTNSL\"\n",
" \"RMLQQKRWDEAAVNLAKSRWYNQTPNRAKRVITTFRTGTWDAYKNL\" )\n",
"\n",
"# PDB IDs, written uppercase with chain ID specified\n",
"pdbs = [\"6LB8_A\",\n",
" \"6LB8_C\",\n",
" \"4PK0_A\",\n",
" \"6FW2_A\"]\n",
"\n",
"# The MMSeqs2Runner object submits the amino acid sequence to\n",
"# the MMSeqs2 server, generates a directory, and populates it with\n",
"# data retrieved from the server. Templates may be specified by the user.\n",
"# All templates are fetched if none are provided or the list is empty.\n",
"mmseqs2_runner = mmseqs2.MMSeqs2Runner( jobname, sequence )\n",
"\n",
"# Fetch sequences and download data\n",
"a3m_lines, template_path = mmseqs2_runner.run_job( templates = pdbs )\n",
"\n",
"# A nested loop in which 5 models are generated per MSA depth value\n",
"# In our manuscript we use three MSA depths: 32 sequences, 128, and 5120\n",
"for nseq in range( 16, 34 ):\n",
" for n_model in range( 5 ):\n",
"\n",
" # Randomly choose one of the two AlphaFold neural\n",
" # networks capable of using templates.\n",
" # In our experience, model 1 is more sensitive to input templates.\n",
" # However, this observation is purely anecdotal and not backed up by\n",
" # hard numbers.\n",
" model_id = random.choice( ( 1, 2 ) )\n",
"\n",
" # Specify the name of the output PDB\n",
" outname = f\"{ n_model }_{ nseq }.pdb\"\n",
"\n",
" # Run the job and save as a PDB\n",
" predict.predict_structure_from_templates(\n",
" mmseqs2_runner.seq, # NOTE mmseqs2_runner removes whitespace from seq\n",
" outname,\n",
" a3m_lines,\n",
" templates = pdbs,\n",
" template_path = template_path,\n",
" model_id = model_id,\n",
" max_msa_clusters = nseq // 2,\n",
" max_extra_msa = nseq,\n",
" max_recycles = 1\n",
" )\n",
"\n",
" # Alternatively, users can run a template-free prediction by uncommenting\n",
" # the line below:\n",
"\n",
" '''\n",
" predict.predict_structure_no_templates( sequence, outname,\n",
" a3m_lines, model_id = model_id, max_msa_clusters = nseq // 2,\n",
" max_extra_msa = nseq, max_recycles = 1 )\n",
" '''\n",
"\n",
"# To download predictions:\n",
"!zip -FSr \"af2.zip\" *\".pdb\"\n",
"files.download( \"af2.zip\" )"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "diiyiNsm8WQZ"
},
"source": [
"# References:\n",
"1. Jumper et al \"Highly accurate protein structure prediction with AlphaFold\" Nature (2021)\n",
"2. Mirdita et al \"ColabFold - making protein folding accessible to all\" biorXiv (2021)\n",
"3. Steinegger & Söding \"MMseqs2 enables sensitive protein sequence searching for the analysis of massive data sets\" Nature Biotechnology (2017)\n",
"4. Mirdita et al \"MMseqs2 desktop and local web server app for fast, integrative sequence searches\" Bioinformatics (2019)\n",
"5. Eastman et al \"OpenMM 7: Rapid development of high performance algorithms for molecular dynamics\" Plos Comp Bio (2017)\n",
"6. Koehler-Leman et al \"Macromolecular modeling and design in Rosetta: recent methods and frameworks\" Nature Methods (2020)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "OaYh1cy9cIIr"
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "ih2OPyWtoGRu"
},
"outputs": [],
"source": []
}
],
"metadata": {
"accelerator": "GPU",
"colab": {
"collapsed_sections": [],
"machine_shape": "hm",
"name": "choose_templates.ipynb",
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

Computing file changes ...