Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FlexPepDockingProtocol.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) 199x-2008 Hebrew University, Jerusalem
5 //
6 // (c) Copyright Rosetta Commons Member Institutions.
7 // (c) This file is part of the Rosetta software suite and is made available under license.
8 // (c) The Rosetta software is developed by the consttributing members of the Rosetta Commons.
9 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
10 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
11 /// @file FlexPepDockingProtocol.hh
12 ///
13 /// @brief protocol for docking flexible peptides onto globular proteins
14 /// @date August 5, 2008
15 /// @author Barak Raveh
16 
17 #ifndef INCLUDED_protocols_flexpep_docking_FlexPepDockingProtocol_hh
18 #define INCLUDED_protocols_flexpep_docking_FlexPepDockingProtocol_hh
19 
20 
21 #include <core/types.hh>
29 // AUTO-REMOVED #include <protocols/moves/DataMap.hh>
31 #include <protocols/moves/Mover.hh>
32 // AUTO-REMOVED #include <protocols/simple_moves/PackRotamersMover.hh>
35 // AUTO-REMOVED #include <utility/tag/Tag.hh>
36 #include <string>
37 // AUTO-REMOVED #include <set>
38 
40 #include <utility/vector0.hh>
41 #include <utility/vector1.hh>
42 
43 
44 
45 namespace protocols {
46 namespace flexpep_docking {
47 
51 
53 {
54 public:
55 
56  /// constructor
57  FlexPepDockingProtocol(Size const rb_jump_in = 1);
58 
59  FlexPepDockingProtocol(Size const rb_jump_in, bool const fullatom, bool const view=false );
60 
61  // empty destructor - needed for proper inclusion of OP clasesses
63 
64  /// @brief setup that is called from constructor
65  void set_default();
66 
67  /// @brief setter
68  void view( bool view_in ) { view_=view_in; }
69 
70  virtual protocols::moves::MoverOP clone() const;
71 
72  virtual void apply( core::pose::Pose & pose );
73 
74  virtual std::string get_name() const;
75 
76  virtual void parse_my_tag(
77  utility::tag::TagPtr const tag,
81  core::pose::Pose const &
82  );
83 private:
84 
85  void setup_foldtree( core::pose::Pose & pose );
86 
87  void minimize_only(
88  core::pose::Pose & pose,
89  const std::string & min_type,
90  const float min_func_tol
91  );
92 
93  /////////////////////////////////////////////////////////////////////////////
94  /////////////////////////////////////////////////////////////////////////////
95  /// @begin create and apply prepack mover
96  ///
97  /// @brief prepack protocol for flexpepdock
98  // (0) minimize all side-chains + peptide b.b., just to get a reference to best possible energy
99  // (i) translate apart (by 1000A)
100  // (ii) repack + minimize side-chains of protein
101  // (iii) translate back (by 1000A)
102  ///
103  // @detailed
104  // Prepacking a docked structure
105  //
106  // @param
107  // pose - the pose to prepack
108  // ppk_receptor - whether to prepack the receptor protein
109  // ppk_peptide - whether to prepack the lignad peptide
110  ////////////////////////////////////////////////////////////////////////////
111  void prepack_only( core::pose::Pose & pose ,
112  bool ppk_receptor, bool ppk_peptide );
113 
114  ////////////////////////////////////////
115  // set constraints to prevent receptor from changing too much from starting structure
116  ////////////////////////////////////////
118 
119  void set_allowed_moves( );
120 
122 
123  void extend_peptide( core::pose::Pose & pose );
124 
125  void random_rb_pert( core::pose::Pose & pose );
126 
127  void small_moves( core::pose::Pose & pose );
128 
129  void shear_moves( core::pose::Pose & pose );
130 
131  void backrub_move( core::pose::Pose & pose );
132 
133  void polyAla( core::pose::Pose & pose );
134 
135  bool check_filters( core::pose::Pose & pose);
136 
137  void calcMetrics( core::pose::Pose & pose );
138 
139  // randomly change peptide's jump residue every cycle
140  // TODO: add a flag for this? (currently not used)
142 
144  core::pose::Pose & pose,
145  const int cycles,
146  const std::string & min_type,
147  const float minimization_threshold,
148  const float min_func_tol
149  );
150 
152  core::pose::Pose & pose,
153  const int cycles,
154  const std::string & min_type,
155  const float trans_magnitude,
156  const float rot_magnitude,
157  const float minimization_threshold,
158  const float func_tol
159  );
160 
162  core::pose::Pose & pose
163  );
164 
165 
166  /////////////////////////////////////////////////////////////////////////////
167  // @brief mark the peptide residues in the native structure interface
168  //
169  // @param superpos_partner[out]
170  // An array of positions - true for peptide residues
171  // @param native_interface_residues[out]
172  // An array of positions - true for interface peptide residues
173  /////////////////////////////////////////////////////////////////////////////
175  ( ObjexxFCL::FArray1D_bool & superpos_partner,
176  ObjexxFCL::FArray1D_bool & native_interface_residues) const;
177 
178  /////////////////////////////////////////////////////////////////////////////
179  // @brief
180  // add low resolution statistics to score_map (see make_statistics)
181  //
182  // @param[in] start_pose- the initial pose sent to this->apply()
183  // @param[in] pose_after_lowres - the pose optimized at low-res by this->apply()
184  /////////////////////////////////////////////////////////////////////////////
185  void addLowResStatistics(
186  core::pose::Pose const& start_pose,
187  core::pose::Pose& pose_after_lowres ) const;
188 
189 
190  /////////////////////////////////////////////////////////////////////////////
191  // @brief
192  // make statistics comparing the start pose, the final pose and the native
193  // and updated final_pose with statistics
194  //
195  // @param[in] start_pose - the initial pose sent to this->apply()
196  // @param[in] pose_after_lowres - the pose after low-res optimization (if applied),
197  // and right before the hi-res optimization
198  // @param[in] final_pose - the final pose optimized by this->apply()
199  /////////////////////////////////////////////////////////////////////////////
200  void storeJobStatistics(
201  core::pose::Pose const& start_pose,
202  core::pose::Pose& pose_after_lowres,
203  core::pose::Pose& final_pose );
204 
205 
206  /////////////////////////////////////////////////////////////////////////////
207  // @brief
208  // High-resolution protocol for docking a flexible peptide onto a globular
209  // protein
210  //
211  // @param pose[in,out] an input pose conformation to be optimized
213 
214 
215 
216 private:
217  /// information about the mode
218  bool fullatom_;
219  /// the jump number across which to do rigid_body transformations
221  /// whether or not to initialize the viewer (for opengl)
222  bool view_;
223 
224 private:
225 
226  bool is_fail_; // flag for failures in class operation
227 
228  FlexPepDockingFlags flags_; // all flags loaded from cmd-line options
229 
232 
234 
237 
238  // metrics calculator object
240  std::map < std::string, core::Real > if_metrics_; // interface metrics
241 
242  // taskfactory for all-protein repacking operations
244 
245  // task factory that restricts packing to the interface
247 
248  // for packing the docking interface
250 
251  // for designing the peptide;
252  core::pack::task::operation::RestrictResidueToRepackingOP receptor_protector_oper_; // operation to prevent the receptor from being redesigned
255 
256  // the flexpepdock protocol movemap // may change throughout the run
258 
259  // movemap for the minimizer
261 
262  // loop mover for modeling loop closure
264 
265  // int num_jumps_;
266 
267  // flag to indicate when the flexible loops are stripped from the pose
268  // this is useful for various tasks when we want to work only on the core
269  // of the rigid body (like R.B. perturbation)
271 
272 };
273 } // flexPepDocking
274 } // protocols
275 
276 #endif
277