Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SurfaceEnergies.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 core/scoring/solid_surface/SurfaceEnergies.hh
11 /// @brief SurfaceEnergies class
12 /// @author Andrew Leaver-Fay (aleaverfay@gmail.com)
13 /// @author Mike Pacella (mpacella@gmail.com)
14 
15 
16 #ifndef INCLUDED_core_scoring_solid_surface_SurfaceEnergies_hh
17 #define INCLUDED_core_scoring_solid_surface_SurfaceEnergies_hh
18 
19 // Package Headers
21 
22 // Project Headers
23 #include <core/scoring/Energies.hh>
25 
26 // Numeric Headers
27 //#include <numeric/geometry/BoundingBox.hh>
28 
29 namespace core {
30 namespace scoring {
31 namespace solid_surface {
32 
33  /// A derived class from class Energies for efficiently representing the
34  /// interactions between a protein and a fixed surface
35 
36 class SurfaceEnergies : public Energies
37 {
38 public:
39  typedef Energies parent;
40 
41 public:
42  /// ctor -- ensure correct initial state
44 
45  // Explicit copy ctor to avoid #include .hh's
46  SurfaceEnergies( SurfaceEnergies const & src );
47 
48  // Explicit assignmnet operator to avoid #include .hh's
49  virtual Energies const & operator = ( Energies const & rhs );
50 
51  ///@details determine whether my type is the same as another Conformation's
52  virtual
53  bool
54  same_type_as_me( Energies const & other, bool recurse = true ) const;
55 
56  /// dtor
57  virtual
59 
60  virtual
62  clone() const;
63 
64  /// @brief The SurfaceEnergies object needs to know how many residues are in its pose;
65  /// it also has to be told which residues are considered part of the surface and which
66  /// residues are not part of the surface.
67  void
68  set_total_residue( Size total_residue );
69 
70  /// @brief Wipe away all the information in the SurfacEnergies object describing which
71  /// residues are considered part of the surface and which residues are not part of the
72  /// surface. (Afterwards, all residues are going to be considered part of the surface).
73  void
75 
76  /// @brief Tell the SurfacEnergies that the following residues are considered not
77  /// part of the surface.
78  void
79  set_residue_range_not_surface( Size seqpos_begin, Size seqpos_end );
80 
81  /// @brief Does the SurfaceEnergies object consider a particular residue to be part of the surface?
82  bool
83  residue_is_surface( Size seqpos ) const;
84 
85 
86  /////////////////////////////////////////////////////////////////////////////
87  /////////////////////////////////////////////////////////////////////////////
88  // private methods
89  /////////////////////////////////////////////////////////////////////////////
90  /////////////////////////////////////////////////////////////////////////////
91 
92 private:
93 
94  /// @brief Create a point graph representing the xyz coordinates of the "neighbor
95  /// atoms." (Each residue_type indicates one of its atoms to be used for
96  /// neighbor detection -- e.g. CB for most amino acids, CA for GLY.) The point
97  /// graph will then be used in a call to find_neighbors to add upper-edges to
98  /// neighboring residues.
99  virtual
100  void fill_point_graph( pose::Pose const & pose, conformation::PointGraphOP pg ) const;
101 
102  /// @brief Create a new surface grid, bounding box and dimension for the surface residues.
103  /// This might get called if the range on the score function changes or if the surface
104  /// moves. (NOTE: currently not prepared to handle the case where the surface moves!)
105  //void
106  //prepare_surface_grid( conformation::PointGraphOP pg, Real neighbor_cutoff ) const;
107 
108  /// @brief Wipe everything held in the surface grid, ensuring that in the next score function
109  /// evaluation, a new grid will be computed.
110  //void
111  //reset_surface_grid() const;
112 
113 private:
114  Size total_residue_; // The total number of residues in the pose. NOTE: if this disagrees with parent::size(), we're in trouble
115  utility::vector1< std::pair< Size, Size > > non_surface_ranges_; // The residue beginning and ending indices which are considered not part of the surface
116  utility::vector1< bool > is_surface_; // The residues considered part of the surface
117 
118 
119  // Data for representing the surface that's used in neighbor detection
121  //mutable std::map< core::conformation::CubeKey, utility::vector1< Size > > surface_grid_;
122  //mutable numeric::geometry::BoundingBox< numeric::xyzVector< Real > > surf_bb_;
123  //mutable core::conformation::CubeKey surf_dim_;
124 
125 };
126 
127 
128 } // namespace solid_surface
129 } // namespace scoring
130 } // namespace core
131 
132 
133 #endif // INCLUDED_core_scoring_solid_surface_Energies_HH