I can calculate total rosetta energy score of a peptide-protein complex. However, when using flexpepdock module from pyrosetta I didn't find anything direct parameter like pep_sc or pep_sc_noref in the pyrosetta module. I try to write a workaround for pep_sc.
from pyrosetta import rosetta
# Initialize PyRosetta
pyrosetta.init()
# Load the protein-peptide complex from the PDB file
pose = rosetta.core.import_pose.pose_from_file("./all_pdb/clean_pdb/1d4t.clean.pdb")
# Create a score function
scorefxn = rosetta.core.scoring.ScoreFunction()
# Set up the FlexPepDock protocol
flexpep_dock = rosetta.protocols.flexpep_docking.FlexPepDockingProtocol()
# Apply the FlexPepDock protocol
flexpep_dock.apply(pose)
# Get the energy terms of interest
score = pose.energies().total_energy()
hbond_sc = pose.energies().residue_total_energies(1)[rosetta.core.scoring.hbond_sc]
rama = pose.energies().residue_total_energies(1)[rosetta.core.scoring.rama]
pep_sc = pose.energies().residue_total_energies(2)[rosetta.core.scoring.fa_atr] + \
pose.energies().residue_total_energies(2)[rosetta.core.scoring.fa_rep] + \
pose.energies().residue_total_energies(2)[rosetta.core.scoring.fa_sol] + \
pose.energies().residue_total_energies(2)[rosetta.core.scoring.fa_elec]
fa_atr = pose.energies().residue_total_energies(1)[rosetta.core.scoring.fa_atr]
fa_pair = pose.energies().residue_total_energies(1)[rosetta.core.scoring.fa_pair]
#pep_sc_noref = pose.energies().residue_total_energies(1)[rosetta.core.scoring.pep_sc_noref]
fa_rep = pose.energies().residue_total_energies(1)[rosetta.core.scoring.fa_rep]
fa_dun = pose.energies().residue_total_energies(1)[rosetta.core.scoring.fa_dun]
fa_sol = pose.energies().residue_total_energies(1)[rosetta.core.scoring.fa_sol]
#startRMSbb = pose.energies().residue_total_energies(1)[rosetta.core.scoring.startRMSbb]
# Calculate I_sc (Interface energy)
complex_energy = pose.energies().total_energies()[rosetta.core.scoring.total_score]
protein_energy = pose.energies().residue_total_energies(1)[rosetta.core.scoring.total_score]
peptide_energy = pose.energies().residue_total_energies(2)[rosetta.core.scoring.total_score]
I_sc = complex_energy - (protein_energy + peptide_energy)
# Print the energy terms
print("Score:", score)
print("hbond_sc:", hbond_sc)
print("rama:", rama)
print("I_sc:", I_sc)
print("pep_sc:", pep_sc)
print("fa_atr:", fa_atr)
print("fa_pair:", fa_pair)
print("fa_rep:", fa_rep)
print("fa_dun:", fa_dun)
print("fa_sol:", fa_sol)
Can anyone tell me how to calculate pep_sc and pep_sc_noref for this code? Also, can anyone tell me what is the formula for pep_sc and pep_sc_noref if there is no direct reference .