You are here

Symmetric design with PyRosetta

10 posts / 0 new
Last post
Symmetric design with PyRosetta
#1

Hello,

 

Is it possible to do symmetric design with PyRosetta4 ?

 

I try to pass a symmetry flag to the command line and run pack_rotamers but I get a warning saying that I try to

use a symmetric score function on a non symmetric protocol or something like that.

 

In previous Rosetta versions, there was a symmetric_pack_rotamers, but this method disappeared and there is some symmetry code in

the pack_rotamer method. Still, it doesn't work. It works if I run fixxbb protocol though.

 

I tried also this:

 

score_fxn = create_score_function(scorefunc) 
mytask = TaskFactory.create_packer_task(pose)
mytask.initialize_from_command_line()
parse_resfile(pose, mytask, resfile)
pose.update_residue_neighbors()
png = create_packer_graph(pose, score_fxn, mytask)
mysymtask = make_new_symmetric_PackerTask_by_requested_method(pose,mytask)
rotsets = SymmetricRotamerSets()
pack_scorefxn_pose_handshake( pose, score_fxn);  
rotsets.set_task( mysymtask )
rotsets.initialize_pose_for_rotsets_creation(pose)
rotsets.build_rotamers( pose, score_fxn, png )
rotsets.prepare_sets_for_packing( pose, score_fxn )

 

But I get a segmentation fault in initialize_pose_for_rotsets_creation. Would anyone know why ?

This piece of code is extracted from a script that works perfectly fine in non-symmetric mode.

 

Category: 
Post Situation: 
Thu, 2016-11-17 07:50
dsim

The reason for absense of symmetric_pack_rotamers is that it is no longer present in Rosetta C++ code. This is because regular pack_rotamers should be able now to handle symetric poses. Have you tried using it instead?

Thu, 2016-11-17 11:28
Sergey

Yes I tried, sorry if my message wasn't clear. 

I tried, and I got a warning which said that I was using a symmetric score function with a non symmetric protocol. 

I'll post some more code about what I tried when I'm back in the lab tomorrow. 

It works fine with the c++ code, but I can't make it work with pack_rotamer in the python version. 

I give the same symmetry options as when I run fixbb with the c++ version.

 

Thu, 2016-11-17 12:05
dsim

.

 

Thu, 2016-11-17 12:06
dsim

If you have C++ code working - then it should definetely works in PyRosetta. Unless of course the C++ code is for different verion of Rosetta (for example if it have symmetric_pack_rotamers not yet removed). Could you please double check that your Rosetta C++ code version match/close to PyRosetta build?

Thu, 2016-11-17 12:50
Sergey

It works with rosetta-3.7 and doesn't work with PyRosetta4 release 117. 

 

Here is exactly what I do:

I have a symmetry definition file and an imput files that were both generated by the rosetta perl script.

I give both files to rosetta-3.7 fixxbb and it works. I can see from the log that it reads the symmetry definition properly.

 

With PyRosetta4:

I give the symmetry flag to the init() method

I load the pose and the score function. Then I do this:

mytask = TaskFactory.create_packer_task(pose)
mytask.initialize_from_command_line()
parse_resfile(pose, mytask, resfile)
pack_rotamers(pose, score_fxn, mytask)

 

and it says:

core.scoring.symmetry.SymmetricScoreFunction: Warning!!! Using a symmetric score function on a non-symmetric pose

 

 

Mon, 2016-11-21 00:24
dsim

Possibly silly question, but have you properly initialized symmetry in your PyRosetta pose? That is, does core.pose.symmetry.is_symmetric( pose ) return True?

If not, what have you done in your PyRosetta protocol to setup the pose for symmetry?  Have you used core.pose.symmetry.make_symmetric_pose()? (http://graylab.jhu.edu/pyrosetta/downloads/documentation/PyRosetta_Tutorial_2012.pdf)

Or did you use some other method to establish the pose as symmetric? For example, the fixbb application calls the protocols.simple_moves.symmetry.SetupForSymmetryMover on the pose prior to running the packer.

Mon, 2016-11-21 11:17
rmoretti

The PyRosetta 117 is significantly more recent then 3.7 release so code is changed since then. I will try to ask develepers who familiar with this part of the code if there is a way around this.

Mon, 2016-11-21 11:07
Sergey

Well, I guess you are right. I wasn't aware of any method to establish the pose as symmetric. 

I figured all this would be "automatic" since I specified some symmetry flag to the command line... 

I'll give it a try and let you know. This may close the topic, thanks for your answers.

 

Mon, 2016-11-21 12:04
dsim

It works, thank you guys.

Actually the SymPackRotamersMover does everything I want.

Tue, 2016-11-22 08:10
dsim