Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RBSegmentRelax.hh
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
11 /// @brief RBSegmentRelax protocol
12 /// @detailed
13 ///
14 ///
15 ///
16 /// @author Srivatsan Raman
17 /// @author Frank DiMaio
18 
19 
20 #ifndef INCLUDED_protocols_rbsegment_relax_RBSegmentRelax_hh
21 #define INCLUDED_protocols_rbsegment_relax_RBSegmentRelax_hh
22 
23 // Package headers
24 // AUTO-REMOVED #include <protocols/rbsegment_Moves/RBSegmentMover.hh>
28 // AUTO-REMOVED #include <protocols/simple_moves/MinMover.hh>
29 
30 #include <core/types.hh>
31 #include <core/pose/Pose.fwd.hh>
33 // AUTO-REMOVED #include <core/id/SequenceMapping.hh>
34 
35 // AUTO-REMOVED #include <core/scoring/ScoreFunction.hh>
36 
37 //C++ headers
38 // AUTO-REMOVED #include <cstdlib>
39 #include <map>
40 #include <list>
41 // AUTO-REMOVED #include <vector>
42 // AUTO-REMOVED #include <cmath>
43 
46 #include <protocols/loops/Loops.hh>
47 #include <protocols/moves/Mover.hh>
48 #include <utility/vector1.hh>
49 
50 
51 namespace protocols {
52 namespace rbsegment_relax {
53 
54 
55 //typedef utility::pointer::owning_ptr< RBSegment > RBSegmentOP;
57 
58 public:
60 
62  utility::vector1< RBSegment > const &RBSegment_input,
63  protocols::loops::Loops const &Loops_input );
65 
67  void apply( core::pose::Pose & pose );
68  virtual std::string get_name() const;
69 
70  void add_helixMover( RBSegmentMoverOP newMover );
71  void add_strandMover( RBSegmentMoverOP newMover );
72  void add_genericRBMover( RBSegmentMoverOP newMover );
75 
76  void clear_movesets();
77 
78  //void reorder_segments();
79 
81  void set_helicalMoveStepsize( core::Real onAxisTrans, core::Real onAxisRot,
82  core::Real offAxisTrans, core::Real offAxisRot );
84  void set_ncycles( int ncycles );
85 
86  void set_cst_weight( core::Real wt );
87  void set_cst_width ( core::Real width );
88  //void set_cst_type ( std::string type );
89 
90  //
91  void set_randomize( core::Size rand ) { rand_ = rand; }
92  void set_bootstrap( bool boot ) { bootstrap_ = boot; }
93  void set_skip_lr( bool skip ) { no_lr_ = skip; }
94  void set_fix_ligands( bool fix ) { fix_ligands_ = fix; }
95 
96 private:
97  void set_default_movemap();
98 
99  // scoring stuff
102  //std::string cst_type_;
105 
106  // protocol parameters -- need get and set methods
108  core::Real init_temp, final_temp; // MC temperature
109  core::Real helical_sigT, helical_sigR; // std dev of helical axis rotations and translations
110  core::Real helical_sigOffAxisT, helical_sigOffAxisR; // std dev of helical off-axis rotations and translations
111  core::Real strand_sigT, strand_sigR; // std dev of strand axis rotations and translations
112  core::Real strand_sigOffAxisT, strand_sigOffAxisR; // std dev of strand off-axis rotations and translations
113  core::Real genericRB_sigT, genericRB_sigR; // stddev of generic RB rotations and translations
114  core::Real randomness_; // Random factor to add to fragment score when choosing RMS-frags
115 
116  core::Size rand_; // number of randomize steps
117  bool no_lr_; // dont do loop relax
118  bool bootstrap_; // initially rebuild pose using fragment insertions only
119  bool fix_ligands_; // [experimental] dont let ligands move during minimize
120 
121  // the rigid-body segments
123 
124  // the loops
126 
127  // fragments
129 
130  // sets of allowed moves for each conf. type
131  std::vector< protocols::moves::MoverOP > WholeStructureMoveSet_;
132  std::vector< RBSegmentMoverOP > HelixMoveSet_;
133  std::vector< RBSegmentMoverOP > StrandMoveSet_;
134  std::vector< RBSegmentMoverOP > GenericRBMoveSet_;
135  std::vector< RBSegmentMoverOP > CompositeSegmentMoveSet_;
136 };
137 
138 
139 /*
140 
141 ////////////////////////////////////////////////////////////
142 /// Sim Anneal Mover
143 ///fd -- note: THis should probably be moved elsewhere
144 ////////////////////////////////////////////////////////////
145 
146 class SimAnnealMover : public protocols::moves::Mover {
147  public:
148  SimAnnealMover() {}
149 
150  SimAnnealMover(
151  protocols::moves::MoverOP mover_in,
152  protocols::moves::MonteCarloOP mc_in,
153  core::Real init_temp,
154  core::Real final_temp,
155  core::Size cycles
156  ) : moves::Mover("SimAnnealMover"),
157  mover_( mover_in ),
158  mc_( mc_in ),
159  init_temp_( init_temp ),
160  final_temp_( final_temp ),
161  cycles_( cycles )
162  {}
163 
164 
165  virtual void apply( core::pose::Pose & pose )
166  {
167  core::Real gamma = std::pow( ( float( final_temp_/ init_temp_ ) ),
168  float( 1.0f/cycles_ ) );
169  core::Real temperature( init_temp_ );
170  mc_->set_temperature( temperature );
171 
172  for ( Size i = 1; i <= cycles_; ++i ) {
173  mover_->apply( pose );
174  temperature *= gamma;
175  //std::cout << "Temperature " << temperature << std::endl;
176  mc_->set_temperature( temperature );
177  }
178  }
179 
180 protected:
181  protocols::moves::MoverOP mover_;
182  protocols::moves::MonteCarloOP mc_;
183  // MoverStatistics stats_;
184 
185 
186 private:
187  core::Real init_temp_, final_temp_;
188  core::Size cycles_;
189 };
190 
191 */
192 
193 }
194 }
195 #endif