Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PackerTask_.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/PackerTask_.hh
11 /// @brief Implementation class for task class to describe packer's behavior header
12 /// Almost all of rosetta needs to use packer tasks, but very little of rosetta needs
13 /// to see how it behaves internally.
14 /// @author Andrew Leaver-Fay (leaverfa@email.unc.edu)
15 /// @author Steven Lewis
16 
17 #ifndef INCLUDED_core_pack_task_PackerTask__hh
18 #define INCLUDED_core_pack_task_PackerTask__hh
19 
20 // Unit Headers
22 
23 // Package Headers
28 
29 // Project Headers
33 #include <core/pose/Pose.fwd.hh>
35 
36 #ifdef USEBOOSTSERIALIZE
38 #endif
39 // Utility Headers
40 // AUTO-REMOVED #include <utility/vector1.hh>
41 
42 // STL Headers
43 // AUTO-REMOVED #include <map>
44 
45 #include <iosfwd>
46 #include <iostream>
47 #include <utility/vector1.hh>
48 
49 
50 namespace core {
51 namespace pack {
52 namespace task {
53 
54 ///@brief Residue-level task class; contained within PackerTask
56 {
57 public:
58  ///@brief constructor; requires a Residue object
60  conformation::Residue const & original_residue
61  );
62 
64 
65  ///@brief dtor
66  virtual ~ResidueLevelTask_();
67 
68  ///@brief returns the extra chi sampling level
69  virtual
72  bool buried,
73  int chi,
74  chemical::ResidueTypeCOP concrete_residue
75  ) const;
76 
77  ///@brief initialize options from command line flags
78  virtual void initialize_from_command_line();
79 
80  ///@brief Initialize only the extra rotamer building flags from the command line;
81  /// invoked by intialize_from_command_line();
83 
84  ///@brief include the pre-existing rotamer while packing
85  virtual void or_include_current( bool include_current );
86  ///@brief is the pre-existing rotamer specifically allowed while packing?
87  virtual bool include_current() const;
88 
89  // access to any flagged protocol-level behaviors for this residue
90  virtual void add_behavior( std::string const & behavior );
91  virtual bool has_behavior( std::string const & behavior ) const;
92  virtual bool has_behavior() const;
93 
94  virtual void target_type( chemical::ResidueTypeCOP type );
95  virtual void target_type( chemical::AA aa );
96  virtual void target_type( std::string name );
97 
98  ///@brief include adducts at this residue
99  virtual void or_adducts( bool setting );
100  virtual bool adducts() const;
101 
102  ///@brief activate ex1 when passed true; do nothing otherwise
103  virtual void or_ex1( bool ex1 );
104  ///@brief activate ex2 when passed true; do nothing otherwise
105  virtual void or_ex2( bool ex2 );
106  ///@brief activate ex3 when passed true; do nothing otherwise
107  virtual void or_ex3( bool ex3 );
108  ///@brief activate ex4 when passed true; do nothing otherwise
109  virtual void or_ex4( bool ex4 );
110 
111  ///@brief increase ex1 sample level; do nothing if not an increase
113  ///@brief increase ex2 sample level; do nothing if not an increase
115  ///@brief increase ex3 sample level; do nothing if not an increase
117  ///@brief increase ex4 sample level; do nothing if not an increase
119 
120  ///@brief activate ex1 for aromatics when passed true; do nothing otherwise
121  virtual void or_ex1aro( bool ex1aro );
122  ///@brief activate ex2 for aromatics when passed true; do nothing otherwise
123  virtual void or_ex2aro( bool ex2aro_only );
124  ///@brief activate ex1 for exposed aromatics when passed true; do nothing otherwise
125  virtual void or_ex1aro_exposed( bool ex1aro_exposed );
126  ///@brief activate ex2 for exposed aromatics when passed true; do nothing otherwise
127  virtual void or_ex2aro_exposed( bool ex2aro_exposed );
128 
129  ///@brief increase ex1aro sample level; do nothing if not an increase
131  ///@brief increase ex2aro sample level; do nothing if not an increase
132  virtual void or_ex2aro_sample_level( ExtraRotSample ex2aro_only_sample_level );
133  ///@brief increase ex1aro_exposed sample level; do nothing if not an increase
135  ///@brief increase ex2aro_exposed sample level; do nothing if not an increase
137 
138  virtual void or_operate_on_ex1( bool operate );
139  virtual void or_operate_on_ex2( bool operate );
140  virtual void or_operate_on_ex3( bool operate );
141  virtual void or_operate_on_ex4( bool operate );
142 
144 
145  virtual void or_optimize_h( bool setting );
146  virtual bool optimize_h() const;
147  virtual void or_preserve_c_beta( bool setting );
148  virtual bool preserve_c_beta() const;
149  virtual void or_flip_HNQ( bool setting );
150  virtual bool flip_HNQ() const;
151  virtual void or_fix_his_tautomer( bool setting );
152  virtual bool fix_his_tautomer() const;
153 
154  ///@brief sample proton chi.
155  virtual void sample_proton_chi( bool setting );
156 
157  ///@brief sample proton chi.
158  virtual bool sample_proton_chi() const;
159 
160  ///@brief sample proton chi.
161  virtual void sample_rna_chi( bool setting );
162 
163  ///@brief sample proton chi.
164  virtual bool sample_rna_chi() const;
165 
166  virtual bool ex1() const;
167  virtual bool ex2() const;
168  virtual bool ex3() const;
169  virtual bool ex4() const;
170 
171  virtual ExtraRotSample ex1_sample_level() const;
172  virtual ExtraRotSample ex2_sample_level() const;
173  virtual ExtraRotSample ex3_sample_level() const;
174  virtual ExtraRotSample ex4_sample_level() const;
175 
176  virtual bool ex1aro() const;
177  virtual bool ex2aro() const;
178  virtual bool ex1aro_exposed() const;
179  virtual bool ex2aro_exposed() const;
180 
181  virtual ExtraRotSample ex1aro_sample_level() const;
182  virtual ExtraRotSample ex2aro_sample_level() const;
185 
186  virtual ExtraRotSample exdna_sample_level() const;
187 
188  virtual bool operate_on_ex1() const;
189  virtual bool operate_on_ex2() const;
190  virtual bool operate_on_ex3() const;
191  virtual bool operate_on_ex4() const;
192 
193  ///@brief lower extrachi_cutoff to given value; do nothing if not a decrease
194  virtual void and_extrachi_cutoff( Size num_neighbors_to_be_called_buried );
195 
196  ///@brief get function for extrachi_cutoff
197  virtual Size extrachi_cutoff() const;
198 
199  ///@brief remove all ResidueTypes from the list of allowed residue types, preventing repacking
200  virtual void prevent_repacking();
201 
202  ///@brief disables designing to residues not in the passed list
204 
205  ///@brief disables designing to residues not in the passed list--and specifies the resfile command that made this list
206  virtual void restrict_absent_canonical_aas( utility::vector1< bool > const & allowed_aas,
207  std::string const & mode );
208 
209  //@brief Same behavior restrict_absent_canonical_aas except that it always allows the native aa at a position even if it is not included in the allowed residues
210  virtual void restrict_nonnative_canonical_aas( utility::vector1< bool > const & allowed_aas);
211 
212 
213  ///@brief disables designing to nucleic acid residues not in the passed list
214  virtual void restrict_absent_nas( utility::vector1< chemical::AA > const & keep_nas );
215 
216  ///@brief only let this residue repack -- prevent redesign
217  virtual void restrict_to_repacking();
218 
219  ///@brief
220  virtual bool is_original_type( chemical::ResidueTypeCOP type ) const;
221 
222  ///@brief
223  virtual chemical::ResidueTypeSet const & get_original_residue_set() const;
224 
225  ///@brief
226  virtual chemical::AA const & get_original_residue() const;
227 
228  ///@brief explicitly allow a NCAA
229  virtual void allow_noncanonical_aa(
230  std::string const & aaname,
231  chemical::ResidueTypeSet const & residue_set
232  );
233 
234  ///@brief explicitly allow a NCAA; assumes same ResidueTypeSet as original_residue_type_
235  virtual void allow_noncanonical_aa( std::string const & aaname );
236 
237  ///@brief explicitly allow a NCAA; assumes same ResidueTypeSet as original_residue_type_
238  virtual void allow_noncanonical_aa( chemical::AA aa );
239 
240  ///@brief explicitly allow a canonical AA
241  virtual void allow_aa( chemical::AA const & aa );
242 
243  virtual ResidueTypeCOPList const & allowed_residue_types() const;
244  ///@brief returns iterator to beginning of allowed residue types list (traversal only)
246  ///@brief returns iterator to end of allowed residue types list (traversal only)
248 
249  virtual chemical::ResidueTypeCOP target_type() const;
250 
251  virtual void print_allowed_types( std::ostream & os ) const;
252 
253  ///@brief is this residue up for design (variable sequence)?
254  virtual bool being_designed() const;
255  ///@brief is this residue modififable at all by the packer?
256  virtual bool being_packed() const;
257 
258  virtual
260  rotamer_operations() const;
261 
262  virtual
263  void
266  );
267 
270 
273 
274  virtual
275  void
278  );
279 
280 
281  ///@brief create a string the resfile format of all the commands applied to this residue level task
282  virtual std::string command_string( ) const;
283 
284 
285  ///////////////////////////// dangerous update functions
286 
287  virtual
288  void
289  update_union(
290  ResidueLevelTask const & res_task_in
291  );
292 
293  virtual
294  void
296  ResidueLevelTask const & res_task_in
297  );
298 
299  virtual
300  void
302  ResidueLevelTask const & res_task_in
303  );
304 
305 
306 
307 private: // private methods
308  ///@brief private: bookkeeping for ex1
310  ///@brief private: bookkeeping for ex2
312  ///@brief private: bookkeeping for ex3
314  ///@brief private: bookkeeping for ex4
316 
317  ///@brief private: bookkeeping for whether sequence can change
318  void determine_if_designing();
319  ///@brief private: bookkeeping for whether rotamer can change
320  void determine_if_repacking();
321 
322 
323  ///@brief private: return the EX command for the packer task
325  get_ex_flags( Size chiid,
326  Size const exaro_sample_level,
327  Size const ex_sample_level) const;
328 
329  ///@brief private: return the task mode that can be used to recreate
330  ///the task. If the residue level task was made with POLAR it
331  ///should return the string "POLAR".
332  std::string task_mode() const;
333 
334 
335 
336  void
338 
339 #ifdef USEBOOSTSERIALIZE
340  friend class boost::serialization::access;
341 
342  template<class Archive>
343  void save(Archive & ar, const unsigned int version) const {
344  using namespace core::chemical;
345  ar & include_current_;
346  ar & behaviors_;
347  ar & adducts_;
348 
349  ar & original_residue_type_->residue_type_set().name();
350  ar & original_residue_type_->name();
351 
352  int tmp = allowed_residue_types_.size();
353  ar & tmp;
355  allowed_iter( allowed_residue_types_begin() );
356  allowed_iter != allowed_residue_types_end();
357  ++allowed_iter ) {
358  ar & (*allowed_iter)->name();
359  }
360 
361  ar & designing_;
362  ar & repacking_;
363  ar & optimize_H_mode_;
364  ar & preserve_c_beta_;
365  ar & flip_HNQ_;
366  ar & fix_his_tautomer_;
367  ar & disabled_;
368  ar & design_disabled_;
369  ar & sample_proton_chi_;
370  ar & sample_rna_chi_;
371  ar & ex1_;
372  ar & ex2_;
373  ar & ex3_;
374  ar & ex4_;
375  ar & ex1aro_;
376  ar & ex2aro_;
377  ar & ex1aro_exposed_;
378  ar & ex2aro_exposed_;
379  ar & ex1_sample_level_;
380  ar & ex2_sample_level_;
381  ar & ex3_sample_level_;
382  ar & ex4_sample_level_;
387  ar & exdna_sample_level_;
388  ar & extrachi_cutoff_;
389  ar & operate_on_ex1_;
390  ar & operate_on_ex2_;
391  ar & operate_on_ex3_;
392  ar & operate_on_ex4_;
393  //ar & use_input_sc_;
394  // can't serialize these
395  //ar & rotamer_operations_;
396  //ar & rotsetops_;
397  // special case, only support LimitAro because its the only one used?
398  std::vector < protocols::toolbox::task_operations::LimitAromaChi2_RotamerSetOperation *> tt;
399  for( rotamer_set::RotSetOperationListIterator i = rotsetops_.begin(); i != rotsetops_.end(); i++ ) {
401  if( cast_attempt != NULL )
402  tt.push_back( cast_attempt );
403  }
404  ar & tt;
405  ar & mode_tokens_;
406 
407  }
408 
409  template<class Archive>
410  void load(Archive & ar, const unsigned int version) {
411  using namespace core::chemical;
412  ar & include_current_;
413  ar & behaviors_;
414  ar & adducts_;
415 
416  // i fucking hate this residue type shit so much
417  // if the residue type doesnt exist, lets segfault, the preferred rosetta error handling method
418  std::string tmp;
419  ar & tmp; //t->original_residue_type_->residue_type_set().name();
421  ar & tmp; //original_residue_type_->name();
423 
424  int numaa;
425  ar & numaa; //allowed_residue_types_.size();
426  for ( int i=0; i< numaa; i++ ) {
427  ar & tmp; //(*allowed_iter)->name();
428  allowed_residue_types_.push_back(utility::pointer::owning_ptr< ResidueType const > ( restype_set->name_map(tmp) ));
429  }
430 
431  ar & designing_;
432  ar & repacking_;
433  ar & optimize_H_mode_;
434  ar & preserve_c_beta_;
435  ar & flip_HNQ_;
436  ar & fix_his_tautomer_;
437  ar & disabled_;
438  ar & design_disabled_;
439  ar & sample_proton_chi_;
440  ar & sample_rna_chi_;
441  ar & ex1_;
442  ar & ex2_;
443  ar & ex3_;
444  ar & ex4_;
445  ar & ex1aro_;
446  ar & ex2aro_;
447  ar & ex1aro_exposed_;
448  ar & ex2aro_exposed_;
449  ar & ex1_sample_level_;
450  ar & ex2_sample_level_;
451  ar & ex3_sample_level_;
452  ar & ex4_sample_level_;
457  ar & exdna_sample_level_;
458  ar & extrachi_cutoff_;
459  ar & operate_on_ex1_;
460  ar & operate_on_ex2_;
461  ar & operate_on_ex3_;
462  ar & operate_on_ex4_;
463  //ar & use_input_sc_;
464  // can't serialize these
465  //ar & rotamer_operations_;
466  // special case, only support LimitAro because its the only one used?
467  std::vector < protocols::toolbox::task_operations::LimitAromaChi2_RotamerSetOperation * > tt;
468  ar & tt;
469  for( int i = 0; i < tt.size(); i++ ) {
470  rotamer_set::RotamerSetOperationOP tmp( reinterpret_cast<rotamer_set::RotamerSetOperation * > (tt[i]) );
471  rotsetops_.push_back( tmp );
472  }
473  ar & mode_tokens_;
474  }
475  BOOST_SERIALIZATION_SPLIT_MEMBER()
476 #endif
477 
478 private:
479  ///@details is the pre-existing rotamer included for the packer to choose?
481  /// here we store any flagged protocol-level behaviors for this residue
483  ///@brief include adducts at this residue
484  bool adducts_;
485  ///@details std::list of ResidueTypeCOP objects - these are only residue types allowed at position
487  chemical::ResidueTypeCOP original_residue_type_; //record this on construction
488  ///@details a member of the allowed types that can optionally respresent a target state
490 
491  ///@details can the sequence change? true implies repacking_ is true as well
493  ///@details can the residue change its conformation?
495 
496  ///@details are we keeping the coordinates of the heavy atoms fixed while
497  ///sampling extra hydrogen placements?
499 
500  ///@details are c-beta positions preserved during rotamer building
502 
503  ///@details are we also considering heavy atom rearrangement for the crystallographically
504  ///symmetric seeming residues: histadine, asparagine and glutamine? Implies optimize_H_mode_
505  bool flip_HNQ_;
506 
507  ///@details has this histidine tautomer been fixed? This value is kept for bookkeeping; the tautomer's fixation is effected by removing the other tautomer from the ResidueTypeCOPList.
509 
510  ///@details if this is true, this residue will be treated as part of the background.
511  ///a disabling takes precedence over any ResidueType additions.
512  bool disabled_;
513  ///@details if this is true, this residue will only be allowed to repack;
514  ///ResidueTypes that do not match the original_residue_type cannot be added.
515  ///Design disabling takes precedence over SOMETHING, ANDREW TELL ME WHAT IT IS
517 
519 
521 
522  bool ex1_;
523  bool ex2_;
524  bool ex3_;
525  bool ex4_;
526  bool ex1aro_;
527  bool ex2aro_;
540 
545 
548 
549 
550  std::vector<std::string> mode_tokens_;
551 
552 };
553 
559 };
560 
561 
562 /////////////////////////////////////////////////////////////////////////////
563 ///@brief the PackerTask controls what rotameric (including sequence) changes the packer is allowed to make
564 class PackerTask_ : public PackerTask
565 {
566 public:
567  ///@brief constructor; the PackerTask will always need a pose!
568  PackerTask_();
569  PackerTask_( pose::Pose const & pose );
570 
571  ///@brief dtor
572  virtual ~PackerTask_();
573 
574  ///@brief copy method
575  PackerTaskOP clone() const;
576 
577  ///@brief replace a given residue task with a brand new one NOTE: This should be the only way to break commutativity!!!!
578  virtual void clean_residue_task( conformation::Residue const & original_residue, Size const seqpos);
579 
580  ///@brief number of residues in the input pose, for convienience (PackerTask does not handle variable length)
581  virtual Size total_residue() const;
582 
583  ///@brief get function: can this position have a rotamer change?
584  virtual bool pack_residue( int resid ) const;
585  ///@brief alias for above
586  virtual bool being_packed( Size resid ) const { return pack_residue( resid ); }
587 
588  ///@brief get function: how many positions can have rotamer changes?
589  virtual Size num_to_be_packed() const;
590 
591  ///@brief get function: can this position have a sequence change?
592  virtual bool design_residue( int resid ) const;
593  ///@brief alias for above
594  virtual bool being_designed( Size resid ) const { return design_residue( resid ); }
595  ///@brief get function: can any positions have a sequence change?
596  virtual bool design_any() const;
597 
598  ///@brief set function: bump_check is activated for pack-rotamers' screening of rotamers that
599  /// collide with the background. Bump-check is not used during rotamer trials, since it is
600  /// nearly as expensive as rotamer trials itself. Energy methods may opt in to the bump check
601  /// process. The "standard" behavior is for bump-check to include only the fa_atr and fa_rep
602  /// terms.
603  virtual void set_bump_check( bool setting );
604  ///@brief get function: has bump_check been requested?
605  virtual bool bump_check() const;
606  /// @brief Decrease the max_rotbump_energy threshold above which rotamers are rejected.
607  virtual void and_max_rotbump_energy( Real setting );
608  /// @brief get function: what is the energy threshold above which rotamers should be rejected
609  virtual Real max_rotbump_energy() const;
610 
611  ///@brief for all positions, turn on include_current if false, do nothing if already true
612  virtual void or_include_current( bool setting );
613  ///@brief for one position, turn on include_current if false, do nothing if already true
614  virtual void or_include_current( bool setting, Size resid );
615  ///@brief get function: what is include_current for this residue?
616  virtual bool include_current( Size resid ) const;
617 
618  virtual void add_behavior( std::string const & behavior );
619  virtual void add_behavior( std::string const & behavior, Size resid );
620  virtual bool has_behavior( std::string const & behavior, Size resid ) const;
621  virtual bool has_behavior( Size resid ) const;
622 
623  ///@brief return the targeted type (may be null pointer)
624  virtual chemical::ResidueTypeCOP target_type( Size resid ) const;
625 
626  ///@brief for all positions, disable adducts if false, do nothing if true
627  virtual void or_adducts( bool setting );
628  ///@brief for one position, disable adducts if false, do nothing if true
629  virtual void or_adducts( bool setting, Size resid );
630  ///@brief include adducts at this residue
631  virtual bool adducts( Size resid ) const;
632 
633  ///@brief if setting == true, turns on optimize_H_mode for all residues
634  virtual void or_optimize_h_mode( bool setting );
635 
636  ///@brief if setting == true, preserves c-beta during rotamer building for all residues
637  virtual void or_preserve_c_beta( bool setting );
638 
639  ///@brief if setting == true, turns on optimize_H_mode and flip_HNQ for all residues
640  virtual void or_flip_HNQ( bool setting );
641 
642  ///@brief if setting == true, fix his tautomer state for defined residues during repacking or optimizeH mode
643  virtual void or_fix_his_tautomer( utility::vector1<int> const & positions, bool setting );
644 
645  ///@brief if setting == true, turns on linear-memory interaction graph usage
646  virtual void or_linmem_ig( bool setting );
647  ///@brief returns the linear-memory interaction graph flag
648  virtual bool linmem_ig() const;
649 
650  /// @brief if setting == true, turns on lazy interaction graph usage
651  /// NOTE: the linear memory interaction graph takes precedence over the LazyIG when
652  /// the InteractionGraphFactory examines the PackerTask.
653  virtual void or_lazy_ig( bool setting );
654  ///@brief returns the lazy interaction interaction graph flag
655  virtual bool lazy_ig() const;
656 
657 
658  /// @brief Activate the DoubleLazyInteractionGraph, which is particularly useful
659  /// for multistate design, when memory and time are both limiting. Overriden by LinMemIG.
660  virtual void or_double_lazy_ig( bool setting );
661  /// @brief Returns the double-lazy interaction graph flag
662  virtual bool double_lazy_ig() const;
663  /// @brief Set the memory limit, in bytes, for the storage that the DLIG should be allowed
664  /// to spend on representing rotamer pair energies. The DLIG will start deallocating
665  /// rotamer pair energy blocks if it exceeds this limit. This limit is occasionally breached by
666  /// as much memory as is required to store a single amino-acid-pair submatrix block; the limit
667  /// does not apply to the entirety of the packer or even the entirety of this interaction graph,
668  /// merely to the amount of space for rotamer pair energies. Remember, rotamers are expensive, too!
669  /// The default value of "0" signifies an unrestricted memory limit -- 0 may not be set through
670  /// this function. The value may increase once from 0 and then may only decrease from there.
671  virtual void decrease_double_lazy_ig_memlimit( Size nbytes_for_rpes );
672  /// @brief the memory limit, in bytes, for the double-lazy interaction graph. A value of 0
673  /// signifies an unrestricted limit.
674  virtual Size double_lazy_ig_memlimit() const;
675 
676 
677  ///@brief if setting == true, turns on MultiCoolAnnealer -- so long as rotamer couplings are not
678  ///also turned on.
679  virtual void or_multi_cool_annealer( bool setting );
680  ///@brief use MultiCoolAnnealer?
681  virtual bool multi_cool_annealer() const;
682 
683  ///@brief Increases the history size for the MultiCoolAnnealer if setting is larger than the
684  ///existing setting.
685  virtual void increase_multi_cool_annealer_history_size( Size setting );
686  ///@brief returns the requested size for the MultiCoolAnnealer
687  virtual Size multi_cool_annealer_history_size() const;
688 
689  virtual void show( std::ostream & out ) const;
690  virtual void show() const;
691  virtual void show_residue_task( std::ostream & out, Size resid ) const;
692  virtual void show_residue_task( Size resid ) const;
693  virtual void show_all_residue_tasks( std::ostream & out ) const;
694  virtual void show_all_residue_tasks() const;
695 
696  ///@brief read command line options (but not resfile) to set the state of the PackerTask, NOT IN CONSTRUCTOR
697  virtual
698  PackerTask &
700 
701  ///@brief read only the command line options for extra rotamer building;
702  virtual PackerTask &
704 
705  ///@brief turn off packing for residues passed false; can't turn on packing
706  virtual
707  PackerTask &
708  restrict_to_residues( utility::vector1< bool > const & residues_allowed_to_be_packed );
709 
710  ///@brief turn off designing (sequence changing) all residues
711  virtual
712  PackerTask &
714 
715  ///@brief const accessor for underlying ResidueLevelTask object
716  virtual
717  ResidueLevelTask const &
718  residue_task( Size resid ) const;
719 
720  ///@brief nonconst access to underlying ResidueLevelTask object
721  virtual
723  nonconst_residue_task( Size resid );
724 
725  virtual
727  repacking_residues() const;
728 
729  virtual
731  designing_residues() const;
732 
733  ///@brief is there at RotamerCouplings object to worry about? (for DNA GC AT pairing, etc)
734  virtual
735  bool
736  rotamer_couplings_exist() const;
737 
738  ///@brief const accessor for the RotamerCouplings object
739  virtual
741  rotamer_couplings() const;
742 
743  ///@brief setter for the RotamerCouplings object
744  virtual
745  void
746  rotamer_couplings( RotamerCouplingsCOP setting );
747 
748  ///@brief is there at RotamerLinks object to worry about? (for repeat linking
749  //of equivalent residues, etc)
750  virtual
751  bool
752  rotamer_links_exist() const;
753 
754  ///@brief const accessor for the RotamerLinks object
755  virtual
757  rotamer_links() const;
758 
759  ///@brief setter for the RotamerLinks object
760  virtual
761  void
762  rotamer_links( RotamerLinksCOP setting );
763 
764 
765  ///@brief accesor for residue residue weight map
766  virtual
768  IGEdgeReweights() const;
769 
770  virtual
772  set_IGEdgeReweights();
773 
774  virtual
775  void
778  );
779 
780  virtual
781  void
784  );
785 
786  //@brief return a resfile string that can recreate the packer task
787  virtual
789  task_string( pose::Pose const & pose ) const;
790 
791 
792  //some get-set functions for annealer options
793  void
794  low_temp( Real const & low_temp );
795 
796  void
797  high_temp( Real const & high_temp );
798 
799  void
800  disallow_quench( bool const & disallow_quench );
801 
802  Real
803  low_temp() const;
804 
805  Real
806  high_temp() const;
807 
808  bool
809  disallow_quench() const;
810 
811  virtual
812  void remap_residue_level_tasks(
814  core::pose::Pose const & pose
815  );
816 
817  //////////////////////// dangerous update functions ///////////////////////
818 
819  virtual
820  void
821  update_residue_union(
822  Size resid,
823  ResidueLevelTask const & res_task_in
824  );
825 
826  virtual
827  void
828  update_residue_intersection(
829  Size resid,
830  ResidueLevelTask const & res_task_in
831  );
832 
833  virtual
834  void
835  update_residue_commutative(
836  Size resid,
837  ResidueLevelTask const & res_task_in
838  );
839 
840  virtual
841  void
843  PackerTask const & tark_in
844  );
845 
846  virtual
847  void
848  request_symmetrize_by_intersection();
849 
850  virtual
851  void
852  request_symmetrize_by_union();
853 
854  virtual
855  bool
856  symmetrize_by_union() const;
857 
858  virtual
859  bool
860  symmetrize_by_intersection() const;
861 
862  /////////////////////////////////////
863  /// For use only inside the packer //
864  /////////////////////////////////////
865 
866  ///@brief turn off packing at all positions
867  /// This is only to be used to control packing from within the packing
868  /// functions rotamer_trials and rtmin. Otherwise, this function should
869  /// not be used. This function is not commutative and therefor using it
870  /// outside of rotamer_trials and rtmin would lead to disasterous behaviors
871  virtual void temporarily_fix_everything();
872 
873  ///@brief reset packer mutability arbitrarily for a given residue
874  /// This is only to be used to control packing from within the packing
875  /// functions rotamer_trials and rtmin. Otherwise, this function should
876  /// not be used. This function is not commutative and therefor using it
877  /// outside of rotamer_trials and rtmin would lead to disasterous behaviors
878  virtual void temporarily_set_pack_residue( int resid, bool setting );
879 
880 
881 private: // private methods
882  void
883  update_n_to_be_packed() const;
884 
885  virtual
886  PackerTask &
887  operator=(PackerTask const &);
888 
889 #ifdef USEBOOSTSERIALIZE
890  friend class boost::serialization::access;
891 
892  template<class Archive>
893  void serialize(Archive & ar, const unsigned int version) {
894  ar & boost::serialization::base_object<PackerTask>(*this);
895  ar & nres_;
896  ar & pack_residue_;
897  ar & residue_tasks_;
898  ar & n_to_be_packed_;
899  ar & n_to_be_packed_up_to_date_;
900  ar & linmem_ig_;
901  ar & lazy_ig_;
902  ar & double_lazy_ig_;
903  ar & dlig_mem_limit_;
904  ar & multi_cool_annealer_;
905  ar & mca_history_size_;
906  ar & optimize_H_;
907  ar & bump_check_;
908  ar & max_rotbump_energy_;
909  ar & low_temp_;
910  ar & high_temp_;
911  ar & disallow_quench_;
912  // not serializing this because it doens't seem important
913  //IGEdgeReweightContainerOP IG_edge_reweights_;
914  ar & symmetry_status_;
915  }
916 #endif
917 
918 private:
919 
921 
922  ///@details superficial on/off switch for repacking residues
923  /// produces no impact on contents of residue_tasks_ vector.
924  /// This is only to be used to control packing from within the packing
925  /// functions rotamer_trials and rtmin. Otherwise, this vector should
926  /// not be used.
928 
929  ///@details vector of ResidueLevelTasks
931 
934 
935  ///@details linmem_ig overrides PDInteractionGraph
937  ///@details linmem_ig overrides LazyIG
938  bool lazy_ig_;
939 
940  ///@details linmem_ig overrides DoubleLazyIG
943 
946 
947  /// @brief keep track: are we optimizing H at all positions?
948  /// don't use linmem_ig_ if so.
950 
953 
954  // pbhack temporary -- usually null pointer
956 
957  // psh hack, just like the pbhack above
959 
960  // rhiju -- some options that need to be sent to the annealer
964 
965  ///@details holds specific residue residue weights to be used in packing
967 
968  // sheffler
970 };
971 
972 //NOTE: parse_resfile is now an independent function in ResfileReader.hh, not a member function of the PackerTask hierarchy
973 
974 } //namespace task
975 } //namespace pack
976 } //namespace core
977 
978 #endif