You are here

"No Python class registered..." when trying to access SymDofs

4 posts / 0 new
Last post
"No Python class registered..." when trying to access SymDofs
#1

I can create symmetric systems without any issue in PyRosetta, but I can't access the symmetric dofs at any stage. It produces a message like this:

In [84]: dofs = symm_info.get_dofs()
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-84-f37670432e61> in <module>()
----> 1 dofs = symm_info.get_dofs()

TypeError: No Python class registered for C++ class std::map<unsigned long, core::conformation::symmetry::SymDof, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, core::conformation::symmetry::SymDof> > >

I want to use the symmetry-enabled rigid body movers, which don't seem to work unless you can pass them the SymDofs in the constructor, and this message is produced even though the C++ signatures match; setting the initial pose doesn't do anything, either. Is there an alternative approach to do this, or is it a shortcoming in the current PyRosetta version?

Category: 
Post Situation: 
Tue, 2015-03-17 14:29
pitmand

Hi Pitmand,

So in order for this to work, we will need to add that specific std::map type to the PyRosetta compile machinery. I will ask Sergey if he can add this sometime soon. If you are a developer, I can lead you to where you will need to add it and then compile PyRosetta.

I'm not familiar enough with the symmetry code to lead Sergey specifically to what symm_info class is. He may know. Can you post the constructor you use for symm_info, and then we can track it down?

If your not a developer, we will need to add this to the Rosetta C++ code, and then it will be available with the next PyRosetta - which SHOULD be releasing each week or with every Rosetta revision.

-Jared

Tue, 2015-03-17 19:41
jadolfbr

Thanks for replying. I'm not a developer, but I'm pulling the latest PyRosetta from git so I can get the latest change whenever it's pushed.

The symm_info object is the class "rosetta.core.conformation.symmetry.SymmetryInfo". I access it from the pose object once said pose has been symmetrized using core.pose.symmetry.make_symmetric_pose:

symm_conf = pose.conformation()
symm_info = symm_conf.Symmetry_Info()

I think I found similar calls regarding SymDofs elsewhere, but I can't remember where they are. Let me know if there's more information I can provide.

Tue, 2015-03-17 23:16
pitmand

Hi Pitmand,

I just added binding for that map class so it should appear within ~week in our release builds.

Best,

Wed, 2015-03-18 13:24
Sergey