You are here

Computing pairwise energies for rotamers

2 posts / 0 new
Last post
Computing pairwise energies for rotamers
#1

I am writing an application for sidechain packing and am trying to figure out how to compute the energy table for all pairs of rotamers on a given edge.

I have an InteractionGraphBaseOP that I obtained from calling core::pack::pack_setup(). I'm not quite sure how to tell which interaction graph object it's pointing to, and as far as I can tell the interface for accessing the two-body energies differs for different types. Ideally I would like to construct an interaction graph that precomputes these enerties (e.g. derived from FixedBBInteractionGraph) and then just pull out the entries.

Any suggestions?

Jason

Post Situation: 
Sat, 2014-05-03 17:52
pachecoj

If you're using a FixedBBInteractionGraph, you can get the energy for a particular residue&rotamer interaction out with the get_two_body_energy_for_edge() method of the interaction graph. Note that the "node" numbering should be the same as the moltenres numbering scheme from the RotamerSets object, rather than pose numbering. (The state numbering should match up with the rotamer states from the RotamerSet object as well).

This will work if you're pulling them out one by one - we don't have a general method for pulling out the full matrix because some of the interaction graph types do on-the-fly calculations of energies for speed/memory efficiency. If you know you're using a interaction graph type which precomputes the rotamer interaction matrix, you might be able to pull out the matrix by getting (a pointer to) the Edge object with the find_edge() member function. You can then use dynamic casts to get the specific derived type you're working with. You'd also have to modify the code for that derived Edge object to add access to the underlying data matrix, as that information is not directly accessible by default, even for versions which store it.

Mon, 2014-05-12 07:50
rmoretti