Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MatcherTask.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 // :noTabs=false:tabSize=4:indentSize=4:
4 //
5 // (c) Copyright Rosetta Commons Member Institutions.
6 // (c) This file is part of the Rosetta software suite and is made available under license.
7 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
8 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
9 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
10 
11 /// @file protocols/match/MatcherTask.hh
12 /// @brief
13 /// @author Andrew Leaver-Fay (aleaverfay@gmail.com)
14 
15 #ifndef INCLUDED_protocols_match_MatcherTask_hh
16 #define INCLUDED_protocols_match_MatcherTask_hh
17 
18 // Unit headers
20 
21 // Project headers
23 
24 #include <core/types.hh>
25 // AUTO-REMOVED #include <core/id/AtomID.hh>
26 #include <core/pose/Pose.fwd.hh>
27 
28 // Utility headers
29 #include <utility/pointer/ReferenceCount.hh>
30 // AUTO-REMOVED #include <utility/vector1.hh>
31 
32 // Numeric headers
33 #include <numeric/geometry/BoundingBox.hh>
34 #include <numeric/xyzVector.hh>
35 
36 // C++ headers
37 #include <string>
38 #include <list>
39 #include <map>
40 
41 #include <core/id/AtomID.fwd.hh>
42 #include <utility/vector1.hh>
43 
44 
45 namespace protocols {
46 namespace match {
47 
49 public:
50  typedef core::Real Real;
51  typedef core::Size Size;
53  typedef numeric::geometry::BoundingBox< Vector > BoundingBox;
54 
55 public:
56  /// Construction and Destruction
57  MatcherTask();
58  MatcherTask( MatcherTask const & other );
59  MatcherTask const & operator = ( MatcherTask const & rhs );
60 
61  virtual ~MatcherTask();
62 
63 
64 public:
65 
66  /// Setup
67  void set_upstream_pose(
68  core::pose::Pose const & pose
69  );
70 
71  void
73  core::pose::Pose const & input_pose
74  );
75 
77  core::pose::Pose const & pose,
78  utility::vector1< core::id::AtomID > const & orientation_atoms
79  );
80 
81  void
83  utility::vector1< core::id::AtomID > const & orientation_atoms
84  );
85 
86  void
87  set_enumerate_ligand_rotamers( bool setting );
88 
89  void
91 
93 
94  void
96  /// @brief Uniformly consider the same set of build points for each of the geometric constrains
98 
99  /// @brief modify the match positions according to what is specified
100  /// in the cstfile
101  void
103 
104  /// @brief Set up the task so that it keeps different backbone build points for each
105  /// geometric constraint -- the task then needs to know how many geometric constraints
106  /// there are.
108  Size n_geometric_constraints
109  );
110 
111  /// @brief Set the build point id's for a particular geometric constraint
113  Size geom_cst_id,
114  utility::vector1< Size > const & resids
115  );
116 
117  void
119 
120  void
122 
123  void
125 
126  void
128 
129 
130  //std::list< core::id::AtomID > const & downstream_atoms_required_inside_active_site_grid() const;
131 
132  /// @brief Set the bounding box for the region of space that the OccupiedSpaceHash should accept hits
133  /// in side of. If the 3rd orientation atom of the downstream partner is outside of this bounding
134  /// box, the hit will be rejected out of hand.
135  void set_occupied_space_bounding_box( BoundingBox const & bb );
136  /// @brief For the occupied space hash, set the euclidean-bin width to a uniform value for xy&z
137  void set_hash_euclidean_bin_width( Real width );
138  /// @brief For the occupeid space hash, set the euler-bin width to a uniform value for phi,psi&theta
139  void set_hash_euler_bin_width( Real width );
140 
141  /// @brief For collision detection, select the amount of collision that should
142  /// be tolerated between heavy atoms. This should be a positive value in Angstroms.
144 
145  /// @brief Initialize many parameters from the command line options
147 
148  /// @brief Matches may either be output as soon as they are generated, or they may be consolidated.
149  /// When consolidating matches, the MatchProcessor (the MatchEvaluator)
150  /// waits until all matches are seen before outputting any; it groups matches and selects the top N
151  /// matches from each group to output. This can require a lot of memory if there are very many
152  /// possible matches. MatchConsolidation is on by default.
153  void consolidate_matches( bool setting );
154  /// @brief For use with the match consolidator; specify the number of output matches that the
155  /// consolidator should select for each group.
156  void n_to_output_per_group( Size setting );
157  /// @brief Add a filter by name to the set of filters being included. If that filter requires
158  /// extra data (as, for example, the UpstreamCollisionFilter) then the task should be expanded
159  /// to include all the data necessary to create and initialize that filter. No valid options
160  /// currently.
161  void add_filter( std::string const & filter_name );
162  /// @brief Specify the name of the match-consolidator related match-grouper class.
163  /// This class will group matches together; the consolidator will then pick the top N from
164  /// each group for output. Valid options include: SameChiBinComboGrouper,
165  /// SameSequenceGrouper, and SameRotamerComboGrouper.
166  void grouper_name( std::string const & setting );
167  /// @brief Specify the name of the match-consolidator related match-evaluator class.
168  /// This class will rank each of the matches so that the consolidator may pick the top N.
169  /// Valid options include: DownstreamRMSEvaluator. More evaluator options will be implemented shortly.
170  void evaluator_name( std::string const & setting );
171  /// @brief Specify the name of the class that will write the output.
172  /// Valid options include: KinWriter. More output options will be implemented shortly.
173  void output_writer_name( std::string const & setting );
174  /// @brief Indicate the name of the single output file to which the matches will be written
175  void output_file_name( std::string const & setting );
176 
177  /// @brief Set the matcher-file input data. The Matcher will read this data when initializing itself.
179 
180  void filter_upstream_residue_collisions( bool setting );
181  void filter_upstream_collisions_by_score( bool setting );
187 
188  void filter_upstream_downstream_collisions( bool setting );
195 
197 
198 
199 public: // Accessors
200 
202  upstream_pose() const;
203 
205  downstream_pose() const;
206 
209 
210  bool
212 
213  bool
215 
218 
219  std::map< core::Size, core::Size > const &
220  upstream_only_geom_cst() const;
221 
222  /// @brief Define the active site through a gridlig file (true), or by listing residue/radii paris (false)?
223  bool
225 
226  /// @brief Accessor for the file name containing the active-site definition in gridlig format
227  std::string const &
228  gridlig_file_name() const;
229 
230  /// @brief Accessor for the data defining the active site by-residue. This data is only
231  /// active if gridlig_active_site_definition() returns false.
232  std::list< std::pair< Size, Real > > const &
234 
235  std::list< core::id::AtomID > const &
237 
240 
241  BoundingBox const &
242  occ_space_bounding_box() const;
243 
245  Vector euler_bin_widths() const;
246 
247  Real permitted_overlap() const;
248 
249  bool use_input_sc() const;
250  bool dynamic_grid_refinement() const;
251  bool consolidate_matches() const;
252 
253  Size n_to_output_per_group() const;
254 
255  std::list< std::string > const &
256  filter_names() const;
257 
258  std::string const & upstream_pose_name() const;
259  std::string const & cstfile_name() const;
260  std::string const & grouper_name() const;
261  std::string const & evaluator_name() const;
262  std::string const & output_writer_name() const;
263  std::string const & output_file_name() const;
264  Real grouper_ds_rmsd() const;
265 
266  bool output_matchres_only() const;
267 
269 
271  enz_input_data() const;
272 
280 
288 
290 
291 private:
292 
293  void
295 
296  /// @brief Read the file describing the occupied space grid euclidean dimensions.
297  /// The "details" tag for this function describes the file format used.
298  void
300 
301  /// @brief Read one of two files given on the command line that defines the set
302  /// of residues on the scaffold to consider as potential launch points for the
303  /// scaffold's active site. File formats are described in the "details" tag.
304  void
306 
307  /// @brief in cases where the upstream pose to be matched already
308  /// contains some of the desired interactions (as specified in the
309  /// REMARK header, the match position list for every geomcst will
310  /// be set to these positions
311  void
313 
314  /// @brief in case the upstream pose containts a copy
315  /// of the downstream object (i.e. if a previously matched
316  /// partial match is being read in again )
317  void
319 
320  void
322 
323  /// @brief queries the enzdes input for which atoms are relevant to the matcher,
324  /// i.e. which atoms in the downstream object interact with any of the match residues
325  void
327 
328  void
330 
331  /// @brief Read the command line arguments specifying the subset of downstream
332  /// partner atoms that are required to be in the active site, as well as a definition
333  /// of the region called the active site. The "details" tag for this function
334  /// describes three file formats used in this function.
335  void
337 
338  void
340 
341  void
343 
344  void
346 
347 private:
348 
350 
356 
361 
362  //for upstream only constraints, this maps between the geom cst
363  //and the geom cst of the upstream target
364  std::map< core::Size, core::Size > upstream_only_geom_cst_;
365 
370  std::list< std::pair< Size, Real > > upstream_resids_and_radii_defining_active_site_;
371 
372  std::list< core::id::AtomID > downstream_atoms_required_inside_active_site_;
374 
378 
380 
383  bool consolidate_matches_; /// MatchConsolidator vs MatchOutputter
385  std::list< std::string > filter_names_;
391 
392  //some options for outputting
394  utility::vector1< core::Size > geom_csts_downstream_output_; //for which of the geometric constraints will the ligand be output
395 
397 
405 
413 
415 
416 };
417 
418 
419 }
420 }
421 
422 #endif