Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PoissonBoltzmannEnergy.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/methods/PoissonBoltzmannEnergy.hh
11 /// @brief Membrane Environment Cbeta Energy
12 /// @author Bjorn Wallner
13 
14 
15 #ifndef INCLUDED_core_scoring_methods_PoissonBoltzmannEnergy_HH
16 #define INCLUDED_core_scoring_methods_PoissonBoltzmannEnergy_HH
17 
18 // Unit Headers
20 
21 // Package headers
24 
25 // Project headers
26 #include <core/pose/Pose.fwd.hh>
27 
30 #include <basic/datacache/CacheableData.hh>
31 #include <basic/datacache/DataCache.fwd.hh>
32 #include <utility/vector1.hh>
33 
34 #include <string>
35 #include <map>
36 
37 namespace core {
38 namespace scoring {
39 namespace methods {
40 
41 class PBLifetimeCache : public basic::datacache::CacheableData{
42 public:
44  virtual ~PBLifetimeCache();
45  basic::datacache::CacheableDataOP clone() const;
46  void set_charged_residues_map( const std::map<std::string, bool> & charged_residues_map );
47  void set_energy_state( const std::string& energy_state );
48  void set_pose( const std::string& energy_state, const core::pose::Pose& pose );
49  void set_pbp( const std::string& energy_state, core::scoring::PoissonBoltzmannPotentialOP pb );
50  void set_conformational_data( const std::string& energy_state,
51  const core::pose::Pose& pose,
53 
54  bool has_cache( const std::string& energy_state ) const;
55 
56  std::map<std::string, bool> & get_charged_residues_map();
57  const std::string & get_energy_state() const;
58  core::pose::PoseCOP get_pose( const std::string& energy_state );
60 
61 private:
62  std::map<std::string, bool> charged_residues_map_;
63  std::map<std::string, core::pose::PoseCOP> pose_by_state_;
64  std::map<std::string, core::scoring::PoissonBoltzmannPotentialOP> pb_by_state_;
66 };
67 
68 ///
70 public:
74 public:
75 
76  ///
78 
79 
80  /// clone
81  virtual
83  clone() const;
84 
85  /////////////////////////////////////////////////////////////////////////////
86  // scoring
87  /////////////////////////////////////////////////////////////////////////////
88 
90  long_range_type() const;
91 
92  virtual bool defines_intrares_energy( EnergyMap const & ) const { return true; }
93 
94  virtual bool defines_residue_pair_energy(
95  pose::Pose const & pose,
96  Size res1,
97  Size res2
98  ) const;
99 
100  virtual void setup_for_scoring( pose::Pose & pose, ScoreFunction const & ) const;
101 
102  Real
104  conformation::Residue const & rsd,
105  pose::Pose const & pose
106  ) const ;
107  bool
109  conformation::Residue const & rsd,
111  ) const ;
112 
113  virtual
114  void
116  conformation::Residue const & rsd,
117  pose::Pose const & pose,
118  ScoreFunction const & sfxn,
119  EnergyMap & emap
120  ) const ;
121 
122  ///
123  virtual void residue_pair_energy(
124  conformation::Residue const & rsd1,
125  conformation::Residue const & rsd2,
126  pose::Pose const & pose,
127  ScoreFunction const & sfxn,
128  EnergyMap & emap
129  ) const;
130 
131  /// virtual
132  /// void
133  /// residue_energy(
134  /// conformation::Residue const & rsd,
135  /// pose::Pose const & pose,
136  /// EnergyMap & emap
137  /// ) const;
138 
139 
140  //virtual
141  //void
142  //finalize_total_energy(
143  // pose::Pose & pose,
144  // ScoreFunction const &,
145  // EnergyMap &
146  //) const;
147 
148  /// @brief PB Energy is context independent and thus indicates that no context graphs need to
149  /// be maintained by class Energies
150  virtual
151  void indicate_required_context_graphs( utility::vector1< bool > & /*context_graphs_required*/ ) const;
152 
153 /////////////////////////////////////////////////////////////////////////////
154 // data
155 /////////////////////////////////////////////////////////////////////////////
156 
157 private:
158 
159  ///
160  /// Compare if two poses are close in fold within tolerance.
161  ///
162  /// To be specific, it returns True if for all a in A and b in B, abs(a.xyz - b.xyz) <= tol,
163  /// for A and B are sets of all atoms in protein 1 and protein 2, respectively.
164  ///
165  /// @param pose1 A protein's pose
166  /// @param pose2 Another protein's pose
167  /// @param atom_num The atom number
168  /// @param tol Tolerable distance in Angstrom, >= 0.A
169  ///
170  bool protein_position_equal_within( pose::Pose const & pose1,
171  pose::Pose const & pose2,
172  Size atom_num,
173  Real tolA) const;
174 
175  // const-ref to scoring database
179 
180  // Cached objects for speed
181  mutable std::map<std::string, pose::PoseCAP> cached_pose_by_state_;
182  mutable std::map<std::string, bool> charged_residues_;
184 
185 virtual
186 core::Size version() const;
187 
188 };
189 
190 
191 }
192 }
193 }
194 
195 #endif // INCLUDED_core_scoring_ScoreFunction_HH