Keywords: help()
!pip install pyrosettacolabsetup
import pyrosettacolabsetup; pyrosettacolabsetup.install_pyrosetta()
import pyrosetta; pyrosetta.init()
from pyrosetta import *
init()
From previous section: Make sure you are in the directory with the pdb files:
cd google_drive/MyDrive/student-notebooks/
pose = pose_from_pdb("inputs/5tj3.pdb")
The full documentaton for PyRosetta can be found here: https://graylab.jhu.edu/PyRosetta.documentation/. You can use it to search for or learn more about any method in PyRosetta.
One benefit of working within Jupyter notebooks is that we can make use of its autocomplete features. To see an example, try typing res_24.is_
and pressing tab
to find other features of residues you can examine. Note that you can scroll down to see more features.
Now that we've looked through those functions, we know how to confirm that PyRosetta has loaded in the zinc ions as metal ions.
zn_resid = pose.pdb_info().pdb2pose('A', 601)
res_zn = pose.residue(zn_resid)
res_zn.is_metal()
We can also explore documentation for objects and methods from Jupyter notebooks. Say you wanted to find out more about the Pose object. Try typing in Pose?
, ?Pose
or help(Pose)
.
By the way, now if you ever go on to develop some PyRosetta functions, you can see the importance of docstrings!
This works for PyRosetta methods as well:
res_24 = pose.residue(24)
# Uncomment this line:
# res_24.atom_index?
Now use the atom_index
method and the method below to find out whether the "CA" atom in res_24 is a backbone atom.
# Uncomment this line:
# res_24.atom_is_backbone?
YOUR-CODE-HERE