Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RigidBodyMover.cc
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file docking_initialization_protocols
11 /// @brief initialization protocols for docking
12 /// @detailed
13 /// This contains the functions that create initial positions for docking
14 /// You can either randomize partner 1 or partner 2, spin partner 2, or
15 /// perform a simple perturbation.
16 /// @author Monica Berrondo
17 
20 // Package headers
22 #include <core/pose/PDBInfo.hh>
23 // Rosetta Headers
24 #include <core/pose/Pose.hh>
25 
28 // AUTO-REMOVED #include <core/scoring/Ramachandran.hh>
29 //#include <core/scoring/ScoringManager.hh>
31 // AUTO-REMOVED #include <basic/basic.hh>
32 #include <utility/tag/Tag.hh>
33 
34 // Random number generator
35 // AUTO-REMOVED #include <numeric/xyzVector.io.hh>
36 #include <numeric/random/random.hh>
37 #include <numeric/random/random_permutation.hh>
38 // AUTO-REMOVED #include <ObjexxFCL/FArray1D.hh>
39 
40 #include <basic/Tracer.hh>
41 using basic::T;
42 using basic::Error;
43 using basic::Warning;
44 
45 //
46 #include <string>
47 
49 #include <utility/vector1.hh>
50 #include <utility/options/IntegerVectorOption.hh>
51 #include <numeric/xyz.functions.hh>
52 
53 namespace protocols {
54 namespace rigid {
55 
56 static basic::Tracer TR("protocols.moves.RigidBodyMover");
57 static basic::Tracer TRBM("protocols.moves.RigidBodyMover");
58 using namespace core;
59 
60 static numeric::random::RandomGenerator RG(43225);
61 
62 // Large rotational perturbations produce a distribution of orientations
63 // that are neither uniform nor similar to the input orientation.
64 // What we probably wanted was a random orientation (possibly plus a translation).
65 const Real max_allowed_rot_mag ( 60.0 );
66 
67 // default constructor
69  protocols::canonical_sampling::ThermodynamicMover(),
70  rb_jump_( 1 ), dir_( n2c ), rot_center_( 0.0 ), freeze_(false)
71 {
72  Mover::type( "RigidBodyBase" );
73 }
74 
75 // constructor with arguments
77  int const rb_jump_in,
78  Direction dir_in
79 ):
80  protocols::canonical_sampling::ThermodynamicMover(),
81  rb_jump_( rb_jump_in ), dir_( dir_in ), rot_center_( 0.0 ), freeze_(false)
82 {
83  Mover::type( "RigidBodyBase" );
84  if ( dir_ == random ) {
85  dir_ = ( numeric::random::uniform() < 0.5 ? c2n : n2c );
86  } else {
87  runtime_assert( dir_ == n2c || dir_ == c2n );
88  }
89 }
90 
92  //utility::pointer::ReferenceCount(), parent( src ),
93  protocols::canonical_sampling::ThermodynamicMover( src ),
94  rb_jump_( src.rb_jump_ ),
95  dir_( src.dir_ ),
96  rot_center_( src.rot_center_ ),
97  freeze_(src.freeze_)
98 {}
99 
101 
104  return "RigidBodyMover";
105 }
106 
109  core::pose::Pose & //pose
110 )
111 {
113 }
114 
116  int const rb_jump_in,
117  core::Real const rot_mag_in,
118  core::Real const trans_mag_in,
119  Partner const partner_in,
120  bool interface_in //rot_center calculated at interface
121  ):
122  RigidBodyMover( rb_jump_in ),
123  rot_mag_( rot_mag_in ),
124  trans_mag_( trans_mag_in ),
125  partner_( partner_in ),
126  interface_(interface_in)
127 {
128  movable_jumps_.push_back( rb_jump_in );
129  TRBM.Debug << "rb_jump " << rb_jump_in << std::endl;
130  TRBM.Debug << "rot_mag " << rot_mag_ << std::endl;
131  TRBM.Debug << "trans_mag " << trans_mag_ << std::endl;
132  Mover::type( "RigidBodyPerturb" );
133 }
134 
135 
137  RigidBodyMover(),
138  rot_mag_( 3.0 ),
139  trans_mag_( 8.0 )
140 {
141  Mover::type( "RigidBodyPerturb" );
142 }
143 
145  int const rb_jump_in,
146  core::Real const rot_mag_in,
147  core::Real const trans_mag_in,
148  Partner const partner_in,
149  utility::vector1< bool > ok_for_centroid_calculation
150  ):
151  RigidBodyMover( rb_jump_in ),
152  rot_mag_( rot_mag_in ),
153  trans_mag_( trans_mag_in ),
154  partner_( partner_in ),
155  interface_( false ),
156  ok_for_centroid_calculation_( ok_for_centroid_calculation )
157 {
158  movable_jumps_.push_back( rb_jump_in );
159  TRBM.Debug << "rb_jump " << rb_jump_in << std::endl;
160  TRBM.Debug << "rot_mag " << rot_mag_ << std::endl;
161  TRBM.Debug << "trans_mag " << trans_mag_ << std::endl;
162  Mover::type( "RigidBodyPerturb" );
163 }
164 
166  core::pose::Pose const & pose_in,
167  core::kinematics::MoveMap const & mm,
168  core::Real const rot_mag_in,
169  core::Real const trans_mag_in,
170  Partner const partner_in,
171  bool interface_in //rot_center calculated at interface
172  ):
173  RigidBodyMover(),
174  rot_mag_( rot_mag_in ),
175  trans_mag_( trans_mag_in ),
176  partner_( partner_in ),
177  interface_(interface_in)
178 {
179  TRBM.Debug << "rot_mag " << rot_mag_ << std::endl;
180  TRBM.Debug << "trans_mag " << trans_mag_ << std::endl;
181  Mover::type( "RigidBodyPerturb" );
182  for ( Size i=1, i_end = pose_in.num_jump(); i<= i_end; ++i ) {
183  if ( mm.get_jump(i) ) {
184  movable_jumps_.push_back( i );
185  }
186  }
187 
188  if ( movable_jumps_.empty() ) {
189  T("protocols.moves.rigid_body") << "[WARNING] no movable jumps!" << std::endl;
190  return;
191  }
192 }
193 
195  core::Real const rot_mag_in,
196  core::Real const trans_mag_in,
197  Partner const partner_in,
198  bool interface_in //rot_center calculated at interface
199 ):
200  RigidBodyMover(),
201  rot_mag_( rot_mag_in ),
202  trans_mag_( trans_mag_in ),
203  partner_( partner_in ),
204  interface_(interface_in)
205 {
206  TRBM.Debug << "rb_jump " << rb_jump_ << std::endl;
207  TRBM.Debug << "rot_mag " << rot_mag_ << std::endl;
208  TRBM.Debug << "trans_mag " << trans_mag_ << std::endl;
209  Mover::type( "RigidBodyPerturb" );
210 }
211 
213  //utility::pointer::ReferenceCount(),
214  parent( src ),
215  rot_mag_( src.rot_mag_ ),
216  trans_mag_( src.trans_mag_ ),
217  partner_( src.partner_ ),
218  interface_( src.interface_ ),
219  movable_jumps_( src.movable_jumps_ )
220 {}
221 
223 {}
224 
225 
227 {
228  // Want to update our center of rotation every time we take a step.
229  // baseclass jump is chosen at random from movable jumps every apply
230  rb_jump_ = ( movable_jumps_.size() > 1 ) ?
231  numeric::random::random_element( movable_jumps_ )
232  : movable_jumps_[1];
233 
234  TR.Debug << "Set movable jump #" << rb_jump_ << std::endl;
235 
236  // Set center of rotation unless we are frozen.
237  if(!freeze_){
238  core::Vector dummy_up, dummy_down;
239  if (interface_){
240  protocols::geometry::centroids_by_jump_int(pose, rb_jump_, dummy_up, dummy_down);
241  } else {
243  }
244  rot_center_ = ( partner_ == partner_downstream ) ? dummy_down : dummy_up;
245  }
246 
247  core::kinematics::Jump flexible_jump = pose.jump( rb_jump_ );
249  flexible_jump.set_rb_center( dir_, downstream_stub, rot_center_ );
250 
251  // this should probably be changed so that instead of doing this here, it calls the randomize apply
252  if ( rot_mag_ >= max_allowed_rot_mag ) {
253  Warning() << "Large Gaussian rotational perturbations don't make sense! Bad choices with -dock_pert? Use -randomize[12] instead." << std::endl;
254  }
255 
256  if(!freeze_){
257  rb_delta_ = flexible_jump.gaussian_move( dir_, trans_mag_, rot_mag_ );
258  }else{
259  flexible_jump.set_rb_deltas(dir_, rb_delta_);
260  flexible_jump.fold_in_rb_deltas();
261  }
262  pose.set_jump( rb_jump_, flexible_jump );
263 } // RigidBodyPerturbMover::apply()
264 
267  return "RigidBodyPerturbMover";
268 }
269 
272  return trans_mag_;
273 }
274 
277  return rot_mag_;
278 }
279 
280 void RigidBodyPerturbMover::rot_center( core::Vector const /*rot_center_in*/ )
281 {
282  utility_exit_with_message("Rotation point is automatically determined ONLY");
283 }
284 
285 std::ostream &operator<< ( std::ostream &os, RigidBodyPerturbMover const &mover )
286 {
287  moves::operator<<(os, mover);
288  os << "Jump number: " << mover.rb_jump() << std::endl;
289  os << "Magnitude of translational movement (deg): " << mover.get_trans_mag() << std::endl <<
290  "Magnitude of rotational movement (deg): " << mover.get_rot_mag() << std::endl;
291  return os;
292 }
293 
294 void
296  utility::tag::TagPtr const tag,
300  core::pose::Pose const &
301 ) {
302  rot_mag_ = tag->getOption< core::Real >( "rot_mag", 0.1 );
303  trans_mag_ = tag->getOption< core::Real >( "trans_mag", 0.4 );
304 }
305 
309 }
310 
314 }
315 
318  return "RigidBodyPerturbNoCenter";
319 }
320 
322  return new RigidBodyPerturbNoCenterMover(*this);
323 }
324 
326  Parent(),
327  rot_mag_( 3.0 ),
328  trans_mag_( 8.0 )
329 {
330  moves::Mover::type( "RigidBodyPerturbNoCenter" );
331 }
332 
334  int const rb_jump_in,
335  core::Real const rot_mag_in,
336  core::Real const trans_mag_in
337 ) : RigidBodyMover(),
338  rot_mag_( rot_mag_in ),
339  trans_mag_( trans_mag_in )
340 {
341  movable_jumps_.push_back( rb_jump_in );
342  moves::Mover::type( "RigidBodyPerturbNoCenter" );
343 }
344 
345 
346 ///@details constructor for the rbm that doesn't set a center
348  core::pose::Pose const & pose_in,
349  kinematics::MoveMap const & mm,
350  Real const rot_mag_in,
351  Real const trans_mag_in,
352  Direction dir_in
353 ):
354  RigidBodyMover(),
355  rot_mag_( rot_mag_in ),
356  trans_mag_( trans_mag_in )
357 {
358 
359  TRBM.Debug << "rot_mag " << rot_mag_in << std::endl;
360  TRBM.Debug << "trans_mag " << trans_mag_in << std::endl;
361  moves::Mover::type( "RigidBodyPerturbNoCenter" );
362  for ( Size i=1, i_end = pose_in.num_jump(); i<= i_end; ++i ) {
363  if ( mm.get_jump(i) ) {
364  if( std::find(movable_jumps_.begin(), movable_jumps_.end(), i) == movable_jumps_.end() ) { // if jump is not already in the list
365  movable_jumps_.push_back( i );
366  }
367  }
368  }
369 
370  if ( movable_jumps_.empty() ) {
371  T("protocols.moves.rigid_body") << "[WARNING] no movable jumps!" << std::endl;
372  return;
373  }
374  dir_ = dir_in;
375 }
376 
379 ) :
380  //utility::pointer::ReferenceCount(),
381  Parent( src ),
382  rot_mag_( src.rot_mag_ ),
383  trans_mag_( src.trans_mag_ ),
384  movable_jumps_( src.movable_jumps_ )
385 {}
386 
388 
390  movable_jumps_.push_back( jump_id );
391 }
392 
394  movable_jumps_.clear();
395 }
396 
398 {
399  // set baseclass rb_jump_ randomly from list of movable jumps
400  if ( movable_jumps_.size() > 1 ) {
401  rb_jump_ = numeric::random::random_element( movable_jumps_ );
402  } else if ( movable_jumps_.size() == 1 ) {
404  } else {
405  rb_jump_ = 1;
406  }
407 
408  TR.Debug << "Set movable jump# " << rb_jump_ << std::endl;
409  core::kinematics::Jump flexible_jump = pose.jump( rb_jump_ );
410  flexible_jump.gaussian_move( dir_, trans_mag_, rot_mag_ );
411  pose.set_jump( rb_jump_, flexible_jump );
412 }
413 
416  return "RigidBodyPerturbNoCenterMover";
417 }
418 
420  parent(),
421  partner_( partner_downstream ),
422  phi_angle_(360),
423  psi_angle_(360),
424  update_center_after_move_(true)
425 {
426  moves::Mover::type( "RigidBodyRandomize" );
427 }
428 
429 // constructor with arguments
431  core::pose::Pose const & pose_in,
432  int const rb_jump_in,
433  Partner const partner_in,
434  int phi_angle,
435  int psi_angle,
436  bool update_center_after_move
437 ):
438  RigidBodyMover( rb_jump_in ),
439  partner_( partner_in ),
440  phi_angle_(phi_angle),
441  psi_angle_(psi_angle),
442  update_center_after_move_(update_center_after_move)
443 {
444  moves::Mover::type( "RigidBodyRandomize" );
445  core::Vector upstream_dummy, downstream_dummy;
446  protocols::geometry::centroids_by_jump(pose_in, rb_jump_in, upstream_dummy, downstream_dummy );
447  if ( partner_in == partner_downstream ) rot_center_ = downstream_dummy;
448  else rot_center_ = upstream_dummy;
449 }
450 
452  //utility::pointer::ReferenceCount(),
453  parent( src ),
454  partner_( src.partner_ ),
455  phi_angle_( src.phi_angle_ ),
456  psi_angle_( src.psi_angle_ )
457 {}
458 
460 
462 {
463  core::kinematics::Jump flexible_jump = pose.jump( rb_jump_ );
464  TRBM << "Randomize: " << "Jump (before): " << flexible_jump << std::endl;
467  TRBM << "Randomize: " << "Rot (before): "
468  << rot_center_.x() << " "
469  << rot_center_.y() << " "
470  << rot_center_.z() << std::endl;
471  // comments for set_rb_center() explain which stub to use when!
472  flexible_jump.set_rb_center( dir_, downstream_stub, rot_center_ );
474  flexible_jump.rotation_by_matrix( upstream_stub, rot_center_, rotation_matrix_);
475  TRBM << "Randomize: " << "Jump (after): " << flexible_jump << std::endl;
476  pose.set_jump( rb_jump_, flexible_jump );
477 
478  if(update_center_after_move_){ // update rot_center_ // TODO fix this so we don't update center, because that ruins our freezing ability
479  core::Vector dummy_up, dummy_down;
480  protocols::geometry::centroids_by_jump(pose, rb_jump_, dummy_up, dummy_down);
481  rot_center_ = ( partner_ == 2 ) ? dummy_down : dummy_up;
482  }
483 
484  TRBM << "Randomize: " << "Rot (after): "
485  << rot_center_.x() << " "
486  << rot_center_.y() << " "
487  << rot_center_.z() << std::endl;
488  TRBM << "Randomize: " << "---" << std::endl;
489 }
490 
493  return "RigidBodyRandomizeMover";
494 }
495 
498  return phi_angle_;
499 }
500 
503  return psi_angle_;
504 }
505 
506 std::ostream &operator<< ( std::ostream &os, RigidBodyRandomizeMover const &randommover )
507 {
508  moves::operator<<(os, randommover);
509  os << "Jump number: " << randommover.rb_jump() << "\nPhi angle: " << randommover.get_phi() <<
510  "\nPsi angle: " << randommover.get_psi() << std::endl;
511  return os;
512 }
513 
515 {
516  moves::Mover::type( "RigidBodySpin" );
517 }
518 
519 ///@brief constructor with arguments
520 /// spin axis is initialized to 0 and then calculated during apply()
522  int const rb_jump_in
523 ):
524  RigidBodyMover( rb_jump_in ), spin_axis_( 0.0 ), update_spin_axis_( true )
525 {
526  moves::Mover::type( "RigidBodySpin" );
527 }
528 
530  //utility::pointer::ReferenceCount(),
531  parent( src ),
532  spin_axis_( src.spin_axis_ ),
533  update_spin_axis_( src.update_spin_axis_ )
534 {}
535 
537 
539 {
540  spin_axis_ = spin_axis_in;
541  update_spin_axis_ = false;
542 }
543 
544 void RigidBodySpinMover::rot_center ( core::Vector const rot_center_in )
545 {
546  rot_center_ = rot_center_in;
547  update_spin_axis_ = false;
548 }
549 
550 
552 {
553  core::kinematics::Jump flexible_jump = pose.jump( rb_jump_ );
554  TRBM << "Spin: " << "Jump (before): " << flexible_jump << std::endl;
557 
558  core::Vector dummy_up, dummy_down;
559  if ( update_spin_axis_ ){
560  protocols::geometry::centroids_by_jump(pose, rb_jump_, dummy_up, dummy_down);
561  rot_center_ = dummy_down;
562  spin_axis_ = dummy_up - rot_center_;
563  }
564 
565  TRBM << "Spin: " << "Rot (before: "
566  << rot_center_.x() << " "
567  << rot_center_.y() << " "
568  << rot_center_.z() << std::endl;
569  // comments for set_rb_center() explain which stub to use when!
570  flexible_jump.set_rb_center( dir_, downstream_stub, rot_center_ );
571  flexible_jump.rotation_by_axis( upstream_stub, spin_axis_, rot_center_, 360.0f*RG.uniform() );
572  TRBM << "Spin: " << "Jump (after): " << flexible_jump << std::endl;
573  pose.set_jump( rb_jump_, flexible_jump );
574  protocols::geometry::centroids_by_jump(pose, rb_jump_, dummy_up, dummy_down);
575  rot_center_ = dummy_down;
576  TRBM << "Spin: " << "Rot (after): "
577  << rot_center_.x() << " "
578  << rot_center_.y() << " "
579  << rot_center_.z() << std::endl;
580  TRBM << "Spin: " << "---" << std::endl;
581 }
582 
585  return "RigidBodySpinMover";
586 }
587 
588 std::ostream &operator<< ( std::ostream &os, RigidBodySpinMover const &spinmover )
589 {
590  moves::operator<<(os, spinmover);
591  os << "Jump number: " << spinmover.rb_jump() << std::endl;
592  return os;
593 }
594 
596 {
597  moves::Mover::type( "RigidBodyDeterministicSpin" );
598  angle_magnitude_ = 0.0;
599 
600 }
601 
602 ///@brief constructor with arguments
603 /// takes a complete set of arguments needed for apply
604 RigidBodyDeterministicSpinMover::RigidBodyDeterministicSpinMover( int const rb_jump_in, core::Vector spin_axis, core::Vector rot_center, float angle_magnitude ):
605 parent( rb_jump_in )
606 {
607  moves::Mover::type( "RigidBodyDeterministicSpin" );
611  update_spin_axis_ = false;
612 }
613 
615 parent( src ),
616 angle_magnitude_( src.angle_magnitude_)
617 {}
618 
620 
622 {
624 }
625 
626 
628 {
629  core::kinematics::Jump flexible_jump = pose.jump( rb_jump_ );
630  TRBM << "Spin: " << "Jump (before): " << flexible_jump << std::endl;
633 
634  core::Vector dummy_up, dummy_down;
635  if ( update_spin_axis_ ){
636  protocols::geometry::centroids_by_jump(pose, rb_jump_, dummy_up, dummy_down);
637  rot_center_ = dummy_down;
638  spin_axis_ = dummy_up - rot_center_;
639  }
640 
641  TRBM << "Spin: " << "Rot (before: "
642  << rot_center_.x() << " "
643  << rot_center_.y() << " "
644  << rot_center_.z() << std::endl;
645  // comments for set_rb_center() explain which stub to use when!
646  flexible_jump.set_rb_center( dir_, downstream_stub, rot_center_ );
647  flexible_jump.rotation_by_axis( upstream_stub, spin_axis_, rot_center_, angle_magnitude_ );
648  TRBM << "Spin: " << "Jump (after): " << flexible_jump << std::endl;
649  pose.set_jump( rb_jump_, flexible_jump );
650  protocols::geometry::centroids_by_jump(pose, rb_jump_, dummy_up, dummy_down);
651  rot_center_ = dummy_down;
652  TRBM << "Spin: " << "Rot (after): "
653  << rot_center_.x() << " "
654  << rot_center_.y() << " "
655  << rot_center_.z() << std::endl;
656  TRBM << "Spin: " << "---" << std::endl;
657 }
658 
661  return "RigidBodyDeterministicSpinMover";
662 }
663 
664 std::ostream &operator<< ( std::ostream &os, RigidBodyDeterministicSpinMover const &spinmover )
665 {
666  moves::operator<<(os, spinmover);
667  os << "Jump number: " << spinmover.rb_jump() << std::endl;
668  return os;
669 }
670 
672 {
673  moves::Mover::type( "RigidBodyTrans" );
674 }
675 
676 // constructor with arguments
678  core::pose::Pose const & pose_in,
679  int const rb_jump_in
680 ):
681  RigidBodyMover( rb_jump_in )
682 {
683  moves::Mover::type( "RigidBodyTrans" );
684  step_size_ = 1.0;
685  core::Vector upstream_dummy, downstream_dummy;
686  protocols::geometry::centroids_by_jump(pose_in, rb_jump_in, upstream_dummy, downstream_dummy );
687  trans_axis_ = downstream_dummy - upstream_dummy;
688 }
689 
691  //utility::pointer::ReferenceCount(),
692  parent( src ),
693  step_size_( src.step_size_ ),
694  trans_axis_( src.trans_axis_ )
695 {}
696 
698 
700 {
701  core::kinematics::Jump flexible_jump = pose.jump( rb_jump_ );
702  TRBM << "Translate: " << "Jump (before): " << flexible_jump << std::endl;
704  flexible_jump.translation_along_axis( upstream_stub, trans_axis_, step_size_ );
705  TRBM << "Translate: " << "Jump (after): " << flexible_jump << std::endl;
706  pose.set_jump( rb_jump_, flexible_jump );
707 }
708 
711  return "RigidBodyTransMover";
712 }
713 
714 std::ostream &operator<< ( std::ostream &os, RigidBodyTransMover const &mover )
715 {
716  moves::operator<<(os, mover);
717  os << "Jump number: " << mover.rb_jump() << std::endl;
718  return os;
719 }
720 
721 UniformSphereTransMover::UniformSphereTransMover() : parent(), step_size_(1), random_step_(0), trans_axis_()
722 {
723  moves::Mover::type( "UniformSphereTrans" );
725 }
726 
727 // constructor with arguments
729  int const rb_jump_in,
730  core::Real step_size_in
731 ):
732  parent( rb_jump_in ),
733  step_size_( step_size_in ),
734  random_step_(0),
735  trans_axis_()
736 
737 {
738  moves::Mover::type( "UniformSphereTrans" );
739  reset_trans_axis(); // start with a random trans_axis, freeze is valid without first calling apply
740 }
741 
743  //utility::pointer::ReferenceCount(),
744  parent( src ),
745  step_size_( src.step_size_ ),
746  random_step_(src.random_step_),
747  trans_axis_(src.trans_axis_)
748 
749 {}
750 
752 
754  do {
755  trans_axis_.assign( step_size_*2*(RG.uniform()-0.5), step_size_*2*(RG.uniform()-0.5), step_size_*2*(RG.uniform()-0.5) );
756  random_step_ = trans_axis_.length();
757  } while( random_step_ > step_size_ );
758  trans_axis_.normalize();
759 }
760 
761 /// @details Sample points in a cube randomly, and discard ones that are outside the sphere.
762 /// This gives us *uniform* sampling of the space inside, whereas
763 /// choosing a random distance and a random direction samples more near the center.
765 {
766  if(! freeze_) reset_trans_axis();
767 
768  RigidBodyTransMover mover( pose, rb_jump_);
769  mover.trans_axis( trans_axis_ );
770  mover.step_size( random_step_ );
771  mover.apply( pose );
772 }
773 
776  return "UniformSphereTransMover";
777 }
778 
781 {
782  moves::Mover::type( "RigidBodyDofRandomize" );
783 }
784 
785 // @details rigid body randomization according to SymDof information. It randomizes all
786 // allowed dof dor a single jump
788  int const rb_jump_in,
790 ):
791  RigidBodyMover( rb_jump_in )
792 {
793  moves::Mover::type( "RigidBodyDofRandomize" );
794  rb_jump_ = rb_jump_in;
795  dof_ = dof;
796 }
797 
798 
800  //utility::pointer::ReferenceCount(),
801  parent( src ),
802  dof_( src.dof_ )
803 {}
804 
806 
808 {
809  using namespace core::conformation::symmetry;
810 
811  core::kinematics::Jump flexible_jump = pose.jump( rb_jump_ );
812 
813  TRBM.Debug << "Randomize: " << "Jump (before): " << flexible_jump << std::endl;
814  // randomize the translational dofs first. We have 3 possible directions: x, y,z
815  for ( int i = X_DOF; i <= Z_DOF; ++i ) {
816  // randomize if dof is allowed and we have specified a range to randomize the translation
817  // for the specific dof
818  if ( dof_.allow_dof(i) && ( dof_.has_range1(i) || dof_.has_range1_lower(i) ) ) {
819  core::Real new_trans(0);
820  if ( dof_.has_range1(i) ) {
821  new_trans = RG.uniform()*(dof_.range1_upper(i) - dof_.range1_lower(i) ) + dof_.range1_lower(i);
822  } else {
823  new_trans = dof_.range1_lower(i);
824  }
825  Vector trans;
826  if ( i == X_DOF ) trans = Vector(1,0,0)*new_trans;
827  if ( i == Y_DOF ) trans = Vector(0,1,0)*new_trans;
828  if ( i == Z_DOF ) trans = Vector(0,0,1)*new_trans;
829  // reverse the jump if the dof specifies so
830  if ( dof_.jump_direction(i) == c2n ) flexible_jump.reverse();
831  flexible_jump.set_translation( trans );
832  if ( dof_.jump_direction(i) == c2n ) flexible_jump.reverse();
833  pose.set_jump( rb_jump_, flexible_jump );
834  }
835  }
836  // Now apply rotations
837  for ( int i = X_ANGLE_DOF; i <= Z_ANGLE_DOF; ++i ) {
838  // If the user has set 360 degrees rotation for X_ANGLE, Y_ANGLE and Z_ANGLE the n we want
839  // uniform randomization as well. Observe that randomizing x,y,z independent does not give
840  // uniform randomization!
841  if ( std::abs( dof_.range1_lower(X_ANGLE_DOF) - dof_.range1_upper(X_ANGLE_DOF) ) == 360 &&
842  std::abs( dof_.range1_lower(Y_ANGLE_DOF) - dof_.range1_upper(Y_ANGLE_DOF) ) == 360 &&
843  std::abs( dof_.range1_lower(Z_ANGLE_DOF) - dof_.range1_upper(Z_ANGLE_DOF) ) == 360 ) {
844  if ( dof_.jump_direction(i) == c2n ) flexible_jump.reverse();
846  flexible_jump.get_rotation();
847  flexible_jump.set_rotation( rot );
848  if ( dof_.jump_direction(i) == c2n ) flexible_jump.reverse();
849  pose.set_jump( rb_jump_, flexible_jump );
850  break;
851  }
852  // randomize each rotational dof independently
853  if ( dof_.allow_dof(i) && dof_.has_range1(i) ) {
855  core::Real angle = RG.uniform()*(dof_.range1_upper(i) - dof_.range1_lower(i) ) + dof_.range1_lower(i);
856 
857  if ( i == X_ANGLE_DOF ) rot = numeric::x_rotation_matrix_degrees(angle);
858  if ( i == Y_ANGLE_DOF ) rot = numeric::y_rotation_matrix_degrees(angle);
859  if ( i == Z_ANGLE_DOF ) rot = numeric::z_rotation_matrix_degrees(angle);
860  if ( dof_.jump_direction(i) == c2n ) flexible_jump.reverse();
861  rot *= flexible_jump.get_rotation();
862  flexible_jump.set_rotation( rot );
863  if ( dof_.jump_direction(i) == c2n ) flexible_jump.reverse();
864  pose.set_jump( rb_jump_, flexible_jump );
865  }
866  if ( dof_.allow_dof(i) && !dof_.has_range1(i) && dof_.has_range1_lower(i) ) {
868 
869  if ( i == X_ANGLE_DOF ) rot = numeric::x_rotation_matrix_degrees( dof_.range1_lower(i) );
870  if ( i == Y_ANGLE_DOF ) rot = numeric::y_rotation_matrix_degrees( dof_.range1_lower(i) );
871  if ( i == Z_ANGLE_DOF ) rot = numeric::z_rotation_matrix_degrees( dof_.range1_lower(i) );
872  if ( dof_.jump_direction(i) == c2n ) flexible_jump.reverse();
873  rot *= flexible_jump.get_rotation();
874  flexible_jump.set_rotation( rot );
875  if ( dof_.jump_direction(i) == c2n ) flexible_jump.reverse();
876  pose.set_jump( rb_jump_, flexible_jump );
877  }
878  }
879  TRBM.Debug << "Randomize: " << "Jump (after): " << flexible_jump << std::endl;
880  TRBM.Debug << "Randomize: " << "---" << std::endl;
881 }
882 
885  return "RigidBodyDofRandomizeMover";
886 }
887 
889  parent()
890 {
891  moves::Mover::type( "RigidBodyDofRandomize" );
892 }
893 
894  // constructor with arguments
896  std::map< Size, core::conformation::symmetry::SymDof > const & dofs
897 ):
898  parent()
899 {
900  moves::Mover::type( "RigidBodyDofSeqRandomize" );
901  dofs_ = dofs;
902 }
903 
906 ) :
907  //utility::pointer::ReferenceCount(),
908  parent( src ),
909  dofs_( src.dofs_ )
910 {}
911 
913 
914 
915 // @details go through and perturb all movable dofs in sequence
917 {
918  using namespace core::conformation::symmetry;
919 
920  std::map< Size, SymDof >::iterator it;
921  std::map< Size, SymDof >::iterator it_begin = dofs_.begin();
922  std::map< Size, SymDof >::iterator it_end = dofs_.end();
923  for ( it = it_begin; it != it_end; ++it ) {
924  int jump_nbr ( (*it).first );
925  SymDof dof ( (*it).second );
926  RigidBodyDofRandomizeMover dofrandommover( jump_nbr, dof );
927  dofrandommover.apply( pose );
928  }
929 }
930 
933  return "RigidBodyDofSeqRandomizeMover";
934 }
935 
936 
937 // default constructor
939 {
940  moves::Mover::type( "RigidBodyDofTrans" );
941 }
942 
943 
944 // @details Constructor for a rigid body translation mover
945 // moves only along directions defined by a vector
946 // of dofs (x,y or z). If more than two directions are
947 // allowed the move along them as well. This probably
948 // never makes sense. Perhaps more logical to select one
949 // direction randomly then?
952  int const rb_jump_in,
953  core::Real step_size
954 ):
955  RigidBodyMover( rb_jump_in )
956 {
957  moves::Mover::type( "RigidBodyDofTrans" );
958  jump_dir_ = n2c;
959  // This is fishy. We should not have different directions for the same jump
960  // need to put in checks for that...
961  if ( dof.jump_direction(1) == c2n || dof.jump_direction(2) == c2n
962  || dof.jump_direction(3) == c2n ) jump_dir_ = c2n;
964  core::Vector zero(0,0,0), x(1,0,0), y(0,1,0), z(0,0,1);
965  trans_axis_ = zero;
966  if ( dof.allow_dof(1) ) {
967  zero += x;
968  }
969  if ( dof.allow_dof(2) ) {
970  zero += y;
971  }
972  if ( dof.allow_dof(3) ) {
973  zero += z;
974  }
975  trans_axis_ = zero;
976 }
977 
978 // constructor with arguments
980  std::map< Size, core::conformation::symmetry::SymDof > dofs
981 ):
983 {
984 
985  utility::vector1< int > trans_jumps;
986 
987  moves::Mover::type( "RigidBodyDofTrans" );
988  jump_dir_ = n2c;
989  step_size_ = 0.5;
990 
991  // Save jumps that are allowed to move and have a translation dof
992  std::map< Size, core::conformation::symmetry::SymDof >::iterator it;
993  std::map< Size, core::conformation::symmetry::SymDof >::iterator it_begin = dofs.begin();
994  std::map< Size, core::conformation::symmetry::SymDof >::iterator it_end = dofs.end();
995  for ( it = it_begin; it != it_end; ++it ) {
996  int jump_nbr ( (*it).first );
997  core::conformation::symmetry::SymDof dof ( (*it).second );
998  if ( dof.allow_dof(1) || dof.allow_dof(2) || dof.allow_dof(3) ) {
999  trans_jumps.push_back( jump_nbr );
1000  }
1001  }
1002 
1003  if ( trans_jumps.empty() ) {
1004  T("protocols.moves.rigid_body") << "[WARNING] no movable jumps!" << std::endl;
1005  return;
1006  }
1007  rb_jump_ = numeric::random::random_element( trans_jumps );
1008  std::map< Size, core::conformation::symmetry::SymDof >::iterator jump_iterator =
1009  dofs.find( rb_jump_ );
1010  if ( jump_iterator == dofs.end() ) {
1011  T("protocols.moves.rigid_body") << "[WARNING] jump dof not found!" << std::endl;
1012  } else {
1013  core::conformation::symmetry::SymDof dof( (*jump_iterator).second );
1014  // This is fishy. We should not have different directions for the same jump
1015  // need to put in checks for that...
1016  if ( dof.jump_direction(1) == c2n || dof.jump_direction(2) == c2n
1017  || dof.jump_direction(3) == c2n ) jump_dir_ = c2n;
1018  core::Vector zero(0,0,0), x(1,0,0), y(0,1,0), z(0,0,1);
1019  trans_axis_ = zero;
1020  if ( dof.allow_dof(1) ) {
1021  zero += x;
1022  }
1023  if ( dof.allow_dof(2) ) {
1024  zero += y;
1025  }
1026  if ( dof.allow_dof(3) ) {
1027  zero += z;
1028  }
1029  trans_axis_ = zero;
1030  }
1031 }
1032 
1034  //utility::pointer::ReferenceCount(),
1035  parent( src ),
1036  jump_dir_( src.jump_dir_ ),
1037  step_size_( src.step_size_ ),
1038  trans_axis_( src.trans_axis_ )
1039 {}
1040 
1042 
1043 
1045 {
1046  core::kinematics::Jump flexible_jump = pose.jump( rb_jump_ );
1047  int c2n(-1);
1048  TRBM.Debug << "Translate: " << "Jump (before): " << flexible_jump << std::endl;
1049  Vector trans_start ( flexible_jump.get_translation() );
1050  if ( jump_dir_ == c2n ) flexible_jump.reverse();
1051  flexible_jump.set_translation( trans_start + step_size_*trans_axis_ );
1052  if ( jump_dir_ == c2n ) flexible_jump.reverse();
1053  TRBM.Debug << "Translate: " << "Jump (after): " << flexible_jump << std::endl;
1054  pose.set_jump( rb_jump_, flexible_jump );
1055 }
1056 
1059  return "RigidBodyDofTransMover";
1060 }
1061 
1062 // default constructor
1064 {
1065  moves::Mover::type( "RigidBodyDofSeqTrans" );
1066 }
1067 
1068 
1069 // @details go through all movable dofs for which translatiions are allowed
1070 // and apply a translation
1071 // constructor with arguments
1073  std::map< Size, core::conformation::symmetry::SymDof > dofs
1074  ):
1076 {
1077 
1078  utility::vector1< int > trans_jumps;
1079 
1080  moves::Mover::type( "RigidBodyDofSeqTrans" );
1081  step_size_ = 0.5;
1082  trans_axis_ = Vector(1,0,0);
1083  // Save jumps that are allowed to move and have a translation dof
1084  std::map< Size, core::conformation::symmetry::SymDof >::iterator it;
1085  std::map< Size, core::conformation::symmetry::SymDof >::iterator it_begin = dofs.begin();
1086  std::map< Size, core::conformation::symmetry::SymDof >::iterator it_end = dofs.end();
1087  for ( it = it_begin; it != it_end; ++it ) {
1088  int jump_nbr ( (*it).first );
1089  core::conformation::symmetry::SymDof dof ( (*it).second );
1090  if ( dof.allow_dof(1) || dof.allow_dof(2) || dof.allow_dof(3) ) {
1091  trans_jumps.push_back( jump_nbr );
1092  }
1093  }
1094 
1095  if ( trans_jumps.empty() ) {
1096  T("protocols.moves.rigid_body") << "[WARNING] no movable jumps!" << std::endl;
1097  return;
1098  }
1099  dofs_ = dofs;
1100  rb_jumps_ = trans_jumps;
1101 }
1102 
1103 
1105  //utility::pointer::ReferenceCount(),
1106  parent( src ),
1107  dofs_( src.dofs_ ),
1108  rb_jumps_( src.rb_jumps_ ),
1109  step_size_( src.step_size_ ),
1110  trans_axis_( src.trans_axis_ )
1111 {}
1112 
1114 
1116 {
1117 
1118  std::map< Size, core::conformation::symmetry::SymDof >::iterator jump_iterator;
1120  start = rb_jumps_.begin();
1121  end = rb_jumps_.end();
1122 
1123  //random__shuffle(rb_jumps_.begin(), rb_jumps_.end() );
1124  numeric::random::random_permutation(rb_jumps_.begin(), rb_jumps_.end(), numeric::random::RG);
1125 
1126  for ( it = start; it != end; ++it ) {
1127  jump_iterator = dofs_.find( *it );
1128  if ( jump_iterator == dofs_.end() ) {
1129  T("protocols.moves.rigid_body") << "[WARNING] jump dof not found!" << std::endl;
1130  } else {
1131  core::conformation::symmetry::SymDof dof( (*jump_iterator).second );
1132  RigidBodyDofTransMover dofmover( dof, *it, step_size_ );
1133  // Silly, just reverse the direction if this vector is reversed
1134  // Since we don't store the direction in this mover
1135  // trans_axis_ serves as a storage for the direction
1136  if ( trans_axis_(1) < 0 ) dofmover.trans_axis().negate();
1137  dofmover.apply( pose );
1138  }
1139  }
1140 }
1141 
1142 
1145  return "RigidBodyDofSeqTransMover";
1146 }
1147 
1148 
1150 {
1151  moves::Mover::type( "RigidBodyDofRandomTrans" );
1152 }
1153 
1154  // @details go randomly set a random translation. Select all
1155  // movable dofs but apply the randomization in random order
1156 
1157  // constructor with arguments
1159  std::map< Size, core::conformation::symmetry::SymDof > dofs
1160 ):
1161  parent()
1162 {
1163 
1164  utility::vector1< int > trans_jumps;
1165 
1166  moves::Mover::type( "RigidBodyDofRandomTrans" );
1167  step_size_ = 0.5;
1168  trans_axis_ = Vector(1,0,0);
1169  // Save jumps that are allowed to move and have a translation dof
1170  std::map< Size, core::conformation::symmetry::SymDof >::iterator it;
1171  std::map< Size, core::conformation::symmetry::SymDof >::iterator it_begin = dofs.begin();
1172  std::map< Size, core::conformation::symmetry::SymDof >::iterator it_end = dofs.end();
1173  for ( it = it_begin; it != it_end; ++it ) {
1174  int jump_nbr ( (*it).first );
1175  core::conformation::symmetry::SymDof dof ( (*it).second );
1176  if ( dof.allow_dof(1) || dof.allow_dof(2) || dof.allow_dof(3) ) {
1177  trans_jumps.push_back( jump_nbr );
1178  }
1179  }
1180 
1181  if ( trans_jumps.empty() ) {
1182  T("protocols.moves.rigid_body") << "[WARNING] no movable jumps!" << std::endl;
1183  return;
1184  }
1185  dofs_ = dofs;
1186  rb_jumps_ = trans_jumps;
1187 }
1188 
1190  //utility::pointer::ReferenceCount(),
1191  parent( src ),
1192  dofs_( src.dofs_ ),
1193  rb_jumps_( src.rb_jumps_ ),
1194  step_size_( src.step_size_ ),
1195  trans_axis_( src.trans_axis_ )
1196 {}
1197 
1199 
1200 
1202 {
1203 
1204  std::map< Size, core::conformation::symmetry::SymDof >::iterator jump_iterator;
1206  start = rb_jumps_.begin();
1207  end = rb_jumps_.end();
1208 
1209  //random__shuffle(rb_jumps_.begin(), rb_jumps_.end() );
1210  numeric::random::random_permutation(rb_jumps_.begin(), rb_jumps_.end(), numeric::random::RG);
1211 
1212  int jump_;
1213  if ( rb_jumps_.size() < 1 ) return;
1214  else jump_ = rb_jumps_[1];
1215  jump_iterator = dofs_.find( jump_ );
1216  if ( jump_iterator == dofs_.end() ) {
1217  T("protocols.moves.rigid_body") << "[WARNING] jump dof not found!" << std::endl;
1218  } else {
1219  core::conformation::symmetry::SymDof dof( (*jump_iterator).second );
1220  RigidBodyDofTransMover dofmover( dof, (*jump_iterator).first, step_size_ );
1221  // Silly, just reverse the direction if this vector is reversed
1222  // Since we don't store the direction in this mover
1223  // trans_axis_ serves as a storage for the direction
1224  if ( trans_axis_(1) < 0 ) dofmover.trans_axis().negate();
1225  dofmover.apply( pose );
1226  }
1227 }
1228 
1229 
1232  return "RigidBodyDofRandomTransMover";
1233 }
1234 
1235 // @details apply a random transformation to a certain jump and use
1236 // the jump step according to dof information if dof_range1 exists.
1237 // Othervise use the trans and rot magnitudes from the constructor
1239  int const rb_jump_in,
1241  core::Real const rot_mag_in,
1242  core::Real const trans_mag_in
1243 ):
1244  RigidBodyMover(),
1245  rot_mag_( rot_mag_in ),
1246  trans_mag_( trans_mag_in )
1247 {
1248 // TRBM.Debug << "rot_mag " << rot_mag_in << std::endl;
1249 // TRBM.Debug << "trans_mag " << trans_mag_in << std::endl;
1250  moves::Mover::type( "RigidBodyDofPerturbMover" );
1251 
1252  rb_jump_ = rb_jump_in;
1253  dof_ = dof;
1254 }
1255 
1256 
1257 // @details apply a random transformation to a certain jump and use
1258 // the jump step according to dof information if dof_range1 exists.
1259 // Othervise use the trans and rot magnitudes from the constructor.
1260 // The jump is selected randomly from the allowed dofs
1262  std::map< Size, core::conformation::symmetry::SymDof > dofs,
1263  Real const rot_mag_in,
1264  Real const trans_mag_in
1265 ):
1266  RigidBodyMover(),
1267  rot_mag_( rot_mag_in ),
1268  trans_mag_( trans_mag_in )
1269 {
1270  utility::vector1< int > moving_jumps;
1271 
1272 // TRBM.Debug << "rot_mag " << rot_mag_in << std::endl;
1273 // TRBM.Debug << "trans_mag " << trans_mag_in << std::endl;
1274  moves::Mover::type( "RigidBodyDofPerturbMover" );
1275 
1276  std::map< Size, core::conformation::symmetry::SymDof >::iterator it;
1277  std::map< Size, core::conformation::symmetry::SymDof >::iterator it_begin = dofs.begin();
1278  std::map< Size, core::conformation::symmetry::SymDof >::iterator it_end = dofs.end();
1279  for ( it = it_begin; it != it_end; ++it ) {
1280  moving_jumps.push_back( (*it).first );
1281  }
1282 
1283  if ( moving_jumps.empty() ) {
1284  T("protocols.moves.rigid_body") << "[WARNING] no movable jumps!" << std::endl;
1285  return;
1286  }
1287  rb_jump_ = numeric::random::random_element( moving_jumps );
1288  std::map< Size, core::conformation::symmetry::SymDof >::iterator jump_iterator =
1289  dofs.find( rb_jump_ );
1290  if ( jump_iterator == dofs.end() ) {
1291  T("protocols.moves.rigid_body") << "[WARNING] jump dof not found!" << std::endl;
1292  } else {
1293  core::conformation::symmetry::SymDof dof( (*jump_iterator).second );
1294  dof_ = dof;
1295  }
1296 }
1297 
1299  //utility::pointer::ReferenceCount(),
1300  parent( src ),
1301  dof_( src.dof_ ),
1302  rot_mag_( src.rot_mag_ ),
1303  trans_mag_( src.trans_mag_ )
1304 {}
1305 
1307 
1309 {
1310  core::kinematics::Jump flexible_jump = pose.jump( rb_jump_ );
1311 
1312  int c2n(-1);
1313 
1314  for ( Size i = 1; i<= 3; ++i ) {
1315  if ( dof_.allow_dof(i) ) {
1316  // the dat in the dof takes precedence
1317  core::Real transmag;
1318  if ( dof_.has_range2_lower(i) ) transmag = dof_.range2_lower(i);
1319  else transmag = trans_mag_;
1320  if ( dof_.jump_direction(i) == c2n ) flexible_jump.reverse();
1321  flexible_jump.gaussian_move_single_rb( dir_, transmag, i );
1322  if ( dof_.jump_direction(i) == c2n ) flexible_jump.reverse();
1323  }
1324  }
1325  for ( Size i = 4; i<= 6; ++i ) {
1326  if ( dof_.allow_dof(i) ) {
1327  // the dat in the dof takes precedence
1328  core::Real rotmag;
1329  if ( dof_.has_range2_lower(i) ) rotmag = dof_.range2_lower(i);
1330  else rotmag = rot_mag_;
1331  if ( dof_.jump_direction(i) == c2n ) flexible_jump.reverse();
1332  flexible_jump.gaussian_move_single_rb( dir_, rotmag, i );
1333  if ( dof_.jump_direction(i) == c2n ) flexible_jump.reverse();
1334  }
1335  }
1336  pose.set_jump( rb_jump_, flexible_jump );
1337 }
1338 
1341  return "RigidBodyDofPerturbMover";
1342 }
1343 
1344 // @details apply perturbations to all allowed dofs. Apply them in sequential order.
1346  std::map< Size, core::conformation::symmetry::SymDof > dofs,
1347  Real const rot_mag_in,
1348  Real const trans_mag_in
1349 ):
1350  RigidBodyMover(),
1351  rot_mag_( rot_mag_in ),
1352  trans_mag_( trans_mag_in )
1353 {
1354  utility::vector1< int > moving_jumps;
1355 
1356 // TRBM.Debug << "rot_mag " << rot_mag_in << std::endl;
1357 // TRBM.Debug << "trans_mag " << trans_mag_in << std::endl;
1358  moves::Mover::type( "RigidBodyDofSeqPerturbMover" );
1359 
1360  std::map< Size, core::conformation::symmetry::SymDof >::iterator it;
1361  std::map< Size, core::conformation::symmetry::SymDof >::iterator it_begin = dofs.begin();
1362  std::map< Size, core::conformation::symmetry::SymDof >::iterator it_end = dofs.end();
1363  for ( it = it_begin; it != it_end; ++it ) {
1364  moving_jumps.push_back( (*it).first );
1365  }
1366 
1367  if ( moving_jumps.empty() ) {
1368  T("protocols.moves.rigid_body") << "[WARNING] no movable jumps!" << std::endl;
1369  return;
1370  }
1371  rb_jumps_ = moving_jumps;
1372  dofs_ = dofs;
1373 }
1374 
1376  RigidBodyDofSeqPerturbMover const & src
1377 ) :
1378  //utility::pointer::ReferenceCount(),
1379  parent( src ),
1380  dofs_( src.dofs_ ),
1381  rb_jumps_( src.rb_jumps_ ),
1382  rot_mag_( src.rot_mag_ ),
1383  trans_mag_( src.trans_mag_ )
1384 {}
1385 
1387 
1389 {
1390 
1391  std::map< Size, core::conformation::symmetry::SymDof >::iterator jump_iterator;
1393  start = rb_jumps_.begin();
1394  end = rb_jumps_.end();
1395  // Shuffle the order by which we visit the jumps
1396  //random__shuffle(rb_jumps_.begin(), rb_jumps_.end() );
1397  numeric::random::random_permutation(rb_jumps_.begin(), rb_jumps_.end(), numeric::random::RG);
1398  // Iterate over all available translation jumps
1399  // and do a translation for its allowd translation dofs
1400  for ( it = start; it != end; ++it ) {
1401  jump_iterator = dofs_.find( *it );
1402  if ( jump_iterator == dofs_.end() ) {
1403  T("protocols.moves.rigid_body") << "[WARNING] jump dof not found!" << std::endl;
1404  } else {
1405  core::conformation::symmetry::SymDof dof( (*jump_iterator).second );
1406  RigidBodyDofPerturbMover dofmover( *it, dof, rot_mag_, trans_mag_ );
1407  dofmover.apply( pose );
1408  }
1409  }
1410 }
1411 
1414  return "RigidBodyDofSeqPerturbMover";
1415 }
1416 
1417 
1418 } // namespace rigid
1419 } // namespace protocols