You are here

dump_scored_pdb

2 posts / 0 new
Last post
dump_scored_pdb
#1

I am new to Pyrosetta and trying to dump the modified pose along with its total energy.

I have used pose.dump_score_pdb('model.pdb', scorefxn) to have the total score printed out with the PDB file.

However, this method prints out way more information. What would be the equivalent way of having the total score printed out (as the fileters work in the xml file at rosetta scripts)?

 

Category: 
Post Situation: 
Wed, 2020-02-19 07:21
allan.ferrari

You can use pose.scores or this: pyrosetta.rosetta.core.io.raw_data.ScoreMap.get_energies_map_from_scored_pose(p) to grab a dictionary for all the scores.  Generally, you want to output a scorefile or equivalent and tie the PDB to the scorefile instead of having the total score in the PDB.  Yes, the function you found prints out a lot more information - but that is the standard way of outputting all the data.  You get a pose residue energies table, a table with all the scores, and whatever extra data is added during a protocol. 

Typically in pyRoseta, you can do it yourself to output a JSON file from a dictionary that you get from get_energies_map_from_scored_pose(). 

You can also use the toolbox function: pyrosetta.toolbox.py_jobdistributor.output_scorefile()

Finally, a PDB file is simpy a text file.  If you really want ONLY the total score in it, just read the PDB file and append a line with the total_score using in-built python IO. 

Wed, 2020-02-19 08:14
jadolfbr