BackrubMover options

Member Site Forums PyRosetta PyRosetta – General BackrubMover options

Viewing 3 reply threads
  • Author
    Posts
    • #1284
      Anonymous

        Hi,

        I would like to apply BackrubMover not to the whole protein as it is by default but the fragment of the protein (not contiguous in sequence). How can I specify this in PyRosetta?
        Could you please write me the example command.

        Thanks!!!

        AOK

      • #7139
        Anonymous

          The command line option to do this is -pivot_residues. http://www.rosettacommons.org/manuals/archive/rosetta3.4_user_guide/d1/d09/backrub.html

          The BackrubMover class has a function set_pivot_residues which takes a vector1 containing the residue numbers at which you wish to allow sampling.

        • #7146
          Anonymous

            Regarding the the building vector1 in PyRosetta (http://www.pyrosetta.org/faq):

            2. How do I construct Vector1 objects?

            Vector1 is exposed in newer versions of PyRosetta and lives in rosetta.Vector1. Specific Vector1 objects live in rosetta.utility.vector1_(data type).

            For example:
            print rosetta.Vector1( [ 1 , 2 , 3 ] )
            print rosetta.Vector1( [ 1.0 , 2.0 , 3.0 ] )
            print rosetta.Vector1( [ True , False , True ] )
            print rosetta.Vector1( [ ‘a’ , ‘b’ , ‘c’ ] )

            v = rosetta.utility.vector1_SSize()
            v.append( 1 )
            print v

          • #7155
            Anonymous

              Thanks a lot for your help!!!

              I am doing:

              my_vector = rosetta.utility.vector1_Size()
              my_vector.append(2)
              my_vector.append(3)

              backrubmover.set_pivot_residues(my_vector)

              and it works.
              Thanks!

            • #7144
              Anonymous

                Thanks a lot. This is what I supposed but I had a problem with passing residue numbers to Vector1. Could you please write me explicitly how to do this.
                I tried
                backrubmover.set_pivot_residues(Vector1([2,3,4,5,6,7]))

                but I got an error:
                backrubmover.set_pivot_residues(Vector1([2,3,4,5,6,7]))
                Boost.Python.ArgumentError: Python argument types in
                BackrubMover.set_pivot_residues(BackrubMover, vector1_int)
                did not match C++ signature:
                set_pivot_residues(protocols::moves::BackrubMover {lvalue}, utility::vector1 > pivot_residues)

                Thanks again for your help!

              • #7145
                Anonymous

                  You can’t construct a vector in C++ with arbitrary arguments that way, the way you make lists or tuples in python.

                  I don’t know how C++ vector1s are explicitly constructed in python, but you can build them with push_back.

                  my_vector.push_back(2)
                  my_vector.push_back(3)
                  my_vector.push_back(4)
                  my_vector.push_back(5)

                  backrubmover.set_pivot_residues(my_vector)

                  I’ve asked someone else to comment on constructing empty templated C++ objects in python.

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