Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TaskOperations.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 core/pack/task/operation/TaskOperations.hh
11 /// @brief An operation to perform on a packer task --
12 /// usually, by a PackerTaskFactory right after the task's construction
13 /// This is an incomplete list. Freely define your own TaskOperation and hand it
14 /// to a PackerTaskFactory.
15 /// @author Andrew Leaver-Fay (leaverfa@email.unc.edu)
16 
17 #ifndef INCLUDED_core_pack_task_operation_TaskOperations_hh
18 #define INCLUDED_core_pack_task_operation_TaskOperations_hh
19 
20 // Unit Headers
21 #include <core/pack/task/operation/TaskOperation.hh> // abstract base classes
23 
24 // Project Headers
25 #include <core/pose/Pose.fwd.hh>
32 #include <core/types.hh>
33 
34 // Utility Headers
35 #include <utility/tag/Tag.fwd.hh>
36 // AUTO-REMOVED #include <utility/vector1.hh>
37 
38 // C++ Headers
39 #include <string>
40 
41 #include <utility/vector1.hh>
42 
43 
44 namespace core {
45 namespace pack {
46 namespace task {
47 namespace operation {
48 
50 public:
52 
53 public:
54  virtual ~RestrictToRepacking();
55 
56  virtual TaskOperationOP clone() const;
57 
58  virtual
59  void
60  apply( pose::Pose const & pose, PackerTask & task ) const;
61 
62  virtual void parse_tag( TagPtr );
63  virtual void parse_def( utility::lua::LuaObject const & def);
64 
65 };
66 
67 /// @brief RestrictResidueToRepacking
69 {
70 public:
72 
73 public:
75 
76  virtual TaskOperationOP clone() const;
77 
78  virtual
79  void
80  apply( pose::Pose const &, PackerTask & ) const;
81 
82  void include_residue( core::Size resid );
83  void clear();
84 
85  virtual void parse_tag( TagPtr );
86 
87 private:
89 };
90 
91 // @brief RestrictAbsentCanonicalAAS
93 {
94 public:
96 
97 public:
100  virtual ~RestrictAbsentCanonicalAAS();
101 
102  virtual TaskOperationOP clone() const;
103 
104  /// @brief if resid_ is zero, will apply RestrictAbsentCanonicalAAs to all residues
105  /// in the pose. O/w only to resid_
106  virtual
107  void
108  apply( pose::Pose const &, PackerTask & ) const;
109 
110  /// @brief a human-readible string-based mutator
111  void keep_aas( std::string const keep_aas );
112  /// @brief direct vector1-basd mutator. If an amino acid is not present (false) in the boolean vector, then do not allow it at this position. The boolean vector is a 20-length vector in alphabetical order by one-letter code.
114  virtual void parse_tag( TagPtr );
115  void include_residue( core::Size const resid );
116 private:
119 };
120 
121 
122 /// @brief DisallowIfNonnative allows you to define what residues are NOT allowed in packing unless that residue is present in the input. Behaves like RestrictAbsentCanonicalAAS and NOTAA except will allow a resitricted residue at a position if it is there to begin with at the time of Task creation. Will do all residues unless otherwise defined by selection syntax below
124 
125 public:
127 
128 public:
132  virtual ~DisallowIfNonnative();
133  virtual TaskOperationOP clone() const;
134 
135  virtual
136  void
137  apply( pose::Pose const &, PackerTask & ) const;
138  //helper functions to define desired AAs
139  void clear();
140  //define as true which residues are NOT allowed.
141  // The functions are not additive, will not remember previous disallowed
142  void disallow_aas( utility::vector1< bool > const & cannonical_disallowed );
143  void disallow_aas( std::string const & aa_string );
144  // allow restriction of residues, additive
145  void restrict_to_residue( core::Size const & resid);
146  void restrict_to_residue( utility::vector1< core::Size > const & residues);
147  virtual void parse_tag( TagPtr );
148  virtual void parse_def( utility::lua::LuaObject const & def);
149 
150 
151 private:
156 };
157 
158 /// @brief rotamer explosion for a residue
160 {
161 public:
163 public:
166  virtual ~RotamerExplosion();
167  virtual TaskOperationOP clone() const;
168  virtual void apply( pose::Pose const &, PackerTask & ) const;
169  virtual void parse_tag( TagPtr );
170  void resid( core::Size const r );
171  void chi( core::Size const c );
172  void sample_level( ExtraRotSample const s );
173 private:
176 };
177 
179 {
180 public:
182 
183 public:
184  virtual ~InitializeFromCommandline();
185 
186  virtual TaskOperationOP clone() const;
187 
188  virtual
189  void
190  apply( pose::Pose const &, PackerTask & ) const;
191 
192  virtual void parse_tag( TagPtr ); //parses nothing
193  virtual void parse_def( utility::lua::LuaObject const & def);
194 };
195 
197 {
198 public:
200 
201 public:
203 
204  virtual TaskOperationOP clone() const;
205 
206  virtual
207  void
208  apply( pose::Pose const &, PackerTask & ) const;
209 
210 };
211 
213 {
214 public:
216 
217 public:
218  virtual ~IncludeCurrent();
219 
220  virtual TaskOperationOP clone() const;
221 
222  virtual
223  void
224  apply( pose::Pose const &, PackerTask & ) const;
225  virtual void parse_def( utility::lua::LuaObject const & def);
226 
227 };
228 
229 ///@details control the extra chi rotamers for all residues
231 public:
233 
234 public:
236  virtual ~ExtraRotamersGeneric();
237 
238  virtual TaskOperationOP clone() const;
239 
240  virtual void parse_tag( TagPtr );
241 
242  virtual
243  void
244  apply( pose::Pose const &, PackerTask & ) const;
245 
246 private:
247 
248  bool ex1_;
249  bool ex2_;
250  bool ex3_;
251  bool ex4_;
252  bool ex1aro_;
253  bool ex2aro_;
256 
267 };
268 
270 {
271 public:
273 
274 public:
275  ReadResfile();
276  ReadResfile( std::string const & );
277  virtual ~ReadResfile();
278 
279  virtual TaskOperationOP clone() const;
280 
281  virtual
282  void
283  apply( pose::Pose const &, PackerTask & ) const;
284 
285  void filename( std::string const & filename );
286 
287  ///@brief queries options system for resfile name
288  void default_filename();
289 
290  std::string const & filename() const;
291 
292  virtual void parse_tag( TagPtr );
293  virtual void parse_def( utility::lua::LuaObject const & def);
294 
295 private:
297 };
298 
299 /// @brief written by flo, feb 2011
300 /// class that can apply a resfile to a pose
301 /// that had its length changed at some point
302 /// in a protocol. A LengthEventCollector must
303 /// be set in the pose's observer cache for this
304 /// to work properly
306 {
307 
308 public:
310 
313 
315 
316  virtual TaskOperationOP clone() const;
317 
318  void
319  apply( pose::Pose const & pose, PackerTask & ptask ) const;
320 
321  virtual void parse_tag( TagPtr );
322 
323  std::list< ResfileCommandCOP > const &
325  Size const resfile_seqpos,
326  ResfileContents const & contents,
327  PackerTask const & ptask ) const;
328 
329 private:
331 
332 };
333 
334 
336 {
337 public:
339 
340 public:
343  virtual ~SetRotamerCouplings();
345 
346  virtual TaskOperationOP clone() const;
347 
348  virtual
349  void
350  apply( pose::Pose const &, PackerTask & ) const;
351 
352  void
354 
355 
356 private:
358 };
359 
360 
362 {
363 public:
365 
366 public:
367  SetRotamerLinks();
369  virtual ~SetRotamerLinks();
370  SetRotamerLinks const & operator = ( SetRotamerLinks const & );
371 
372  virtual TaskOperationOP clone() const;
373 
374  virtual
375  void
376  apply( pose::Pose const &, PackerTask & ) const;
377 
378  void
380 
381 
382 private:
384 };
385 
386 
387 ///@brief when a PackerTask is created by the Factory, the RotamerOperation will be given to it
389 {
390 public:
392 public:
393  AppendRotamer();
394  virtual ~AppendRotamer();
395  AppendRotamer( rotamer_set::RotamerOperationOP rotamer_operation );
396  AppendRotamer( AppendRotamer const & );
397  virtual TaskOperationOP clone() const;
398  virtual void apply( pose::Pose const &, PackerTask & ) const;
399  void set_rotamer_operation( rotamer_set::RotamerOperationOP rotamer_operation );
400 
401 
402 private:
404 };
405 
406 
407 ///@brief when a PackerTask is created by the Factory, the RotamerSetOperation will be given to it
408 ///@author Barak Raveh (Dec 2008)
410 {
411 public:
413 public:
415  virtual ~AppendRotamerSet();
416  AppendRotamerSet( rotamer_set::RotamerSetOperationOP rotamer_set_operation );
418  virtual TaskOperationOP clone() const;
419  virtual void apply( pose::Pose const &, PackerTask & ) const;
421 
422 private:
424 };
425 
426 ///@brief Apply rotamerSetOperation to only the rotamerSet for the given residue
427 ///@author Tim Jacobs (2011)
429 {
430 public:
432 public:
434  virtual ~AppendResidueRotamerSet();
437  virtual TaskOperationOP clone() const;
438  virtual void apply( pose::Pose const &, PackerTask & ) const;
439  void set_resnum( core::Size resnum );
441 
442 private:
445 };
446 
448 {
449 public:
451 
452 public:
453  virtual ~PreserveCBeta();
454 
455  virtual TaskOperationOP clone() const;
456 
457  virtual
458  void
459  apply( pose::Pose const &, PackerTask & ) const;
460 
461 };
462 
463 
464 /// @brief PreventRepacking allows you to prevent repacking (NATRO behavior) through the Factory. Useful if you do not know the residue numbers when the resfile is created. Note that this is unlike RestrictToRepacking; you have to specify which residues. If PreventRepacking worked on the entire Task you'd have a do-nothing task.
466 {
467 public:
469 
470 public:
471  virtual ~PreventRepacking();
472 
473  virtual TaskOperationOP clone() const;
474 
475  virtual
476  void
477  apply( pose::Pose const &, PackerTask & ) const;
478 
479  void include_residue( core::Size resid );
480  void clear();
481 
482  virtual void parse_tag( TagPtr );
483 
484 private:
487 };
488 
489 
490 /// @brief RestrictYSDesign restricts positions to a binary Tyr/Ser alphabet
492 
493 public:
495 
496 public:
498  RestrictYSDesign( RestrictYSDesign const & src );
500  virtual ~RestrictYSDesign();
501 
502  virtual TaskOperationOP clone() const;
503  virtual void apply( pose::Pose const &, PackerTask & task) const;
504  void include_resid( core::Size const resid );
505  void include_gly( bool const gly );
506  // void clear(); // Not defined, commenting out to make Python binding compile
507 
508 private:
511 };
512 
513 /// @brief ExtraRotamer for a residue. You know, -ex1, -ex2, all that.
515 {
516 public:
518 public:
519  ExtraRotamers();
520  ExtraRotamers( core::Size const resid, core::Size const chi, core::Size level = 1 );
521  virtual ~ExtraRotamers();
522  virtual TaskOperationOP clone() const;
523  virtual void apply( pose::Pose const &, PackerTask & ) const;
524  virtual void parse_tag( TagPtr );
525 private:
527 };
528 
529 /// @brief ExtraChiCutoff (correponding to flag "-extrachi_cutoff <float>" )
531 {
532 public:
534 public:
535  ExtraChiCutoff();
536  ExtraChiCutoff( core::Size const resid, core::Size const extrachi_cutoff );
537  virtual ~ExtraChiCutoff();
538  virtual TaskOperationOP clone() const;
539  virtual void apply( pose::Pose const &, PackerTask & ) const;
540  virtual void parse_tag( TagPtr );
541 private:
543 };
544 
545 } //namespace operation
546 } //namespace task
547 } //namespace pack
548 } //namespace core
549 
550 #endif