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

Side Chain Conformations and Dunbrack Energies

Keywords: phi(), psi(), energies(), residue_total_energies()

References

  1. Original Rotamer paper
  2. New rotamer paper

Recommended Resources

  1. Rotamer Library Homepage: http://dunbrack.fccc.edu/bbdep2010/
  2. Rotamer Library Interactive Overview: http://dunbrack.fccc.edu/bbdep2010/ImagesMovies.php
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!")

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

Begin by moving to the directory with your pdb files and loading cetuximab from 1YY8.clean.pdb used in previous workshops.

cd google_drive/My\ Drive/student-notebooks/
pose = pose_from_pdb("1YY8.clean.pdb")
start_pose = Pose()
start_pose.assign(pose)
In [1]:
pose = pose_from_pdb("inputs/1YY8.clean.pdb")
start_pose = Pose()
start_pose.assign(pose)
core.init: Checking for fconfig files in pwd and ./rosetta/flags
core.init: Rosetta version: PyRosetta4.Release.python36.mac r208 2019.04+release.fd666910a5e fd666910a5edac957383b32b3b4c9d10020f34c1 http://www.pyrosetta.org 2019-01-22T15:55:37
core.init: command: PyRosetta -ex1 -ex2aro -database /Users/kathyle/Computational Protein Prediction and Design/PyRosetta4.Release.python36.mac.release-208/pyrosetta/database
core.init: 'RNG device' seed mode, using '/dev/urandom', seed=-202618888 seed_offset=0 real_seed=-202618888
core.init.random: RandomGenerator:init: Normal mode, seed=-202618888 RG_type=mt19937
core.chemical.GlobalResidueTypeSet: Finished initializing fa_standard residue type set.  Created 696 residue types
/Users/kathyle/Computational Protein Prediction and Design/PyRosetta4.Release.python36.mac.release-208/pyrosetta/teaching.py:13: UserWarning: Import of 'rosetta' as a top-level module is deprecated and may be removed in 2018, import via 'pyrosetta.rosetta'.
  from rosetta.core.scoring import *
core.chemical.GlobalResidueTypeSet: Total time to initialize 1.13131 seconds.
core.import_pose.import_pose: File '1YY8.clean.pdb' automatically determined to be of type PDB
core.conformation.Conformation: [ WARNING ] missing heavyatom:  CG  on residue ARG 18
core.conformation.Conformation: [ WARNING ] missing heavyatom:  CD  on residue ARG 18
core.conformation.Conformation: [ WARNING ] missing heavyatom:  NE  on residue ARG 18
core.conformation.Conformation: [ WARNING ] missing heavyatom:  CZ  on residue ARG 18
core.conformation.Conformation: [ WARNING ] missing heavyatom:  NH1 on residue ARG 18
core.conformation.Conformation: [ WARNING ] missing heavyatom:  NH2 on residue ARG 18
core.conformation.Conformation: [ WARNING ] missing heavyatom:  CG  on residue GLN:NtermProteinFull 214
core.conformation.Conformation: [ WARNING ] missing heavyatom:  CD  on residue GLN:NtermProteinFull 214
core.conformation.Conformation: [ WARNING ] missing heavyatom:  OE1 on residue GLN:NtermProteinFull 214
core.conformation.Conformation: [ WARNING ] missing heavyatom:  NE2 on residue GLN:NtermProteinFull 214
core.conformation.Conformation: Found disulfide between residues 23 88
core.conformation.Conformation: current variant for 23 CYS
core.conformation.Conformation: current variant for 88 CYS
core.conformation.Conformation: current variant for 23 CYD
core.conformation.Conformation: current variant for 88 CYD
core.conformation.Conformation: Found disulfide between residues 134 194
core.conformation.Conformation: current variant for 134 CYS
core.conformation.Conformation: current variant for 194 CYS
core.conformation.Conformation: current variant for 134 CYD
core.conformation.Conformation: current variant for 194 CYD
core.conformation.Conformation: Found disulfide between residues 235 308
core.conformation.Conformation: current variant for 235 CYS
core.conformation.Conformation: current variant for 308 CYS
core.conformation.Conformation: current variant for 235 CYD
core.conformation.Conformation: current variant for 308 CYD
core.conformation.Conformation: Found disulfide between residues 359 415
core.conformation.Conformation: current variant for 359 CYS
core.conformation.Conformation: current variant for 415 CYS
core.conformation.Conformation: current variant for 359 CYD
core.conformation.Conformation: current variant for 415 CYD
core.pack.pack_missing_sidechains: packing residue number 18 because of missing atom number 6 atom name  CG
core.pack.pack_missing_sidechains: packing residue number 214 because of missing atom number 6 atom name  CG
core.pack.task: Packer task: initialize from command line()
core.scoring.ScoreFunctionFactory: SCOREFUNCTION: ref2015
core.scoring.etable: Starting energy table calculation
core.scoring.etable: smooth_etable: changing atr/rep split to bottom of energy well
core.scoring.etable: smooth_etable: spline smoothing lj etables (maxdis = 6)
core.scoring.etable: smooth_etable: spline smoothing solvation etables (max_dis = 6)
core.scoring.etable: Finished calculating energy tables.
basic.io.database: Database file opened: scoring/score_functions/hbonds/ref2015_params/HBPoly1D.csv
basic.io.database: Database file opened: scoring/score_functions/hbonds/ref2015_params/HBFadeIntervals.csv
basic.io.database: Database file opened: scoring/score_functions/hbonds/ref2015_params/HBEval.csv
basic.io.database: Database file opened: scoring/score_functions/hbonds/ref2015_params/DonStrength.csv
basic.io.database: Database file opened: scoring/score_functions/hbonds/ref2015_params/AccStrength.csv
basic.io.database: Database file opened: scoring/score_functions/rama/fd/all.ramaProb
basic.io.database: Database file opened: scoring/score_functions/rama/fd/prepro.ramaProb
basic.io.database: Database file opened: scoring/score_functions/omega/omega_ppdep.all.txt
basic.io.database: Database file opened: scoring/score_functions/omega/omega_ppdep.gly.txt
basic.io.database: Database file opened: scoring/score_functions/omega/omega_ppdep.pro.txt
basic.io.database: Database file opened: scoring/score_functions/omega/omega_ppdep.valile.txt
basic.io.database: Database file opened: scoring/score_functions/P_AA_pp/P_AA
basic.io.database: Database file opened: scoring/score_functions/P_AA_pp/P_AA_n
core.scoring.P_AA: shapovalov_lib::shap_p_aa_pp_smooth_level of 1( aka low_smooth ) got activated.
basic.io.database: Database file opened: scoring/score_functions/P_AA_pp/shapovalov/10deg/kappa131/a20.prop
basic.io.database: Database file opened: scoring/score_functions/elec_cp_reps.dat
core.scoring.elec.util: Read 40 countpair representative atoms
core.pack.dunbrack.RotamerLibrary: shapovalov_lib_fixes_enable option is true.
core.pack.dunbrack.RotamerLibrary: shapovalov_lib::shap_dun10_smooth_level of 1( aka lowest_smooth ) got activated.
core.pack.dunbrack.RotamerLibrary: Binary rotamer library selected: /Users/kathyle/Computational Protein Prediction and Design/PyRosetta4.Release.python36.mac.release-208/pyrosetta/database/rotamer/shapovalov/StpDwn_0-0-0/Dunbrack10.lib.bin
core.pack.dunbrack.RotamerLibrary: Using Dunbrack library binary file '/Users/kathyle/Computational Protein Prediction and Design/PyRosetta4.Release.python36.mac.release-208/pyrosetta/database/rotamer/shapovalov/StpDwn_0-0-0/Dunbrack10.lib.bin'.
core.pack.dunbrack.RotamerLibrary: Dunbrack 2010 library took 0.386455 seconds to load from binary
core.pack.pack_rotamers: built 43 rotamers at 2 positions.
core.pack.interaction_graph.interaction_graph_factory: Instantiating DensePDInteractionGraph
Out[1]:
<pyrosetta.rosetta.core.pose.Pose at 0x1066dc0a0>

Question: What are the φ, ψ, and χ angles of residue K49?

In [2]:
print(pose.residue(49).name())
print("Phi: %.5f\nPsi: %.5f\n" %(pose.phi(49), pose.psi(49)))
print("Chi 1: %.5f\nChi 2: %.5f\nChi 3: %.5f\nChi 4: %.5f" %(pose.chi(1, 49), pose.chi(2, 49), pose.chi(3, 49), pose.chi(4, 49)))
LYS
Phi: -122.41752
Psi: 153.08267

Chi 1: 68.12458
Chi 2: -169.18576
Chi 3: -175.37028
Chi 4: -169.58806
In [ ]:
 

Score your pose with the standard full-atom score function. What is the energy of K49? Note the Dunbrack energy component (fa_dun), which represents the side-chain conformational probability given phi/psi (Ie backbone-dependant).

Any energy can be converted to a probability. Use this energy (E) to calculate the approximate probability of the rotamer (p): p=e^(-E)

scorefxn = get_fa_scorefxn()
scorefxn(pose)
energies = pose.energies()
print(energies.residue_total_energies(49))
print(energies.residue_total_energies(49)[pyrosetta.rosetta.core.scoring.fa_dun])
In [4]:
### BEGIN SOLUTION
scorefxn = get_fa_scorefxn()
scorefxn(pose)
energies = pose.energies()
print(energies.residue_total_energies(49))
print(energies.residue_total_energies(49)[pyrosetta.rosetta.core.scoring.fa_dun])
### END SOLUTION
core.scoring.ScoreFunctionFactory: SCOREFUNCTION: ref2015
( fa_atr; -8.83354) ( fa_rep; 2.78019) ( fa_sol; 5.92847) ( fa_intra_atr; -1.68168) ( fa_intra_rep; 2.47533) ( fa_intra_sol; 1.20218) ( fa_intra_atr_xover4; -0.52776) ( fa_intra_rep_xover4; 0.191981) ( fa_intra_sol_xover4; 0.292855) ( fa_intra_atr_nonprotein; 0) ( fa_intra_rep_nonprotein; 0) ( fa_intra_sol_nonprotein; 0) ( fa_intra_RNA_base_phos_atr; 0) ( fa_intra_RNA_base_phos_rep; 0) ( fa_intra_RNA_base_phos_sol; 0) ( fa_atr_dummy; 0) ( fa_rep_dummy; 0) ( fa_sol_dummy; 0) ( fa_vdw_tinker; 0) ( lk_hack; 0) ( lk_ball; 0) ( lk_ball_wtd; 0.321463) ( lk_ball_iso; 0) ( lk_ball_bridge; 0) ( lk_ball_bridge_uncpl; 0) ( coarse_fa_atr; 0) ( coarse_fa_rep; 0) ( coarse_fa_sol; 0) ( coarse_beadlj; 0) ( mm_lj_intra_rep; 0) ( mm_lj_intra_atr; 0) ( mm_lj_inter_rep; 0) ( mm_lj_inter_atr; 0) ( mm_twist; 0) ( mm_bend; 0) ( mm_stretch; 0) ( lk_costheta; 0) ( lk_polar; 0) ( lk_nonpolar; 0) ( lk_polar_intra_RNA; 0) ( lk_nonpolar_intra_RNA; 0) ( fa_elec; -2.75782) ( fa_elec_bb_bb; 0) ( fa_elec_bb_sc; 0) ( fa_elec_sc_sc; 0) ( fa_intra_elec; 0) ( h2o_hbond; 0) ( dna_dr; 0) ( dna_bp; 0) ( dna_bs; 0) ( dna_ref; 0) ( peptide_bond; 0) ( pcs; 0) ( pcsTs1; 0) ( pcsTs2; 0) ( pcsTs3; 0) ( pcsTs4; 0) ( pcs2; 0) ( fastsaxs; 0) ( saxs_score; 0) ( saxs_cen_score; 0) ( saxs_fa_score; 0) ( pddf_score; 0) ( fiberdiffraction; 0) ( fiberdiffractiondens; 0) ( fa_mbenv; 0) ( fa_mbsolv; 0) ( fa_elec_rna_phos_phos; 0) ( fa_elec_rna_phos_sugr; 0) ( fa_elec_rna_phos_base; 0) ( fa_elec_rna_sugr_sugr; 0) ( fa_elec_rna_sugr_base; 0) ( fa_elec_rna_base_base; 0) ( fa_elec_rna_phos_phos_fast; 0) ( fa_elec_rna_phos_sugr_fast; 0) ( fa_elec_rna_phos_base_fast; 0) ( fa_elec_rna_sugr_sugr_fast; 0) ( fa_elec_rna_sugr_base_fast; 0) ( fa_elec_rna_base_base_fast; 0) ( fa_elec_aro_aro; 0) ( fa_elec_aro_all; 0) ( hack_aro; 0) ( rna_fa_atr_base; 0) ( rna_fa_rep_base; 0) ( rna_data_backbone; 0) ( ch_bond; 0) ( ch_bond_bb_bb; 0) ( ch_bond_sc_sc; 0) ( ch_bond_bb_sc; 0) ( pro_close; 0) ( rama2b; 0) ( vdw; 0) ( cenpack; 0) ( cenpack_smooth; 0) ( cen_hb; 0) ( hybrid_vdw; 0) ( gauss; 0) ( rna_vdw; 0) ( rnp_vdw; 0) ( rna_base_backbone; 0) ( rna_backbone_backbone; 0) ( rna_repulsive; 0) ( rna_base_pair_pairwise; 0) ( rna_base_axis_pairwise; 0) ( rna_base_stagger_pairwise; 0) ( rna_base_stack_pairwise; 0) ( rna_base_stack_axis_pairwise; 0) ( rna_data_base; 0) ( rna_base_pair; 0) ( rna_base_axis; 0) ( rna_base_stagger; 0) ( rna_base_stack; 0) ( rna_base_stack_axis; 0) ( rnp_base_pair; 0) ( rnp_stack; 0) ( rnp_stack_xy; 0) ( rnp_pair; 0) ( rnp_pair_dist; 0) ( rnp_aa_to_rna_backbone; 0) ( rna_mg_point; 0) ( rna_mg_point_indirect; 0) ( mg; 0) ( mg_lig; 0) ( mg_sol; 0) ( mg_ref; 0) ( hoh_ref; 0) ( rna_torsion; 0) ( rna_torsion_sc; 0) ( rna_suite; 0) ( rna_jr_suite; 0) ( suiteness_bonus; 0) ( tna_suite; 0) ( rna_sugar_close; 0) ( fa_stack; 0) ( fa_stack_lower; 0) ( fa_stack_upper; 0) ( fa_stack_aro; 0) ( fa_stack_ext; 0) ( fa_stack_sol; 0) ( fa_stack_lr; 0) ( fa_stack_rna_protein; 0) ( fa_stack_rna_protein_aro; 0) ( ss_contact_worst; 0) ( stack_elec; 0) ( stack_elec_base_base; 0) ( stack_elec_base_bb; 0) ( alignment; 0) ( dna_bb_torsion; 0) ( dna_sugar_close; 0) ( dna_base_distance; 0) ( geom_sol_fast; 0) ( geom_sol_fast_intra_RNA; 0) ( fa_cust_pair_dist; 0) ( custom_atom_pair; 0) ( orbitals_hpol_bb; 0) ( pci_cation_pi; 0) ( pci_pi_pi; 0) ( pci_salt_bridge; 0) ( pci_hbond; 0) ( PyRosettaTwoBodyContextIndepenedentEnergy_first; 0) ( PyRosettaTwoBodyContextIndepenedentEnergy_161; 0) ( PyRosettaTwoBodyContextIndepenedentEnergy_162; 0) ( PyRosettaTwoBodyContextIndepenedentEnergy_163; 0) ( PyRosettaTwoBodyContextIndepenedentEnergy_164; 0) ( PyRosettaTwoBodyContextIndepenedentEnergy_165; 0) ( PyRosettaTwoBodyContextIndepenedentEnergy_166; 0) ( PyRosettaTwoBodyContextIndepenedentEnergy_167; 0) ( PyRosettaTwoBodyContextIndepenedentEnergy_168; 0) ( PyRosettaTwoBodyContextIndepenedentEnergy_169; 0) ( PyRosettaTwoBodyContextIndepenedentEnergy_last; 0) ( python; 0) ( fa_pair; 0) ( fa_pair_aro_aro; 0) ( fa_pair_aro_pol; 0) ( fa_pair_pol_pol; 0) ( hbond_sr_bb; 0) ( hbond_lr_bb; 0) ( hbond_bb_sc; 0) ( hbond_sr_bb_sc; 0) ( hbond_lr_bb_sc; 0) ( hbond_sc; 0) ( hbond_intra; 0) ( hbond_wat; 0) ( wat_entropy; 0) ( hbond; 0) ( npd_hbond_sr_bb; 0) ( npd_hbond_lr_bb; 0) ( npd_hbond_bb_sc; 0) ( npd_hbond_sr_bb_sc; 0) ( npd_hbond_lr_bb_sc; 0) ( npd_hbond_sc; 0) ( npd_hbond_intra; 0) ( npd_hbond; 0) ( fa_grpelec; 0) ( PyRosettaTwoBodyContextDependentEnergy_first; 0) ( PyRosettaTwoBodyContextDependentEnergy_196; 0) ( PyRosettaTwoBodyContextDependentEnergy_197; 0) ( PyRosettaTwoBodyContextDependentEnergy_198; 0) ( PyRosettaTwoBodyContextDependentEnergy_199; 0) ( PyRosettaTwoBodyContextDependentEnergy_200; 0) ( PyRosettaTwoBodyContextDependentEnergy_201; 0) ( PyRosettaTwoBodyContextDependentEnergy_202; 0) ( PyRosettaTwoBodyContextDependentEnergy_203; 0) ( PyRosettaTwoBodyContextDependentEnergy_204; 0) ( PyRosettaTwoBodyContextDependentEnergy_last; 0) ( interface_dd_pair; 0) ( geom_sol; 0) ( geom_sol_intra_RNA; 0) ( occ_sol_fitted; 0) ( occ_sol_fitted_onebody; 0) ( occ_sol_exact; 0) ( cen_rot_pair; 0) ( cen_rot_pair_ang; 0) ( cen_rot_pair_dih; 0) ( pair; 0) ( cen_pair_smooth; 0) ( Mpair; 0) ( mp_pair; 0) ( fa_mpsolv; 0) ( suck; 0) ( rna_rg; 0) ( rna_motif; 0) ( facts_elec; 0) ( facts_solv; 0) ( facts_sasa; 0) ( motif_dock; 0) ( pointwater; 0) ( goap; 0) ( goap_dist; 0) ( goap_angle; 0) ( approximate_buried_unsat_penalty; 0) ( interchain_pair; 0) ( interchain_vdw; 0) ( gb_elec; 0) ( multipole_elec; 0) ( fa_sasa; 0) ( dslf_ss_dst; 0) ( dslf_cs_ang; 0) ( dslf_ss_dih; 0) ( dslf_ca_dih; 0) ( dslf_cbs_ds; 0) ( dslf_fa13; 0) ( dslfc_cen_dst; 0) ( dslfc_cb_dst; 0) ( dslfc_ang; 0) ( dslfc_cb_dih; 0) ( dslfc_bb_dih; 0) ( dslfc_rot; 0) ( dslfc_trans; 0) ( dslfc_RT; 0) ( atom_pair_constraint; 0) ( base_pair_constraint; 0) ( coarse_chainbreak_constraint; 0) ( constant_constraint; 0) ( coordinate_constraint; 0) ( angle_constraint; 0) ( dihedral_constraint; 0) ( big_bin_constraint; 0) ( dunbrack_constraint; 0) ( site_constraint; 0) ( metalhash_constraint; 0) ( metalbinding_constraint; 0) ( rna_stub_coord_hack; 0) ( bond_geometry; 0) ( rna_bond_geometry; 0) ( Hpol_bond_geometry; 0) ( rama; 0) ( omega; 0.0116849) ( fa_dun; 3.97212) ( fa_dun_dev; 1.07017) ( fa_dun_rot; 2.90195) ( fa_dun_semi; 0) ( cen_rot_dun; 0) ( dna_chi; 0) ( p_aa_pp; 0.0112208) ( p_aa_ss; 0) ( yhh_planarity; 0) ( hxl_tors; 0) ( h2o_intra; 0) ( ref; -0.71458) ( ref_nc; 0) ( seqdep_ref; 0) ( nmer_ref; 0) ( nmer_pssm; 0) ( nmer_svm; 0) ( envsmooth; 0) ( e_pH; 0) ( rna_bulge; 0) ( dna_dihedral_bb; 0) ( dna_dihedral_chi; 0) ( dna_dihedral_sugar; 0) ( sugar_bb; 0) ( free_suite; 0) ( free_2HOprime; 0) ( free_side_chain; 0) ( free_base; 0) ( free_res; 0) ( free_dof; 0) ( intermol; 0) ( other_pose; 0) ( special_rot; 0) ( PB_elec; 0) ( cen_env_smooth; 0) ( cbeta_smooth; 0) ( cen_rot_env; 0) ( cen_rot_cbeta; 0) ( env; 0) ( cbeta; 0) ( DFIRE; 0) ( Menv; 0) ( Mcbeta; 0) ( Menv_non_helix; 0) ( Menv_termini; 0) ( Menv_tm_proj; 0) ( Mlipo; 0) ( rg; 0) ( rg_local; 0) ( co; 0) ( hs_pair; 0) ( ss_pair; 0) ( rsigma; 0) ( sheet; 0) ( burial_v2; 0) ( burial; 0) ( abego; 0) ( hrf_ms_labeling; 0) ( rnp_env; 0) ( loop_close; 0) ( missing_res; 0) ( mp_env; 0) ( mp_cbeta; 0) ( mp_lipo; 0) ( mp_termini; 0) ( mp_nonhelix; 0) ( mp_tmproj; 0) ( fa_mpenv; 0) ( fa_mpenv_smooth; 0) ( mp_res_lipo; 0) ( span_ins; 0) ( mp_span_ang; 0) ( mp_helicality; 0) ( natbias_ss; 0) ( natbias_hs; 0) ( natbias_hh; 0) ( natbias_stwist; 0) ( aa_cmp; 0) ( dock_ens_conf; 0) ( csa; 0) ( dc; 0) ( rdc; 0) ( rdc_segments; 0) ( rdc_rohl; 0) ( nmr_pcs; 0) ( nmr_rdc; 0) ( nmr_pre; 0) ( cen_pair_motifs; 0) ( cen_pair_motif_degree; 0) ( holes; 0) ( holes_decoy; 0) ( holes_resl; 0) ( holes_min; 0) ( holes_min_mean; 0) ( rna_chem_shift; 0) ( rna_chem_map; 0) ( rna_chem_map_lores; 0) ( rna_partition; 0) ( dab_sasa; 0) ( dab_sev; 0) ( sa; 0) ( d2h_sa; 0) ( ProQM; 0) ( ProQ; 0) ( interchain_env; 0) ( interchain_contact; 0) ( chainbreak; 0) ( linear_chainbreak; 0) ( overlap_chainbreak; 0) ( distance_chainbreak; 0) ( dof_constraint; 0) ( branch_conn; 0) ( linear_branch_conn; 0) ( rama_prepro; -0.0498918) ( paa_abego3; 0) ( cart_bonded; 0) ( cart_bonded_angle; 0) ( cart_bonded_length; 0) ( cart_bonded_ring; 0) ( cart_bonded_torsion; 0) ( cart_bonded_proper; 0) ( cart_bonded_improper; 0) ( gen_bonded; 0) ( gen_bonded_bond; 0) ( gen_bonded_angle; 0) ( gen_bonded_torsion; 0) ( gen_bonded_improper; 0) ( neigh_vect; 0) ( neigh_count; 0) ( neigh_vect_raw; 0) ( symE_bonus; 0) ( sym_lig; 0) ( mhc_epitope; 0) ( pack_stat; 0) ( rms_energy; 0) ( res_type_constraint; 0) ( res_type_linking_constraint; 0) ( pocket_constraint; 0) ( backbone_stub_constraint; 0) ( backbone_stub_linear_constraint; 0) ( surface; 0) ( p_aa; 0) ( unfolded; 0) ( split_unfolded_two_body; 0) ( fa_atr_ref; 0) ( fa_rep_ref; 0) ( fa_sol_ref; 0) ( fa_elec_ref; 0) ( hbond_ref; 0) ( dslf_fa13_ref; 0) ( fa_intra_atr_ref; 0) ( fa_intra_rep_ref; 0) ( fa_intra_sol_ref; 0) ( pro_close_ref; 0) ( fa_dun_ref; 0) ( fa_dun_dev_ref; 0) ( fa_dun_rot_ref; 0) ( fa_dun_semi_ref; 0) ( rama_ref; 0) ( p_aa_pp_ref; 0) ( omega_ref; 0) ( mm_lj_intra_rep_ref; 0) ( mm_lj_intra_atr_ref; 0) ( mm_twist_ref; 0) ( elec_dens_fast; 0) ( elec_dens_window; 0) ( elec_dens_whole_structure_ca; 0) ( elec_dens_whole_structure_allatom; 0) ( elec_dens_atomwise; 0) ( grid_vdw; 0) ( xtal_ml; 0) ( xtal_rwork; 0) ( xtal_rfree; 0) ( hpatch; 0) ( Menv_smooth; 0) ( wat_desolv; 0) ( ring_close; 0) ( aa_repeat; 0) ( aa_composition; 0) ( aspartimide_penalty; 0) ( hbnet; 0) ( buried_unsatisfied_penalty; 0) ( netcharge; 0) ( voids_penalty; 0) ( dna_env; 0) ( dna_pair; 0) ( dump_trajectory; 0) ( PyRosettaEnergy_first; 0) ( PyRosettaEnergy_457; 0) ( PyRosettaEnergy_458; 0) ( PyRosettaEnergy_459; 0) ( PyRosettaEnergy_460; 0) ( PyRosettaEnergy_461; 0) ( PyRosettaEnergy_462; 0) ( PyRosettaEnergy_463; 0) ( PyRosettaEnergy_464; 0) ( PyRosettaEnergy_465; 0) ( PyRosettaEnergy_last; 0) ( sidechain_neighbors; 0) ( membrane_span_constraint; 0) ( membrane_span_term_z_constraint; 0) ( total_score; -1.45222) ( dummy_score_type; 0) 
3.972124341964819

Use pose.set_chi(<i>, <res_num>, <chi>) to set the side chain of residue 49 to the all-anti conformation. (Here, i is the χ index, and chi is the new torsion angle in degrees.) Re-score the pose and note the Dunbrack energy.

In [5]:
for i in range(1, 5):
    pose.set_chi(i, 49, 180)
    
### BEGIN SOLUTION
scorefxn(pose)
print(energies.residue_total_energies(49))
print(energies.residue_total_energies(49)[pyrosetta.rosetta.core.scoring.fa_dun])
### END SOLUTION
In [ ]: