Acessing energies terms from energy.show() table

Member Site Forums PyRosetta PyRosetta – General Acessing energies terms from energy.show() table

Viewing 1 reply thread
  • Author
    Posts
    • #3909
      Anonymous

        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?

         

      • #16116
        Anonymous

          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 https://graylab.jhu.edu/PyRosetta.documentation/pyrosetta.bindings.energies.html — I think that the residue_total_energies_array() and total_energies_array() functions may give you what you want.

          • #16126
            Anonymous

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

               

        Viewing 1 reply thread
        • You must be logged in to reply to this topic.