{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "Before you turn this problem in, make sure everything runs as expected. First, **restart the kernel** (in the menubar, select Kernel$\\rightarrow$Restart) and then **run all cells** (in the menubar, select Cell$\\rightarrow$Run All).\n", "\n", "Make sure you fill in any place that says `YOUR CODE HERE` or \"YOUR ANSWER HERE\", as well as your name and collaborators below:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "NAME = \"\"\n", "COLLABORATORS = \"\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "---" ] }, { "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) >
"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": false,
"editable": false,
"nbgrader": {
"checksum": "6aa8f28ae9ee095a08190784a96bdd18",
"grade": false,
"grade_id": "cell-c32668370dae07d5",
"locked": true,
"schema_version": 1,
"solution": false
}
},
"source": [
"# Practice: Analyzing energy between residues\n",
"Keywords: pose_from_rcsb(), pdb2pose(), EMapVector()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Notebook setup\n",
"import sys\n",
"if 'google.colab' in sys.modules:\n",
" !pip install pyrosettacolabsetup\n",
" import pyrosettacolabsetup\n",
" pyrosettacolabsetup.setup()\n",
" print (\"Notebook is set for PyRosetta use in Colab. Have fun!\")\n",
"\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": {
"deletable": false,
"nbgrader": {
"checksum": "021521771cae846244b7da6fe1e5fbfe",
"grade": true,
"grade_id": "cell-870a6043eeeae1de",
"locked": false,
"points": 0,
"schema_version": 1,
"solution": true
}
},
"outputs": [],
"source": [
"# YOUR CODE HERE\n",
"raise NotImplementedError()"
]
},
{
"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": [],
"deletable": false,
"nbgrader": {
"checksum": "c7eb996bd82c409aba707dab13c6e707",
"grade": true,
"grade_id": "cell-1ffc5699ad9c088b",
"locked": false,
"points": 0,
"schema_version": 1,
"solution": true
}
},
"outputs": [],
"source": [
"# YOUR CODE HERE\n",
"raise NotImplementedError()"
]
},
{
"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) >
"
]
}
],
"metadata": {
"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
}