Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LoopClosure.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 src/protocols/abinitio/LoopClosure.hh
11 /// @brief header file for LoopClosure protocol
12 /// @detailed
13 /// Contains currently: Classic Abinitio
14 ///
15 ///
16 /// @author Oliver Lange
17 /// @author Mike Tyka
18 ///
19 
20 
21 #ifndef INCLUDED_protocols_loops_loop_closure_ccd_LoopClosure_hh
22 #define INCLUDED_protocols_loops_loop_closure_ccd_LoopClosure_hh
23 
24 // Unit Headers
26 
27 // Package Headers
28 // AUTO-REMOVED #include <protocols/loops/Loops.hh>
29 
30 // Project Headers
31 #include <core/pose/Pose.fwd.hh>
32 
34 
35 #include <core/types.hh>
36 
39 #include <core/fragment/Frame.hh>
40 
44 
45 // ObjexxFCL Headers
46 
47 // Utility headers
48 #include <utility/pointer/ReferenceCount.hh>
49 
50 //// C++ headers
51 // AUTO-REMOVED #include <cstdlib>
52 // AUTO-REMOVED #include <string>
53 // AUTO-REMOVED #include <vector>
54 
55 #include <protocols/loops/Loop.hh>
56 #include <utility/vector1.hh>
57 
58 
59 namespace protocols {
60 namespace loops {
61 namespace loop_closure {
62 namespace ccd {
63 
65 public:
66  ///@brief constructor: supply fragsets for fragment moves
70  Loop loop_def,
72  );
73 
74  //destructor
75  virtual ~LoopClosure();
76 
77  //@brief run protocol on pose
78  virtual bool apply( core::pose::Pose const& pose );
79 
80  //@brief return the list of collected fragments
81  // fo the basic LoopClosure class this will contain only 1 Frame. could have returned the frame
82  // but maybe it is worth to keep the interface more general ?
85  return closure_frame_;
86  }
87 
88  //@brief returns current movemap
90 
91  // //@brief set new monte-carlo object
92 // void set_mc( moves::MonteCarloOP mc ) {
93 // mc_ = mc;
94 // }
95 
96  //@brief obtain currently used monte-carlo object --> use to obtain current score-func: mc().score_function()
98  return *mc_;
99  }
100 
101 // //@brief obtain currently used monte-carlo object --> use to obtain current score-func: mc().score_function()
102 // moves::MonteCarlo const& mc() const {
103 // return *mc_;
104 // }
105 
107  return *scorefxn_;
108  }
109 
110 
111  //@brief override cycle setting, sets nr_fragments to 100*ratio
112  // and trials to 20*loopsize*ratio
113  void set_cycles( core::Real cycle_ratio = 1.0 );
114 
116 
118  return nr_fragments_;
119  }
120 
121  void ramp_chainbreak( bool setting = true ) {
122  bRampChainbreak_ = setting;
123  }
124 
125 protected:
126  //protected c'stor: set up relevant stuff
127  // and call set_defaults from derived-class c'stor
128  LoopClosure();
129 
130  void init();
131 
132 // //@brief obtain currently used monte-carlo object --> use to obtain current score-func: mc().score_function()
133 // moves::MonteCarloOP mc_ptr() {
134 // return mc_;
135 // }
136 
137  //@brief inner-loop of fragment and ccd-moves
138  virtual void do_frag_cycles( core::pose::Pose &pose ) const;
139 
140  ///@brief save the loop-fragment in closure_frames_
141  virtual void catch_fragment( core::pose::Pose const& pose );
142 
143 // core::fragment::FrameOP&
144 // closure_fragments() {
145 // return closure_frame_;
146 // }
147 
148  ///@brief replace scorefxn
150 
151  void set_loop( Loop const& loop_in ) {
152  loop_ = loop_in;
153  }
154 
155  Loop const& loop() const {
156  return loop_;
157  }
158 
159  void init_mc();
160 
162 
164 
165  //@brief override temperature setting
166  void set_temperature( core::Real temperature ) {
167  temperature_ = temperature;
168  }
169 
170  virtual void ramp_chainbreak( core::Size iter, core::Size total ) const;
171 
172 protected:
174 
176 
177  //@brief a temperature
179 
180  //@brief movemap --> which dofs can be moved during loops
182 
183  //@brief a MonteCarlo object -- set_default_mc() , access: mc()
185 
187 
188  core::Size nr_fragments_; //outer_cycles;
189  core::Size cycles_; // trials per fragments
190 
193 
195 
200 };
201 
202 } // namespace ccd
203 } // namespace loop_closure
204 } // namespace loops
205 } // namespace protocols
206 
207 #endif //INCLUDED_protocols_loops_loop_closure_ccd_LoopClosure_hh