Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CountPairIntraRes.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/CountPairIntraRes.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_CountPairIntraRes_hh
17 #define INCLUDED_core_scoring_etable_count_pair_CountPairIntraRes_hh
18 
19 // Package Headers
20 // AUTO-REMOVED #include <core/scoring/etable/count_pair/CountPairFunction.hh>
21 
22 // Project Headers
24 
25 //#include <core/scoring/etable/count_pair/CountPairCrossover3.hh>
26 
27 #include <core/types.hh>
29 
32 #include <utility/vector1.hh>
33 
34 
35 namespace core {
36 namespace scoring {
37 namespace etable {
38 namespace count_pair {
39 
40 template < class CrossoverBehavior >
41 class CountPairIntraRes : public CrossoverBehavior
42 {
43 public:
44  public:
46 
47 public:
49  conformation::Residue const & res
50  );
51 
52  virtual ~CountPairIntraRes();
53 
54  ///@brief function required by templated functions in atom_pair_energy_inline
55  inline
56  bool
58  int const at1,
59  int const at2,
60  Real & weight,
61  Size & path_dist
62  ) const
63  {
64  path_dist = path_dists_[ at1 ][ at2 ];
65  return parent::count_at_path_distance( path_dist, weight );
66  }
67 
68  virtual
69  bool
70  count(
71  int const at1,
72  int const at2,
73  Real &,
74  Size & path_dist
75  ) const;
76 
77  /// Type Resolution Functions ///
78 
79  virtual
80  void
82  conformation::Residue const & res1,
83  conformation::Residue const & res2,
85  EnergyMap &
86  ) const;
87 
88 
89  virtual
90  void
92  conformation::Residue const &,
93  conformation::Residue const &,
95  EnergyMap &
96  ) const;
97 
98 
99  virtual
100  void
102  conformation::Residue const &,
103  conformation::Residue const &,
105  EnergyMap &
106  ) const;
107 
108  virtual
109  void
111  conformation::Residue const &,
112  conformation::Residue const &,
114  EnergyMap &
115  ) const;
116 
117 
118  virtual
119  void
121  conformation::Residue const &,
122  conformation::Residue const &,
124  EnergyMap &
125  ) const;
126 
127  virtual
128  void
130  conformation::Residue const & res1,
131  conformation::Residue const & res2,
133  EnergyMap &
134  ) const;
135 
136 
137  virtual
138  void
140  conformation::Residue const &,
141  conformation::Residue const &,
143  EnergyMap &
144  ) const;
145 
146 
147  virtual
148  void
150  conformation::Residue const &,
151  conformation::Residue const &,
153  EnergyMap &
154  ) const;
155 
156  virtual
157  void
159  conformation::Residue const &,
160  conformation::Residue const &,
162  EnergyMap &
163  ) const;
164 
165 
166  virtual
167  void
169  conformation::Residue const &,
170  conformation::Residue const &,
172  EnergyMap &
173  ) const;
174 
175 private:
177 
178 };
179 
180 /// @brief take a reference to the path distances table
181 template < class CrossoverBehavior >
183  conformation::Residue const & res
184 ) :
185  parent(),
186  path_dists_( res.path_distances() )
187 {
188 }
189 
190 template < class CrossoverBehavior >
192 
193 template < class CrossoverBehavior >
194 bool
196  int const at1,
197  int const at2,
198  Real & w,
199  Size & path_dist
200 ) const
201 {
202  //bool temp = operator() ( at1, at2, w, path_dist );
203  //std::cout << "CPIR: " << at1 << "\t" << at2 << "\t" << w << "\t" << path_dist << "\t" << temp << std::endl;
204  //return temp;
205  return operator() ( at1, at2, w, path_dist );
206 }
207 
208 
209 template < class CrossoverBehavior >
210 void
212  conformation::Residue const & res,
213  conformation::Residue const & ,
214  etable::TableLookupEvaluator const & etable_energy,
215  EnergyMap & emap
216 ) const
217 {
218  inline_intraresidue_atom_pair_energy( res, etable_energy, *this, emap );
219 }
220 
221 
222 template < class CrossoverBehavior >
223 void
225  conformation::Residue const & ,
226  conformation::Residue const & ,
228  EnergyMap &
229 ) const
230 {
231  std::cerr << "Error: illegal call to CountPairIntraRes< CrossoverBehavior >::residue_atom_pair_energy_sidechain_backbone" << std::endl;
232  utility_exit();
233 }
234 
235 
236 template < class CrossoverBehavior >
237 void
239  conformation::Residue const & ,
240  conformation::Residue const & ,
242  EnergyMap &
243 ) const
244 {
245  std::cerr << "Error: illegal call to CountPairIntraRes< CrossoverBehavior >::residue_atom_pair_energy_sidechain_whole" << std::endl;
246  utility_exit();
247 }
248 
249 
250 template < class CrossoverBehavior >
251 void
253  conformation::Residue const &,
254  conformation::Residue const &,
256  EnergyMap &
257 ) const
258 {
259  std::cerr << "Error: illegal call to CountPairIntraRes< CrossoverBehavior >::residue_atom_pair_energy_backbone_backbone" << std::endl;
260  utility_exit();
261 }
262 
263 
264 template < class CrossoverBehavior >
265 void
267  conformation::Residue const &,
268  conformation::Residue const &,
270  EnergyMap &
271 ) const
272 {
273  std::cerr << "Error: illegal call to CountPairIntraRes< CrossoverBehavior >::residue_atom_pair_energy_sidechain_sidechain" << std::endl;
274  utility_exit();
275 }
276 
277 
278 template < class CrossoverBehavior >
279 void
281  conformation::Residue const & res,
282  conformation::Residue const & ,
283  etable::AnalyticEtableEvaluator const & etable_energy,
284  EnergyMap & emap
285 ) const
286 {
287  inline_intraresidue_atom_pair_energy( res, etable_energy, *this, emap );
288 }
289 
290 
291 template < class CrossoverBehavior >
292 void
294  conformation::Residue const & ,
295  conformation::Residue const & ,
297  EnergyMap &
298 ) const
299 {
300  std::cerr << "Error: illegal call to CountPairIntraRes< CrossoverBehavior >::residue_atom_pair_energy_sidechain_backbone" << std::endl;
301  utility_exit();
302 }
303 
304 
305 template < class CrossoverBehavior >
306 void
308  conformation::Residue const & ,
309  conformation::Residue const & ,
311  EnergyMap &
312 ) const
313 {
314  std::cerr << "Error: illegal call to CountPairIntraRes< CrossoverBehavior >::residue_atom_pair_energy_sidechain_whole" << std::endl;
315  utility_exit();
316 }
317 
318 
319 template < class CrossoverBehavior >
320 void
322  conformation::Residue const &,
323  conformation::Residue const &,
325  EnergyMap &
326 ) const
327 {
328  std::cerr << "Error: illegal call to CountPairIntraRes< CrossoverBehavior >::residue_atom_pair_energy_backbone_backbone" << std::endl;
329  utility_exit();
330 }
331 
332 
333 template < class CrossoverBehavior >
334 void
336  conformation::Residue const &,
337  conformation::Residue const &,
339  EnergyMap &
340 ) const
341 {
342  std::cerr << "Error: illegal call to CountPairIntraRes< CrossoverBehavior >::residue_atom_pair_energy_sidechain_sidechain" << std::endl;
343  utility_exit();
344 }
345 
346 
347 } // namespace count_pair
348 } // namespace etable
349 } // namespace scoring
350 } // namespace core
351 
352 #endif