Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ClassicMatchAlgorithm.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/downstream/ClassicMatchAlgorithm.hh
12 /// @brief
13 /// @author Alex Zanghellini (zanghell@u.washington.edu)
14 /// @author Andrew Leaver-Fay (aleaverfay@gmail.com), porting to mini
15 
16 #ifndef INCLUDED_protocols_match_downstream_ClassicMatchAlgorithm_hh
17 #define INCLUDED_protocols_match_downstream_ClassicMatchAlgorithm_hh
18 
19 // Unit headers
21 
22 // Package headers
28 // AUTO-REMOVED #include <protocols/match/Hit.hh>
29 
30 // Project headers
31 #include <core/types.hh>
34 // AUTO-REMOVED #include <core/pose/Pose.fwd.hh>
35 
36 // Utility headers
37 #include <utility/pointer/ReferenceCount.hh>
38 
39 // C++ headers
40 #include <list>
41 #include <string>
42 
43 #include <utility/fixedsizearray1.hh>
44 #include <utility/vector1.hh>
45 
46 
47 namespace protocols {
48 namespace match {
49 namespace downstream {
50 
51 /// @brief Produce hits by hashing building the coordinates of the downstream partner
52 /// The downstream partner is responsible for building itself from the coordinate frame of
53 /// three of its atoms. The ExternalGeomSampler describes the ways to orient the downstream
54 /// partner given the coordinates of the upstream partner.
56 {
57 public:
59  typedef core::Size Size;
60  typedef core::Real Real;
61  typedef numeric::HomogeneousTransform< Real > HTReal;
62 
63 public:
65  virtual ~ClassicMatchAlgorithm();
66 
67  virtual
69  clone() const;
70 
71  virtual
72  std::list< Hit >
74  Matcher & matcher
75  );
76 
77  /// @brief Reset the occupied space grid for the matcher so that only those
78  /// regions which contain hits from this geometric constraint are marked as occupied.
79  virtual
80  void
81  respond_to_primary_hitlist_change( Matcher & matcher, Size round_just_completed );
82 
83  /// @brief Delete hits for this geometric constraint if they fall into
84  /// now-empty regions of 6D. This step can be avoided if the occupied-space-grid's
85  /// revision ID has not changed since the last time this function was invoked.
86  virtual
87  void
89 
90  /// @brief Iterate across the external geom samplers that describe the rigid body orientations
91  /// of the downstream partner from the coordinates of the upstream partner.
92  virtual
93  std::list< Hit >
94  build(
95  Size const scaffold_build_point_id,
96  Size const upstream_conf_id,
97  core::conformation::Residue const & upstream_residue
98  ) const;
99 
100  /// @brief This method returns 'false' since the classic match algorithm
101  /// builds coordinates of the downstream partner and its hits should
102  /// be hashed in 6D to generate matches
103  virtual
104  bool
105  upstream_only() const;
106 
107  /// @brief This method returns 'true' since the classic matcher builds the
108  /// downstream coordinates from scratch.
109  virtual
110  bool
111  generates_primary_hits() const;
112 
113 
114  /// @brief This method should not be invoked on the ClassicMatchAlgorithm,
115  /// since it returns "false" in its upstream_only method.
116  virtual
119 
120  virtual
121  Size
123 
124 
125  /// @brief This function completes the building of the downstream conformation
126  /// once the coordinates of the upstream conformation are known (and deemed
127  /// non-colliding or, generally, pass any filter the upstream builder would use).
128  std::list< Hit >
130  Size const which_external_sampler,
131  Size const scaffold_build_point_id,
132  Size const upstream_conf_id,
133  core::conformation::Residue const & upstream_residue
134  ) const;
135 
136 public:
137 
139 
142  Size const exgeom_id,
143  std::string const & atom1,
144  std::string const & atom2,
145  std::string const & atom3,
146  DownstreamBuilderCOP downstream_builder
147  );
148 
150 
151 public:
152  /// Accessors
153 
155  restype() const {
156  return *restype_;
157  }
158 
160  external_sampler( Size external_geom_id ) const
161  {
162  return external_samplers_[ external_geom_id ];
163  }
164 
165  Size
166  launch_atom( Size external_geom_id, Size which_point ) const {
167  return launch_points_[ external_geom_id ][ which_point ];
168  }
169 
170  Size
172  return external_samplers_.size();
173  }
174 
175 private:
177 
182 
184 };
185 
186 }
187 }
188 }
189 
190 #endif