Hi everyone,
I’m trying to get the energies of individual residues in a pose and am encountering an error that I can’t seem to find much information on. Here is a sample of my script:
from pyrosetta import *
from pyrosetta.rosetta import *
from pyrosetta.rosetta.core.scoring import *
pyrosetta.init('-ignore_zero_occupancy false')
pose = pose_from_pdb(pdb_file)
sfxn = create_score_function('ref2015.wts')
score = pose.energies().residue_total_energy(1)
And here is the error I encounter:
ERROR: Energies::residue_total_energy( int const seqpos ): variable seqpos is out of range!
This error is confusing to me because it seems to say that the residue number I entered (in this example 1) is not in the pose, however when I try something like:
aa = pose.aa(1)
which also requires the seqpose input I don’t get an error, and there doesn’t seem to be anything strange with the PDB file. I’ve tried this with multiple PDB files and gotten the same error. Does any know what I am doing wrong, or if there is an alternate way to get individual residue energies?
Thanks
-Peik