Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AnchorMoversData.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/AnchoredDesign/AnchorMoversData.hh
11 /// @brief header for AnchorMoversData
12 /// @author Steven Lewis
13 
14 #ifndef INCLUDED_protocols_anchored_design_AnchorMoversData_hh
15 #define INCLUDED_protocols_anchored_design_AnchorMoversData_hh
16 
17 // Unit Headers
20 
21 // Project Headers
22 #include <core/pose/Pose.fwd.hh>
23 #include <protocols/loops/Loop.hh>
24 #include <protocols/loops/Loops.hh> //ultimately, non OPed loop objects are contained
30 
31 // Utility Headers
32 #include <core/types.hh>
33 // AUTO-REMOVED #include <utility/vector1.hh>
34 #include <utility/vector1_bool.hh>
35 #include <utility/pointer/ReferenceCount.hh>
36 #include <utility/keys/Key3Tuple.hh> //container holds Loop, movemap, movemap (OPs)
37 
38 #include <utility/vector1.hh>
39 
40 
41 
42 // C++ Headers
43 
44 namespace protocols{
45 namespace anchored_design{
46 
47 ///@brief This data class wraps all the data needed for the AnchoredDesign movers.
48 ///@details This data class keeps the anchor, mobile loops, and movemaps associated with the loops all together.
49 ///It generates its own movemaps.
51 {
52 public:
53  //////////////////////////////////typedefs//////////////////////////////////////////////
54  //these are internal data structures
55  typedef utility::keys::Key3Tuple< protocols::loops::Loop, core::kinematics::MoveMapOP, core::kinematics::MoveMapOP> Loop_mm_tuple;
57 
58  //////////////////mechanicals (ctor, dtor, etc)/////////////////////////////////////
59  ///@brief empty constructor is empty - don't use it unless you intend to set alllllllll the data manually...
61 
62  ///@brief constructor takes an anchor and loop object and sets up internals reasonably; options boolean is optionally optional. If you use this constructor, you will need to later manually give fragments to the AnchorMoversData object or use one of its fragments functions to determine what type of fragments to use.
66  bool const options=false
67  );
68 
69  ///@brief constructor takes a pose to generate its own internals (also using the option system)
70  AnchorMoversData( core::pose::Pose const & pose );
71 
72  ///@brief virtual dtors make c++ happy
73  virtual ~AnchorMoversData();
74 
75  ///@brief copy ctor
76  AnchorMoversData( AnchorMoversData const & rhs );
77 
78  ///@brief assignment operator
80 
81  AnchorMoversDataOP clone() const;
82 
83  ///@brief randomly reset loop cutpoints. Useful only when starting structure is well-closed. Best for MPI-style runs
84  void pick_new_cutpoints( bool reset_always );
85 
86  ///@brief set up constraints for anchor_noise_constraints_mode
88 
89  ///////////////////set functions/////////////////////////////////////////////////////////
90  ///@brief set fragments object
92  ///@brief brew its own design frags (LLLLL secondary structure)
94  ///@brief brew its own sequence-specific frags
96  ///@brief figure out what type of fragments to use, and use them; pose needed to make packertask to detect if design is occuring
97  void autogenerate_frags( core::pose::Pose const & pose );
98  ///@brief set packertask factory
100  ///@brief set fullatom scorefunction
102  ///@brief set centroid scorefunction
104  ///@brief set up kinematics' loops and anchors
106 
107  /////////////////loops and movemap functions//////////////////////////////////////////////
108  ///@brief access anchored loop
109  protocols::loops::Loop const & anchored_loop() const; // {return anchor_loop_index_;}
110 
111  ///@brief access for movemap that covers all loops; fullatom
112  core::kinematics::MoveMapOP movemap_fa_all() const;// {return movemap_fa_all_;}
113  ///@brief access for movemap that covers all loops; centroid
114  core::kinematics::MoveMapOP movemap_cen_all() const;// {return movemap_cen_all_;}
115 
116  ///@brief number of loops/mms
117  inline core::Size num_loops() const { return loops_and_fa_mms_.size(); } //WHY NOT CEN HERE?
118  ///@brief accessor for a loop
119  protocols::loops::Loop const & loop( core::Size i ) const;// { return loops_and_fa_mms_[ i ].key1(); }
120  ///@brief accessor for omega-variable movemap (most movers); fullatom phase (may allow anchor movement w/constraints)
121  core::kinematics::MoveMapOP movemap_fa( core::Size i ) const;// { return loops_and_fa_mms_[ i ].key2(); }
122  ///@brief accessor for omega-fixed movemap (appropriate for CCD movers); fullatom phase (may allow anchor movement w/constraints)
123  core::kinematics::MoveMapOP movemap_fa_omegafixed( core::Size i ) const;// { return loops_and_fa_mms_[ i ].key3(); }
124  ///@brief accessor for omega-variable movemap (most movers); centroid phase (no anchor movement)
125  core::kinematics::MoveMapOP movemap_cen( core::Size i ) const;// { return loops_and_cen_mms_[ i ].key2(); }
126  ///@brief accessor for omega-fixed movemap (appropriate for CCD movers); centroid phase
127  core::kinematics::MoveMapOP movemap_cen_omegafixed( core::Size i ) const;// { return loops_and_cen_mms_[ i ].key3(); }
128  ///@brief accessor for loops object
129  protocols::loops::Loops const & loops() const;
130 
131 
132  /////////////////////////////anchor functions//////////////////////////////////////////////
133  ///@brief access for anchor start
134  core::Size anchor_start() const;
135  ///@brief access for anchor end
136  core::Size anchor_end() const;
137 
138  ////////////////////////scfxn, packertask, fragments accessors//////////////////////////////
139  ///@brief access fragments object
140  core::fragment::FragSetCOP get_frags() const;// { return fragset_; }
141  ///@brief access packertask factory
142  core::pack::task::TaskFactoryCOP get_task_factory() const;// { return task_factory_; }
143  ///@brief access packertask factory
144  core::pack::task::TaskFactoryCOP get_late_factory() const;// { return task_factory_; }
145  ///@brief access fullatom scorefunction
146  core::scoring::ScoreFunctionOP get_fullatom_scorefunction() const;// { return fullatom_scorefunction_; }
147  ///@brief access centroid scorefunction
148  core::scoring::ScoreFunctionOP get_centroid_scorefunction() const;// { return centroid_scorefunction_; }
149  ///@brief access centroid scorefunction for minimization
150  core::scoring::ScoreFunctionOP get_centroid_scorefunction_min() const;// { return centroid_scorefunction_min_; }
151  ///@brief return packertask from factory
153 
154 
155  ////////////////option system replacement/////////////////////////////
156  ///@brief dye position used in dye modeling publication
157  void set_akash_dyepos(core::Size const akash_dyepos);
158  ///@brief used for unbound mode
159  void set_unbound_mode(bool unbound_mode);
160  ///@brief used to test anchoring via constraints
161  void set_anchor_via_constraints(bool anchor_via_constraints);
162  ///@brief VDW weight in centroid scorefunction
163  void set_VDW_weight(core::Real VDW_weight);
164  ///@brief chainbreak weight in fullatom scorefunction
165  void set_chainbreak_weight(core::Real chainbreak_weight);
166  ///@brief allow anchor to repack
167  void set_allow_anchor_repack(bool allow_anchor_repack);
168  ///@brief resfile for design
169  void set_resfile_1(std::string const & resfile_1);
170  ///@brief later-stage resfile if desired
171  void set_resfile_2(std::string const & resfile_2);
172  // ///@brief whether to automatically initialize from the options system; defaults to true
173  //void set_autoinitialize(bool const autoinitialize);
174  ///@brief copy of cmdline option loop_file
175  //void set_loop_file(std::string const & loop_file); //This setter in un-provided because it cannot be used; the variable is only used in the option-system-dependent ctor; it's only a class variable to fit the rules
176  ///@brief copy of cmdline option frag3
177  void set_frag3(std::string const & frag3);
178  ///@brief do not use fragments?
179  void set_no_frags(bool no_frags);
180  ///@brief special anchor_noise_constraints_mode
181  void set_anchor_noise_constraints_mode(bool anchor_noise_constraints_mode);
182  ///@brief special super_secret_fixed_interface_mode
183  void set_super_secret_fixed_interface_mode(bool super_secret_fixed_interface_mode);
184 
185  ///@brief dye position used in dye modeling publication
187  ///@brief used for unbound mode
188  bool get_unbound_mode() const;
189  ///@brief used to test anchoring via constraints
190  bool get_anchor_via_constraints() const;
191  ///@brief VDW weight in centroid scorefunction
192  core::Real get_VDW_weight() const;
193  ///@brief chainbreak weight in fullatom scorefunction
195  ///@brief allow anchor to repack
196  bool get_allow_anchor_repack() const;
197  ///@brief resfile for design
198  std::string const & get_resfile_1() const;
199  ///@brief later-stage resfile if desired
200  std::string const & get_resfile_2() const;
201  // ///@brief whether to automatically initialize from the options system; defaults to true
202  //bool get_autoinitialize() const;
203  ///@brief copy of cmdline option loop_file
204  std::string const & get_loop_file() const;
205  ///@brief copy of cmdline option frag3
206  std::string const & get_frag3() const;
207  ///@brief do not use fragments?
208  bool get_no_frags() const;
209  ///@brief special anchor_noise_constraints_mode
211  ///@brief special super_secret_fixed_interface_mode
213 
214  ///@brief read options from the option system
215  void read_options();
216 
217  ///@brief get string name for interface_calc_
218  std::string const & interface_calc() const;
219  ///@brief get string name for neighborhood_calc_
220  std::string const & neighborhood_calc() const;
221 
222 
223 private:
224  ////////////////////////private functions generate internal data from input and defaults/////////////////
225  ///@brief constructor subunit; generates movemaps from loops, including master movemap_all_
226  void setup_movemaps();
227  ///@brief setup_movemaps subunit
228  void set_movemap( core::kinematics::MoveMapOP movemap, core::Size seqpos, bool omega = false );
229  ///@brief setup_movemaps subunit; boolean controls fullatom ignoring of fixing movemap if constraints exist
230  void fix_anchor( core::kinematics::MoveMapOP movemap, bool const centroid );
231  ///@brief constructor subunit, determines which loop is anchor's loop
232  void locate_anchor_loop();
233  ///@brief constructor subunit, rearranges multiple-loops input structure into internal data structure
235  ///@brief determined which pointers are unset, and sets them if possible
236  void set_unset_defaults();
237  ///@brief set_unset_defaults subunit, sets default scorefunctions as necessary
239  ///@brief set_unset_defaults subunit, sets default packertask factory as necessary
241  ///@brief randomly reset just one cutpoint; used by pick_new_cutpoints
242  core::Size pick_new_cutpoint( core::Size const loopstart, core::Size const loopend );
243 
244  ///@brief the anchor itself
246  ///@brief location of the anchored loop within loop_mm_tuples vector
248  ///@brief movemap allowing all loops to move; fullatom phase
250  ///@brief movemap allowing all loops to move; centroid phase
252  ///@brief pairs of loops and movemaps to move those loops for loop closure/smallmover; fullatom versions
254  ///@brief pairs of loops and movemaps to move those loops for loop closure/smallmover; centroid versions
256  ///@brief a copy of the input loops object, in case a Loops type is needed
258 
259  ///@brief fragments if we've got them
261  ///@brief PackerTask factory
263  ///@brief second TaskFactory for more rotamers late in refinement
265  ///@brief fullatom scorefunction
267  ///@brief centroid scorefunction
269  ///@brief centroid scorefunction with no-derivative functions off (for minimizing)
271 
272  ///@brief calculator name
274  ///@brief calculator name
276 
277  //option system replacement internals
278  ///@brief dye position used in dye modeling publication
280  ///@brief used for unbound mode
282  ///@brief used to test anchoring via constraints
284  ///@brief VDW weight in centroid scorefunction
286  ///@brief chainbreak weight in fullatom scorefunction
288  ///@brief allow anchor to repack
290  ///@brief resfile for design
292  ///@brief later-stage resfile if desired
294  // ///@brief whether to automatically initialize from the options system; defaults to true
295  //bool autoinitialize_;
296  ///@brief copy of loop_file cmdline option
298  ///@brief copy of frag3 cmdline option
300  ///@brief use no fragments
301  bool no_frags_;
302  ///@brief special anchor_noise_constraints_mode
304  ///@brief special super_secret_fixed_interface_mode
306 
307 };//end AnchorMoversData class
308 
309 }//AnchoredDesign
310 }//protocols
311 
312 #endif //INCLUDED_protocols_AnchoredDesign_AnchorMoversData_HH