!pip install pyrosettacolabsetup
import pyrosettacolabsetup; pyrosettacolabsetup.install_pyrosetta()
import pyrosetta; pyrosetta.init()
import pyrosetta
pyrosetta.init()
### BEGIN SOLUTION
ras = pyrosetta.pose_from_pdb("inputs/6Q21_A.pdb")
### END SOLUTION
from pyrosetta.teaching import *
### BEGIN SOLUTION
sfxn = get_score_function(True)
### END SOLUTION
### BEGIN SOLUTION
print(sfxn)
### END SOLUTION
ScoreFunction::show():
weights: (fa_atr 1) (fa_rep 0.55) (fa_sol 1) (fa_intra_rep 0.005) (fa_intra_sol_xover4 1) (lk_ball_wtd 1) (fa_elec 1) (pro_close 1.25) (hbond_sr_bb 1) (hbond_lr_bb 1) (hbond_bb_sc 1) (hbond_sc 1) (dslf_fa13 1.25) (omega 0.4) (fa_dun 0.7) (p_aa_pp 0.6) (yhh_planarity 0.625) (ref 1) (rama_prepro 0.45)
energy_method_options: EnergyMethodOptions::show: aa_composition_setup_files:
EnergyMethodOptions::show: mhc_epitope_setup_files:
EnergyMethodOptions::show: netcharge_setup_files:
EnergyMethodOptions::show: aspartimide_penalty_value: 25
EnergyMethodOptions::show: etable_type: FA_STANDARD_DEFAULT
analytic_etable_evaluation: 1
EnergyMethodOptions::show: method_weights: ref 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
EnergyMethodOptions::show: method_weights: free_res
EnergyMethodOptions::show: unfolded_energies_type: UNFOLDED_SCORE12
EnergyMethodOptions::show: split_unfolded_label_type: SPLIT_UNFOLDED_MM
EnergyMethodOptions::show: split_unfolded_value_type: SPLIT_UNFOLDED_BOLTZ
EnergyMethodOptions::show: atom_vdw_atom_type_set_name: centroid
EnergyMethodOptions::show: exclude_protein_protein_fa_elec: false
EnergyMethodOptions::show: exclude_RNA_RNA_fa_elec: false
EnergyMethodOptions::show: exclude_RNA_protein_fa_elec: false
EnergyMethodOptions::show: exclude_monomer_fa_elec: false
EnergyMethodOptions::show: elec_max_dis: 5.5
EnergyMethodOptions::show: elec_min_dis: 1.6
EnergyMethodOptions::show: elec_die: 10
EnergyMethodOptions::show: elec_no_dis_dep_die: false
EnergyMethodOptions::show: elec_sigmoidal_die: true
EnergyMethodOptions::show: elec_sigmoidal_D: 80
EnergyMethodOptions::show: elec_sigmoidal_D0: 6
EnergyMethodOptions::show: elec_sigmoidal_S: 0.4
EnergyMethodOptions::show: smooth_fa_elec: true
EnergyMethodOptions::show: grpelec_fade_type: false
EnergyMethodOptions::show: grpelec_fade_param1: 1
EnergyMethodOptions::show: grpelec_fade_param2: 1
EnergyMethodOptions::show: grpelec_fade_hbond: 0
EnergyMethodOptions::show: grp_cpfxn: 1
EnergyMethodOptions::show: elec_group_file: /scoring/score_functions/elec_group_def.dat
EnergyMethodOptions::show: grpelec_context_dependent: 0
EnergyMethodOptions::show: use_polarization: true
EnergyMethodOptions::show: use_gen_kirkwood: true
EnergyMethodOptions::show: protein_dielectric: 1
EnergyMethodOptions::show: water_dielectric: 78.3
EnergyMethodOptions::show: exclude_DNA_DNA: true
EnergyMethodOptions::show: exclude_intra_res_protein: false
EnergyMethodOptions::show: count_pair_hybrid: false
EnergyMethodOptions::show: put_intra_into_total: false
EnergyMethodOptions::show: geom_sol_interres_path_distance_cutoff: false
EnergyMethodOptions::show: geom_sol_intrares_path_distance_cutoff: true
EnergyMethodOptions::show: eval_intrares_elec_ST_only: false
EnergyMethodOptions::show: envsmooth_zero_negatives: false
EnergyMethodOptions::show: cst_max_seq_sep: 18446744073709551615
EnergyMethodOptions::show: pb_bound_tag: bound
EnergyMethodOptions::show: pb_unbound_tag: unbound
EnergyMethodOptions::show: ordered_wat_penalty: 1.221
EnergyMethodOptions::show: ordered_pt_wat_penalty: 2.709
EnergyMethodOptions::show: voids_penalty_energy_containing_cones_cutoff_:6
EnergyMethodOptions::show: voids_penalty_energy_cone_distance_cutoff_: 8
EnergyMethodOptions::show: voids_penalty_energy_cone_dotproduct_cutoff_: 0.1
EnergyMethodOptions::show: voids_penalty_energy_voxel_grid_padding_: 1
EnergyMethodOptions::show: voids_penalty_energy_voxel_size_: 0.5
EnergyMethodOptions::show: voids_penalty_energy_disabled_except_during_packing_: TRUE
EnergyMethodOptions::show: hbnet_bonus_ramping_function_: "quadratic"
EnergyMethodOptions::show: hbnet_max_network_size_: 0
EnergyMethodOptions::show: approximate_buried_unsat_penalty_hbond_energy_threshold_: -0.25
EnergyMethodOptions::show: approximate_buried_unsat_penalty_burial_atomic_depth_: 4.5
EnergyMethodOptions::show: approximate_buried_unsat_penalty_burial_probe_radius_: 2.3
EnergyMethodOptions::show: approximate_buried_unsat_penalty_burial_resolution_: 0.5
EnergyMethodOptions::show: approximate_buried_unsat_penalty_oversat_penalty_: 1
EnergyMethodOptions::show: approximate_buried_unsat_penalty_assume_const_backbone_:1
EnergyMethodOptions::show: bond_angle_central_atoms_to_score:
EnergyMethodOptions::show: bond_angle_residue_type_param_set: none
HBondOptions::show: exclude_DNA_DNA: true
HBondOptions::show: exclude_intra_res_protein_: false
HBondOptions::show: exclude_intra_res_RNA_: false
HBondOptions::show: put_intra_into_total_: false
HBondOptions::show: exclude_self_hbonds: true
HBondOptions::show: use_hb_env_dep: false
HBondOptions::show: use_hb_env_dep_DNA: true
HBondOptions::show: smooth_hb_env_dep: true
HBondOptions::show: bb_donor_acceptor_check: true
HBondOptions::show: decompose_bb_hb_into_pair_energies: false
HBondOptions::show: params_database_tag_: ref2015_params
HBondOptions::show: use_sp2_chi_penalty_: true
HBondOptions::show: sp2_BAH180_rise_: 0.75
HBondOptions::show: sp2_outer_width_: 0.357
HBondOptions::show: measure_sp3acc_BAH_from_hvy_: true
HBondOptions::show: fade_energy_: 1
HBondOptions::show: exclude_ether_oxygens_: 0
HBondOptions::show: Mbhbond: false
HbondOptions::show: mphbond: false
HBondOptions::show: hbond_energy_shift: 0
HBondOptions::show: water_hybrid_sf: false
RNA_EnergyMethodOptions::show: syn_G_potential_bonus: 0
RNA_EnergyMethodOptions::show: torsion_potential: ps_04282011
RNA_EnergyMethodOptions::show: suiteness_bonus: Richardson
RNA_EnergyMethodOptions::show: rna_base_pair_xy_filename: scoring/rna/rna_base_pair_xy.dat
FreeDOF_Options::show: free_suite_bonus: -1
FreeDOF_Options::show: free_2HOprime_bonus: -0.5
FreeDOF_Options::show: free_sugar_bonus: -1
FreeDOF_Options::show: pack_phosphate_penalty: 0.25
FreeDOF_Options::show: free_side_chain_bonus: -0.5
### BEGIN SOLUTION
sfxn2 = ScoreFunction()
sfxn2.set_weight(fa_atr, 1.0)
sfxn2.set_weight(fa_rep, 1.0)
### END SOLUTION
# print total energy of ras
### BEGIN SOLUTION
print(sfxn(ras))
### END SOLUTION
# print the attractive and repulsive energy of ras
### BEGIN SOLUTION
print(sfxn2(ras))
### END SOLUTION
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.450999 seconds to load from binary
1215.729069796814
154.59159174026854
# use the sfxn.show() method
### BEGIN SOLUTION
sfxn.show(ras)
### END SOLUTION
core.scoring:
------------------------------------------------------------
Scores Weight Raw Score Wghtd.Score
------------------------------------------------------------
fa_atr 1.000 -1039.246 -1039.246
fa_rep 0.550 1193.837 656.611
fa_sol 1.000 682.582 682.582
fa_intra_rep 0.005 700.419 3.502
fa_intra_sol_xover4 1.000 46.564 46.564
lk_ball_wtd 1.000 -14.597 -14.597
fa_elec 1.000 -195.387 -195.387
pro_close 1.250 97.210 121.513
hbond_sr_bb 1.000 -41.656 -41.656
hbond_lr_bb 1.000 -28.352 -28.352
hbond_bb_sc 1.000 -13.111 -13.111
hbond_sc 1.000 -7.771 -7.771
dslf_fa13 1.250 0.000 0.000
omega 0.400 41.525 16.610
fa_dun 0.700 1296.642 907.650
p_aa_pp 0.600 -25.496 -15.298
yhh_planarity 0.625 0.000 0.000
ref 1.000 47.114 47.114
rama_prepro 0.450 197.781 89.002
---------------------------------------------------
Total weighted score: 1215.729
print(ras.energies().show(<n>))
### BEGIN SOLUTION
print(ras.energies().show(24))
### END SOLUTION
core.scoring.Energies: E fa_atr fa_rep fa_sol fa_intra_repfa_intra_sol_x lk_ball_wtd fa_elec pro_close hbond_sr_bb hbond_lr_bb hbond_bb_sc hbond_sc dslf_fa13 omega fa_dun p_aa_pp yhh_planarity ref rama_prepro
core.scoring.Energies: E(i) 24 -7.40 19.03 2.94 8.76 0.09 -0.11 -0.56 0.00 0.00 0.00 0.00 0.00 0.00 0.12 2.68 0.06 0.00 2.30 3.58
None
### BEGIN SOLUTION
res24 = ras.residue(24)
res20 = ras.residue(20)
res24_atomN = res24.atom_index("N")
res20_atomO = res20.atom_index("O")
pyrosetta.etable_atom_pair_energies(res24, res24_atomN, res20, res20_atomO, sfxn)
### END SOLUTION
(-0.1505855046001568, 0.0, 0.5903452111877215, 2.173111777247698)
!pip install pyrosettacolabsetup
import pyrosettacolabsetup; pyrosettacolabsetup.install_pyrosetta()
import pyrosetta; pyrosetta.init()
from pyrosetta import *
from pyrosetta.teaching import *
init()
# From previous section:
sfxn = get_score_function(True)
### 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
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])
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。