{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "*This notebook contains material from [PyRosetta](https://RosettaCommons.github.io/PyRosetta.notebooks);\n", "content is available [on Github](https://github.com/RosettaCommons/PyRosetta.notebooks.git).*" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "< [Modeling Membrane Proteins](http://nbviewer.jupyter.org/github/RosettaCommons/PyRosetta.notebooks/blob/master/notebooks/15.00-Modeling-Membrane-Proteins.ipynb) | [Contents](toc.ipynb) | [Index](index.ipynb) | [Predicting the ∆∆G of single point mutations](http://nbviewer.jupyter.org/github/RosettaCommons/PyRosetta.notebooks/blob/master/notebooks/15.02-Membrane-Protein-ddG-of-mutation.ipynb) >

\"Open" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "CymzNzofdZEE" }, "source": [ "# Setting up a membrane protein in the bilayer\n", "Keywords: membrane, bilayer, AddMembraneMover, OCTOPUS" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "mazLwP8SdVoj" }, "source": [ "## Getting Started: Setting up the protein in the lipid bilayer\n", "\n", "To start modeling membrane proteins, we must place the protein in the lipid bilayer. This begs an important question: how should the protein be oriented? The orientation of a protein in the bilayer is driven by a number of biophysical factors, such as burying nonpolar side chains in the hydrophobic membrane. For RosettaMP, there are three ways to choose the initial orientation. The choice is up to you, and often depends on how much information you have about your protein beforehand. \n" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 344 }, "colab_type": "code", "id": "RLnXXNnRdxcf", "outputId": "feb8ae62-b2fb-446c-b5e9-51b10f9c9f0c" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Collecting pyrosettacolabsetup\n", " Downloading https://files.pythonhosted.org/packages/31/11/10a9140931c88352b51a91d2e6be8b929b6560b3683e5517d88c271ceb37/pyrosettacolabsetup-0.1.tar.gz\n", "Building wheels for collected packages: pyrosettacolabsetup\n", " Building wheel for pyrosettacolabsetup (setup.py) ... \u001b[?25l\u001b[?25hdone\n", " Created wheel for pyrosettacolabsetup: filename=pyrosettacolabsetup-0.1-cp36-none-any.whl size=1694 sha256=a57372333cb399736ec8ad414460dc3e88fbb9e6e8106d86585dc13d4cdb67a0\n", " Stored in directory: /root/.cache/pip/wheels/3a/2d/68/2a5b479b424b3df2b96d725177e1f42c9b85c446965d566c6c\n", "Successfully built pyrosettacolabsetup\n", "Installing collected packages: pyrosettacolabsetup\n", "Successfully installed pyrosettacolabsetup-0.1\n", "Go to this URL in a browser: https://accounts.google.com/o/oauth2/auth?client_id=947318989803-6bn6qk8qdgf4n4g3pfee6491hc0brc4i.apps.googleusercontent.com&redirect_uri=urn%3aietf%3awg%3aoauth%3a2.0%3aoob&response_type=code&scope=email%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdocs.test%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdrive%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdrive.photos.readonly%20https%3a%2f%2fwww.googleapis.com%2fauth%2fpeopleapi.readonly\n", "\n", "Enter your authorization code:\n", "··········\n", "Mounted at /content/google_drive\n", "Notebook is set for PyRosetta use in Colab. Have fun!\n" ] } ], "source": [ "!pip install pyrosettacolabsetup\n", "import pyrosettacolabsetup; pyrosettacolabsetup.install_pyrosetta()\n", "import pyrosetta; pyrosetta.init()\n" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 158 }, "colab_type": "code", "id": "X1DEcUK9dX92", "outputId": "25e8f17d-b11b-4f48-8aad-8f263cb5dfdb" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "PyRosetta-4 2019 [Rosetta PyRosetta4.MinSizeRel.python36.linux 2019.50+release.91b7a940f06ab065a81d9ce3046b08eef0de0b31 2019-12-12T23:03:24] retrieved from: http://www.pyrosetta.org\n", "(C) Copyright Rosetta Commons Member Institutions. Created in JHU by Sergey Lyskov and PyRosetta Team.\n", "core.init: Checking for fconfig files in pwd and ./rosetta/flags\n", "core.init: Rosetta version: PyRosetta4.MinSizeRel.python36.linux r240 2019.50+release.91b7a94 91b7a940f06ab065a81d9ce3046b08eef0de0b31 http://www.pyrosetta.org 2019-12-12T23:03:24\n", "core.init: command: PyRosetta -ex1 -ex2aro -database /content/prefix/pyrosetta-2019.50+release.91b7a94-py3.6-linux-x86_64.egg/pyrosetta/database\n", "basic.random.init_random_generator: 'RNG device' seed mode, using '/dev/urandom', seed=1541953743 seed_offset=0 real_seed=1541953743\n", "basic.random.init_random_generator: RandomGenerator:init: Normal mode, seed=1541953743 RG_type=mt19937\n" ] } ], "source": [ "from pyrosetta import *\n", "pyrosetta.init()" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "jdeDFkiP9cco" }, "source": [ "Make sure you are in the right directory for accessing the `.pdb` files:\n", "\n", "`cd google_drive/MyDrive/student-notebooks/`" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 34 }, "colab_type": "code", "id": "CvgI7XDf-A-E", "outputId": "fa6fc6cb-a447-49ae-c3f4-06c3673a1b19" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "/content/google_drive/My Drive/student-notebooks\n" ] } ], "source": [ "#cd google_drive/MyDrive/student-notebooks/" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "MgmV1Jmy-Ydz" }, "source": [ "### Option 1: Download a pre-transformed PDB from the OPM database" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "colab": {}, "colab_type": "code", "id": "q_SIbroV8iIK" }, "outputs": [], "source": [ "from pyrosetta.toolbox import cleanATOM\n", "cleanATOM(\"inputs/1afo.pdb\")\n", "pose = pose_from_pdb(\"inputs/1afo.clean.pdb\")" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "sZ96zp6i-KJv" }, "source": [ "Then, initialize RosettaMP using AddMembraneMover. In this option, the orientation is known and you can estimate the transmembrane spans from the orientation. Therefore, we tell RosettaMP to estimate the spanning topology from structure: " ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "colab": {}, "colab_type": "code", "id": "EAVdRCb2-Jqq" }, "outputs": [], "source": [ "from pyrosetta.rosetta.protocols.membrane import *\n", "addmem = AddMembraneMover(\"from_structure\")\n", "addmem.apply(pose)" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "6ro5BatR-ga5" }, "source": [ "### Option 2: Estimate the transmembrane spans and use this information to choose an orientation" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "YilUftRa_yHd" }, "source": [ "In this option, you will need to figure out what the transmembrane spans are. For this, you can used a sequence-based server such as OCTOPUS (http://octopus.cbr.su.se ). You will need to find the sequence of 1AFO on the PDB, copy/paste the sequence of one of the chains into OCTOPUS, and then save the output as a text file. Then, you will need to convert the output from OCTOPUS to the Rosetta format using the `octopus2memb` script. \n", "\n", "Next, initialize RosettaMP with AddMembraneMover. Here, instead of specifying “from_structure”, you will specify the path to your spanning topology file: " ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 125 }, "colab_type": "code", "id": "h6RM8nhT9qKx", "outputId": "28f6e57b-6205-40b1-ce2a-a1e8b37fb67b" }, "outputs": [], "source": [ "from pyrosetta.rosetta.protocols.membrane import *\n", "if not os.getenv(\"DEBUG\"):\n", " addmem = AddMembraneMover(\"inputs/1afo.span\")\n", " addmem.apply(pose)" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "0J10H-xT-mkq" }, "source": [ "## Key Concepts for the membrane representation\n", "\n", "1.\tAddMembraneMover adds an additional residue to the protein called the Membrane residue. It is not a physical residue, but it contains information about the membrane. Note that AddMembraneMover attaches the MEM residue to the protein in Rosetta’s representation, but it does not physically exist as a residue. This is a special kind of connection called a “jump edge” whereas connections between the actual residues like are called “peptide edges” (more on that in the fold tree section). \n", "2.\tThe spanning information is stored in a SpanningTopology object\n" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "vv8HGE2t-015" }, "source": [ "Let’s check some information about our current pose:\n", "\t\n", "\tprint(pose.conformation())\n", "\tprint(pose.conformation().membrane_info())\n", "\n", "pose.conformation() shows information about all residues in the pose, fold_tree() shows information about the Edges of the FoldTree, and membrane_info() shows information about the membrane residue. \n" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "colab": {}, "colab_type": "code", "id": "SudcikpS_3wM", "nbgrader": { "grade": true, "grade_id": "cell-1f1b0d48cf09dbf5", "locked": false, "points": 0, "schema_version": 3, "solution": true } }, "outputs": [], "source": [ "if not os.getenv(\"DEBUG\"):\n", " ### BEGIN SOLUTION\n", " print(pose.conformation())\n", " print(pose.conformation().membrane_info())\n", " ### END SOLUTION" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "G42gEQ2Z_COZ" }, "source": [ "**Questions:**\n", "How many residues compose 1AFO? ___\n", "Which residue is the Membrane residue? ___\n", "How many transmembrane spans does membrane_info() say there are? " ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "colab": {}, "colab_type": "code", "id": "x6pjYN8l-nVC" }, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "9Zx8C5IX_LkO" }, "source": [ "## Fold Tree\n", "Understanding the fold tree is necessary to use movers that move parts of the protein with respect to other parts of the protein. For example, TiltMover requires a jump number and tilts the section after the jump number by a specified amount. SpinAroundPartnerMover spins one partner with respect to another, which also requires a jump number. We will explain the terminology shortly! Enter this code in the Python command line:\n", "`print(pose.conformation().fold_tree())`" ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "colab": {}, "colab_type": "code", "id": "7Un1U4XS_keb", "nbgrader": { "grade": true, "grade_id": "cell-4c80acb62da52a60", "locked": false, "points": 0, "schema_version": 3, "solution": true } }, "outputs": [], "source": [ "if not os.getenv(\"DEBUG\"):\n", " ### BEGIN SOLUTION\n", " print(pose.conformation().fold_tree())\n", " ### END SOLUTION" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "pIaxD4US_k91" }, "source": [ "1AFO is a relatively simple protein with 2 chains, however PyMOL shows 3 chains. Next to the “1AFO_AB.pdb” line in PyMOL, click “label” and then “chains”. Select Chain C, then select “label” and then “residue name”. What is the only residue in Chain C, and therefore what does the third chain represent? Does it make sense that Chain C is the membrane representation and not physically part of the protein?\n", "\n", "This information is shown in the fold tree data above, where we see one jump edge between residues 1 and 41, and a second jump edge for the membrane representation connecting MEM “residue” 81 to residue 1. Jump edges have a positive final number which increments for each jump. The edges with a negative final number indicate a peptide edge. **Jump edges represent parts of the protein that are not physically connected to each other, and peptide edges represent parts that are physically connected.**\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "UhGWsjSmAF65" }, "source": [ "Edge 1 40 -1 means that the edge connects residue 1 to residue 40, and it’s a physical connection. Therefore what does this Edge represent? **It represents Chain A.**\n", "\n", "Edge 1 41 1 means that there is a *physical separation* between residues 1 and 41. Therefore what does this Edge represent? **It represents the separation between Chain A and Chain B.**" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "3M3_iOMXATsm" }, "source": [ "For a more in-depth review of fold trees, look at Rosetta documentation (https://www.rosettacommons.org/demos/latest/tutorials/fold_tree/fold_tree). " ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "zaSMnm7cAfZY" }, "source": [ "The key takeaway is that if we wanted to tilt one part of the protein with respect to another part of the protein, it doesn’t make sense to give TiltMover jump number 2, which is the membrane jump. It does make sense to give TiltMover jump number 1, because then we’re asking TiltMover to tilt Chain B with respect to Chain A." ] }, { "cell_type": "code", "execution_count": 0, "metadata": { "colab": {}, "colab_type": "code", "id": "c4_ROs6rAA0p" }, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "< [Modeling Membrane Proteins](http://nbviewer.jupyter.org/github/RosettaCommons/PyRosetta.notebooks/blob/master/notebooks/15.00-Modeling-Membrane-Proteins.ipynb) | [Contents](toc.ipynb) | [Index](index.ipynb) | [Predicting the ∆∆G of single point mutations](http://nbviewer.jupyter.org/github/RosettaCommons/PyRosetta.notebooks/blob/master/notebooks/15.02-Membrane-Protein-ddG-of-mutation.ipynb) >

\"Open" ] } ], "metadata": { "celltoolbar": "Create Assignment", "colab": { "collapsed_sections": [], "name": "12.01 Modeling Bilayer.ipynb", "provenance": [], "toc_visible": true }, "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.6" }, "toc": { "base_numbering": 1, "nav_menu": {}, "number_sections": true, "sideBar": true, "skip_h1_title": false, "title_cell": "Table of Contents", "title_sidebar": "Contents", "toc_cell": false, "toc_position": {}, "toc_section_display": true, "toc_window_display": false } }, "nbformat": 4, "nbformat_minor": 1 }