Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RemodelMover.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 protocols/forge/remodel/RemodelMover.hh
11 /// @brief
12 /// @author Yih-En Andrew Ban (yab@u.washington.edu)
13 
14 #ifndef INCLUDED_protocols_forge_remodel_RemodelMover_hh
15 #define INCLUDED_protocols_forge_remodel_RemodelMover_hh
16 
17 // unit headers
22 
23 // type headers
24 #include <core/types.hh>
25 
26 // package headers
29 // AUTO-REMOVED #include <protocols/forge/build/Interval.hh>
31 
32 // project headers
34 #include <core/pose/Pose.fwd.hh>
36 #include <protocols/moves/Mover.hh>
37 
38 #include <protocols/moves/DataMap.fwd.hh> //parser
39 
40 // utility headers
41 #include <utility/vector1.hh>
42 
43 // C++ headers
44 #include <string>
45 
46 
47 namespace protocols {
48 namespace forge {
49 namespace remodel {
50 
51 
53 
54 
55 private: // typedefs
56 
57 
59 
60 
61 public: // typedefs
62 
63 
65 
66  typedef core::Real Real;
67  typedef core::Size Size;
72 
82 
83  /// @brief A pair storing a instruction's original interval and a string
84  /// denoting the sequence during design.
85  /// @remarks This is only for instructions such as SegmentRebuild or
86  /// SegmentInsert. Non-applicable instructions will not have any data
87  /// stored here.
88  typedef std::pair< Interval, String > OriginalInterval2DesignString;
90 
91 //parser fabio
96 
97 public: // construct/destruct
98 
99 
100  /// @brief default constructor
101  RemodelMover();
102 
103 
104  /// @brief copy constructor
105  RemodelMover( RemodelMover const & rval );
106 
107 
108  /// @brief default destructor
109  virtual
110  ~RemodelMover();
111 
112 
113 private: // disallow assignment
114 
115 
116  /// @brief copy assignment
117  /// @remarks Mover base class prevents this from working properly...
118  RemodelMover & operator =( RemodelMover const & rval );
119 
120 
121 public: // virtual constructors
122 
123  /// @brief clone this object, for parser
124  virtual
125  MoverOP clone() const;
126 
127 
128  /// @brief create this type of object, for parser
129  virtual
130  MoverOP fresh_instance() const;
131 
132 
133  /// @brief clone this object
134  virtual
135  MoverOP clone();
136 
137 
138  /// @brief create this type of object
139  virtual
141 
142 
143 public: // accessors
144 
145 /*
146  /// @brief use full-mer fragments when building the loop? (default false)
147  inline
148  bool use_fullmer() const {
149  return use_fullmer_;
150  }
151 
152 
153  /// @brief use sequence biased fragments when building the loop? (default false)
154  inline
155  bool use_sequence_bias() const {
156  return use_sequence_bias_;
157  }
158 
159 
160  /// @brief the maximum allowed linear chainbreak (default 0.07)
161  inline
162  Real max_linear_chainbreak() const {
163  return max_linear_chainbreak_;
164  }
165 
166 
167  /// @brief the loop mover string to use during centroid build
168  /// (default "RemodelLoopMover")
169  /// @remarks set to either a string the create_loop_mover() LoopMoverFactory
170  /// recognizes or the "RemodelLoopMover"
171  inline
172  String const & centroid_loop_mover_str() const {
173  return centroid_loop_mover_str_;
174  }
175 
176 
177  /// @brief redesign the neighborhood around the loop? if false, then just
178  /// repacks during the design phase (default true)
179  inline
180  bool redesign_loop_neighborhood() const {
181  return redesign_loop_neighborhood_;
182  }
183 
184 
185  /// @brief name of the resfile to use during design-refine; empty string
186  /// implies no resfile
187  inline
188  String const & resfile() const {
189  return resfile_;
190  }
191 
192 
193  /// @brief the number of design-refine cycles to perform, default 3
194  inline
195  Size dr_cycles() const {
196  return dr_cycles_;
197  }
198 */
199 
200  /// @brief the centroid level score function, default "remodel_cen"
201  ScoreFunction const & centroid_scorefunction() const;
202 
203 
204  /// @brief the full-atom level score function, default score12
205  ScoreFunction const & fullatom_scorefunction() const;
206 
207 
208 public: // mutators
209 
210 
211  /// @brief add instruction to the manager of this RemodelMover (no copy)
212  /// @param[in] bi BuildInstruction
213  /// @param[in] aa_during_design_refine The allowed amino acid sequence
214  /// during design. Only applicable to BuildInstructions like
215  /// SegmentRebuild and SegmentInsert. Make sure the length of this
216  /// string matches up properly, and remember to use any special characters,
217  /// e.g. the insertion character for SegmentInsert
218  /*
219  void add_instruction(
220  BuildInstructionOP bi,
221  String const & aa_during_design_refine = String()
222  );
223 
224 
225  /// @brief create directed dependency between two instructions
226  void create_directed_dependency(
227  BuildInstructionOP u,
228  BuildInstructionOP v
229  );
230 */
231 /*
232  /// @brief use full-mer fragments when building the loop?
233  inline
234  void use_fullmer( bool const flag ) {
235  use_fullmer_ = flag;
236  }
237 
238 
239  /// @brief use sequence biased fragments when building the loop? (default false)
240  inline
241  void use_sequence_bias( bool const flag ) {
242  use_sequence_bias_ = flag;
243  }
244 */
245 
246  /// @brief the maximum allowed linear chainbreak
247  inline
248  void max_linear_chainbreak( Real const threshold ) {
249  max_linear_chainbreak_ = threshold;
250  }
251 
252 
253  /// @brief the loop mover string to use during centroid build
254  /// @remarks set to either a string the create_loop_mover() LoopMoverFactory
255  /// recognizes or the "RemodelLoopMover"
256  inline
257  void centroid_loop_mover_str( String const & loop_mover_str ) {
258  centroid_loop_mover_str_ = loop_mover_str;
259  }
260 
261 
262  /// @brief redesign the neighborhood around the loop? if false, then just
263  /// repacks during the design phase
264  inline
265  void redesign_loop_neighborhood( bool const flag ) {
267  }
268 
269 /*
270  /// @brief name of the resfile to use during design-refine; empty string
271  /// implies no resfile
272  inline
273  void resfile( String const & filename ) {
274  resfile_ = filename;
275  }
276 */
277  /// @brief set the number of design-refine cycles to perform
278  /// @remarks set this to 0 to skip design-refine
279  inline
280  void dr_cycles( Size const cycles ) {
281  dr_cycles_ = cycles;
282  }
283 
284 
285  /// @brief set the centroid level score function
286  void centroid_scorefunction( ScoreFunction const & sfx );
287 
288 
289  /// @brief set the centroid level score function
290  void centroid_scorefunction( ScoreFunctionOP const & sfx );
291 
292 
293  /// @brief set the full-atom level score function
294  void fullatom_scorefunction( ScoreFunction const & sfx );
295 
296 
297  /// @brief set the full-atom level score function
298  void fullatom_scorefunction( ScoreFunctionOP const & sfx );
299 
300 
301 public: // calculators
302 
303 
304  /// @brief the name for the loops' neighborhood calculator
305  inline
306  static
308  return "RemodelMover_loops_neighborhood_calc";
309  }
310 
311 
312  /// @brief the name for the loops' buried unsatisfied polars
313  /// calculator
314  inline
315  static
317  return "RemodelMover_loops_bup";
318  }
319 
320 
321  /// @brief the name for the loops' neighborhood buried unsatisfied polars
322  /// calculator
323  inline
324  static
326  return "RemodelMover_loops_neighborhood_bup";
327  }
328 
329 
330 public: // virtual main methods
331 
332 
333  /// @brief apply defined moves to given Pose
334  virtual
335  void apply( Pose & pose );
336 
337  virtual std::string get_name() const;
338 
339  bool confirm_sequence(core::pose::Pose & pose );
340 
341 
342 private: // protocol methods
343  void register_user_options();
344 
345  bool centroid_build(
346  Pose & pose,
348  );
349 
350 
351  /// @brief run the centroid level build stage
352  /// @return true if loop closed, false otherwise
353  bool centroid_build(
354  Pose & pose
355  );
356 
358  Pose & pose,
359  RemodelDesignMover & designMover
360  );
361 
362  /// @brief run the design-refine stage
363  /// @return currently always true
364  bool design_refine(
365  Pose & pose,
366  RemodelDesignMover & designMover
367  );
368 
369 
370  /// @brief return a TaskFactory useable as a starting point for either
371  /// design or refinement
373 
374 
375 private: // design methods
376 
377 
378  /// @brief process a continuous design string, adding appropriate operations
379  /// to the TaskFactory
381  Interval const & original_interval,
382  String const & design_str,
383  Original2Modified const & original2modified_interval_endpoints,
384  TaskFactoryOP design_tf
385  );
386 
387 
388  /// @brief process a design string containing an insert, adding appropriate
389  /// operations to the TaskFactory
391  Interval const & original_interval,
392  String const & design_str,
393  Original2Modified const & original2modified_interval_endpoints,
394  TaskFactoryOP design_tf
395  );
396 
397 
398  /// @brief return a boolean vector specifying allowed a.a. when designing
399  /// on the surface
400  static
402 
403 
404 private: // data
405 
406 
407  /// @brief the BuildManager
408  // try to get this from Remodel OB
410 
412 
413  /// @brief holds all the blueprint info, contains build manager
415 
416  /// @brief working set holds all the modified index that is required for the
417  /// remodeling task
419 
420 
421  /// @brief Stores instructions' original interval and a string denoting
422  /// the sequence during design.
423  /// @remarks This is only for instructions such as SegmentRebuild or
424  /// SegmentInsert. Non-applicable instructions will not have any data
425  /// stored here.
427 
428 
429  /// @brief use sequence biased fragments when building the loop? (default false)
430 /// bool use_sequence_bias_;
431 
432 
433  /// @brief the maximum allowed linear chainbreak (default 0.07)
435 
436 
437  /// @brief the loop mover string to use during centroid build
438  /// (default "RemodelLoopMover")
439  /// @remarks set to either a string the create_loop_mover() LoopMoverFactory
440  /// recognizes or the "RemodelLoopMover"
442 
443 
444  /// @brief redesign the neighborhood around the loop? if false, then just
445  /// repacks during the design phase (default true)
447 
448 
449  /// @brief name of the resfile to use during design-refine; empty string
450  /// implies no resfile
451  ///String resfile_;
452 
453 
454  /// @brief the number of design-refine cycles to perform, default 3
456 
457 
458  /// @brief the centroid scorefunction to use, default "remodel_cen"
460 
461 
462  /// @brief the full-atom scorefunction to use, default score12
464 
465 
466  //blueprint
468 
469 
470 
475  bool nojumps_;
477  bool use_bp_seq_; // use blueprint sequence for fragment picking
478  bool randomize_equiv_frag_; // randomize identical scoring fragments, otherwise will get the same top 'n' fragments each time
482  bool backrub_;
483  bool help_;
487  bool no_frags_;
493  bool dsspSS_;
503 
504  /// @brief use full-mer fragments when building the loop? (default false)
506 
507  // added by Nobu
508  bool silent_;
511 
515 };
516 
517 private: // per-stage movers
518 
519 
520  /// @brief VLB for centroid_build
521  /// @remarks Store it here instead of re-instantiation each centroid_build()
522  /// call so fragment caching works.
523  /// @warning Remember to set this to null if the BuildManager changes.
525 
526 
527 public: // parser
528 
529  virtual void parse_my_tag( TagPtr const tag,
530  DataMap & data,
531  Filters_map const &,
532  Movers_map const &,
533  Pose const & );
534 
535 };
536 
537 
538 } // namespace components
539 } // namespace forge
540 } // namespace protocols
541 
542 
543 #endif /* INCLUDED_protocols_forge_components_RemodelMover_HH */