Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ExactOccludedHbondSolEnergy.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 // This file is part of the Rosetta software suite and is made available under license.
5 // The Rosetta software is developed by the contributing members of the Rosetta Commons consortium.
6 // (C) 199x-2009 Rosetta Commons participating institutions and developers.
7 // For more information, see http://www.rosettacommons.org/.
8 
9 /// @file core/scoring/geometric_solvation/ExactOccludedHbondSolEnergy.hh
10 /// @brief Solvation model based on penalizing potential for Hbonding to solvent
11 /// @author John Karanicolas
12 
13 
14 #ifndef INCLUDED_core_scoring_geometric_solvation_ExactOccludedHbondSolEnergy_hh
15 #define INCLUDED_core_scoring_geometric_solvation_ExactOccludedHbondSolEnergy_hh
16 
17 #include <core/types.hh>
18 
19 // Project headers
21 // AUTO-REMOVED #include <core/scoring/methods/EnergyMethodOptions.fwd.hh>
22 #include <core/pose/Pose.fwd.hh>
27 // AUTO-REMOVED #include <core/chemical/AtomTypeSet.hh>
28 
29 // Utility headers
30 // AUTO-REMOVED #include <utility/vector1.hh>
31 
32 // C++ headers
33 #include <map>
34 
36 #include <utility/vector1.hh>
37 
38 
39 
40 namespace core {
41 namespace scoring {
42 namespace geometric_solvation {
43 
44 
45 // singleton class
46 class GridInfo {
47 
48 public:
49  static GridInfo * get_instance();
50 
51  // accessors
52  core::Size xnum_points() const { return xnum_points_; };
53  core::Size ynum_points() const { return ynum_points_; };
54  core::Size znum_points() const { return znum_points_; };
55  core::Real xstep() const { return xstep_; };
56  core::Real ystep() const { return ystep_; };
57  core::Real zstep() const { return zstep_; };
58  core::Real xorigin() const { return xorigin_; };
59  core::Real yorigin() const { return yorigin_; };
60  core::Real zorigin() const { return zorigin_; };
61 
62 private:
63  //private constructor
64  GridInfo();
65  static GridInfo * instance_;
66 
67  // private member data
71 
72 };
73 
74 
75 
76 // singleton class
78 
79 public:
81 
82  std::vector < std::vector < std::vector <core::Real> > > const &
83  get_water_weight_grid( hbonds::HBEvalType const & hbond_eval_type ) const;
84 
86  get_sum_water_weight_grid( hbonds::HBEvalType const & hbond_eval_type ) const;
87 
88 private:
89  //private constructor
92 
93  core::Real fill_water_grid( std::vector < std::vector < std::vector <core::Real> > > & water_weights,
94  hbonds::HBEvalTuple const & hbond_eval_type, GridInfo const & grid_info, bool const water_is_donor);
95 
96  // private member data
97  std::map< hbonds::HBEvalType, std::vector < std::vector < std::vector <core::Real> > > > all_water_weights_;
98  std::map< hbonds::HBEvalType, core::Real> sum_all_water_weights_;
99 
102 };
103 
104 typedef std::map< hbonds::HBEvalType, std::vector < std::vector < std::vector <core::Real> > > >::const_iterator all_water_weights_iterator;
105 typedef std::map< hbonds::HBEvalType, core::Real>::const_iterator sum_water_weights_iterator;
106 
107 
109 public:
111 
112 public:
113 
115  bool const exact_occ_skip_Hbonders = false,
116  bool const exact_occ_include_Hbond_contribution = false,
117  bool const exact_occ_pairwise = false,
118  bool const exact_occ_pairwise_by_res = false,
119  bool const exact_occ_split_between_res = false,
120  bool const exact_occ_self_res_occ = true,
121  core::Real const occ_radius_scaling = 1.,
122  bool const verbose = false
123  );
124 
126 
128 
129  virtual methods::EnergyMethodOP clone() const;
130 
131  virtual void setup_for_scoring( pose::Pose & pose, ScoreFunction const & ) const;
132 
133  virtual void setup_for_packing(pose::Pose & pose, utility::vector1< bool > const &, utility::vector1< bool > const & ) const;
134 
135  virtual void setup_for_derivatives( pose::Pose &pose, ScoreFunction const & ) const;
136 
137  virtual void setup_for_minimizing(pose::Pose & pose, ScoreFunction const & , kinematics::MinimizerMapBase const &) const;
138 
139  virtual void residue_energy(
140  conformation::Residue const & polar_rsd,
141  pose::Pose const & pose,
142  EnergyMap & emap
143  ) const;
144 
146 
147  virtual bool defines_intrares_energy( EnergyMap const & ) const { return false; }
148 
149  virtual Distance atomic_interaction_cutoff() const;
150 
151  core::Real
153  hbonds::HBEvalTuple const & hbond_eval_type
154  ) const;
155 
157  pose::Pose const & pose,
158  conformation::Residue const & polar_rsd,
159  Size const polar_atom,
160  bool const restrict_to_single_occluding_residue = false,
161  Size const single_occluding_resinx = 0,
162  bool const restrict_to_single_occluding_atom = false,
163  Size const single_occluding_atominx = 0
164  ) const;
165 
167  pose::Pose const & pose,
168  conformation::Residue const & polar_rsd,
169  core::Size const polar_atomno,
170  GridInfo const & grid_info,
171  core::Real const & grid_constant,
172  std::vector < std::vector < std::vector <core::Real> > > const & water_weights,
173  bool const restrict_to_single_occluding_residue = false,
174  core::Size const single_occluding_resinx = 0,
175  bool const restrict_to_single_occluding_atom = false,
176  core::Size const single_occluding_atominx = 0
177  ) const;
178 
179 
180 private:
181 
191  bool const verbose_;
193 
194 
195  // note: this would really be a local variable, it's just that we don't want to pay
196  // the price to reallocate memory every time. Making it member data keeps it persistent,
197  // but then we can't alter it in const member functions. For this reason, it's mutable...
198  mutable std::vector < std::vector < std::vector <bool> > > occluded_sites_;
199 virtual
200 core::Size version() const;
201 
202 };
203 
204 } // geometric_solvation
205 } // scoring
206 } // core
207 
208 #endif
209