You are here


3 posts / 0 new
Last post


I am trying to find the residues interacting with a particular residue of interest so as I can determine which residue-residue interaction is making the most contribution to a specific scoring term. However, I have not been able to find the residue_pair_energy function. 

Do I need to write the function class to obtain this or is there a function that already available (e.g. to get atom-atom pairwise energies). If the latter case where is the function  located. 

I have tried core.scoring.Energies but it does not exist there

I am using PyRosetta4.Release.python36.mac downloaded 4 days ago

Please advice 


Thank you for your time




Post Situation: 
Fri, 2017-12-01 09:21

I'm not aware of a canned function which will allow this.

What you'll have to do is extract the information from the EnergyGraph object that's stored in a Pose after a call to scoring. (Be sure to score the pose prior to extracting the data, else you might get a crash, and you'll certainly get nonsense numbers.)

To get the total score between to residues `resi1` and `resi2` (in the start-at-one, Pose-numbered integer form):

pose.energies().energy_graph().find_energy_edge( resi1, resi2 ).dot( scorefxn.weights() )

If you want the unweighted energies or the score for particular components, you can also pull that out of the particular edge.


Note: For efficiency purposes, the backbone hydrogen bonds aren't included as pairwise energies by default. To correct for this, you'll have to set an option in the EnergyMethodOptions -- Do this *before* you score the pose with the scorefunction.

emeth_opt = scorefxn.energy_method_options().clone()
emeth_opt.hbond_options().decompose_bb_hb_into_pair_energies( True )
scorefxn->set_energy_method_options( emeth_opt )


Fri, 2017-12-01 09:52


Thanks  alot I will give this a shot 

Fri, 2017-12-01 16:50