Problems with SmoothFragmentMover

Member Site Forums PyRosetta PyRosetta – General Problems with SmoothFragmentMover

Viewing 2 reply threads
  • Author
    Posts
    • #1655
      Anonymous

        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.

      • #9370
        Anonymous

          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/dd9/abinitio.html

          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

        • #9371
          Anonymous

            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?

          • #9376
            Anonymous

              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…

          Viewing 2 reply threads
          • You must be logged in to reply to this topic.