{ "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", "< [Score Function Basics](http://nbviewer.jupyter.org/github/RosettaCommons/PyRosetta.notebooks/blob/master/notebooks/03.01-Score-Function-Basics.ipynb) | [Contents](toc.ipynb) | [Index](index.ipynb) | [Energies and the PyMOL Mover](http://nbviewer.jupyter.org/github/RosettaCommons/PyRosetta.notebooks/blob/master/notebooks/03.03-Energies-and-the-PyMOLMover.ipynb) >

\"Open" ] }, { "cell_type": "markdown", "metadata": { "nbgrader": { "grade": false, "grade_id": "cell-c32668370dae07d5", "locked": true, "schema_version": 3, "solution": false } }, "source": [ "# Practice: Analyzing energy between residues\n", "Keywords: pose_from_rcsb(), pdb2pose(), EMapVector()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "!pip install pyrosettacolabsetup\n", "import pyrosettacolabsetup; pyrosettacolabsetup.install_pyrosetta()\n", "import pyrosetta; pyrosetta.init()\n", "from pyrosetta import *\n", "from pyrosetta.teaching import *\n", "init()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# From previous section:\n", "sfxn = get_score_function(True)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Analyze the energy between residues Y102 and Q408 in cetuximab (PDB code 1YY9, use the `pyrosetta.toolbox.pose_from_rcsb` function to download it and load it into a new `Pose` object) by following the steps below. \n", "\n", "A. Internally, a Pose object has a list of residues, numbered starting from 1. To find the residue numbers of Y102 of chain D and Q408 of chain A, use the residue chain identifier and the PDB residue number to convert to the pose numbering using the `pose2pdb()` method:\n", "\n", "```\n", "pose = pyrosetta.toolbox.pose_from_rcsb(\"1YY9\")\n", "res102 = pose.pdb_info().pdb2pose(\"D\", 102)\n", "res408 = pose.pdb_info().pdb2pose(\"A\", 408)\n", "```" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# get the pose numbers for Y102 (chain D) and Q408 (chain A)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "nbgrader": { "grade": true, "grade_id": "cell-870a6043eeeae1de", "locked": false, "points": 0, "schema_version": 3, "solution": true } }, "outputs": [], "source": [ "### BEGIN SOLUTION\n", "pose = pyrosetta.toolbox.pose_from_rcsb(\"1YY9\")\n", "res102 = pose.pdb_info().pdb2pose(\"D\", 102)\n", "res408 = pose.pdb_info().pdb2pose(\"A\", 408)\n", "### END SOLUTION" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "B. Score the pose and determine the van der Waals energies and solvation energy between these two residues. Use the following commands to isolate contributions from particular pairs of residues, where `rsd102` and `rsd408` are the two residue objects of interest from above (not the residue number -- use `pose.residue(res_num)` to access the objects): \n", "\n", "```\n", "emap = EMapVector()\n", "sfxn.eval_ci_2b(pose.residue(res102), pose.residue(res408), pose, emap)\n", "print(emap[fa_atr])\n", "print(emap[fa_rep])\n", "print(emap[fa_sol])\n", "```" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "code_folding": [], "nbgrader": { "grade": true, "grade_id": "cell-1ffc5699ad9c088b", "locked": false, "points": 0, "schema_version": 3, "solution": true } }, "outputs": [], "source": [ "### BEGIN SOLUTION\n", "emap = EMapVector()\n", "sfxn.eval_ci_2b(pose.residue(res102), pose.residue(res408), pose, emap)\n", "print(emap[fa_atr])\n", "print(emap[fa_rep])\n", "print(emap[fa_sol])\n", "### END SOLUTION" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "< [Score Function Basics](http://nbviewer.jupyter.org/github/RosettaCommons/PyRosetta.notebooks/blob/master/notebooks/03.01-Score-Function-Basics.ipynb) | [Contents](toc.ipynb) | [Index](index.ipynb) | [Energies and the PyMOL Mover](http://nbviewer.jupyter.org/github/RosettaCommons/PyRosetta.notebooks/blob/master/notebooks/03.03-Energies-and-the-PyMOLMover.ipynb) >

\"Open" ] } ], "metadata": { "celltoolbar": "Create Assignment", "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.6.0" }, "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": true } }, "nbformat": 4, "nbformat_minor": 2 }