You are here

Problems with SmoothFragmentMover

4 posts / 0 new
Last post
Problems with SmoothFragmentMover
#1

Hi, I'm new to Rosetta/PyRosetta and I'm having trouble getting the SmoothFragmentMover to work. According to the PyRosetta pdf I found at the Gray lab website, this should work:

movemap = Movemap()
movemap.set_bb(True)
fragset = ConstantLengthFragSet(3)
fragset.read_fragment_file(path_to_3mer_frags)
smoothmover = SmoothFragmentMover(fragset, movemap)

Instead of creating the mover, I get an error saying that it needs another argument, a 'FragmentCost' object:

ArgumentError: Python argument types in
SmoothFragmentMover.__init__(SmoothFragmentMover, ConstantLengthFragSet, MoveMap)
did not match C++ signature:
__init__(_object*, utility::pointer::owning_ptr fragset, utility::pointer::owning_ptr movemap, utility::pointer::owning_ptr cost)
__init__(_object*, protocols::simple_moves::SmoothFragmentMover )
__init__(_object*, utility::pointer::owning_ptr fragset, utility::pointer::owning_ptr cost)

What is this 'FragmentCost' object and how can I create one in PyRosetta? My fragments were created by the Robetta server and work fine with the ClassicFragmentMover. Any help would be greatly appreciated.

Post Situation: 
Wed, 2013-10-02 09:20
epalovcak

FragmentCost is a base class defined in the same file, with the brief: Cost computation for Gunn Moves. One of the earlier abinitio papers goes over the Gunn Cost a bit. I believe it is in the first paper from 1997 here: It biases the fragment insertion in some way.

https://www.rosettacommons.org/manuals/archive/rosetta3.4_user_guide/d0/...

The GunnCost class inherits from FragmentCost, it is in rosetta.protocols.simple_moves.GunnCost.

That's about all I know about it.
If you want to use the SmoothFragmentMover, you want to import GunnCost from rosetta.protocols.simple_moves:

from rosetta.protocols.simple_moves import *

Then create the class:

cost = GunnCost()
smooth = SmoothFragmentMover(fragset, movemap, cost)

Someone else on here from the Baker lab may be able to tell you more...

-J

Wed, 2013-10-02 12:29
jadolfbr

Wow, thanks for the quick response. This works perfectly and makes my sampling much more efficient.

Apparently I can use the ConstraintFragmentMover in the same way. I assume ConstraintFragmentMover is like SmoothFragmentMover but instead of mitigating disruption to pose structure, it's mitigating violations of a pose's constraints? Is this correct?

Wed, 2013-10-02 13:52
epalovcak

It inherits from ClassicFragmentMover - when you construct it, it passes the info to this. However, from the looks of the code, it doesn't look like it's really actually doing anything different than ClassicFragmentMover besides storing the FragmentCost object. In fact, the class isn't used by any protocol, so I would definitely stray away from using it...

You could checkout src/protocols/abinitio/FoldConstraints.cc if your interested in folding constraints...I don't know anything about it though, it might help as a guide...

Fri, 2013-10-04 08:11
jadolfbr