PyRosetta—Score

2021-02-04 14:55:42 浏览数 (1)

Scoring Poses

Rosetta的基本功能是计算生物分子的能量或得分。Rosetta具有用于所有原子计算的标准能量函数以及用于低分辨率蛋白质表示的多个评分函数。此外,您可以通过在自定义权重中包括对您选择的项计分来定制能量函数。

对于这些练习,请使用蛋白质PDB ID 1YY8,并将其加载到称为POSE的姿势中。

代码语言:javascript复制
import pyrosetta
from pyrosetta import *
init()
#开始定义一个score_function
scorefxn=get_fa_scorefxn()
#get_fa_scorefxn告诉Rosetta加载默认的全原子打分
#查看打分内容
print(scorefxn)
#内容
'''
coreFunction::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: covalent_labeling_input: 
EnergyMethodOptions::show: covalent_labeling_fa_input: 
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: nmer_ref_seq_length_: 9
EnergyMethodOptions::show: nmer_svm_term_length_: 3
EnergyMethodOptions::show: nmer_svm_pssm_feat_: 1
EnergyMethodOptions::show: nmer_svm_scorecut_defined_: 0
EnergyMethodOptions::show: nmer_svm_scorecut_: 0
EnergyMethodOptions::show: nmer_svm_avg_rank_as_energy_: 0
EnergyMethodOptions::show: nmer_svm_aa_matrix_defined_: 0
EnergyMethodOptions::show: nmer_svm_aa_matrix_: 
EnergyMethodOptions::show: nmer_svm_list_defined_: 0
EnergyMethodOptions::show: nmer_svm_list_: 
EnergyMethodOptions::show: nmer_svm_defined_: 0
EnergyMethodOptions::show: nmer_svm_: 
EnergyMethodOptions::show: nmer_svm_rank_list_defined_: 0
EnergyMethodOptions::show: nmer_svm_rank_list_: 
EnergyMethodOptions::show: nmer_svm_rank_defined_: 0
EnergyMethodOptions::show: nmer_svm_rank_: 
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
'''
#设置自己的自定义分数功能,仅包含范德华力,溶剂化和氢键键合项,所有权重均为1.0。使用以下内容开始:
#创建一个pose
from pyrosetta.toolbox import pose_from_rcsb 
pose = pose_from_rcsb("1YY8")
#对这个pose进行打分
print(scorefxn(pose))
-465.267565112

#展示打分细节
scorefxn.show(pose)
 
core.scoring:
------------------------------------------------------------
 Scores                       Weight   Raw Score Wghtd.Score
------------------------------------------------------------
 fa_atr                       1.000   -4873.833  -4873.833
 fa_rep                       0.550    2000.420   1100.231
 fa_sol                       1.000    2808.888   2808.888
 fa_intra_rep                 0.005    2051.516      10.258
 fa_intra_sol_xover4          1.000     149.253    149.253
 lk_ball_wtd                  1.000     -83.161    -83.161
 fa_elec                      1.000   -1176.256  -1176.256
 pro_close                    1.250      56.040      70.050
 hbond_sr_bb                  1.000     -75.843    -75.843
 hbond_lr_bb                  1.000    -402.601   -402.601
 hbond_bb_sc                  1.000    -125.566   -125.566
 hbond_sc                     1.000     -81.368    -81.368
 dslf_fa13                    1.250      -6.461      -8.076
 omega                        0.400       1.866       0.747
 fa_dun                       0.700    2796.540   1957.578
 p_aa_pp                      0.600    -248.924   -149.354
 yhh_planarity                0.625       0.000       0.000
 ref                          1.000     289.140    289.140
 rama_prepro                  0.450     276.988    124.645
---------------------------------------------------
 Total weighted score:                     -465.267
#每一个残基的打分
print(pose.energies().show())
#182位残基的打分
print(pose.energies().show(182))
#out
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) 182         -4.34          0.44          4.62          0.54          0.09         -0.12         -1.42          0.00          0.00          0.00         -0.79          0.00          0.00          0.01          0.76         -0.23          0.00         -0.29         -0.37
None

#计算原子与原子之间的相互作用力
r1 = pose.residue(24)
r2 = pose.residue(20)
#a1 = r1.atom("N")
#a2 = r2.atom("O") 

etable_atom_pair_energies(r1,1, r2,2, scorefxn3)
 
#据说这个可以展示氢键
from rosetta.core.scoring import hbonds
from rosetta.core.scoring.hbonds import HBondSet 
hbond_set= HBondSet()
pose.update_residue_neighbors()
hbonds.fill_hbond_set(pose, False, hbond_set) 
hbond_set.show(pose)
#暂时就是这样,本来还有很多
#Dch Dn Dres Da  Ach An Ares Aa  length AHDang BAHang  BAtor weight energy
#A    3 LEU  N  A  26  SER  OG  1.79  156.8  119.1 -128.9 0.529 -1.824
#A   26 SER  N  A   3  LEU  O   2.05  135.4  149.9  49.1  1.000 -0.605
#A    5 THR  N  A  24  ARG  O   1.79  169.7  149.6  33.2  1.000 -1.288
#A   24 ARG  N  A   5  THR  O   1.84  167.8  141.8  53.0  1.000 -1.244
#A    6 GLN  NE2A   86 TYR  O    2.00 151.1  113.6 -132.7  1.000 -1.113
#A  101 GLY  N  A   6  GLN  OE1 1.95  131.8  111.8  76.0  1.000 -0.316
#A    7 SER  N  A  22  SER  O   1.95  156.0  134.1 -48.7  1.000 -1.294
#A   22 SER  N  A   7  SER  O   2.04  153.7  173.5  63.1  1.000 -0.827
#A  103 LYS  N  A   9  VAL  O   2.07  170.5  148.3 -122.3 1.000 -1.263
#A   11 LEU  N  A 103  LYS  O   1.84  173.8  163.7 107.5  1.000 -1.015
#A  105 GLU  N  A  11  LEU  O   1.76  176.6  156.5 113.8  1.000 -0.915
 
#简单的方式
from pyrosetta.toolbox import get_hbonds 
hbond_set = get_hbonds(pose) 
hbond_set.show(pose)
#证明是骗人的
 
#残基24位相关的氢键
hbond_set.show(pose, 24)
#Dch Dn Dres Da  Ach An Ares Aa  length AHDang BAHang  BAtor weight energy
#A    5 THR  N  A  24  ARG  O   1.79  169.7  149.6  33.2  1.000 -1.288
#A   24 ARG  N  A   5  THR  O   1.84  167.8  141.8  53.0  1.000 -1.244
pdb

0 人点赞