Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CountPair1B.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/etable/count_pair/CountPair1B.hh
11 /// @brief Count pair for residue pairs connected with one bond, where the
12 /// crossover from excluding to counting atom pair interactions is at 3 bonds.
13 /// @author Andrew Leaver-Fay (leaverfa@email.unc.edu)
14 
15 
16 #ifndef INCLUDED_core_scoring_etable_count_pair_CountPair1B_hh
17 #define INCLUDED_core_scoring_etable_count_pair_CountPair1B_hh
18 
19 // AUTO-REMOVED #include <core/scoring/etable/count_pair/CountPairFunction.hh>
20 
21 //#include <core/scoring/etable/count_pair/CountPairCrossover3.hh>
22 
23 #include <core/types.hh>
25 
27 
31 #include <utility/vector1.hh>
32 
33 
34 namespace core {
35 namespace scoring {
36 namespace etable {
37 namespace count_pair {
38 
39 template < class CrossoverBehavior >
40 class CountPair1B : public CrossoverBehavior
41 {
42 public:
43  public:
45 
46 public:
48  conformation::Residue const & res1,
49  Size const res1_connect_atom,
50  conformation::Residue const & res2,
51  Size const res2_connect_atom
52  );
53 
54  virtual ~CountPair1B() {} // inlined when declared on the stack
55 
56  ///@brief function required by templated functions in atom_pair_energy_inline
57  inline
58  bool
60  int const at1,
61  int const at2,
62  Real & weight,
63  Size & path_dist
64  ) const
65  {
66  path_dist = 1 + res1_conn_dist_[ at1 ] + res2_conn_dist_[ at2 ];
67  return parent::count_at_path_distance( path_dist, weight );
68  }
69 
70  virtual
71  bool
72  count(
73  int const at1,
74  int const at2,
75  Real &,
76  Size & path_dist
77  ) const;
78 
79  /// Type Resolution Functions ///
80 
81  virtual
82  void
84  conformation::Residue const & res1,
85  conformation::Residue const & res2,
87  EnergyMap &
88  ) const;
89 
90 
91  virtual
92  void
94  conformation::Residue const &,
95  conformation::Residue const &,
97  EnergyMap &
98  ) const;
99 
100 
101  virtual
102  void
104  conformation::Residue const &,
105  conformation::Residue const &,
107  EnergyMap &
108  ) const;
109 
110 
111  virtual
112  void
114  conformation::Residue const &,
115  conformation::Residue const &,
117  EnergyMap &
118  ) const;
119 
120 
121  virtual
122  void
124  conformation::Residue const &,
125  conformation::Residue const &,
127  EnergyMap &
128  ) const;
129 
130 
131  virtual
132  void
134  conformation::Residue const & res1,
135  conformation::Residue const & res2,
137  EnergyMap &
138  ) const;
139 
140 
141  virtual
142  void
144  conformation::Residue const &,
145  conformation::Residue const &,
147  EnergyMap &
148  ) const;
149 
150 
151  virtual
152  void
154  conformation::Residue const &,
155  conformation::Residue const &,
157  EnergyMap &
158  ) const;
159 
160 
161  virtual
162  void
164  conformation::Residue const &,
165  conformation::Residue const &,
167  EnergyMap &
168  ) const;
169 
170 
171  virtual
172  void
174  conformation::Residue const &,
175  conformation::Residue const &,
177  EnergyMap &
178  ) const;
179 
180 private:
183 
184 };
185 
186 
187 /// @brief take a row from the path distances table
188 /// to retrieve the lower and upper path distances
189 /// for all atoms in each residue
190 template < class CrossoverBehavior >
192  conformation::Residue const & res1,
193  Size const res1_connect_atom,
194  conformation::Residue const & res2,
195  Size const res2_connect_atom
196 ) :
197  parent(),
198  res1_conn_dist_( res1.path_distance( res1_connect_atom )),
199  res2_conn_dist_( res2.path_distance( res2_connect_atom ))
200 {
201 }
202 
203 template < class CrossoverBehavior >
204 bool
206  int const at1,
207  int const at2,
208  Real & w,
209  Size & path_dist
210 ) const
211 {
212  return operator() ( at1, at2, w, path_dist );
213 }
214 
215 template < class CrossoverBehavior >
216 void
218  conformation::Residue const & res1,
219  conformation::Residue const & res2,
220  etable::TableLookupEvaluator const & etable_energy,
221  EnergyMap & emap
222 ) const
223 {
224  inline_residue_atom_pair_energy( res1, res2, etable_energy, *this, emap );
225 }
226 
227 
228 template < class CrossoverBehavior >
229 void
231  conformation::Residue const & res1,
232  conformation::Residue const & res2,
233  etable::TableLookupEvaluator const & etable_energy,
234  EnergyMap & emap
235 ) const
236 {
237  inline_residue_atom_pair_energy_sidechain_backbone( res1, res2, etable_energy, *this, emap );
238 }
239 
240 
241 template < class CrossoverBehavior >
242 void
244  conformation::Residue const & res1,
245  conformation::Residue const & res2,
246  etable::TableLookupEvaluator const & etable_energy,
247  EnergyMap & emap
248 ) const
249 {
250  inline_residue_atom_pair_energy_sidechain_whole( res1, res2, etable_energy, *this, emap );
251 }
252 
253 template < class CrossoverBehavior >
254 void
256  conformation::Residue const & res1,
257  conformation::Residue const & res2,
258  etable::TableLookupEvaluator const & etable_energy,
259  EnergyMap & emap
260 ) const
261 {
262  inline_residue_atom_pair_energy_backbone_backbone( res1, res2, etable_energy, *this, emap );
263 }
264 
265 
266 template < class CrossoverBehavior >
267 void
269  conformation::Residue const & res1,
270  conformation::Residue const & res2,
271  etable::TableLookupEvaluator const & etable_energy,
272  EnergyMap & emap
273 ) const
274 {
275  inline_residue_atom_pair_energy_sidechain_sidechain( res1, res2, etable_energy, *this, emap );
276 }
277 
278 template < class CrossoverBehavior >
279 void
281  conformation::Residue const & res1,
282  conformation::Residue const & res2,
283  etable::AnalyticEtableEvaluator const & etable_energy,
284  EnergyMap & emap
285 ) const
286 {
287  inline_residue_atom_pair_energy( res1, res2, etable_energy, *this, emap );
288 }
289 
290 
291 template < class CrossoverBehavior >
292 void
294  conformation::Residue const & res1,
295  conformation::Residue const & res2,
296  etable::AnalyticEtableEvaluator const & etable_energy,
297  EnergyMap & emap
298 ) const
299 {
300  inline_residue_atom_pair_energy_sidechain_backbone( res1, res2, etable_energy, *this, emap );
301 }
302 
303 
304 template < class CrossoverBehavior >
305 void
307  conformation::Residue const & res1,
308  conformation::Residue const & res2,
309  etable::AnalyticEtableEvaluator const & etable_energy,
310  EnergyMap & emap
311 ) const
312 {
313  inline_residue_atom_pair_energy_sidechain_whole( res1, res2, etable_energy, *this, emap );
314 }
315 
316 template < class CrossoverBehavior >
317 void
319  conformation::Residue const & res1,
320  conformation::Residue const & res2,
321  etable::AnalyticEtableEvaluator const & etable_energy,
322  EnergyMap & emap
323 ) const
324 {
325  inline_residue_atom_pair_energy_backbone_backbone( res1, res2, etable_energy, *this, emap );
326 }
327 
328 
329 template < class CrossoverBehavior >
330 void
332  conformation::Residue const & res1,
333  conformation::Residue const & res2,
334  etable::AnalyticEtableEvaluator const & etable_energy,
335  EnergyMap & emap
336 ) const
337 {
338  inline_residue_atom_pair_energy_sidechain_sidechain( res1, res2, etable_energy, *this, emap );
339 }
340 
341 
342 } // namespace count_pair
343 } // namespace etable
344 } // namespace scoring
345 } // namespace core
346 
347 #endif