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

Protein Design 2

Keywords: FastDesign, FastRelax, ResidueSelector, TaskFactory, TaskOperation, pose_from_rcsb, get_residues_from_subset, ResidueNameSelector, ChainSelector, ResiduePropertySelector, NotResidueSelector, AndResidueSelector, RestrictToRepackingRLT, RestrictAbsentCanonicalAASRLT, NoRepackDisulfides, OperateOnResidueSubset

Overview

Here, we will expand upon our knowledge of ResidueSelectors and TaskOperations and how to use them. We can once again use FastRelax or FastDesign to do design. Since we don't need any additional tools offered by FastDesign, we will use FastRelax. I like to call it RelaxedDesign. :)

Warning: This notebook uses pyrosetta.distributed.viewer code, which runs in jupyter notebook and might not run if you're using jupyterlab.

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

Make sure you are in the directory with the pdb files:

cd google_drive/My\ Drive/student-notebooks/

In [1]:
import logging
logging.basicConfig(level=logging.INFO)
import os
import pyrosetta
import pyrosetta.toolbox
import site

from IPython.core.display import display, HTML
display(HTML("<style>.container { width:100% !important; }</style>"))

Initialize PyRosetta

In [2]:
pyrosetta.init("-ignore_unrecognized_res 1 -ex1 -ex2aro")
INFO:pyrosetta.rosetta:Found rosetta database at: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pyrosetta-2019.33+release.1e60c63beb5-py3.6-macosx-10.6-intel.egg/pyrosetta/database; using it....
INFO:pyrosetta.rosetta:PyRosetta-4 2019 [Rosetta PyRosetta4.Release.python36.mac 2019.33+release.1e60c63beb532fd475f0f704d68d462b8af2a977 2019-08-09T15:19:57] retrieved from: http://www.pyrosetta.org
(C) Copyright Rosetta Commons Member Institutions. Created in JHU by Sergey Lyskov and PyRosetta Team.
INFO:rosetta:core.init: Checking for fconfig files in pwd and ./rosetta/flags
INFO:rosetta:core.init: Reading fconfig.../Users/jadolfbr/.rosetta/flags/common
INFO:rosetta:core.init: 
INFO:rosetta:core.init: 
INFO:rosetta:core.init: Rosetta version: PyRosetta4.Release.python36.mac r230 2019.33+release.1e60c63beb5 1e60c63beb532fd475f0f704d68d462b8af2a977 http://www.pyrosetta.org 2019-08-09T15:19:57
INFO:rosetta:core.init: command: PyRosetta -ignore_unrecognized_res 1 -ex1 -ex2aro -database /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pyrosetta-2019.33+release.1e60c63beb5-py3.6-macosx-10.6-intel.egg/pyrosetta/database
INFO:rosetta:basic.random.init_random_generator: 'RNG device' seed mode, using '/dev/urandom', seed=955310447 seed_offset=0 real_seed=955310447
INFO:rosetta:basic.random.init_random_generator: RandomGenerator:init: Normal mode, seed=955310447 RG_type=mt19937
PyRosetta-4 2019 [Rosetta PyRosetta4.Release.python36.mac 2019.33+release.1e60c63beb532fd475f0f704d68d462b8af2a977 2019-08-09T15:19:57] retrieved from: http://www.pyrosetta.org
(C) Copyright Rosetta Commons Member Institutions. Created in JHU by Sergey Lyskov and PyRosetta Team.

For this tutorial, let's again use the native protein crambin from PDB ID 1AB1 (http://www.rcsb.org/structure/1AB1) Setup the input pose and scorefunction:

In [3]:
start_pose = pyrosetta.toolbox.rcsb.pose_from_rcsb("1AB1", ATOM=True, CRYS=False)
pose = start_pose.clone()
scorefxn = pyrosetta.create_score_function("ref2015_cart.wts")
INFO:rosetta:core.chemical.GlobalResidueTypeSet: Finished initializing fa_standard residue type set.  Created 980 residue types
INFO:rosetta:core.chemical.GlobalResidueTypeSet: Total time to initialize 0.949456 seconds.
INFO:rosetta:core.import_pose.import_pose: File '1AB1.clean.pdb' automatically determined to be of type PDB
INFO:rosetta:core.io.pdb.pdb_reader: Parsing 0 .pdb records with unknown format to search for Rosetta-specific comments.
INFO:rosetta:core.io.pose_from_sfr.PoseFromSFRBuilder: [ WARNING ] discarding 3 atoms at position 1 in file 1AB1.clean.pdb. Best match rsd_type:  THR:NtermProteinFull
INFO:rosetta:core.conformation.Conformation: Found disulfide between residues 3 40
INFO:rosetta:core.conformation.Conformation: current variant for 3 CYS
INFO:rosetta:core.conformation.Conformation: current variant for 40 CYS
INFO:rosetta:core.conformation.Conformation: current variant for 3 CYD
INFO:rosetta:core.conformation.Conformation: current variant for 40 CYD
INFO:rosetta:core.conformation.Conformation: Found disulfide between residues 4 32
INFO:rosetta:core.conformation.Conformation: current variant for 4 CYS
INFO:rosetta:core.conformation.Conformation: current variant for 32 CYS
INFO:rosetta:core.conformation.Conformation: current variant for 4 CYD
INFO:rosetta:core.conformation.Conformation: current variant for 32 CYD
INFO:rosetta:core.conformation.Conformation: Found disulfide between residues 16 26
INFO:rosetta:core.conformation.Conformation: current variant for 16 CYS
INFO:rosetta:core.conformation.Conformation: current variant for 26 CYS
INFO:rosetta:core.conformation.Conformation: current variant for 16 CYD
INFO:rosetta:core.conformation.Conformation: current variant for 26 CYD
INFO:rosetta:core.scoring.etable: Starting energy table calculation
INFO:rosetta:core.scoring.etable: smooth_etable: changing atr/rep split to bottom of energy well
INFO:rosetta:core.scoring.etable: smooth_etable: spline smoothing lj etables (maxdis = 6)
INFO:rosetta:core.scoring.etable: smooth_etable: spline smoothing solvation etables (max_dis = 6)
INFO:rosetta:core.scoring.etable: Finished calculating energy tables.
INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/hbonds/ref2015_params/HBPoly1D.csv
INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/hbonds/ref2015_params/HBFadeIntervals.csv
INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/hbonds/ref2015_params/HBEval.csv
INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/hbonds/ref2015_params/DonStrength.csv
INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/hbonds/ref2015_params/AccStrength.csv
INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/rama/fd/all.ramaProb
INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/rama/fd/prepro.ramaProb
INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/omega/omega_ppdep.all.txt
INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/omega/omega_ppdep.gly.txt
INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/omega/omega_ppdep.pro.txt
INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/omega/omega_ppdep.valile.txt
INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/P_AA_pp/P_AA
INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/P_AA_pp/P_AA_n
INFO:rosetta:core.scoring.P_AA: shapovalov_lib::shap_p_aa_pp_smooth_level of 1( aka low_smooth ) got activated.
INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/P_AA_pp/shapovalov/10deg/kappa131/a20.prop
INFO:rosetta:core.scoring.CartesianBondedEnergy: Initializing IdealParametersDatabase with default Ks=300 , 80 , 20 , 10 , 40
INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/bondlength_bondangle/default-lengths.txt
INFO:rosetta:core.scoring.CartesianBondedEnergy: Read 757 bb-independent lengths.
INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/bondlength_bondangle/default-angles.txt
INFO:rosetta:core.scoring.CartesianBondedEnergy: Read 1456 bb-independent angles.
INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/bondlength_bondangle/default-torsions.txt
INFO:rosetta:core.scoring.CartesianBondedEnergy: Read 1 bb-independent torsions.
INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/bondlength_bondangle/default-improper.txt
INFO:rosetta:core.scoring.CartesianBondedEnergy: Read 2216 bb-independent improper tors.

To list the cysteine residues in crambin, now we use ResidueSelectors: Note difference in residue names "CYS:disulfide" vs. "CYS"

Note that we could also use the ResiduePropertySelector and use the DISULFIDE_BONDED property to grab these.

In [4]:
disulfide_res = pyrosetta.rosetta.core.select.residue_selector.ResidueNameSelector("CYS:disulfide")
print(pyrosetta.rosetta.core.select.get_residues_from_subset(disulfide_res.apply(pose)))
vector1_unsigned_long[3, 4, 16, 26, 32, 40]

Inspect the starting pose using the PyMolMover or dump_pdb(). By default, disulfide bonds are not drawn even if they exist in PyRosetta:

You can also use this shortcut to view a pose in py3Dmol which recognizes disulfide bonds in PyRosetta:

Run one of the following, whether you git cloned the pyrosetta_scripts repository or downloaded visualization.py from the Google Drive

%run ~/pyrosetta_scripts/pilot/apps/klimaj/py3Dmol/visualization.py %run ./visualization.py

Design strategy

Design away the cysteine residues (i.e. disulfide bonds) using ResidueSelectors and TaskOperations, allowing all side-chains to re-pack and all backbone and side-chain torsions to minimize using the FastDesign mover.

Note: because we did not include the -detect_disulfide 0 command line flag in pyrosetta.init(), in order to mutate disulfide bonded cysteine residues using packing steps in the FastDesign mover, first we need to break the disulfide bonds:

In [5]:
for i in pyrosetta.rosetta.core.select.get_residues_from_subset(disulfide_res.apply(pose)):
    for j in pyrosetta.rosetta.core.select.get_residues_from_subset(disulfide_res.apply(pose)):
        if pyrosetta.rosetta.core.conformation.is_disulfide_bond(pose.conformation(), i, j):
            pyrosetta.rosetta.core.conformation.break_disulfide(pose.conformation(), i, j)

Now we can declare a ResidueSelector for cysteine residues:

In [6]:
cys_res = pyrosetta.rosetta.core.select.residue_selector.ResidueNameSelector("CYS")
print(pyrosetta.rosetta.core.select.get_residues_from_subset(cys_res.apply(pose)))
vector1_unsigned_long[3, 4, 16, 26, 32, 40]

Note: the pose consists of only chain "A"

In [7]:
print(pose.pdb_info())
PDB file name: 1AB1.clean.pdb
 Pose Range  Chain    PDB Range  |   #Residues         #Atoms

0001 -- 0046    A 0001  -- 0046  |   0046 residues;    00649 atoms
                           TOTAL |   0046 residues;    00649 atoms

Although the pose contains only chain A, if the pose contained other chains we could make the selection to only select chain A and cysteine residues using an AndResidueSelector. We will use this ResidueSelector with RestrictAbsentCanonicalAASRLT (restrict absent canonical amino acids residue level task operation).

In [8]:
chain_A = pyrosetta.rosetta.core.select.residue_selector.ChainSelector("A")
print(pyrosetta.rosetta.core.select.get_residues_from_subset(chain_A.apply(pose)))
chain_A_cys_res = pyrosetta.rosetta.core.select.residue_selector.AndResidueSelector(selector1=cys_res, selector2=chain_A)
print(pyrosetta.rosetta.core.select.get_residues_from_subset(chain_A_cys_res.apply(pose)))
vector1_unsigned_long[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46]
vector1_unsigned_long[3, 4, 16, 26, 32, 40]

Specify a NotResidueSelector selecting everything except the chain_A_cys_res ResidueSelector to use with a RestrictToRepackingRLT (restrict to repacking residue level task operation):

In [9]:
not_chain_A_cys_res = pyrosetta.rosetta.core.select.residue_selector.NotResidueSelector(chain_A_cys_res)
print(pyrosetta.rosetta.core.select.get_residues_from_subset(not_chain_A_cys_res.apply(pose)))
vector1_unsigned_long[1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46]

Quickly view the not_chain_A_cys_res ResidueSelector:

Now we can set up the TaskOperations for FastDesign:

In [10]:
# The task factory accepts all the task operations
tf = pyrosetta.rosetta.core.pack.task.TaskFactory()

# These are pretty standard
tf.push_back(pyrosetta.rosetta.core.pack.task.operation.InitializeFromCommandline())
tf.push_back(pyrosetta.rosetta.core.pack.task.operation.IncludeCurrent())
tf.push_back(pyrosetta.rosetta.core.pack.task.operation.NoRepackDisulfides())


# Disable design (i.e. repack only) on not_chain_A_cys_res
tf.push_back(pyrosetta.rosetta.core.pack.task.operation.OperateOnResidueSubset(
    pyrosetta.rosetta.core.pack.task.operation.RestrictToRepackingRLT(), not_chain_A_cys_res))

# Enable design on chain_A_cys_res
aa_to_design = pyrosetta.rosetta.core.pack.task.operation.RestrictAbsentCanonicalAASRLT()
aa_to_design.aas_to_keep("ADEFGHIKLMNPQRSTVWY")
tf.push_back(pyrosetta.rosetta.core.pack.task.operation.OperateOnResidueSubset(
    aa_to_design, chain_A_cys_res))

# Convert the task factory into a PackerTask
packer_task = tf.create_task_and_apply_taskoperations(pose)
# View the PackerTask
print(packer_task)
INFO:rosetta:core.pack.task: Packer task: initialize from command line()
#Packer_Task

resid	pack?	design?	allowed_aas
1	TRUE	FALSE	THR:NtermProteinFull
2	TRUE	FALSE	THR
3	TRUE	TRUE	ALA,ASP,GLU,PHE,GLY,HIS,HIS_D,ILE,LYS,LEU,MET,ASN,PRO,GLN,ARG,SER,THR,VAL,TRP,TYR
4	TRUE	TRUE	ALA,ASP,GLU,PHE,GLY,HIS,HIS_D,ILE,LYS,LEU,MET,ASN,PRO,GLN,ARG,SER,THR,VAL,TRP,TYR
5	TRUE	FALSE	PRO
6	TRUE	FALSE	SER
7	TRUE	FALSE	ILE
8	TRUE	FALSE	VAL
9	TRUE	FALSE	ALA
10	TRUE	FALSE	ARG
11	TRUE	FALSE	SER
12	TRUE	FALSE	ASN
13	TRUE	FALSE	PHE
14	TRUE	FALSE	ASN
15	TRUE	FALSE	VAL
16	TRUE	TRUE	ALA,ASP,GLU,PHE,GLY,HIS,HIS_D,ILE,LYS,LEU,MET,ASN,PRO,GLN,ARG,SER,THR,VAL,TRP,TYR
17	TRUE	FALSE	ARG
18	TRUE	FALSE	LEU
19	TRUE	FALSE	PRO
20	TRUE	FALSE	GLY
21	TRUE	FALSE	THR
22	TRUE	FALSE	SER
23	TRUE	FALSE	GLU
24	TRUE	FALSE	ALA
25	TRUE	FALSE	ILE
26	TRUE	TRUE	ALA,ASP,GLU,PHE,GLY,HIS,HIS_D,ILE,LYS,LEU,MET,ASN,PRO,GLN,ARG,SER,THR,VAL,TRP,TYR
27	TRUE	FALSE	ALA
28	TRUE	FALSE	THR
29	TRUE	FALSE	TYR
30	TRUE	FALSE	THR
31	TRUE	FALSE	GLY
32	TRUE	TRUE	ALA,ASP,GLU,PHE,GLY,HIS,HIS_D,ILE,LYS,LEU,MET,ASN,PRO,GLN,ARG,SER,THR,VAL,TRP,TYR
33	TRUE	FALSE	ILE
34	TRUE	FALSE	ILE
35	TRUE	FALSE	ILE
36	TRUE	FALSE	PRO
37	TRUE	FALSE	GLY
38	TRUE	FALSE	ALA
39	TRUE	FALSE	THR
40	TRUE	TRUE	ALA,ASP,GLU,PHE,GLY,HIS,HIS_D,ILE,LYS,LEU,MET,ASN,PRO,GLN,ARG,SER,THR,VAL,TRP,TYR
41	TRUE	FALSE	PRO
42	TRUE	FALSE	GLY
43	TRUE	FALSE	ASP
44	TRUE	FALSE	TYR
45	TRUE	FALSE	ALA
46	TRUE	FALSE	ASN:CtermProteinFull

This time we will set up a MoveMap to establish which torsions are free to minimize

In [11]:
mm = pyrosetta.rosetta.core.kinematics.MoveMap()
mm.set_bb(True)
mm.set_chi(True)
mm.set_jump(True)

Set up FastDesign

In [16]:
rel_design = pyrosetta.rosetta.protocols.relax.FastRelax(scorefxn_in=scorefxn, standard_repeats=1, script_file="MonomerDesign2019")
rel_design.cartesian(True)
rel_design.set_task_factory(tf)
rel_design.set_movemap(mm)
rel_design.minimize_bond_angles(True)
rel_design.minimize_bond_lengths(True)
INFO:rosetta:protocols.relax.RelaxScriptManager: score12 : 11.2084
INFO:rosetta:protocols.relax.RelaxScriptManager: talaris2013 : 4.35493
INFO:rosetta:protocols.relax.RelaxScriptManager: talaris2014 : 4.28436
INFO:rosetta:protocols.relax.RelaxScriptManager: ref2015 : 1.8125
INFO:rosetta:protocols.relax.RelaxScriptManager: beta_nov16 : 9.87535
INFO:rosetta:protocols.relax.RelaxScriptManager: Looking for MonomerDesign2019.ref2015.txt
INFO:rosetta:protocols.relax.RelaxScriptManager: ================== Reading script file: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pyrosetta-2019.33+release.1e60c63beb5-py3.6-macosx-10.6-intel.egg/pyrosetta/database/sampling/relax_scripts/MonomerDesign2019.ref2015.txt ==================
INFO:rosetta:protocols.relax.RelaxScriptManager: repeat %%nrepeats%%
INFO:rosetta:protocols.relax.RelaxScriptManager: reference -0.511909 2.0282 -3.29233 -3.74112 2.5917 -1.12843 -1.33724 3.25715 -1.56117 2.65488 2.88076 -2.80685 -1.5498 -2.69754 -1.62133 -1.86628 -0.0648395 2.6561 4.7344 1.37564
INFO:rosetta:protocols.relax.RelaxScriptManager: coord_cst_weight 1.0
INFO:rosetta:protocols.relax.RelaxScriptManager: scale:fa_rep 0.059
INFO:rosetta:protocols.relax.RelaxScriptManager: repack
INFO:rosetta:protocols.relax.RelaxScriptManager: scale:fa_rep 0.092
INFO:rosetta:protocols.relax.RelaxScriptManager: min 0.01
INFO:rosetta:protocols.relax.RelaxScriptManager: reference 0.335091 2.4652 -2.85533 -3.29412 1.6487 -1.27143 -1.07024 2.80415 -1.20417 2.08188 2.06776 -2.26985 -1.5128 -2.21054 -1.15433 -1.25928 0.392161 2.6131 2.9414 0.752641
INFO:rosetta:protocols.relax.RelaxScriptManager: coord_cst_weight 0.5
INFO:rosetta:protocols.relax.RelaxScriptManager: scale:fa_rep 0.280
INFO:rosetta:protocols.relax.RelaxScriptManager: repack
INFO:rosetta:protocols.relax.RelaxScriptManager: scale:fa_rep 0.323
INFO:rosetta:protocols.relax.RelaxScriptManager: min 0.01
INFO:rosetta:protocols.relax.RelaxScriptManager: reference 0.742591 2.7127 -2.62783 -3.12662 1.1962 -0.823929 -0.992739 2.55165 -1.09667 1.83938 1.72526 -2.04235 -1.6253 -2.10304 -1.06683 -0.951779 0.589661 2.6206 2.0389 0.440141
INFO:rosetta:protocols.relax.RelaxScriptManager: coord_cst_weight 0.0
INFO:rosetta:protocols.relax.RelaxScriptManager: scale:fa_rep 0.568
INFO:rosetta:protocols.relax.RelaxScriptManager: repack
INFO:rosetta:protocols.relax.RelaxScriptManager: scale:fa_rep 0.633
INFO:rosetta:protocols.relax.RelaxScriptManager: min 0.01
INFO:rosetta:protocols.relax.RelaxScriptManager: reference 1.32468 3.25479 -2.14574 -2.72453 1.21829 0.79816 -0.30065 2.30374 -0.71458 1.66147 1.65735 -1.34026 -1.64321 -1.45095 -0.09474 -0.28969 1.15175 2.64269 2.26099 0.58223
INFO:rosetta:protocols.relax.RelaxScriptManager: coord_cst_weight 0.0
INFO:rosetta:protocols.relax.RelaxScriptManager: scale:fa_rep 1
INFO:rosetta:protocols.relax.RelaxScriptManager: repack
INFO:rosetta:protocols.relax.RelaxScriptManager: min 0.00001
INFO:rosetta:protocols.relax.RelaxScriptManager: accept_to_best
INFO:rosetta:protocols.relax.RelaxScriptManager: endrepeat

Run the FastDesign mover. Note: this takes ~39.6 s

In [17]:
### BEGIN SOLUTION
%time rel_design.apply(pose)
### END SOLUTION
INFO:rosetta:core.scoring.CartesianBondedEnergy: Creating new peptide-bonded energy container (46)
INFO:rosetta:basic.io.database: Database file opened: scoring/score_functions/elec_cp_reps.dat
INFO:rosetta:core.scoring.elec.util: Read 40 countpair representative atoms
INFO:rosetta:core.pack.dunbrack.RotamerLibrary: shapovalov_lib_fixes_enable option is true.
INFO:rosetta:core.pack.dunbrack.RotamerLibrary: shapovalov_lib::shap_dun10_smooth_level of 1( aka lowest_smooth ) got activated.
INFO:rosetta:core.pack.dunbrack.RotamerLibrary: Binary rotamer library selected: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pyrosetta-2019.33+release.1e60c63beb5-py3.6-macosx-10.6-intel.egg/pyrosetta/database/rotamer/shapovalov/StpDwn_0-0-0/Dunbrack10.lib.bin
INFO:rosetta:core.pack.dunbrack.RotamerLibrary: Using Dunbrack library binary file '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pyrosetta-2019.33+release.1e60c63beb5-py3.6-macosx-10.6-intel.egg/pyrosetta/database/rotamer/shapovalov/StpDwn_0-0-0/Dunbrack10.lib.bin'.
INFO:rosetta:core.pack.dunbrack.RotamerLibrary: Dunbrack 2010 library took 0.25445 seconds to load from binary
INFO:rosetta:protocols::checkpoint: Deleting checkpoints of FastRelax
CPU times: user 150 ms, sys: 132 ms, total: 282 ms
Wall time: 307 ms

Inspect the resulting design!

Design Challenge:

Copy and modify this script to:

  • Repack all residues and allow all degrees of freedom to minimize (i.e. FastRelax) start_pose prior to downstream design. Use the resulting start_pose for analysis.
  • Re-design the cysteine residues in start_pose to allow only hydrophobic residues excluding glycine and proline
  • Only re-pack residues within a 6 Angstroms radius around the neighborhood of each cysteine residue (Cα-Cα distance)
    • Note this will require using:
    • The NeighborhoodResidueSelector: pyrosetta.rosetta.core.select.residue_selector.NeighborhoodResidueSelector(selector, distance, include_focus_in_subset)
    • The prevent repacking residue level task operation: pyrosetta.rosetta.core.pack.task.operation.PreventRepackingRLT()
  • Minimize only the side-chains (chi degrees of freedom) being re-packed or designed
  • Allow the backbone torsions to minimize, except for the first, last and any proline phi/psi angles

Extra Challenge!

Instead of using pyrosetta.rosetta.core.pack.task.operation.OperateOnResidueSubset TaskOperations, use pyrosetta.rosetta.protocols.task_operations.ResfileCommandOperation TaskOperations by applying resfile-style commands to ResidueSelectors. Example:

repack_only_task_operation = pyrosetta.rosetta.protocols.task_operations.ResfileCommandOperation()
repack_only_task_operation.set_command("POLAR EMPTY NC R2 NC T6 NC OP5")
repack_only_task_operation.set_residue_selector(selector)
tf.push_back(repack_only_task_operation)

By how many Angstroms RMSD did the backbone Cα atoms move?

In [ ]:
 

What is the delta total_score from start_pose to pose?

In [ ]:
 

What is the per-residue energy difference for each mutated position between start_pose and pose?

In [ ]: