Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LoopMover.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
12 /// @author Mike Tyka
13 
14 #ifndef INCLUDED_protocols_loops_loop_mover_LoopMover_hh
15 #define INCLUDED_protocols_loops_loop_mover_LoopMover_hh
16 
18 #include <protocols/moves/Mover.hh>
19 
20 #include <core/types.hh>
23 #include <core/pose/Pose.fwd.hh>
24 
30 #include <utility/vector1.fwd.hh>
31 #include <basic/Tracer.fwd.hh>
32 
33 #ifdef WIN32
34  //#include <core/fragment/FragData.hh>
35  #include <core/fragment/FragSet.hh>
36 #endif
37 
38 
39 // C++ Headers
40 
41 
42 ///////////////////////////////////////////////////////////////////////////////
43 namespace protocols {
44 namespace loops {
45 namespace loop_mover {
46 
48 
49 
50 /// @brief The loop-rebuild protocol
52 public: // typedefs
53 
55 
56 public:
57 
58  LoopMover();
60  LoopMover( protocols::loops::LoopsFileData const & loops_from_file );
62 
63  ///@brief copy ctor
64  LoopMover( LoopMover const & rhs );
65 
66  ///@brief assignment operator
67  LoopMover & operator=( LoopMover const & rhs );
68 
69  //destructor
70  virtual ~LoopMover();
71 
72  virtual std::string get_name() const;
73 
74  /// @brief Inform the GuardedLoopsFromFile object that it is not in charge of
75  /// updating its Loops object at the beginning of apply()
77 
78  /// @brief Apply the loop-build protocol to the input pose
79  virtual void apply( core::pose::Pose & ) = 0;
80 
81  void set_scorefxn( const core::scoring::ScoreFunctionOP score_in );
83 
84  /// @brief Set the loops pointer by giving the LoopMover resolved loop indices; implicity sets
85  /// the GuardedLoopsFromFile object into a "not in charge" state (since something else
86  /// must be controlling the the Loops object). The GuardedLoopFromFile object copies the pointer,
87  /// not the data.
88  void loops( protocols::loops::LoopsOP lptr );
89 
90  /// @brief Set the loops by giving the LoopMover unresolved loop indices (which cannot be resolved until apply() ).
91  void loops( LoopsFileData const & loop_file_data );
92 
93  /// @brief Set the guarded_loops pointer
94  void loops( protocols::loops::GuardedLoopsFromFileOP guarded_loops );
95 
96  /// @brief Accessor for the loops data. Requires that the loop indices have been resolved; do not call this before
97  /// apply() has been called.
99 
100  /// @brief non-const accessor for the loops data. Requires that the loop indices have been resolved; do not call this
101  /// before apply() has been called.
103 
105  std::string torsion_features_string( core::pose::Pose const & pose ) const; // AS
106 
107 
108  /// @brief Extend a loop
109  virtual void set_extended_torsions( core::pose::Pose & pose, Loop const & loop );
110 
111 public: // fragment libraries
112 
113  /// @brief add a fragment set
115 
116  /// @brief clear the list of fragment sets
117  void clear_fragments();
118 
119 public: // movemap management
120 
121  /// @brief <b>explicit</b> False settings in this MoveMap will override any
122  /// automatically generated MoveMap settings during the loop modeling
123  /// protocol
124  MoveMapOP const & false_movemap() const;
125 
126  /// @brief <b>explicit</b> False settings in this MoveMap will override any
127  /// automatically generated MoveMap settings during the loop modeling
128  /// protocol
129  void false_movemap( MoveMapOP const & mm );
130 
131 public: // checkpointing
133 
134 protected: // movemap management
135 
136  /// @brief import the false_movemap's <b>explicit</b> False settings into the
137  /// given MoveMap
138  /// @return The number of False settings imported.
139  Size enforce_false_movemap( MoveMapOP & mm ) const;
140 
141  /// @author flo, march 2011
142  /// @brief allow the loops to be set from the segments
143  /// stored in the poses observer cache. makes it possible
144  /// to have LoopMovers be part of parser protocols
145  /// where the loops were determined by some previous on the
146  /// fly step
148 
149  bool use_loops_from_observer_cache() const;
150  void set_use_loops_from_observer_cache( bool const loops_from_observer_cache );
151 
152  virtual basic::Tracer & tr() const = 0;
153 
154 
155  /// @brief Turn the unresolved loop indices read in from disk into pose-specific
156  /// loop indices. Must be called by derived classes at the beginning of apply.
157  void resolve_loop_indices( core::pose::Pose const & p );
158 
159 private:
160 
161  void init();
163 
164 
165 private: // data
166 
168 
173 
174  /// @brief <b>explicit</b> False settings in this MoveMap will override any
175  /// automatically generated MoveMap settings during the loop modeling
176  /// protocol
178 
179 }; // class LoopMover
180 
181 void
183 
184 } //namespace loop_mover
185 } //namespace loops
186 } //namespace protocols
187 
188 #endif //INCLUDED_protocols_loops_loop_mover_LoopMover_HH