Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DockingProtocol.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 DockingProtocol.hh
11 ///
12 /// @brief
13 /// @author Monica Berrondo
14 
15 #ifndef INCLUDED_protocols_docking_DockingProtocol_hh
16 #define INCLUDED_protocols_docking_DockingProtocol_hh
17 
18 // Unit Headers
20 
21 // Package Headers
29 
30 // Project Headers
31 #include <core/types.hh>
35 #include <core/pose/Pose.fwd.hh>
36 #include <core/scoring/ScoreFunction.hh> // Needs to be the full header so the scorefxn can default to NULL
38 
39 #include <protocols/moves/Mover.hh>
45 
46 #include <utility/tag/Tag.fwd.hh>
47 
48 
49 // Utility Headers
50 #include <utility/vector1.hh>
51 
52 // Numeric Headers
53 
54 // ObjexxFCL Headers
55 
56 // C++ headers
57 
58 namespace protocols {
59 namespace docking {
60 
61 /// @brief This is the standard RosettaDock protocol
62 /// @detailed RosettaDock protocol based on [refs...Gray2003, Wang2005, Chaudhury 2007 ... ]
64 {
65 public:
66  /// @brief
67  /// empty constructor fills values with the expected defaults
68  /// rb_jump will be assigned as 1 (meaning the first jump will
69  /// be used as the jump across which all rigid-body perturbations
70  /// will occur
72 
74  Size const rb_jump_in,
75  bool const low_res_protocol_only=false, // if true: skip high resolution docking
76  bool const docking_local_refine=false, // if true: skip low resolution docking
77  bool const autofoldtree=true,
80  );
81 
84  bool const low_res_protocol_only=false, // if true: skip high resolution docking
85  bool const docking_local_refine=false, // if true: skip low resolution docking
86  bool const autofoldtree=true,
89  );
90 
91  /// @brief Assigns default values to primitive members
92  void set_default();
93 
94  /// @brief Instantiates non-primitive members based on the value of the primitive members
96 
97 
98  //destructor
100 
101  virtual protocols::moves::MoverOP clone() const;
102 
104 
105  ///@brief This mover retains state such that a fresh version is needed if the input Pose is about to change
106  virtual bool reinitialize_for_new_input() const;// {return true;};
107 
108  ///@brief copy ctor
109  DockingProtocol( DockingProtocol const & rhs );
110 
111  ///@brief assignment operator
112  DockingProtocol & operator=( DockingProtocol const & rhs );
113 
114 
115 
116  /// @brief Associates relevant options with the DockingProtocol class
117  static void register_options();
118 
119  /// @brief Sets the score function that will be used in the low-resolution phase
120  void set_lowres_scorefxn( core::scoring::ScoreFunctionOP docking_scorefxn_low );
121 
122  /// @brief Sets the score function that will be used in the high-resolution phase.
123  /// The same score function will be used for evaluating moves, packing and discriminating
124  void set_highres_scorefxn( core::scoring::ScoreFunctionOP docking_scorefxn_high );
125 
126  /// @brief Sets the score function that will be used in the high-resolution phase.
127  /// The first scorefunction will be used for evaluating moves and discriminating, the second will be used for packing
129  core::scoring::ScoreFunctionOP docking_scorefxn_high,
130  core::scoring::ScoreFunctionOP docking_scorefxn_pack );
131 
132  /// @brief Sets the score function that will be used in the high-resolution phase.
133  /// The first scorefunction will be used for evaluating moves, the second will be used for packing and the third for discriminating
135  core::scoring::ScoreFunctionOP docking_scorefxn_high,
136  core::scoring::ScoreFunctionOP docking_scorefxn_pack,
137  core::scoring::ScoreFunctionOP docking_scorefxn_output);
138 
139  void set_sc_min( bool sc_min );
140  void set_rt_min( bool rt_min );
141  void set_dock_min( bool const dock_min );
142 
143  void set_no_filters( bool no_filters );
144  void set_low_res_protocol_only( bool const low_res_protocol_only );
145  void set_docking_local_refine( bool const docking_local_refine );
146  void set_use_legacy_protocol( bool const use_legacy_protocol );
147  void set_cst_weight( core::Real const cst_weight );
148  void set_use_constraints( bool const use_csts );
150 
154 
155 
156  virtual void apply( core::pose::Pose & pose );
157 
158  // score_only is no longer implemented. It remains here until a decision is made about what to do with it.
159  // void score_only( core::pose::Pose & pose );
160 
161  // inline getters
162  std::string partners() const { return partners_;} /// @brief returns the docking partners chain identifiers
163  virtual std::string get_name() const { return "DockingProtocol"; }
164  DockJumps & movable_jumps(){ return movable_jumps_;} ///@brief returns ref to the jumps vector for docking
165  DockJumps const & movable_jumps() const { return movable_jumps_; } ///@ return const ref to the jumps vector for docking
167 
168  //getters for const access to movers and data of docking protocol
174 
175  //Allow a developer to set a custom high resolution mover
177 
178  //Allow a developer to add some additional steps to the end of the low resolution phase.
179  //Each mover that's added in this way is added to a SequenceMover that is applied after low resolution
180  //docking concludes.
181  void add_additional_low_resolution_step( protocols::moves::MoverOP additional_low_resolution_mover );
182 
183  // inline setters
184  void set_autofoldtree( bool const autofoldtree ){ autofoldtree_ = autofoldtree; }
186  void set_inner_cycles( core::Size inner_cycles ) { lowres_inner_cycles_=inner_cycles; }
187  void set_outer_cycles( core::Size outer_cycles ) { lowres_outer_cycles_=outer_cycles; }
188  void set_design( bool const design ) { design_ = design; } // for RosettaScripts. to be deprecated when legacy high res disappears
190  void set_ignore_default_docking_task(bool const ignore_default_docking_task){ignore_default_docking_task_ = ignore_default_docking_task;}
191  void set_movable_jumps( DockJumps const jump_numbers ){ movable_jumps_ = jump_numbers; }
192  void set_reporting( bool report ) { reporting_ = report; }
193  void set_ensemble1( std::string const& ensemble1 ) { ensemble1_filename_ = ensemble1; }
194  void set_ensemble2( std::string const& ensemble2 ) { ensemble2_filename_ = ensemble2; }
196  // Other member functions
197  void add_jump( core::Size const jump_number ){ movable_jumps_.push_back( int( jump_number ) ); }
198 
199  void show( std::ostream & out=std::cout );
200  friend std::ostream & operator<<(std::ostream& out, const DockingProtocol & dp );
201 
202  // function for the parser with lots of accessors
204 
205 private:
206  /// information about the mode
207  bool user_defined_; // for constructor options passed to init
211 
214 
215  bool sc_min_;
216  bool rt_min_;
217  bool dock_min_;
218 
219  bool if_ensemble_; // Add by DK
220 
224 
225  bool use_csts_;
227 
231 
233 
234  // low res options
236 
237  /// jumps that rigid_body transformations can occur over
239 
240  // score functions
245 
246  // success criteria enforcers
247  protocols::moves::MonteCarloOP mc_; //not used currently
250 
251 
252  //protocols
256 
257  // atom set switch movers
260 
261  // ensemble objects
265 
266  // constraint set mover
268 
270 
272 
273  //if side-chains are to be taken from specified pdb file... it is set here...
275 
276  core::pack::task::TaskFactoryOP init_task_factory_; // use this to restrict the packer task for docking protocol
277  bool design_; // for RosettaScripts. to be deprecated when legacy high res disappears
278  bool ignore_default_docking_task_; //passed down to DockingHighRes, prevents the default DockingTaskFactory from being built
279 
280  /// @brief Assigns user specified values to primitive members using command line options
281  void init_from_options();
282 
283  /// @brief Performs the portion of setup of non-primitive members that requires a pose - called on apply
284  void finalize_setup( core::pose::Pose & pose );
285 
286  /// @brief Sets up the instance of DockingProtocol and initializes all members based on values passed in at construction
287  /// or via the command line.
288  void init(
289  DockJumps const movable_jumps,
290  bool const low_res_protocol_only_,
291  bool const docking_local_refine,
292  bool const autofoldtree,
293  core::scoring::ScoreFunctionOP docking_score_low,
294  core::scoring::ScoreFunctionOP docking_score_high
295  );
296 
298 
299  void setup_objects();
300 
301  void setup_constraints( core::pose::Pose & pose );
304 
305 };
306 } // docking
307 } // protocols
308 
309 #endif
310