Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
IndependentLoopMover.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/loops/loop_mover/IndependentLoopMover.hh
11 /// @brief
12 /// @author Mike Tyka
13 /// @author James Thompson
14 
15 #ifndef INCLUDED_protocols_loops_loop_mover_IndependentLoopMover_hh
16 #define INCLUDED_protocols_loops_loop_mover_IndependentLoopMover_hh
17 
19 
21 
22 #include <core/types.hh>
23 #include <core/pose/Pose.fwd.hh>
24 
27 
28 #include <utility/vector1.hh>
29 
30 
31 ///////////////////////////////////////////////////////////////////////////////
32 namespace protocols {
33 namespace loops {
34 namespace loop_mover {
35 
36 // A subclass where all the loops are modelled independently from each
37 // other. Deriving classes should not overload apply but instead
38 // model_loop. This is an unfortunate design decision, because there's no
39 // way to guarantee that deriving classes do the right thing and don't
40 // override the apply method.
42 public:
44  IndependentLoopMover( LoopsOP loops_in );
45  IndependentLoopMover( LoopsFileData const & lfd );
47 
48  //destructor
49  virtual ~IndependentLoopMover();
50 
51  void set_defaults();
52 
53  /// @brief Apply the loop-build protocol to the input pose
54  virtual void apply( core::pose::Pose & pose );
55  virtual std::string get_name() const;
56 
57  /// Accessors:
58 
59  void set_build_attempts_( int value ) { build_attempts_ = value; }
60  void set_grow_attempts_( int value ) { grow_attempts_ = value; }
61  void set_accept_aborted_loops_( bool value ) { accept_aborted_loops_ = value; }
62  void set_strict_loops( bool value ) { strict_loops_ = value; }
63  void set_random_order_( bool value ) { random_order_ = value; }
64  void set_build_all_loops_( bool value ) { build_all_loops_ = value; }
66 
67  int get_build_attempts() const { return build_attempts_; }
68  int get_grow_attempts() const { return grow_attempts_; }
70  bool get_strict_loops() const { return strict_loops_; }
71  bool get_random_order() const { return random_order_; }
72  bool get_build_all_loops() const { return build_all_loops_; }
73  bool get_loop_combine_rate() const { return loop_combine_rate_; }
74  bool get_all_loops_closed() const {return all_loops_closed_; }
75 
76 private:
77 
78  /// select loops to be built
79  void select_loops( Loops & selected_loops );
80 
81  /// Try loopbuilding n times before extending
83 
84  /// Try extending n times
86 
87  /// danger - can lead to infinite loops !
89 
90  /// Grow loops outwards if building fails.
92 
93  /// Randomise loop build order
95 
96  /// Force to build all loops (i.e. ignore skiprate)
98 
99  /// determines if all the loops were closed in the last time mover was
100  /// called.
102  /// Loop combine rate
104 
105 protected:
106  virtual
107  LoopResult
108  model_loop(
109  core::pose::Pose & pose,
110  protocols::loops::Loop const & loop
111  ) = 0;
112 
113 };
114 
115 } //namespace loop_mover
116 } //namespace loops
117 } //namespace protocols
118 
119 #endif //INCLUDED_protocols_loops_loop_mover_IndependentLoopMover_hh