Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ActiveSiteGrid.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/ActiveSiteGrid.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_ActiveSiteGrid_hh
17 #define INCLUDED_protocols_match_downstream_ActiveSiteGrid_hh
18 
19 // Unit headers
20 // AUTO-REMOVED #include <protocols/match/downstream/ExternalGeomSampler.fwd.hh>
21 
22 // Package headers
24 
25 // Project headers
26 #include <core/types.hh>
28 
29 // Numeric headers
30 #include <numeric/xyzVector.hh>
31 #include <numeric/geometry/BoundingBox.hh>
32 
33 // Utility headers
34 // AUTO-REMOVED #include <utility/vector1.hh>
35 #include <utility/pointer/ReferenceCount.hh>
36 
37 // C++ headers
38 
39 namespace protocols {
40 namespace match {
41 namespace downstream {
42 
44 public:
46  typedef core::Size Size;
47  typedef core::Real Real;
49  typedef numeric::geometry::BoundingBox< Vector > BoundingBox;
50 
51 public:
52  virtual ~ActiveSiteGrid();
53 
55  ActiveSiteGrid( ActiveSiteGrid const & );
56 
57  ActiveSiteGrid const &
58  operator = ( ActiveSiteGrid const & rhs );
59 
60  /// @brief Set the bounding box for this grid
61  void
62  set_bounding_box( BoundingBox const & bb );
63 
64  void
65  set_bin_width( Real width );
66 
67  /// @brief Accessor for the bounding box
68  BoundingBox const &
69  bounding_box() const {
70  return bb_;
71  }
72 
73  Bool3DGrid const &
74  grid() const;
75 
76  /// @brief Is a point in this grid active? False for a point outside the bounding box.
77  bool
78  occupied( Vector const & p ) const;
79 
80  /// @brief Reset all the voxels to false
81  void
82  clear();
83 
84  void
86 
87  /// @brief Set the bounding box to be large enough to hold the volume within the
88  /// radius of any atom in the given residue. This function has the side-effect of
89  /// clearing the grid.
90  void
92  core::conformation::Residue const & res,
93  Real radius
94  );
95 
96  /// @brief Set the bounding box to be large enough to hold the volume within the
97  /// radius of any sidechain atom in the given residue. This function has the side-effect of
98  /// clearing the grid.
99  void
101  core::conformation::Residue const & res,
102  Real radius
103  );
104 
105  /// @brief Set the bounding box to be large enough to hold the volume within the
106  /// radius of any backbone atom in the given residue. This function has the side-effect of
107  /// clearing the grid.
108  void
110  core::conformation::Residue const & res,
111  Real radius
112  );
113 
114 
115  /// @brief Set all the voxels within a certain radius of the residue atoms to true.
116  void
118  core::conformation::Residue const & res,
119  Real radius
120  );
121 
122  /// @brief Set all the voxels within a certain radius of the sidechain atoms to true.
123  void
125  core::conformation::Residue const & res,
126  Real radius
127  );
128 
129  /// @brief Set all the voxels within a certain radius of the backbone atoms to true.
130  void
132  core::conformation::Residue const & res,
133  Real radius
134  );
135 
136  /// @brief Ensures the grid is up-to-date after any calls to enlargen_*.
137  void initialize();
138 
139 private:
140 
141  /// @brief Increase the size of the bounding box to contain a given volume
142  void
144  Vector lower,
145  Vector upper,
146  Real radius
147  );
148 
149  /// @brief Ensure that the grid has the appropriate bounding box. This resets the grid
150  /// if the object has modifications to its bounding box that have not yet been transfered
151  /// to its grid.
152  void
153  prep_grid();
154 
155 private:
156 
161 
162 };
163 
164 }
165 }
166 }
167 
168 #endif