Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CentroidRelaxMover.cc
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;
2 // rm-trailing-spaces:t -*-
3 // vi: set ts=2 noet:
4 //
5 // (c) Copyright Rosetta Commons Member Institutions.
6 // (c) This file is part of the Rosetta software suite and is made available
7 // under license.
8 // (c) The Rosetta software is developed by the contributing members of the
9 // Rosetta Commons.
10 // (c) For more information, see http://www.rosettacommons.org. Questions about
11 // this can be
12 // (c) addressed to University of Washington UW TechTransfer,
13 // email: license@u.washington.edu.
14 
15 /// @file CentroidRelaxMover.cc
16 /// @author Robin A Thottungal (rathottungal@gmail.com)
17 
18 // Unit Headers
20 
21 // Package Headers
22 
23 // Project headers
24 #include <core/pose/Pose.hh>
26 #include <protocols/moves/Mover.hh>
32 
35 #include <basic/Tracer.hh>
36 #include <basic/options/option.hh>
37 #include <basic/options/keys/run.OptionKeys.gen.hh>
38 
39 //Utility Headers
40 #include <utility/exit.hh>
41 #include <basic/prof.hh>
42 #include <basic/Tracer.hh>
43 
44 
45 using basic::T;
46 using basic::Error;
47 using basic::Warning;
48 
49 static basic::Tracer TR("protocols.SurfaceDocking.CentroidRelaxMover");
50 
51 
52 namespace protocols {
53 namespace surface_docking {
54 
55 using namespace core;
56 using namespace protocols::moves;
57 
58 //constructor
60  // initilized here to avoid warning!
61  nmoves_=2;
62  temperature_=0.5;
63  kT_=0.5;
64  Mover::type( "CentroidRelaxMover");
65  TR << "CentroidRelaxMover Constructor Called" << std::endl;
67  }
68 
69 //destructor
71 
73  TR << "Setting Defaults" << std::endl;
74  // setting MoveMaps
75  // Setting up default score function -->place to add modified score6 from
76  // rosetta++
79  create_score_function("RS_centroid.wts");//("cen_std.wts");
80  smallmin_type_="linmin";
81  shearmin_type_="dfpmin";
82  benchmark_=false;
83  setupMovers();
85  }
86 
88  using namespace basic::options;
89  using namespace basic::options::OptionKeys;
90  benchmark_ = option[ OptionKeys::run::benchmark ]();
91 
92 }
93 
95  // Setting Common Parameters for movers
97  moveMapOP_->set_bb( true );
98  Real tolerance=0.01;// for minimizer
99 
100  //Setting up smallTrialMover
101  //Creating smallMove; temperature_ : explanation;
102  // nnmoves_ : number of residues to move(Robin thinks its a
103  // good idea to change this based on length of peptide !!!!
105  smallmover_->angle_max(30); // max angle deviation.
106  //Default Values copied from MinMover.cc
108  score_low_res_,smallmin_type_,tolerance,true,false,false);
109  //smallsequenceMover_ =
110  /// new moves::SequenceMover(smallmover_,smallminmover_);
112  smallsequenceMover_->add_mover(smallmover_);
114 
115  //Setting up shearTrialMover
116  //Creating smallMove; temperature_ : explanation;
117  //nnmoves_ : number of residues to move
119  shearmover_->angle_max(30);
120  //Default Values copied from MinMover.cc
122  shearmin_type_,tolerance,true,false,false);
123  //shearsequenceMover_ =
124  //new moves::SequenceMover(shearmover_,shearminmover_);
126  shearsequenceMover_->add_mover(shearmover_);
128 
129 }
130 
131 
133  TR << "Finalizing Movers" << std::endl;
134  // To init the final part of min_trial_small & mini_trial_shear mover
135  // Creating a global mc object that can be used by both
136  // small_min_trial_mover() and shear_min_trial_mover()
138  //smallTrialMover
139  TR << "Finalizing small Movers" << std::endl;
143  //shearTrialMover
144  TR << "Finalizing shear Movers" << std::endl;
148  }
149 
151  FinalizeMovers(pose);
152  TR << "Starting CentroidRelax" << std::endl;
153  Size innerLoopCycle= pose.total_residue();
154  Size outerLoopCycle=6;
155  for ( Size outerLoop = 1; outerLoop <= outerLoopCycle; ++outerLoop ){
156  TR << "OuterLoop Execution Number:"<< outerLoop << std::endl;
157  monteCarlo_->recover_low(pose);
158  shear_trial_min_mover_->apply(pose);
159  for ( Size innerLoop = 1; innerLoop <=innerLoopCycle; ++innerLoop ){
160  TR << "InnerLoop Execution Number:"<< innerLoop << std::endl;
161  small_trial_min_mover_->apply(pose);
162  }
163  }
164  monteCarlo_->show_counters();
165  monteCarlo_->recover_low(pose);
166 }
167 
169  nmoves_ = nmoves_in;
170  }
171 
173  return "CentroidRelaxMover";
174  }
175 
176 
177 
178 } //surfaceDockingProtocol
179 
180 } //protocol