You are here

Reading poses from silent file that need a params file

3 posts / 0 new
Last post
Reading poses from silent file that need a params file

 Hello everyone,

I am trying to read a silent file with the function poses_from_silent(), but I get an error about an unrecognized residue:

for pose in poses_from_silent(silentFile):
    pose Reading all structures from silent.out Finished reading X structures from silent.out
$HOME/miniconda2/lib/python2.7/site-packages/pyrosetta-2018.31+release.231d1f3-py2.7-linux-x86_64.egg/pyrosetta/io/__init__.pyc in poses_from_silent(silent_filename)
     66         ss = sfd.get_structure(tag)
     67         pose = Pose()
---> 68         ss.fill_pose(pose)
     69         yield pose
File: /home/benchmark/T/rosetta.Glass/_commits_/main/source/src/core/pose/
[ ERROR ] UtilityExitException
ERROR:  can't find residue type for XX at pos XXX in sequence M[MET:NtermProteinFull]...

However, when I am working with a single pdb file there is no problem to do this; I am currently loading the params file, for a single pdb, with the function pose_from_file() as follows:

pose = Pose()
pose_from_file(pose, pdbFile)

which loads correctly the params file into a new pose object and then it is passed to the pose_from_file() function.

Is there an analog way for loading the params file as to be read by the poses_from_silent() function?

Post Situation: 
Mon, 2018-08-13 12:25
Martin Floor

You can take a look at the implementation of poses_from_silent() to see how it works:

def poses_from_silent(silent_filename):
    sfd =
    for tag in sfd.tags():
        ss = sfd.get_structure(tag)
        pose = Pose()
        yield pos

The ss.fill_pose() will obey a set non-standard residue set just like pose_from_file() will. You would just need to implement your own version oof poses_from_silent which loads your params files for each pose you're creating.


The other alternative is to add the params files to the global residue type set. This can be done by passing them in during PyRosetta initialization with the -extra_res_fa option. ( -- The drawback of this way is that you'd add the ligand for the entire run, and not just the loaded structures.

Fri, 2018-08-24 11:22

Thank you very much Rocco for your answer, very helpfull as always!

Mon, 2018-08-27 10:50
Martin Floor