Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SymFoldandDockRbTrialMover.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 // This file is part of the Rosetta software suite and is made available under license.
5 // The Rosetta software is developed by the contributing members of the Rosetta Commons consortium.
6 // (C) 199x-2009 Rosetta Commons participating institutions and developers.
7 // For more information, see http://www.rosettacommons.org/.
8 
9 /// @file MinMover.cc
10 /// @brief
11 /// @author Ingemar Andre
12 
13 // Unit headers
17 #include <core/pose/Pose.hh>
21 
22 // Package headers
26 // AUTO-REMOVED #include <core/conformation/symmetry/util.hh>
27 
28 
29 // options
30 #include <basic/options/option.hh>
31 #include <basic/options/keys/fold_and_dock.OptionKeys.gen.hh>
32 
33 // ObjexxFCL Headers
34 
35 // C++ Headers
36 
37 // Utility Headers
38 #include <basic/Tracer.hh>
39 
40 #include <utility/vector1.hh>
41 
42 
43 namespace protocols {
44 namespace symmetric_docking {
45 
46 static basic::Tracer TR("protocols.moves.symmetry.SymFoldandDockRbTrialMover");
47 
49  Mover( "SymFoldandDockRbTrialMover" ),
50  smooth_move_(false), rot_mag_(8.0), trans_mag_(3.0), rigid_body_cycles_(50), mc_filter_(true)
51 {
53 }
54 
57 ) :
58  Mover( "SymFoldandDockRbTrialMover" ),
59  scorefxn_(scorefxn), smooth_move_(false), rot_mag_(8.0), trans_mag_(3.0), rigid_body_cycles_(50), mc_filter_(true)
60 {}
61 
64  bool smooth_move
65 ) :
66  Mover( "SymFoldandDockRbTrialMover" ),
67  scorefxn_(scorefxn), smooth_move_(smooth_move), rot_mag_(8.0), trans_mag_(3.0), rigid_body_cycles_(50), mc_filter_(true)
68 {}
69 
72  bool smooth_move,
73  core::Real rot_mag,
74  core::Real trans_mag
75 ) :
76  Mover( "SymFoldandDockRbTrialMover" ),
77  scorefxn_( scorefxn), smooth_move_(smooth_move), rot_mag_(rot_mag), trans_mag_(trans_mag)
78 {}
79 
80 void
82 {
84  setup.apply( pose );
85 
86  using namespace core::conformation::symmetry;
87  using namespace basic::options;
88  assert( core::pose::symmetry::is_symmetric( pose ));
89  SymmetricConformation & symm_conf (
90  dynamic_cast<SymmetricConformation & > ( pose.conformation()) );
91 
92  std::map< Size, SymDof > dofs ( symm_conf.Symmetry_Info()->get_dofs() );
93 
94  TR.Debug << "Rb move applied..." << std::endl;
95 
96  core::Real trans_mag_smooth = 0.1;
97  core::Real rot_mag_smooth = 1.0;
98 
99  // Docking options
100  if ( smooth_move_ ) {
101  if ( option[ OptionKeys::fold_and_dock::trans_mag_smooth ].user() ) {
102  trans_mag_smooth = option[ OptionKeys::fold_and_dock::trans_mag_smooth ];
103  }
104  if ( option[ OptionKeys::fold_and_dock::rot_mag_smooth ].user() ) {
105  rot_mag_smooth = option[ OptionKeys::fold_and_dock::rot_mag_smooth ];
106  }
107  }
108 
109  // overrriding constructor or default values
110  if ( option[ OptionKeys::fold_and_dock::rb_rot_magnitude ].user() )
111  {
112  rot_mag_ = ( option[ OptionKeys::fold_and_dock::rb_rot_magnitude ] );
113  }
114 
115  // overrriding constructor or default values
116  if ( option[ OptionKeys::fold_and_dock::rb_trans_magnitude ].user() )
117  {
118  trans_mag_ = ( option[ OptionKeys::fold_and_dock::rb_trans_magnitude ] );
119  }
120 
121  core::Real rot_mag_trial = smooth_move_ ? rot_mag_smooth : rot_mag_;
122  core::Real trans_mag_trial = smooth_move_ ? trans_mag_smooth : trans_mag_;
123 
124  // overrriding constructor or default values
125  if ( option[ OptionKeys::fold_and_dock::rigid_body_cycles ].user() )
126  {
127  rigid_body_cycles_ = ( option[ OptionKeys::fold_and_dock::rigid_body_cycles ] );
128  }
129 
130  if ( option[ OptionKeys::fold_and_dock::rigid_body_disable_mc ].user() )
131  {
132  mc_filter_ = false;
133  }
134 
135  // Setup Monte Carlo object
137 
138  //set up mover for docking
140  protocols::rigid::RigidBodyDofSeqPerturbMover( dofs , rot_mag_trial, trans_mag_trial );
141 
142  if ( option[ OptionKeys::fold_and_dock::rotate_anchor_to_x ].user() ) {
144  }
145 
146  for ( Size i = 1; i <= rigid_body_cycles_; ++i ) {
147  rb_perturb.apply( pose );
148  if ( mc_filter_ ) monteCarlo_->boltzmann( pose );
149  }
150  //monteCarlo_->recover_low(pose);
151 }
152 
155  return "SymFoldandDockRbTrialMover";
156 }
157 
158 
159 } // symmetric_docking
160 } // protocols