You are here

Acessing energies terms from table

3 posts / 0 new
Last post
Acessing energies terms from table

I am trying to get the individual values from each energy term from my pose to save in a dataframe, but i still haven't find i way to do this, there is a simple way to do this?


Post Situation: 
Mon, 2022-02-07 07:56
João Sartori

The energies which are displayed with the pose.energies().show() function come from the core.scoring.Energies object that's stored in the pose (the one you're calling show() on). You should be able to pull them out yourself with the residue_total_energies(resnum) method, as well as the total_energies() method. The potential problem you'll run into is that that gives you an EnergyMap object which contains all possible scoreterms, not just the ones you're interested in. The solution to that is looking for the non-zero entries in the EnergyMap returned by weights().

There's some convenience functions which make this easier See -- I think that the residue_total_energies_array() and total_energies_array() functions may give you what you want.

Mon, 2022-02-07 08:39

Hmm, ok , i will check those functions and run some tests, thank you very much for the support


Wed, 2022-02-09 04:35
João Sartori