Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CarbonHBondEnergy.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/CarbonHBondEnergy.hh
11 /// @brief Hydrogen bond energy method class declaration
12 /// @author Phil Bradley
13 /// @author Andrew Leaver-Fay
14 
15 
16 #ifndef INCLUDED_core_scoring_carbon_hbonds_CarbonHBondEnergy_hh
17 #define INCLUDED_core_scoring_carbon_hbonds_CarbonHBondEnergy_hh
18 
19 #include <core/types.hh>
20 
21 // Unit Headers
23 
24 // Package headers
26 // AUTO-REMOVED #include <core/scoring/carbon_hbonds/CarbonHBondPotential.hh>
28 
29 
30 // Project headers
31 #include <core/pose/Pose.fwd.hh>
32 // AUTO-REMOVED #include <core/scoring/EnergyMap.hh>
33 
35 #include <utility/vector1.hh>
36 #include <numeric/xyzVector.hh>
37 
38 namespace core {
39 namespace scoring {
40 namespace carbon_hbonds {
41 
43 
44 ///
46 public:
48 
49 public:
50 
51  ///
53 
54  ///@brief copy c-tor
55  CarbonHBondEnergy( CarbonHBondEnergy const & src );
56 
57  /// clone
58  virtual
60  clone() const;
61 
62  ///
63  virtual
64  void
65  setup_for_scoring( pose::Pose & pose, ScoreFunction const & ) const;
66 
67  /////////////////////////////////////////////////////////////////////////////
68  // scoring
69  /////////////////////////////////////////////////////////////////////////////
70 
71  /// @brief Evaluate the cbond energy between two residues
72  virtual
73  void
75  conformation::Residue const & rsd1,
76  conformation::Residue const & rsd2,
77  pose::Pose const & pose,
78  ScoreFunction const &,
79  EnergyMap & emap
80  ) const;
81 
82 
83  /// @brief Splitting out based on bb/bb for the OnTheFly IGs
84  virtual
85  void
87  conformation::Residue const & rsd1,
88  conformation::Residue const & rsd2,
89  pose::Pose const & pose,
90  ScoreFunction const & sfxn,
91  EnergyMap & emap
92  ) const;
93 
94 
95  virtual
96  void
98  conformation::Residue const & rsd1,
99  conformation::Residue const & rsd2,
100  pose::Pose const & pose,
101  ScoreFunction const & sfxn,
102  EnergyMap & emap
103  ) const;
104 
105  virtual
106  void
108  conformation::Residue const & rsd1,
109  conformation::Residue const & rsd2,
110  pose::Pose const & pose,
111  ScoreFunction const & sfxn,
112  EnergyMap & emap
113  ) const;
114 
115  /* DEPRECATED
116  virtual
117  void
118  eval_atom_derivative(
119  id::AtomID const & atom_id,
120  pose::Pose const & pose,
121  kinematics::DomainMap const &,
122  ScoreFunction const &,
123  EnergyMap const & weights,
124  Vector & F1,
125  Vector & F2
126  ) const;*/
127 
128  virtual
129  bool
131 
132  /// @brief Evaluate all atom-pair derivatives for any interactions between the two residues
133  virtual
134  void
136  conformation::Residue const & rsd1,
137  conformation::Residue const & rsd2,
140  ResPairMinimizationData const & min_data,
141  pose::Pose const & pose,
142  EnergyMap const & weights,
143  utility::vector1< DerivVectorPair > & r1_atom_derivs,
144  utility::vector1< DerivVectorPair > & r2_atom_derivs
145  ) const;
146 
147  virtual
148  void
150  conformation::Residue const & rsd,
151  ResSingleMinimizationData const & min_data,
152  pose::Pose const & pose,
153  EnergyMap const & weights,
155  ) const;
156 
157  ///
158  // virtual
159  // void
160  // finalize_total_energy(
161  // pose::Pose & pose,
162  // ScoreFunction const &,
163  // EnergyMap & totals
164  // ) const;
165 
166  virtual
167  bool
168  defines_intrares_energy( EnergyMap const & /*weights*/ ) const;
169 
170  virtual
171  void
173  conformation::Residue const & rsd,
174  pose::Pose const & pose,
175  ScoreFunction const & sfxn,
176  EnergyMap & emap
177  ) const;
178 
179  virtual
180  Distance
182 
183  virtual
184  bool
186  {
187  return true;
188  }
189 
190  // Real hydrogen_interaction_cutoff2() const;
191 
192  ///@brief CarbonHBondEnergy is context sensitive
193  virtual
195  utility::vector1< bool > & context_graphs_required ) const;
196 
197  bool
199 
200 private:
201 
202  bool
204  conformation::Residue const & rsd1,
205  conformation::Residue const & rsd2,
206  Size const ii,
207  Size const jj
208  ) const;
209 
210  Real
212  conformation::Residue const & don_rsd,
213  conformation::Residue const & acc_rsd,
214  Real & bb_bb,
215  Real & bb_sc,
216  Real & sc_sc
217  ) const;
218 
219  Real
221  conformation::Residue const & don_rsd,
222  conformation::Residue const & acc_rsd
223  ) const;
224 
225  Real
227  conformation::Residue const & don_rsd, // sidechain atoms on donor
228  conformation::Residue const & acc_rsd // backbone atoms on acceptor
229  ) const;
230 
231  Real
233  conformation::Residue const & don_rsd, // backbone atoms on donor
234  conformation::Residue const & acc_rsd // sidechain atoms on acceptor
235  ) const;
236 
237  Real
239  conformation::Residue const & don_rsd,
240  conformation::Residue const & acc_rsd
241  ) const;
242 
243 
244  void
246  conformation::Residue const & don_rsd,
247  conformation::Residue const & acc_rsd,
248  EnergyMap const & weights,
249  utility::vector1< DerivVectorPair > & don_atom_derivs,
250  utility::vector1< DerivVectorPair > & acc_atom_derivs
251  ) const;
252 
253 
254  bool
255  atom_is_apolar_h( conformation::Residue const & rsd, Size const atm ) const;
256 
257  bool
258  atom_is_acceptor( conformation::Residue const & rsd, Size const atm ) const;
259 
260  /// @details Atom pair interaction energy; returns true if the interaction energy
261  /// is nonzero. The f2 vector returned when update_deriv is true is the force on
262  /// the hydrogen atom; f2 for the acceptor is -1 * f2 for the hydrogen. f1 may
263  /// be computed by taking the cross product of f2 with the coordinate of the
264  /// acceptor/hydrogen respectively.
265  bool
267  Size const don_h_atm,
268  conformation::Residue const & don_rsd,
269  Size const acc_atm,
270  conformation::Residue const & acc_rsd,
271  Real & energy,
272  bool const update_deriv = false,
273  Vector & f2 = DUMMY_VECTOR
274  ) const;
275 
276 
277 private:
278 
279  /////////////////////////////////////////////////////////////////////////////
280  // data
281  /////////////////////////////////////////////////////////////////////////////
282 
283  // const-ref to scoring database
285  Real const max_dis_;
287 
289 
291  bool const verbose_;
292 
293  /// apl -- enmethods should not know what weights to use; they should use the weights they're given
294  /// This will allow (near future) reweighting between arbitrary residue pairs
295  //mutable Real wbb_bb_;
296  //mutable Real wbb_sc_;
297  //mutable Real wsc_sc_;
298 
299 virtual
300 core::Size version() const;
301 };
302 
303 } // carbon_hbonds
304 } // scoring
305 } // core
306 
307 #endif
308