Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BluePrintBDR.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/fldsgn/BluePrintBDR.hh
11 /// @brief
12 /// @author Yih-En Andrew Ban (yab@u.washington.edu)
13 
14 #ifndef INCLUDED_protocols_fldsgn_BluePrintBDR_hh
15 #define INCLUDED_protocols_fldsgn_BluePrintBDR_hh
16 
17 // unit headers
19 
20 // type headers
21 #include <core/types.hh>
22 
23 // project headers
24 #include <core/pose/Pose.fwd.hh>
33 // AUTO-REMOVED #include <protocols/forge/constraints/SheetConstraintsRCG.fwd.hh>
34 #include <protocols/moves/Mover.hh>
36 
37 // C++ headers
38 #include <string>
39 
40 #include <utility/vector1.hh>
41 
42 
43 
44 namespace protocols {
45 namespace fldsgn {
46 
47 
49 
50 
51 private: // typedefs
52 
53 
55 
56 
57 public: // typedefs
58 
59 
61 
62  typedef core::Real Real;
63  typedef core::Size Size;
64 
70 
79 
84 
85 
86 public: // construct/destruct
87 
88 
89  /// @brief default constructor
90  BluePrintBDR();
91 
92  /// @brief value constructor
93  BluePrintBDR( String const & filename, bool const ss_from_blueprint=true );
94 
95  /// @brief value constructor
96  BluePrintBDR( BluePrintOP const & blueprintOP, bool const ss_from_blueprint=true );
97 
98  /// @brief copy constructor
99  BluePrintBDR( BluePrintBDR const & rval );
100 
101  /// @brief default destructor
102  virtual ~BluePrintBDR();
103 
104 
105 private: // disallow assignment
106 
107 
108  /// @brief copy assignment
109  /// @remarks Mover base class prevents this from working properly...
110  BluePrintBDR & operator =( BluePrintBDR const & rval );
111 
112 
113 public: // virtual constructors
114 
115 
116  /// @brief clone this object
117  virtual
118  MoverOP clone() const;
119 
120  /// @brief create this type of object
121  virtual
122  MoverOP fresh_instance() const;
123 
124 
125 public: // accessors
126 
127 
128  /// @brief the centroid level score function, default "fldsgn_cen"
129  ScoreFunction const & scorefunction() const;
130 
131  ////
132  Size instruction_size() const { return manager_.size(); }
133 
134  /// @brief the loop mover string to use during centroid build
135  /// (default "RemodelLoopMover")
136  /// @remarks set to either a string the create_loop_mover() LoopMoverFactory
137  /// recognizes or the "RemodelLoopMover"
138  inline String const & loop_mover_str() const { return loop_mover_str_; }
139 
140  /// @brief use full-mer fragments when building the loop? (default false)
141  inline bool use_fullmer() const { return use_fullmer_; }
142 
143  /// @brief the number of fragments to pick at each position
144  inline Size num_fragpick() const { return num_fragpick_; }
145 
146  /// @brief use sequence biased fragments when building the loop? (default false)
147  inline bool use_sequence_bias() const { return use_sequence_bias_; }
148 
149  /// @brief use abego biased fragments when building the loop? (default false)
150  inline bool use_abego_bias() const { return use_abego_bias_; }
151 
152  /// @brief the maximum allowed linear chainbreak (default 0.07)
154 
155  /// @brief define secondary structrue by blueprint
156  inline bool is_initialized() const { return initialized_; }
157 
158 
159 public: // mutators
160 
161 
162  /// @brief add instruction to the manager of this BluePrintBDR (no copy)
163  /// @param[in] bi BuildInstruction
164  /// @param[in] aa_during_design_refine The allowed amino acid sequence
165  /// during design. Only applicable to BuildInstructions like
166  /// SegmentRebuild and SegmentInsert. Make sure the length of this
167  /// string matches up properly, and remember to use any special characters,
168  /// e.g. the insertion character for SegmentInsert
170 
171  /// @brief create directed dependency between two instructions
173 
174  /// @brief use full-mer fragments when building the loop?
175  inline void use_fullmer( bool const flag ) { use_fullmer_ = flag; }
176 
177  /// @brief use sequence biased fragments when building the loop? (default false)
178  inline void use_sequence_bias( bool const flag ) { use_sequence_bias_ = flag; }
179 
180  /// @brief use abego biased fragments when building the loop? (default false)
181  inline void use_abego_bias( bool const flag ) { use_abego_bias_ = flag; }
182 
183  /// @brief the maximum allowed linear chainbreak
184  inline void max_linear_chainbreak( Real const threshold ) { max_linear_chainbreak_ = threshold; }
185 
186  /// @brief the loop mover string to use during centroid build
187  /// @remarks set to either a string the create_loop_mover() LoopMoverFactory
188  /// recognizes or the "RemodelLoopMover"
190 
191  /// @brief the number of fragments to pick at each position
192  inline void num_fragpick( Size const num ){ num_fragpick_ = num; }
193 
194  /// @brief define secondary structrue by blueprint
195  inline void ss_from_blueprint( bool const flag ){ ss_from_blueprint_ = flag; }
196 
197  /// @brief set the centroid level score function
198  void scorefunction( ScoreFunction const & sfx );
199 
200  /// @brief set the centroid level score function
201  void scorefunction( ScoreFunctionOP sfx );
202 
203  /// @brief set blueprint file by filename
204  void set_blueprint( String const & filename );
205 
206  /// @brief set blueprint file
207  void set_blueprint( BluePrintOP const & blp );
208 
209  /// @brief set constraints between N- and C- Ca atoms
210  void set_constraints_NtoC( Real const & weight );
211 
212  /// @brief set constraint file
213  void set_constraint_file( String const & constraint_file );
214 
215  /// @brief dump pdb when this protocol failed
217 
218 
219 public: // virtual main methods
220 
221 
222  /// @brief apply defined moves to given Pose
223  virtual
224  void apply( Pose & pose );
225 
226  virtual
227  std::string get_name() const;
228 
229 
230 public: //parser
231 
232 
233  /// @brief parse xml file
234  void parse_my_tag( TagPtr const tag,
235  DataMap & data,
236  Filters_map const &,
237  Movers_map const &,
238  Pose const & );
239 
240 
241 private: // protocol methods
242 
243 
244  /// @brief run the centroid level build stage
245  /// @return true if loop closed, false otherwise
246  bool centroid_build( Pose & pose );
247 
248  /// @brief set instruction by blueprint
249  bool set_instruction_blueprint( Pose const & pose );
250 
251  /// @brief set up folding aroung theozyme
252  /// in a vlb
253  void
254  setup_invrot_tree_in_vlb( VarLengthBuild & vlb, Pose & pose ) const;
255 
256 
257 private: // data
258 
259  /// @brief bluerprint file for setting build instruction
261 
262  /// @brief the BuildManager
264 
265  /// @brief the centroid scorefunction to use, default "remodel_cen"
267 
268  /// @brief the loop mover string to use during centroid build
269  /// (default "RemodelLoopMover")
270  /// @remarks set to either a string the create_loop_mover() LoopMoverFactory
271  /// recognizes or the "RemodelLoopMover"
273 
274  /// @brief use full-mer fragments when building the loop? (default false)
276 
277  /// @brief the number of fragments to pick at each position
279 
280  /// @brief use sequence biased fragments when building the loop? (default false)
282 
283  /// @brief use abego biased fragments when building the loop? (default false)
285 
286  /// @brief the maximum allowed linear chainbreak (default 0.07)
288 
289  /// @brief vlb_ is intialized or not
291 
292  /// @brief define secondary structure by blueprint
294 
295  /// @brief add constraints between N- and C- terminal Ca atoms
297 
298  /// @brief add constraints betwee Ca atoms in sheet
300 
301  /// @brief constraint file
303 
304  /// @brief dump pdb when this protocol failed
306 
307  /// @brief loop mover for loop building, default RemodelLoopMover
309 
310  /// @brief number of allowed_closure_attempts_ of RemodelLoopMover
312 
313  /// @brief Entire sequence except for rebuilding regions become poly Val
315 
316  /// @brief in case we're folding up around a ligand
319 
320 private: // per-stage movers
321 
322 
323  /// @brief VLB for centroid_build
324  /// @remarks Store it here instead of re-instantiation each centroid_build()
325  /// call so fragment caching works.
326  /// @warning Remember to set this to null if the BuildManager changes.
328 
329 
330 };
331 
332 
333 } // namespace fldsgn
334 } // namespace protocols
335 
336 
337 #endif /* INCLUDED_protocols_forge_components_BluePrintBDR_HH */