Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LoopRelaxMover.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 /// @brief LoopRelaxMover.hh
11 /// @author James Thompson
12 
13 #ifndef INCLUDED_protocols_comparative_modeling_LoopRelaxMover_hh
14 #define INCLUDED_protocols_comparative_modeling_LoopRelaxMover_hh
15 
16 #include <core/types.hh>
17 #include <core/fragment/FragSet.hh>
19 #include <utility/tag/Tag.fwd.hh>
22 #include <protocols/moves/Mover.hh>
28 
29 #include <string>
30 
31 #include <utility/vector1.hh>
32 
33 #include <protocols/loops/Loops.hh>
34 
35 
36 namespace protocols {
37 namespace comparative_modeling {
38 
39 class LoopRelaxMover : public moves::Mover {
40 
41 public:
42 
43  // constructor
45 
46  /// @brief Alternative constructor.
47  /// BE WARNED: THIS CONSTRUCTOR DOES NOT CALL SET_DEFAULTS().
48  /// AS A RESULT, THE SCORE FUNCTIONS (AMONG OTHER THINGS) WILL
49  /// NOT BE INITIALIZED.
51  std::string const & remodel,
52  std::string const & intermedrelax,
53  std::string const & refine,
54  std::string const & relax,
55  loops::Loops const & loops
56  );
57 
58  /// @brief Unresolved-loop-index constructor.
59  /// BE WARNED: THIS CONSTRUCTOR DOES NOT CALL SET_DEFAULTS().
60  /// AS A RESULT, THE SCORE FUNCTIONS (AMONG OTHER THINGS) WILL
61  /// NOT BE INITIALIZED.
63  std::string const & remodel,
64  std::string const & intermedrelax,
65  std::string const & refine,
66  std::string const & relax,
67  loops::LoopsFileData const & loops_from_file
68  );
69 
70  /// @brief GuardedLoopsOP constructor. This constructor copies the pointer
71  /// to a GuardedLoops object; Loop indices must be resolved by the time
72  /// that the guarded_loops_ object is accessed, but, they need not
73  /// have been resolved at the time of this object's construction.
74  /// BE WARNED: THIS CONSTRUCTOR DOES NOT CALL SET_DEFAULTS().
75  /// AS A RESULT, THE SCORE FUNCTIONS (AMONG OTHER THINGS) WILL
76  /// NOT BE INITIALIZED.
78  std::string const & remodel,
79  std::string const & intermedrelax,
80  std::string const & refine,
81  std::string const & relax,
82  loops::GuardedLoopsFromFileOP guarded_loops
83  );
84 
85  /// @brief Copy-ctor; Shallow copy of all data.
86  LoopRelaxMover( LoopRelaxMover const & src );
87 
88  /// @brief assignment operator; Shallow copy of all data.
89  LoopRelaxMover const & operator = ( LoopRelaxMover const & rhs );
90 
91 
92  //destructor
93  virtual ~LoopRelaxMover();
94 
95  /// @brief Apply the loop-relax protocol to a Pose. At the call to this function, the
96  /// loop indices originating from the loop file (which may list indices with PDB identifiers
97  /// i.e. res+insertioncode+chain ) will be resolved. Until this point, the Loops object
98  /// in the LoopRelaxMover cannot be used.
99  virtual void apply( core::pose::Pose & pose );
100  virtual std::string get_name() const;
101 
102  // getters and setters
104  void fa_scorefxn( core::scoring::ScoreFunctionOP fa_scorefxn );
105  void cen_scorefxn( core::scoring::ScoreFunctionOP cen_scorefxn );
106 
107  void cmd_line_csts( bool setting ) {
108  cmd_line_csts_ = setting;
109  }
110 
111  void copy_sidechains( bool setting ) {
112  copy_sidechains_ = setting;
113  }
114 
115  void rebuild_filter( core::Real setting ) {
116  rebuild_filter_ = setting;
117  }
118 
119  void n_rebuild_tries( core::Size setting ) {
120  n_rebuild_tries_ = setting;
121  }
122 
123  void remodel( std::string val ) {
124  remodel_ = val;
125  }
126 
128  intermedrelax_ = val;
129  }
130 
131  void refine( std::string val ) {
132  refine_ = val;
133  }
134 
135  void relax( std::string val ) {
136  relax_ = val;
137  }
138 
139  /// @brief Must be called before the Loops data can be read from.
140  void resolve_loopfile_indices( core::pose::Pose const & pose );
141 
142  /// @brief set the Loops object (with resolved indices) directly. This would override
143  /// the unresolved-indices held in the LoopsFileData if that data were set in the constructor
144  void loops( protocols::loops::LoopsOP const val );
145 
146  /// @brief Set the loop file data. This will require that a Pose be presented to
147  /// the LoopRelax object before get_loops() can be called.
148  void loops_file_data( loops::LoopsFileData const & loopfiledata );
149 
151 
152  bool cmd_line_csts() const {
153  return cmd_line_csts_;
154  }
155 
156  bool copy_sidechains() const {
157  return copy_sidechains_;
158  }
159 
161  return n_rebuild_tries_;
162  }
163 
165  return rebuild_filter_;
166  }
167 
168  /// @brief Loops accessor. May only be retrieved after the loop indices have been resolved
169  /// in a call to apply.
171 
172  /// @brief Loops accessor. May only be retrieved after the loop indices have been resolved
173  /// in a call to apply.
175 
176  std::string remodel () const {
177  return remodel_;
178  }
179 
180  std::string relax() const {
181  return relax_;
182  }
183 
185  return intermedrelax_;
186  }
187 
188  std::string refine() const {
189  return refine_;
190  }
191 
193 
196  void compute_rmsd( bool const c ){ compute_rmsd_ = c; }
197  bool compute_rmsd() const { return compute_rmsd_; }
198 
199  void parse_my_tag(
200  utility::tag::TagPtr const tag,
204  core::pose::Pose const &
205  );
206 
207 // void task_factory( core::pack::task::TaskFactoryOP tf ); /// currently taskfactory is not supported
208 // core::pack::task::TaskFactoryOP task_factory() const;
209 
210 private:
211  void set_defaults_();
212 
215 
218 
223 
225 
228 
230  bool compute_rmsd_; //dflt true; but set to false if you change the pose length between start and rmsd measurements;
231 // core::pack::task::TaskFactoryOP task_factory_; //dflt NULL; a way to restrict packing from outside the mover
232 };
233 
234 } // namespace loops
235 } // namespace protocols
236 
237 #endif // INCLUDED_protocols_loops_LoopRelaxMover_HH
238