- This topic has 5 replies, 2 voices, and was last updated 10 years, 8 months ago by Anonymous.
March 21, 2013 at 2:29 pm #1538Anonymous
I have a protein with a ligand inside. Is it possible to calculate only the score of the protein (without the ligand) ?
March 21, 2013 at 3:01 pm #8516Anonymous
It’s good. I found a way to do that !
Here’s my python code (sample):
scorefxn = create_score_function_ws_patch(“standard”, “score12”)
residue_energies = [pose.energies().residue_total_energy(i) for i in range(1, pose.total_residue() + 1)]
score_prot = 0
score_lig = 0
for i in range(1, len(residue_energies) + 1):
score_prot += residue_energies
score_lig += residue_energies
print “prot: ” +str(score_prot)+ ” lig: ” +str(score_lig)+ ” total: ” +str(score_prot + score_lig)
print “scorefxn: ” +str(scorefxn(pose))
prot: 1402.95812191 lig: 62597.7988939 total: 64000.7570158
Now, I don’t understand why I obtain different results ?!
March 21, 2013 at 3:12 pm #8518Anonymous
The most likely reason for the difference is in hydrogen bonding; hydrogen bonds are stored on a per-Pose basis instead of a per-Residue basis like most score terms for performance reasons. There is a way to override this if necessary.
Scoring in this way is incorrect if you meant to calculate the empty form of the protein. The scores are still aware of the presence of the ligand when you do this, so (for example) the protein-ligand van der Waals scores are still there. If you want the score of the empty protein, and/or of the ligand alone, you should separate them into separate Pose objects. (Copy the pose, delete the ligand from one and the protein from the other).
March 21, 2013 at 3:36 pm #8520Anonymous
Thank you for reply me !
Last question, how do you remove residue from pose ?
March 21, 2013 at 3:52 pm #8521Anonymous
The first thing to try is the pose utility function remove_nonprotein_residues(pose). It’s in the core::pose utility functions, I’m not sure of the python syntax.
Failing that, try pose.conformation().delete_residue_slow(ligand_position).
March 21, 2013 at 6:09 pm #8522Anonymous
Apparently, the right syntax is core.pose.remove_nonprotein_residues(pose).
Just remove_nonprotein_residues(pose) doesn’t work for me.
(But I think this function “speaks” a little too much for me.)
- You must be logged in to reply to this topic.