This notebook contains material from PyRosetta; content is available on Github.

# Practice: Analyzing energy between residues¶

Keywords: pose_from_rcsb(), pdb2pose(), EMapVector()

In [ ]:
# Notebook setup
import sys
!pip install pyrosettacolabsetup
import pyrosettacolabsetup
pyrosettacolabsetup.mount_pyrosetta_install()
print ("Notebook is set for PyRosetta use in Colab.  Have fun!")

from pyrosetta import *
from pyrosetta.teaching import *
init()

In [ ]:
# From previous section:
sfxn = get_score_function(True)


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.

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:

pose = pyrosetta.toolbox.pose_from_rcsb("1YY9")
res102 = pose.pdb_info().pdb2pose("D", 102)
res408 = pose.pdb_info().pdb2pose("A", 408)
In [ ]:
# get the pose numbers for Y102 (chain D) and Q408 (chain A)

In [ ]:
### BEGIN SOLUTION
pose = pyrosetta.toolbox.pose_from_rcsb("1YY9")
res102 = pose.pdb_info().pdb2pose("D", 102)
res408 = pose.pdb_info().pdb2pose("A", 408)
### END SOLUTION


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):

emap = EMapVector()
sfxn.eval_ci_2b(pose.residue(res102), pose.residue(res408), pose, emap)
print(emap[fa_atr])
print(emap[fa_rep])
print(emap[fa_sol])
In [ ]:
### BEGIN SOLUTION
emap = EMapVector()
sfxn.eval_ci_2b(pose.residue(res102), pose.residue(res408), pose, emap)
print(emap[fa_atr])
print(emap[fa_rep])
print(emap[fa_sol])
### END SOLUTION

In [ ]: