Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OccludedHbondSolEnergy.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/OccludedHbondSolEnergy.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_OccludedHbondSolEnergy_hh
15 #define INCLUDED_core_scoring_geometric_solvation_OccludedHbondSolEnergy_hh
16 
17 #include <core/types.hh>
18 
19 // Unit Headers
21 
22 // Package headers
26 
27 // Project headers
28 #include <core/pose/Pose.fwd.hh>
29 
30 #include <utility/vector1.hh>
31 
32 
33 //#include <core/scoring/EnergyMap.hh>
34 
35 namespace core {
36 namespace scoring {
37 namespace geometric_solvation {
38 
40 
42 public:
44 public:
45 
46  OccludedHbondSolEnergy( methods::EnergyMethodOptions const & options, bool const verbose = false );
47 
49 
50  virtual
52  clone() const;
53 
54  virtual
55  void
56  setup_for_scoring( pose::Pose & pose, ScoreFunction const & ) const;
57 
58  virtual
59  void
60  setup_for_derivatives( pose::Pose & pose, ScoreFunction const & ) const;
61 
62  virtual
63  void
65  conformation::Residue const & rsd1,
66  conformation::Residue const & rsd2,
67  pose::Pose const & ,
68  ScoreFunction const &,
69  EnergyMap & emap
70  ) const;
71 
72  virtual
73  void
75  conformation::Residue const & rsd,
76  pose::Pose const & pose,
77  ScoreFunction const & scorefxn,
78  EnergyMap & emap
79  ) const;
80 
81  /// @brief Inform inquiring algorithms that this energy method will opt-in to the
82  /// residue-pair decomposable derivative evaluation scheme.
83  virtual
84  bool
85  minimize_in_whole_structure_context( pose::Pose const & ) const { return false; }
86 
87  virtual
88  bool
90  conformation::Residue const & res1,
91  conformation::Residue const & res2,
92  bool res_moving_wrt_eachother
93  ) const;
94 
95  virtual
96  void
98  conformation::Residue const & rsd1,
99  conformation::Residue const & rsd2,
102  ResPairMinimizationData const & min_data,
103  pose::Pose const & pose, // provides context
104  EnergyMap const & weights,
105  utility::vector1< DerivVectorPair > & r1_atom_derivs,
106  utility::vector1< DerivVectorPair > & r2_atom_derivs
107  ) const;
108 
109  virtual
110  void
112  conformation::Residue const & rsd,
113  ResSingleMinimizationData const & min_data,
114  pose::Pose const & pose,
115  EnergyMap const & weights,
117  ) const;
118 
119  /*void
120  deprecated_eval_atom_derivative(
121  id::AtomID const & atom_id,
122  pose::Pose const & pose,
123  kinematics::DomainMap const &,
124  ScoreFunction const &,
125  EnergyMap const & weights,
126  Vector & F1,
127  Vector & F2
128  ) const;*/
129 
130  // Note: This could change - see notes in the .cc re double-counting. If it does,
131  // eval_atom_derivative has to change too.
132  virtual
133  bool
134  defines_intrares_energy( EnergyMap const & ) const { return true; };
135 
136  virtual
137  Distance
139 
140  virtual
142 
143 private:
144 
145  Real
147  conformation::Residue const & polar_rsd,
148  conformation::Residue const & occ_rsd ) const;
149 
150  void
152  conformation::Residue const & rsd1,
153  conformation::Residue const & rsd2,
154  EnergyMap const & weights,
155  utility::vector1< DerivVectorPair > & r1_atom_derivs,
156  utility::vector1< DerivVectorPair > & r2_atom_derivs
157  ) const;
158 
159 
160  void
162  Size const don_h_atom,
163  Size const don_base_atom,
164  conformation::Residue const & don_rsd,
165  Size const occ_atom,
166  conformation::Residue const & occ_rsd,
167  Real & energy,
168  bool const update_deriv = false,
169  Real const occ_sol_fitted_weight = 0.0,
170  //bool const update_deriv_base = false,
171  //bool const update_deriv_occ = false,
172  Vector & f1_base = dummy_deriv_vector_,
173  Vector & f2_base = dummy_deriv_vector_,
174  Vector & f1_polar = dummy_deriv_vector_,
175  Vector & f2_polar = dummy_deriv_vector_,
176  Vector & f1_occ = dummy_deriv_vector_,
177  Vector & f2_occ = dummy_deriv_vector_
178  ) const;
179 
180  Real
182  Vector const & base_atom_xyz,
183  Vector const & polar_atom_xyz,
184  Vector const & occluding_atom_xyz ) const;
185 
186  bool
187  atom_is_donor_h( conformation::Residue const & rsd, Size const atom ) const;
188 
189  bool
190  atom_is_acceptor( conformation::Residue const & rsd, Size const atom ) const;
191 
192  bool
193  atom_is_valid_base( conformation::Residue const & rsd, Size const atom ) const;
194 
195 
196 private:
197 
198  // const-ref to scoring database
200 
201  bool const verbose_;
202 virtual
203 core::Size version() const;
204 
205 };
206 
207 } // geometric_solvation
208 } // scoring
209 } // core
210 
211 #endif
212