Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PairEnergy.cc
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/PairEnergy.cc
11 /// @brief Statistically derived rotamer pair potential class implementation
12 /// @author Phil Bradley
13 /// @author Andrew Leaver-Fay
14 
15 
16 // Unit headers
19 
20 // Package headers
24 #include <core/scoring/Energies.hh>
25 // AUTO-REMOVED #include <core/scoring/EnergyGraph.hh>
29 
30 // Project headers
32 #include <core/pose/Pose.hh>
34 
35 #include <utility/vector1.hh>
36 #include <ObjexxFCL/FArray2D.hh>
37 
38 
39 // Utility headers
40 
41 
42 // C++
43 
44 
45 namespace core {
46 namespace scoring {
47 namespace methods {
48 
49 
50 /// @details This must return a fresh instance of the PairEnergy class,
51 /// never an instance already in use
55 ) const {
56  return new PairEnergy;
57 }
58 
61  ScoreTypes sts;
62  sts.push_back( fa_pair );
63  sts.push_back( fa_pair_aro_aro );
64  sts.push_back( fa_pair_aro_pol );
65  sts.push_back( fa_pair_pol_pol );
66  return sts;
67 }
68 
69 
70 
73  potential_( ScoringManager::get_instance()->get_PairEPotential() )
74 {}
75 
76 
77 /// clone
80 {
81  return new PairEnergy();
82 }
83 
84 ///
85 void
87 {
89  // no longer necessary, as of r16937 -- pose.update_actcoords();
90 }
91 
92 ///
93 void
95 {
97  //pose.update_actcoords();
98 }
99 
100 ///
101 void
103 {
105  //pose.update_actcoords();
106 }
107 
108 void
110  pose::Pose const & /*pose*/,
112 ) const
113 {
114  for ( Size ii = 1; ii <= set.num_rotamers(); ++ii ) {
115  set.nonconst_rotamer( ii )->update_actcoord(); // the Rotamer set does not take responsibility for this; why not? -- maybe Residue could?
116  }
117 }
118 
119 void
121  pose::Pose & pose,
122  Size resid
123 ) const
124 {
125  pose.update_actcoord( resid );
126 }
127 
128 
129 /////////////////////////////////////////////////////////////////////////////
130 // scoring
131 /////////////////////////////////////////////////////////////////////////////
132 
133 ///
134 void
136  conformation::Residue const & rsd1,
137  conformation::Residue const & rsd2,
138  pose::Pose const & pose,
139  ScoreFunction const &,
140  EnergyMap & emap
141 ) const
142 {
143  // ignore scoring residues which have been marked as "REPLONLY" residues (only the repulsive energy will be calculated)
145  return;
146  }
147 
148  if ( rsd1.seqpos() == rsd2.seqpos() ) return;
149 
150  if ( rsd1.is_protein() && rsd2.is_protein() &&
151  (rsd1.is_polar() || rsd1.is_aromatic() ) &&
152  (rsd2.is_polar() || rsd2.is_aromatic() ) ) {
153 
154  /// Enforce interaction cutoff
155  Real const rsd1_reach( rsd1.nbr_radius() ), rsd2_reach( rsd2.nbr_radius() );
156  Distance const intxn_dist = rsd1_reach + rsd2_reach + interaction_cutoff();
157  DistanceSquared const intxn_dist2 = intxn_dist * intxn_dist;
158  DistanceSquared const nbr_dist2 = rsd1.xyz( rsd1.nbr_atom() ).distance_squared( rsd2.xyz( rsd2.nbr_atom() ) );
159  if ( nbr_dist2 > intxn_dist2 ) return;
160 
161  TenANeighborGraph const & tenA_neighbor_graph
162  ( pose.energies().tenA_neighbor_graph() );
163 
165  rsd1,
166  tenA_neighbor_graph.get_node( rsd1.seqpos() )->
167  num_neighbors_counting_self_static(),
168  rsd2,
169  tenA_neighbor_graph.get_node( rsd2.seqpos() )->
170  num_neighbors_counting_self_static() );
171  if ( rsd1.is_polar() && rsd2.is_polar() ) {
172  emap[ fa_pair_pol_pol ] += pairE;
173  emap[ fa_pair ] += pairE;
174  } else if ( rsd1.is_aromatic() && rsd2.is_aromatic() ) {
175  emap[ fa_pair_aro_aro ] += pairE;
176  } else {
177  emap[ fa_pair_aro_pol ] += pairE;
178  }
179 
180  //if ( rsd1.actcoord_atoms().size() == 1 && rsd1.actcoord().distance( rsd1.xyz( rsd1.actcoord_atoms()[ 1 ] )) > 0.0001 ) {
181  // std::cout << "Actcoord discrepancy!" << std::endl;
182  //}
183 
184  //if ( rsd2.actcoord_atoms().size() == 1 && rsd2.actcoord().distance( rsd2.xyz( rsd2.actcoord_atoms()[ 1 ] )) > 0.0001 ) {
185  // std::cout << "Actcoord discrepancy2!" << std::endl;
186  //}
187 
188 
189  //if ( pairE != 0.0 )
190  // std::cout << " pairE " << rsd1.seqpos() << " " << rsd2.seqpos() << " " << pairE << " " << std::sqrt( nbr_dist2 ) << std::endl;
191  //std::cout << " pairE: " << rsd1.seqpos() << " " << rsd2.seqpos() << " " << pairE << std::endl;
192  }
193 }
194 
195 void
197  conformation::RotamerSetBase const & set1,
198  conformation::RotamerSetBase const & set2,
199  pose::Pose const & pose,
200  ScoreFunction const & sfxn,
201  EnergyMap const & weights,
202  ObjexxFCL::FArray2D< core::PackerEnergy > & energy_table
203 ) const
204 {
205  using namespace conformation;
206  using namespace numeric;
207 
208  EnergyMap emap;
209 
210  bool const any_aro( weights[ fa_pair_aro_pol ] != 0 || weights[ fa_pair_aro_aro ] != 0 );
211 
212  for ( Size ii = 1; ii <= set1.get_n_residue_types(); ++ii ) {
213  if ( set1.get_n_rotamers_for_residue_type( ii ) == 0 ) continue;
214  Size const ii_offset = set1.get_residue_type_begin( ii );
215  Residue const & ii_example_rotamer( *set1.rotamer( ii_offset ));
216  if ( ! ii_example_rotamer.is_protein() || ! ( ii_example_rotamer.is_polar() || (any_aro && ii_example_rotamer.is_aromatic()) ) ) continue;
217 
218 
219  Vector const & ii_coord( ii_example_rotamer.atom( ii_example_rotamer.type().nbr_atom() ).xyz());
220  Real const ii_radius( ii_example_rotamer.type().nbr_radius() );
221 
222  for ( Size jj = 1; jj <= set2.get_n_residue_types(); ++jj ) {
223  if ( set2.get_n_rotamers_for_residue_type( jj ) == 0 ) continue;
224  Size const jj_offset = set2.get_residue_type_begin( jj );
225  Residue const & jj_example_rotamer( *set2.rotamer( jj_offset ));
226 
227  if ( ! jj_example_rotamer.is_protein() || ! ( jj_example_rotamer.is_polar() || (any_aro && jj_example_rotamer.is_aromatic()) )) continue;
228 
229 
230  Vector const & jj_coord( jj_example_rotamer.atom( jj_example_rotamer.type().nbr_atom() ).xyz());
231  Real const jj_radius( jj_example_rotamer.type().nbr_radius() );
232 
233  if ( ii_coord.distance_squared( jj_coord ) < std::pow(ii_radius+jj_radius+atomic_interaction_cutoff(), 2 )) {
234  for ( Size kk = 1, kke = set1.get_n_rotamers_for_residue_type( ii ); kk <= kke; ++kk ) {
235  Size const kk_rot_id = ii_offset + kk - 1;
236  for ( Size ll = 1, lle = set2.get_n_rotamers_for_residue_type( jj ); ll <= lle; ++ll ) {
237  Size const ll_rot_id = jj_offset + ll - 1;
238 
239  //emap.zero();
240  emap[ fa_pair ] = 0;
241  emap[ fa_pair_aro_aro ] = 0;
242  emap[ fa_pair_aro_pol ] = 0;
243  emap[ fa_pair_pol_pol ] = 0;
244  PairEnergy::residue_pair_energy( *set1.rotamer( kk_rot_id ), *set2.rotamer( ll_rot_id ), pose, sfxn, emap );
245  energy_table( ll_rot_id, kk_rot_id ) += static_cast< core::PackerEnergy > (
246  weights[ fa_pair ] * emap[ fa_pair ] +
247  weights[ fa_pair_aro_aro ] * emap[ fa_pair_aro_aro ] +
248  weights[ fa_pair_aro_pol ] * emap[ fa_pair_aro_pol ] +
249  weights[ fa_pair_pol_pol ] * emap[ fa_pair_pol_pol ]
250  );
251  }
252  }
253  }
254  }
255  }
256 
257 }
258 
259 void
261  conformation::RotamerSetBase const & set,
262  conformation::Residue const & residue,
263  pose::Pose const & pose,
264  ScoreFunction const & sfxn,
265  EnergyMap const & weights,
267 ) const
268 {
269  if ( ! residue.is_protein() || ! ( residue.is_polar() || residue.is_aromatic() )) return;
270  EnergyMap emap;
271  for ( Size ii = 1, ii_end = set.num_rotamers(); ii <= ii_end; ++ii ) {
272  //emap.zero();
273  emap[ fa_pair ] = 0;
274  emap[ fa_pair_aro_aro ] = 0;
275  emap[ fa_pair_aro_pol ] = 0;
276  emap[ fa_pair_pol_pol ] = 0;
277  if ( ! set.rotamer(ii)->is_protein() || ! ( set.rotamer(ii)->is_polar() || set.rotamer(ii)->is_aromatic() ) ) continue;
278  PairEnergy::residue_pair_energy( *set.rotamer( ii ), residue, pose, sfxn, emap );
279  energy_vector[ ii ] += static_cast< core::PackerEnergy > (weights.dot( emap ) );
280  }
281 }
282 
283 
284 
285 
286 void
288  conformation::RotamerSetBase const & set,
289  conformation::Residue const & residue,
290  pose::Pose const & pose,
291  ScoreFunction const & sfxn,
292  EnergyMap const & , // weights
294 ) const
295 {
296  if ( ! residue.is_protein() || ! residue.is_polar() || ! residue.is_aromatic() ) return;
297  EnergyMap emap;
298  for ( Size ii = 1, ii_end = set.num_rotamers(); ii <= ii_end; ++ii ) {
299  //emap.zero();
300  emap[ fa_pair ] = 0;
301  emap[ fa_pair_aro_aro ] = 0;
302  emap[ fa_pair_aro_pol ] = 0;
303  emap[ fa_pair_pol_pol ] = 0;
304  if ( ! set.rotamer(ii)->is_protein() || ! ( set.rotamer(ii)->is_polar() || set.rotamer(ii)->is_aromatic() )) continue;
305  PairEnergy::residue_pair_energy( *set.rotamer( ii ), residue, pose, sfxn, emap );
306  emaps[ ii ] += emap;
307  }
308 }
309 
310 
311 /// @details Returns false if !res_movign_wrt_eachother since the score function does not update
312 /// the neighbor counts for residues during minimization. If two residues are not moving wrt
313 /// each other, their scores are not changing during minimization, even though this is a context
314 /// dependent score function.
315 bool
317  conformation::Residue const & res1,
318  conformation::Residue const & res2,
319  bool res_moving_wrt_eachother
320 ) const
321 {
322  if ( ! res_moving_wrt_eachother ) return false;
323  if ( ! res1.is_protein() || ( ! res1.is_polar() && ! res1.is_aromatic()) ) return false;
324  if ( ! res2.is_protein() || ( ! res2.is_polar() && ! res2.is_aromatic()) ) return false;
325  return true;
326 }
327 
328 /*void
329 PairEnergy::eval_atom_derivative_for_residue_pair(
330  Size const atom_index,
331  conformation::Residue const & rsd1,
332  conformation::Residue const & rsd2,
333  ResSingleMinimizationData const &,// minsingle_data1,
334  ResSingleMinimizationData const &,// minsingle_data2,
335  ResPairMinimizationData const &,// minpair_data,
336  pose::Pose const & pose, // provides context
337  kinematics::DomainMap const &,// domain_map,
338  ScoreFunction const & ,//sfxn,
339  EnergyMap const & weights,
340  Vector & F1,
341  Vector & F2
342 ) const
343 {
344  if ( atom_index == rsd1.actcoord_atoms()[1] ) {
345  TenANeighborGraph const & tenA_neighbor_graph( pose.energies().tenA_neighbor_graph() );
346  int const nbr_count1( tenA_neighbor_graph.get_node( rsd1.seqpos() )->
347  num_neighbors_counting_self_static() );
348  int const nbr_count2( tenA_neighbor_graph.get_node( rsd2.seqpos() )->
349  num_neighbors_counting_self_static() );
350 
351  Real weight(0.0); Size naros(0);
352  if ( rsd1.is_aromatic() ) {
353  ++naros;
354  }
355  if( rsd2.is_aromatic() ) {
356  ++naros;
357  }
358  switch (naros ) {
359  case 0:
360  weight = std::max( weights[ fa_pair ], weights[ fa_pair_pol_pol ] );
361  break;
362  case 1:
363  weight = weights[ fa_pair_aro_pol ];
364  break;
365  case 2:
366  weight = weights[ fa_pair_aro_aro ];
367  break;
368  default:
369  utility_exit_with_message( "ERROR in fa_pair derivaties, too many aromatics!!!");
370  break;
371  }
372 
373  if ( weight == 0.0 ) return;
374 
375  Real dpairE_dr( 0.0 );
376  potential_.pair_term_energy_and_deriv
377  ( rsd1, nbr_count1, rsd2, nbr_count2, dpairE_dr );
378  //std::cout << " pairE deriv " << rsd1.seqpos() << " " << rsd2.seqpos() << " " << dpairE_dr << " " << rsd1.actcoord().distance( rsd2.actcoord() ) << std::endl;
379  //std::cout << " r1: " << rsd1.actcoord().x() << " " << rsd1.actcoord().y() << " " << rsd1.actcoord().z() << std::endl;
380  //for ( Size ii = 1; ii <= rsd1.actcoord_atoms().size(); ++ii ) {
381  // std::cout << " r1 real: " <<
382  // rsd1.xyz( rsd1.actcoord_atoms()[ ii ] ).x() << " " << rsd1.xyz( rsd1.actcoord_atoms()[ ii ] ).y() << " " << rsd1.xyz( rsd1.actcoord_atoms()[ ii ] ).z() << std::endl;
383  //}
384 
385  //std::cout << " r2: " << rsd2.actcoord().x() << " " << rsd2.actcoord().y() << " " << rsd2.actcoord().z() << std::endl;
386  //for ( Size ii = 1; ii <= rsd2.actcoord_atoms().size(); ++ii ) {
387  // std::cout << " r2 real: " <<
388  // rsd2.xyz( rsd2.actcoord_atoms()[ ii ] ).x() << " " << rsd2.xyz( rsd2.actcoord_atoms()[ ii ] ).y() << " " << rsd2.xyz( rsd2.actcoord_atoms()[ ii ] ).z() << std::endl;
389  //}
390  //if ( rsd1.actcoord_atoms().size() == 1 && rsd1.actcoord().distance( rsd1.xyz( rsd1.actcoord_atoms()[ 1 ] )) > 0.0001 ) {
391  // std::cout << "Actcoord discrepancy!" << std::endl;
392  //}
393 
394  //if ( rsd2.actcoord_atoms().size() == 1 && rsd2.actcoord().distance( rsd2.xyz( rsd2.actcoord_atoms()[ 1 ] )) > 0.0001 ) {
395  // std::cout << "Actcoord discrepancy2!" << std::endl;
396  //}
397 
398  Vector const f1( cross( rsd1.actcoord(), rsd2.actcoord() ) );
399  Vector const f2( rsd1.actcoord() - rsd2.actcoord() );
400  Real const dis( f2.length() );
401 
402  if ( dis == Real(0.0 ) ) {
403  utility_exit_with_message("dis==0 in pairtermderiv!");
404  }
405  dpairE_dr /= dis;
406  F1 += weight * dpairE_dr * f1;
407  F2 += weight * dpairE_dr * f2;
408  }
409 }*/
410 
411 void
413  conformation::Residue const & rsd1,
414  conformation::Residue const & rsd2,
417  ResPairMinimizationData const &,
418  pose::Pose const & pose, // provides context
419  EnergyMap const & weights,
420  utility::vector1< DerivVectorPair > & r1_atom_derivs,
421  utility::vector1< DerivVectorPair > & r2_atom_derivs
422 ) const
423 {
424  // ignore scoring residues which have been marked as "REPLONLY" residues (only the repulsive energy will be calculated)
426  return;
427  }
428 
429  assert( (rsd1.is_polar() || rsd1.is_aromatic()) && (rsd2.is_polar() || rsd2.is_aromatic() ) );
430 
431  TenANeighborGraph const & tenA_neighbor_graph( pose.energies().tenA_neighbor_graph() );
432  int const nbr_count1( tenA_neighbor_graph.get_node( rsd1.seqpos() )->
433  num_neighbors_counting_self_static() );
434  int const nbr_count2( tenA_neighbor_graph.get_node( rsd2.seqpos() )->
435  num_neighbors_counting_self_static() );
436 
437  Real weight(0.0); Size naros(0);
438  if ( rsd1.is_aromatic() ) {
439  ++naros;
440  }
441  if( rsd2.is_aromatic() ) {
442  ++naros;
443  }
444  switch (naros ) {
445  case 0:
446  weight = std::max( weights[ fa_pair ], weights[ fa_pair_pol_pol ] );
447  break;
448  case 1:
449  weight = weights[ fa_pair_aro_pol ];
450  break;
451  case 2:
452  weight = weights[ fa_pair_aro_aro ];
453  break;
454  default:
455  utility_exit_with_message( "ERROR in fa_pair derivaties, too many aromatics!!!");
456  break;
457  }
458 
459  if ( weight == 0.0 ) return;
460 
461  Real dpairE_dr( 0.0 );
462  potential_.pair_term_energy_and_deriv( rsd1, nbr_count1, rsd2, nbr_count2, dpairE_dr );
463  Vector f1( cross( rsd1.actcoord(), rsd2.actcoord() ) );
464  Vector f2( rsd1.actcoord() - rsd2.actcoord() );
465  Real const dis( f2.length() );
466 
467  if ( dis == Real(0.0 ) ) {
468  utility_exit_with_message("dis==0 in pairtermderiv!");
469  }
470  dpairE_dr /= dis;
471  f1 *= weight * dpairE_dr;
472  f2 *= weight * dpairE_dr;
473 
474  /// APL: so where does this next section come from? Well, previously the code assumed that
475  /// all actcoord atoms were controlled by the same chi (or in arg's case, were moved synchronously
476  /// by chi4 so that their motions canceled out, assuming the CN bond lengths were ideal)
477  /// but this assumption does not hold in the case that bond angles or bond lengths are allowed
478  /// to move. The code below gives accurate derivatives by splitting up the derivative
479  /// contribution to the atoms that are controlling the actcoord.
480  Vector f1_1( f1 ), f2_1( f2 ), f1_2( f1 ), f2_2( f2 );
481  Size const nact1 = rsd1.actcoord_atoms().size();
482  Size const nact2 = rsd2.actcoord_atoms().size();
483  Real inv_nact1( 1 / (Real) nact1 ), inv_nact2( -1 / (Real) nact2 );
484  f1_1 *= inv_nact1;
485  f2_1 *= inv_nact1;
486  f1_2 *= inv_nact2;
487  f2_2 *= inv_nact2;
488 
489  for ( Size ii = 1; ii <= nact1; ++ii ) {
490  r1_atom_derivs[ rsd1.actcoord_atoms()[ ii ]].f1() += f1_1;
491  r1_atom_derivs[ rsd1.actcoord_atoms()[ ii ]].f2() += f2_1;
492  }
493  for ( Size ii = 1; ii <= nact2; ++ii ) {
494  r2_atom_derivs[ rsd2.actcoord_atoms()[ ii ]].f1() += f1_2;
495  r2_atom_derivs[ rsd2.actcoord_atoms()[ ii ]].f2() += f2_2;
496  }
497 }
498 
499 
500 /////////////////////////////////////////////////////////////////////////////
501 /// probably move this logic to PairEPotential ??
502 /*void
503 PairEnergy::eval_atom_derivative(
504  id::AtomID const & atom_id,
505  pose::Pose const & pose,
506  kinematics::DomainMap const &, // domain_map,
507  ScoreFunction const &,
508  EnergyMap const & weights,
509  Vector & F1,
510  Vector & F2
511 ) const
512 {
513  int const seqpos( atom_id.rsd() );
514  conformation::Residue const & rsd( pose.residue( seqpos ) );
515  if ( potential_.pair_term_energy_exists( rsd ) ) {
516  assert( !rsd.actcoord_atoms().empty() );
517  TenANeighborGraph const & tenA_neighbor_graph
518  ( pose.energies().tenA_neighbor_graph() );
519  EnergyGraph const & energy_graph( pose.energies().energy_graph() );
520 
521  //
522  // NOTE this will not give the right derivatives if bond angles and lenghts are alowed to flex.
523  // This code clearly operates under the assumption that all the act coords are controlled by the
524  // same DOF. The simple solution is to divide the derivative over all the atoms that define
525  // the act coords.
526  if ( atom_id.atomno() == rsd.actcoord_atoms()[1] ) {
527  int const nbr_count( tenA_neighbor_graph.get_node( seqpos )->
528  num_neighbors_counting_self_static() );
529  // neighbor lookup by index (seqpos) rather than from within residue
530  for ( graph::Graph::EdgeListConstIter
531  ir = energy_graph.get_node( seqpos )->const_edge_list_begin(),
532  ire = energy_graph.get_node( seqpos )->const_edge_list_end();
533  ir != ire; ++ir ) {
534  int const seqpos2( (*ir)->get_other_ind( seqpos ) );
535  conformation::Residue const & rsd2( pose.residue( seqpos2 ) );
536  int const nbr_count2( tenA_neighbor_graph.get_node( seqpos2 )->
537  num_neighbors_counting_self_static() );
538  if ( potential_.pair_term_energy_exists( rsd2 ) ) {
539  Real weight(0.0); Size naros(0);
540  if ( rsd.is_aromatic() ) {
541  ++naros;
542  }
543  if( rsd2.is_aromatic() ) {
544  ++naros;
545  }
546  switch (naros ) {
547  case 0:
548  weight = std::max( weights[ fa_pair ], weights[ fa_pair_pol_pol ] );
549  break;
550  case 1:
551  weight = weights[ fa_pair_aro_pol ];
552  break;
553  case 2:
554  weight = weights[ fa_pair_aro_aro ];
555  break;
556  default:
557  utility_exit_with_message( "ERROR in fa_pair derivaties, too many aromatics!!!");
558  break;
559  }
560 
561  Real dpairE_dr( 0.0 );
562  potential_.pair_term_energy_and_deriv
563  ( rsd, nbr_count, rsd2, nbr_count2, dpairE_dr );
564  Vector const f1( cross( rsd.actcoord(), rsd2.actcoord() ) );
565  Vector const f2( rsd.actcoord() - rsd2.actcoord() );
566  Real const dis( f2.length() );
567 
568  if ( dis == Real(0.0 ) ) {
569  utility_exit_with_message("dis==0 in pairtermderiv!");
570  }
571  dpairE_dr /= dis;
572  F1 += weight * dpairE_dr * f1;
573  F2 += weight * dpairE_dr * f2;
574  }
575  }
576  }
577  }
578 }*/
579 
580 /// @brief PairEnergy distance cutoff set to the same cutoff used by EtableEnergy, for now
581 Distance
583 {
584  return interaction_cutoff();
585 }
586 
587 /// @details non-virtual accessor for speed; assumption: PairEnergy is not inherrited from.
588 Distance
590 {
591  //return 5.5; // TOO SHORT. GOES OUT TO 7.5 A if nbins == 2; if nbins == 3, then it goes out to 9 A.
592  return potential_.range();
593 }
594 
595 /// @brief PairEnergy requires that Energies class maintains a TenANeighborGraph
596 void
598 {
599  context_graphs_required[ ten_A_neighbor_graph ] = true;
600 }
601 
602 /// @brief PairEnergy does not define intraresidue interactions
603 bool
604 PairEnergy::defines_intrares_energy( EnergyMap const & /*weights*/ ) const
605 {
606  return false;
607 }
608 
609 void
611  conformation::Residue const & ,
612  pose::Pose const & ,
613  ScoreFunction const & ,
614  EnergyMap &
615 ) const {}
618 {
619  return 1; // Initial versioning
620 }
621 
622 
623 }
624 }
625 }