Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SlidingWindowLoopClosure.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/SlidingWindowLoopClosure.hh
11 /// @brief header file for SlidingWindowLoopClosure protocol
12 /// @detailed
13 /// Contains currently: Classic Abinitio
14 ///
15 ///
16 /// @author Oliver Lange
17 /// @author James Thompson
18 
19 
20 #ifndef INCLUDED_protocols_loops_loop_closure_ccd_SlidingWindowLoopClosure_hh
21 #define INCLUDED_protocols_loops_loop_closure_ccd_SlidingWindowLoopClosure_hh
22 
23 // Unit Headers
25 
26 // Package Headers
27 // AUTO-REMOVED #include <protocols/loops/Loops.hh>
28 #include <protocols/moves/Mover.hh>
29 
30 // Project Headers
31 #include <core/pose/Pose.fwd.hh>
32 
34 
35 #include <core/types.hh>
36 
38 
39 #include <core/fragment/FragID.hh>
42 
43 //#include <protocols/simple_moves/FragmentMover.hh>
46 // AUTO-REMOVED #include <protocols/evaluation/ConstraintEvaluator.hh>
47 
48 // ObjexxFCL Headers
49 
50 // Utility headers
51 #include <utility/pointer/ReferenceCount.hh>
52 
53 //// C++ headers
54 // AUTO-REMOVED #include <cstdlib>
55 #include <string>
56 // AUTO-REMOVED #include <vector>
57 
59 #include <protocols/loops/Loop.hh>
60 #include <utility/vector1.hh>
61 
62 
63 namespace protocols {
64 namespace loops {
65 namespace loop_closure {
66 namespace ccd {
67 
68 extern std::string const VDW_FRAG_STORE;
69 extern std::string const SCORE_FRAG_STORE;
70 extern std::string const RMSD_FRAG_STORE;
71 
73 public:
74  ///@brief constructor: supply fragsets for fragment moves
79  );
80 
81  //@brief just set defaults -- expects fragset, scorefxn and movemap to be set later
83 
85 
86  using moves::Mover::apply;
87 
88  //@brief run find fragments that close loop (if ideal loop closing: such that the less_cut pose is close RMSD <0.1 to pose more_cut)
89  // returns less_cut and more_cut with best fragment already applied..
90  virtual void apply( core::pose::Pose& more_cut, core::pose::Pose& less_cut );
91  virtual std::string get_name() const;
92 
93  //@brief run find fragments that close loop (if ideal loop closing: such that the less_cut pose is close RMSD <0.1 to pose more_cut)
94  // returns less_cut and more_cut with best fragment already applied..
95  virtual void sample_loops( core::pose::Pose& more_cut, core::pose::Pose& less_cut );
96 
97  //@brief run find fragments that close loop (if ideal loop closing: such that the less_cut pose is close RMSD <0.1 to pose more_cut)
98  // returns less_cut and more_cut with best fragment already applied..
99  virtual void select_final_loop( core::pose::Pose& more_cut, core::pose::Pose& less_cut );
100 
101  // returns less_cut and more_cut with best fragment already applied..
102  virtual void apply( core::pose::Pose& more_cut );
103 
104  static void setPoseExtraScores( core::pose::Pose &pose );
105 
106  //@brief return the list of collected fragments -- here it actually will be more than one Frame
109  return closure_fragments_;
110  }
111 
112  void keep_fragments( bool setting = true ) {
113  bKeepFragments_ = setting;
114  }
115 
116  void output_debug_structure( core::pose::Pose & pose, std::string prefix );
117 
118 
119  //@brief returns current movemap
121  return *movemap_;
122  }
123 
124  //@brief sets the movemap
125  void movemap( core::kinematics::MoveMapCOP movemap );
126 
128  return *scorefxn_;
129  }
130 
132  scorefxn_ = sfxn;
133  }
134 
135  //@brief set fragments for loop-sampling
136  void
139  fragset_ = frags;
140  }
141 
142 
144  scored_frag_cycle_ratio_ = setting;
145  }
146 
148  short_frag_cycle_ratio_ = setting;
149  }
150  // //@brief override cycle setting
151  // void set_cycles( core::Real cycle_ratio = 1.0 );
152  void set_bIdealLoopClosing( bool setting ) {
153  bIdealLoopClosing_ = setting;
154  }
155 
156  bool bIdealLoopClosing() const {
157  return bIdealLoopClosing_;
158  }
159 
160  void set_chainbreak_max( core::Real setting ) {
161  chainbreak_max_ = setting;
162  }
163 
164  void
166 
167  void
168  set_loop( Loop const& loop_in ) {
169  loop_ = loop_in;
170  }
171 
172  Loop determine_loop( core::pose::Pose const& more_cut, core::pose::Pose & less_cut );
173 
174 protected:
175  typedef std::list< std::pair< core::Real, Loop > > WindowList;
176  void generate_window_list( Size loop_size, WindowList& window_list ) const;
177 
178 
179 
180  void set_defaults();
181 
183 
184  //@brief process fragments for loop-closing prowess, keep track of best_fragment
185  // return nr_of new good_loops ( vdw criterion )
186  Size
188  core::fragment::FrameList& frame_in,
189  core::pose::Pose const& more_cut,
190  core::pose::Pose const& loop_pose
191  );
192 
193 // ///@brief replace scorefxn
194 // void set_scorefxn( core::scoring::ScoreFunctionOP scorefxn ) {
195 // scorefxn_ = scorefxn;
196 // }
197 
198 // void set_loop( Loop const& loop_in ) {
199 // loop_ = loop_in;
200 // }
201 
202 // Loop const& loop() const {
203 // return loop_;
204 // }
205 
206 // void init_mc();
207 
208 // void set_movemap( core::kinematics::MoveMapCOP mm ) {
209 // movemap_ = mm;
210 // }
211 
212 // void set_fragset( core::fragment::FragSetCOP frags ) {
213 // fragset_ = frags;
214 // }
215 
216  bool bQuickTest() const {
217  return bQuickTest_;
218  }
219 
220  /// return the score used for filtering ( scorefxn_ + filter_cst_weight_ * filter_cst_ )
222 
223 
224 protected:
225  // min_begin and max_end as well as cutpoint are stored here after call to init
227 
229 
230  //@brief movemap --> which dofs can be moved during loops
232 
233  //@brief a MonteCarlo object -- set_default_mc() , access: mc()
234  //moves::MonteCarloOP mc_; not used
235 
237 
239 
250 
253 
256 
258 
259  //@brief if this flag is set the changes are made to the pose without a chainbreak ( new fold-tree )
260  // thus the loop-fragments are applied to either an idealized chain (if true) or to a loop with chainbreak
261  // loop-fragments are ranked by score of the resulting pose
262  bool bIdealLoopClosing_; //default=true,
263 
265 
268 
269 };
270 
271 } // namespace ccd
272 } // namespace loop_closure
273 } // namespace loops
274 } // namespace protocols
275 
276 #endif //INCLUDED_protocols_loops_loop_closure_ccd_SlidingWindowLoopClosure_hh