Jump::random_trans strange behavior

Member Site Forums Rosetta 3 Rosetta 3 – General Jump::random_trans strange behavior

  • This topic has 2 replies, 2 voices, and was last updated 9 years ago by Anonymous.
Viewing 1 reply thread
  • Author
    Posts
    • #2352
      Anonymous

        Hi to everyone!

        I have a complex: protein and peptide (AB chains). I need to make small random shifts of peptide. I do it so

        numeric::Real step_size(1.0);

        core::kinematics::Jump flexible_jump = pose.jump(pose.num_jump());

        flexible_jump.random_trans(step_size);

        pose.set_jump( pose.num_jump(), flexible_jump );

        However, peptide does a huge jump. flexible_jump.get_translation() gives something like (random value, 0, random value).

        Description of the function “choose a random unit vector as the direction of translation, by selecting its spherical coordinates phi(0-180) and theta(0-360) then move dist_in along that direction”. In an attachment result of work (green selection is initial position).

        That way works perfectly

        core::Vector rand_vect;

        for(numeric::Size i = 0; i < 3; i++ )

                rand_vect.at(i) = numeric::random::rg().uniform();

        rand_vect.normalize();

        core::kinematics::Jump flexible_jump2 = pose.jump(pose.num_jump());

        core::kinematics::Stub upstream_stub = pose.conformation().upstream_jump_stub(pose.num_jump());

        flexible_jump2.translation_along_axis( upstream_stub, rand_vect, step_size );

        pose.set_jump( pose.num_jump(), flexible_jump2 );

        My questions:

        1) Is it something wrong what I do in first case?

        2) For what random_trans function exactly for?

        3) What is the simplest way to do peptide shifts with variable step size (using jump)?

        I use rosetta 2015.38

        Thanks,

        Sergey

         

      • #11305
        Anonymous

          As I read things, the random_trans() method is reinitializing the jump to a random translation, whereas the translation_along_axis() method is simply adding the random pertubation to the existing translation in the jump. You can see this in the code, where translation_along_axis() adds a rt_.get_translation() to the random adjustment, whereas random_trans() just sets the adjustment itself.

          Honestly, I’d probably use something like protocols::rigid::RigidBodyPerturbMover, which is set up for perturbing the rigid body position of a chain, rather than changing the jump directly. You can check out the apply() method for details, but the core of it actually uses Jump::gaussian_move() to do the random perturbation, if you do want to use low level code.

        • #11306
          Anonymous

            Well, it is really seens like reinitialization. However, I still do not understand why random translation vector have one fixed coordinate: y is always equals 0. Anyway I think RigidBodyPerturbMover is actually what I need. There are ways to use it without any movemaps, this fact escaped me. Thank you for your answer.

        Viewing 1 reply thread
        • You must be logged in to reply to this topic.