Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
interface_vector_calculate.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/pack/task/operation/InterfaceVectorDefinition.cc
11 /// @brief Calculates the residues at an interface between two protein chains or jump.
12 /// The calculation is done in the following manner. First the point graph
13 /// is used to find all residues within some big cutoff of residues on the other chain.
14 /// For these residues near the interface, two metrics are used to decide if they are actually
15 /// possible interface residues. The first metric is to itterate through all the side chain
16 /// atoms in the residue of interest and check to see if their distance is less than the nearby
17 /// atom cutoff, if so then they are an interface residue. If a residue does not pass that
18 /// check, then two vectors are drawn, a CA-CB vector and a vector from CB to a CB atom on the
19 /// neighboring chain. The dot product between these two vectors is then found and if the angle
20 /// between them is less than some cutoff then they are classified as interface.
21 /// @author Ben Stranges (stranges@unc.edu)
22 
23 
24 // Unit headers
26 #include <core/pose/Pose.hh>
31 
34 
36 #include <ObjexxFCL/FArray1D.hh>
37 
38 // Utility headers
39 // AUTO-REMOVED #include <basic/MetricValue.hh>
40 // AUTO-REMOVED #include <basic/Tracer.hh>
41 //#include <utility/exit.hh>
42 #include <utility/string_util.hh>
43 //#include <basic/options/option.hh>
44 #include <numeric/conversions.hh>
45 #include <numeric/xyzVector.hh>
46 #include <numeric/HomogeneousTransform.hh>
47 #include <cmath>
48 #include <set>
49 //#include <core/pose/PDBInfo.hh> //debugging only
50 
51 //#include <cassert>
52 
53 // option key includes
54 
55 // AUTO-REMOVED #include <basic/options/keys/pose_metrics.OptionKeys.gen.hh>
56 
59 #include <utility/vector1.hh>
60 
61 namespace core{
62 namespace pack{
63 namespace task{
64 namespace operation{
65 namespace util{
66 
67 // typedefs
68 typedef std::pair< std::set<core::Size>,std::set<core::Size> > InterfacePair;
69 typedef numeric::HomogeneousTransform< core::Real > HTReal;
70 
71 //static basic::Tracer TR("core.util.interface_vector_calculate");
72 
73 
74 //forward declarations of funtions that do the work
75 ///@brief looks at the big set and figures out what is actually pointing towards the interface
77  core::pose::Pose const & pose, InterfacePair const & interface_pair,
78  core::Real const nearby_atom_cutoff,
79  core::Real const vector_angle_cutoff,
80  core::Real const vector_dist_cutoff,
81  utility::vector1_bool & interface_residues
82 );
83 
84 ///@brief find nearby atoms to other in interface
87  core::Real cutoff);
88 
89 ///@brief neighbors to look for vectors within (big set here)
91  core::Size chain1, core::Size chain2 );
92 
93 ///@brief find neighbors to look for vectors within using a big cutoff for CBs
95  int jump_num );
96 
97 ///@brief the Cbeta vector(s) from on rsd to another
99 ///@brief the action coordinate for each residue
101 ///@brief out if res1 and res2 are pointing at eachother
104  core::Real angle_cutoff /*degrees*/,
105  core::Real dist_cutoff);
106 void fill_in_chain_terminii( core::pose::Pose const & pose, core::Size chain1, core::Size chain2 );
107 
108 
109 ///@details minimal chain number definition
110 utility::vector1_bool
111 calc_interface_vector( core::pose::Pose const & pose, core::Size const chain1_number, core::Size const chain2_number ){
112  // set some logical defaults and run the full calc function
113  core::Real CB_dist_cutoff(10.0);
114  core::Real nearby_atom_cutoff(5.5);
115  core::Real vector_angle_cutoff(75.0);
116  core::Real vector_dist_cutoff(9.0);
117 
118  return calc_interface_vector( pose, chain1_number, chain2_number, CB_dist_cutoff,
119  nearby_atom_cutoff, vector_angle_cutoff, vector_dist_cutoff );
120 }
121 
122 ///@details full runner that takes all of the inputs for chains
123 utility::vector1_bool
125  core::pose::Pose const & pose,
126  core::Size const chain1_number, core::Size const chain2_number,
127  core::Real const CB_dist_cutoff, core::Real const nearby_atom_cutoff,
128  core::Real const vector_angle_cutoff, core::Real const vector_dist_cutoff
129 ){
130  //set all residues in pose to false
131  utility::vector1_bool at_interface(pose.total_residue(), false);
132  //do stuff
133  //first find all the neighbors within some Cbeta cutoff distance from eachother
134  InterfacePair CB_pairs_list;
135  CB_pairs_list = find_neighbors_within_CB_cutoff(pose, CB_dist_cutoff, chain1_number, chain2_number );
136  //second, prune this set down to what matters
137  find_interface_pointing_residues_from_neighbs( pose, CB_pairs_list, nearby_atom_cutoff,
138  vector_angle_cutoff, vector_dist_cutoff, at_interface );
139  // //debugging
140  // for(core::Size ii = 1; ii<= at_interface.size(); ++ii)
141  // std::cout << "Residue number: " << ii << " at_interface value: " << at_interface[ii] << std::endl;
142 
143  return at_interface;
144 }
145 
146 ///@details full runner that takes the jump
147 utility::vector1_bool
149  core::pose::Pose const & pose,
150  int const interface_jump,
151  core::Real const CB_dist_cutoff,
152  core::Real const nearby_atom_cutoff,
153  core::Real const vector_angle_cutoff,
154  core::Real const vector_dist_cutoff
155 ){
156  //set all residues in pose to false
157  utility::vector1_bool at_interface(pose.total_residue(), false);
158  //do stuff
159  //first find all the neighbors within some Cbeta cutoff distance from eachother
160  InterfacePair CB_pairs_list;
161  CB_pairs_list = find_jump_partners_within_CB_cutoff( pose, CB_dist_cutoff, interface_jump );
162  //second, prune this set down to what matters
163  find_interface_pointing_residues_from_neighbs( pose, CB_pairs_list, nearby_atom_cutoff,
164  vector_angle_cutoff, vector_dist_cutoff, at_interface );
165  // //debugging
166  // for(core::Size ii = 1; ii<= at_interface.size(); ++ii)
167  // std::cout << "Residue number: " << ii << " at_interface value: " << at_interface[ii] << std::endl;
168 
169  return at_interface;
170 }
171 
172 ///@details minimal jump runner
173 utility::vector1_bool
174 calc_interface_vector( core::pose::Pose const & pose, int const interface_jump ){
175  // set some logical defaults and run the full calc function
176  core::Real const CB_dist_cutoff(10.0);
177  core::Real const nearby_atom_cutoff(5.5);
178  core::Real const vector_angle_cutoff(75.0);
179  core::Real const vector_dist_cutoff(9.0);
180  return calc_interface_vector( pose, interface_jump, CB_dist_cutoff,
181  nearby_atom_cutoff, vector_angle_cutoff, vector_dist_cutoff );
182 }
183 
184 ///@details calc_interacting_vector does the same thing except does not need interface separation
185 /// I
186 utility::vector1_bool calc_interacting_vector(
187  core::pose::Pose const & pose,
188  std::set< core::Size > & part1res,
189  std::set< core::Size > & part2res,
190  core::Real const CB_dist_cutoff,
191  core::Real const nearby_atom_cutoff,
192  core::Real const vector_angle_cutoff,
193  core::Real const vector_dist_cutoff )
194 {
195  //set all residues in pose to false
196  utility::vector1_bool at_interface(pose.total_residue(), false);
197  //first find all the neighbors within some Cbeta cutoff distance from eachother
198  InterfacePair CB_pairs_list;
199 
200  //setup
201  std::set<core::Size> side1_within_cutoff, side2_within_cutoff;
202  //use neighbor atoms from point graph
205  core::conformation::find_neighbors<core::conformation::PointGraphVertexData,core::conformation::PointGraphEdgeData>( pg, CB_dist_cutoff );
206 
207  // for all nodes in chain1 == for all residues in chain 1
208  // all this is setup by verify_chain_setup in InterfaceDefinitionBase
209  utility::vector1< Size > chain1_interface, chain2_interface;
210  for ( std::set<Size>::const_iterator side1_it = part1res.begin(); side1_it != part1res.end(); ++side1_it ) {
211  for ( conformation::PointGraph::UpperEdgeListConstIter edge_iter = pg->get_vertex( *side1_it ).upper_edge_list_begin(),
212  edge_end_iter = pg->get_vertex( *side1_it ).upper_edge_list_end(); edge_iter != edge_end_iter; ++edge_iter ) {
213  // get node on other edge of that node == 2nd residue index
214  Size const edge_res = edge_iter->upper_vertex();
215  // if that node(residue) is in the second set of residues
216  if ( part2res.count( edge_res ) ) {
217  side1_within_cutoff.insert( *side1_it ); // add partner1 residue
218  side2_within_cutoff.insert( edge_res ); // add partner2 residue
219  }
220  else continue;
221  } // end - for all edges of node
222  } // end - for all nodes in chain1
223 
224  //return the pair of interface side sets
225  CB_pairs_list = std::make_pair( side1_within_cutoff, side2_within_cutoff );
226 
227  //Now that we have the pairs list we can get the residues that are in proximity
228  find_interface_pointing_residues_from_neighbs( pose, CB_pairs_list, nearby_atom_cutoff,
229  vector_angle_cutoff, vector_dist_cutoff, at_interface );
230  // //debugging
231  // for(core::Size ii = 1; ii<= at_interface.size(); ++ii)
232  // std::cout << "Residue number: " << ii << " at_interface value: " << at_interface[ii] << std::endl;
233 
234  return at_interface;
235 
236 }
237 
238 ///@details does the real work, looks at the big set and figures out what is actually pointing towards the interface
239 ///sets a vector bool value to true if a residue is at the interface
241  core::pose::Pose const & pose,
242  InterfacePair const & interface_pairs,
243  core::Real const nearby_atom_cutoff,
244  core::Real const vector_angle_cutoff,
245  core::Real const vector_dist_cutoff,
246  utility::vector1_bool & interface_residues ){
247 
248  using namespace utility;
249  using namespace core;
250  //itterate over pairs
251  for( std::set<Size>::const_iterator chain1_it = interface_pairs.first.begin(); chain1_it!=interface_pairs.first.end(); ++chain1_it ){
252  conformation::Residue ch1residue(pose.residue(*chain1_it));
253  for( std::set<Size>::const_iterator chain2_it = interface_pairs.second.begin(); chain2_it!=interface_pairs.second.end(); ++chain2_it ){
254  conformation::Residue ch2residue(pose.residue(*chain2_it));
255  //check to see if both are already in the interface
256  if( interface_residues[*chain1_it] && interface_residues[*chain2_it] )
257  continue;
258  //use a stricter distance cutoff to define any very close to other chain
259  bool r1_near_r2 (any_atoms_within_cutoff( ch1residue, ch2residue, nearby_atom_cutoff ) );
260  bool r2_near_r1 (any_atoms_within_cutoff( ch2residue, ch1residue, nearby_atom_cutoff ) );
261  //are residue1 sidechain atoms near residue2 atoms?
262  if( r1_near_r2 ){
263  interface_residues[*chain1_it] = true;
264 // #ifndef NDEBUG
265 // std::cout<< "Residue: "<<pose.pdb_info()->pose2pdb(*chain1_it) << " is included because Residue: "
266 // << pose.pdb_info()->pose2pdb(*chain2_it) <<" meets the nearby cutoff."<<std::endl;
267 // #endif
268  }
269  //are residue2 sidechain atoms near residue1 atoms?
270  if( r2_near_r1 ){
271  interface_residues[*chain2_it] = true;
272 // #ifndef NDEBUG
273 // std::cout<< "Residue: "<<pose.pdb_info()->pose2pdb(*chain2_it) << " is included because Residue: "
274 // << pose.pdb_info()->pose2pdb(*chain1_it) <<" meets the nearby cutoff."<<std::endl;
275 // #endif
276  }
277  //check to see if both are NOW at the interface
278  if( interface_residues[*chain1_it] && interface_residues[*chain2_it] )
279  continue;
280  //check to see if the vectors are in the same direction
281  //chain1 res pointed at chain 2 res?
282  if( res1_pointed_at_res2( ch1residue, ch2residue, vector_angle_cutoff, vector_dist_cutoff ) ){
283  interface_residues[*chain1_it] = true;
284 // #ifndef NDEBUG
285 // std::cout<< "Residue: "<<pose.pdb_info()->pose2pdb(*chain1_it) << " is included because Residue: "
286 // << pose.pdb_info()->pose2pdb(*chain2_it) <<" is pointed at it."<<std::endl;
287 // #endif
288  }
289  //chain 2 residue pointed at chain1 residue?
290  if( res1_pointed_at_res2( ch2residue, ch1residue, vector_angle_cutoff, vector_dist_cutoff ) ){
291  interface_residues[*chain2_it] = true;
292 // #ifndef NDEBUG
293 // std::cout<< "Residue: "<<pose.pdb_info()->pose2pdb(*chain2_it) << " is included because Residue: "
294 // << pose.pdb_info()->pose2pdb(*chain1_it) <<" is pointed at it."<<std::endl;
295 // #endif
296  }
297  //space here for Cgamma defintion if wanted
298 
299 
300  }//end itterate over chain 2
301  }//end itterate over chain 1
302  // //debugging
303  // for(core::Size ii = 1; ii<= interface_residues.size(); ++ii)
304  // std::cout << "End finding: Residue number: " << ii << " at_interface value: " << interface_residues[ii] << std::endl;
305 
306 }//end find_interface_pointing_residues_from_neighbs
307 
308 
309 ///@details looks are residue 1 and sees if any of the side chain atoms are within the cutoff distance to residue 2
312  core::Real cutoff){
313  using namespace core;
314  bool within_cutoff(false);
315  Real cutoff_squared( cutoff * cutoff );
316  //only look at side chain atoms that are <cutoff from ANY atom in the other chain
317  //res1 sidechain atoms vs all res2 atoms
318  //if there is a CB atom itterate through all the side chain atms in res 1
319  if ( res1.type().has("CB") ){
320  //itterate over res1 sidechain atoms
321  for( conformation::Atoms::const_iterator res1atm = res1.sidechainAtoms_begin(); res1atm != res1.heavyAtoms_end(); ++res1atm ){
322  //itterate over res2 all atoms
323  for( conformation::Atoms::const_iterator res2atm = res2.atom_begin(); res2atm != res2.heavyAtoms_end(); ++res2atm ){
324  if ( (*res1atm).xyz().distance_squared( (*res2atm).xyz() ) < cutoff_squared){
325  within_cutoff = true;
326  break;
327  }
328  }
329  if(within_cutoff)
330  break;
331  }
332  } //end if residue has CB atom
333  //else if there is no CB atom in that residue make one up and check it against all res2 atms
334  else{
336  for( conformation::Atoms::const_iterator res2atm = res2.atom_begin(); res2atm != res2.heavyAtoms_end(); ++res2atm ){
337  if ( pretend_CB.distance_squared( (*res2atm).xyz() ) < cutoff_squared){
338  within_cutoff = true;
339  break;
340  }
341  }//end loop over res2
342  } //end if no CB
343  return within_cutoff;
344 } //end any_atoms_within_cutoff
345 
346 
347 ///@details find based on chains neighbors to look for vectors within using a big cutoff for CBs
350  core::Real big_cutoff,
351  core::Size chain1 , core::Size chain2 ){
352  //setup chain begin and end
353  core::Size ch1_begin_num = pose.conformation().chain_begin( chain1 );
354  core::Size ch1_end_num = pose.conformation().chain_end( chain1 );
355  core::Size ch2_begin_num = pose.conformation().chain_begin( chain2 );
356  core::Size ch2_end_num = pose.conformation().chain_end( chain2);
357 
358  //setup
359  std::set<core::Size> side1_within_cutoff, side2_within_cutoff;
360 
361  //use neighbor atoms from point graph
364  core::conformation::find_neighbors<core::conformation::PointGraphVertexData,core::conformation::PointGraphEdgeData>( pg, big_cutoff );
365 
366  // for all nodes in chain1 == for all residues in chain 1
367  // all this is setup by verify_chain_setup in InterfaceDefinitionBase
368  utility::vector1< Size > chain1_interface, chain2_interface;
369  for ( Size partner1_res = ch1_begin_num; partner1_res <= ch1_end_num; ++partner1_res ) {
370  for ( conformation::PointGraph::UpperEdgeListConstIter edge_iter = pg->get_vertex( partner1_res ).upper_edge_list_begin(),
371  edge_end_iter = pg->get_vertex( partner1_res ).upper_edge_list_end(); edge_iter != edge_end_iter; ++edge_iter ) {
372  // get node on other edge of that node == 2nd residue index
373  Size const partner2_res = edge_iter->upper_vertex();
374  // if that node(residue) is in chain 2
375  if ( ( partner2_res >= ch2_begin_num ) && (partner2_res <= ch2_end_num ) ) {
376  side1_within_cutoff.insert( partner1_res ); // add partner1 residue
377  side2_within_cutoff.insert( partner2_res ); // add partner2 residue
378  }
379  else continue;
380  } // end - for all edges of node
381  } // end - for all nodes in chain1
382 
383  //return the pair of interface side sets
384  return std::make_pair( side1_within_cutoff, side2_within_cutoff );
385 } // end find_neighbors_within_CB_cutoff
386 
387 ///@details find neighbors to look for vectors within using a big cutoff for CBs
389 find_jump_partners_within_CB_cutoff( core::pose::Pose const & pose, core::Real big_cutoff, int jump_num ){
390  std::set<core::Size> side1_within_cutoff, side2_within_cutoff;
391 
392  //use neighbor atoms from point graph
395  core::conformation::find_neighbors<core::conformation::PointGraphVertexData,core::conformation::PointGraphEdgeData>( pg, big_cutoff );
396 
397  /// create a dummy array to initialize all the members of the partner
398  /// and is_interface array to false
399  /// make foldtree copy
400  core::kinematics::FoldTree foldtree_copy( pose.fold_tree() );
401  ObjexxFCL::FArray1D_bool partners_array ( pose.total_residue(), false );
402  //set one side of jump to true
403  foldtree_copy.partition_by_jump( jump_num, partners_array );
404 
405  //itterate through all residues
406  for( core::Size ii = 1; ii <= pose.total_residue(); ++ii){
407  //check edges to that residue
408  for ( conformation::PointGraph::UpperEdgeListConstIter edge_iter = pg->get_vertex( ii ).upper_edge_list_begin(),
409  edge_end_iter = pg->get_vertex( ii ).upper_edge_list_end(); edge_iter != edge_end_iter; ++edge_iter ){
410  // get node on other edge of that node == 2nd residue index
411  Size const pointgraph_res = edge_iter->upper_vertex();
412  //see if they are in the same residue group or not
413  //need to subtract 1 because FArray1D indexes from 0
414  if( partners_array[ii - 1] == partners_array[ pointgraph_res -1 ] ) continue;
415  //figure out what side of jump this is on.
416  if( partners_array[ ii - 1 ] ) {
417  side1_within_cutoff.insert( ii ); // add partner1 residue
418  side2_within_cutoff.insert( pointgraph_res ); // add partner2 residue
419  }
420  else{
421  side1_within_cutoff.insert( pointgraph_res ); // add partner1 residue
422  side2_within_cutoff.insert( ii ); // add partner2 residue
423  }
424  }//end itterate through neighbors point graph
425  }//end itterate through all residues
426 
427  //return the pair of interface side sets
428  return std::make_pair( side1_within_cutoff, side2_within_cutoff );
429 } // end find_jump_partners_within_CB_cutoff
430 
431 ///@details find the Cbeta vector(s) from one residue to another, returns the normalized vector needed
434  //std::string const atom_to_use( "CA" );
435  if ( ! res.has("CA") ) {
436  return numeric::xyzVector< core::Real> (0.0);
437  }
438  numeric::xyzVector< core::Real > CA_position( res.atom("CA").xyz() );
440  //subtract CB position from CA position to get the right vector, then .normalize()
441  numeric::xyzVector< core::Real > cbvector( CB_position - CA_position );
442  return cbvector.normalize();
443 }
444 
445 ///@details selects the action position for a given residue
446 /// Generally CB for everything but gly, and an imaginary CB position for gly.
449  using namespace numeric;
450  using namespace core;
451  //if there is a CB then use it
452  if ( res.type().has("CB") ) {
453  return res.atom("CB").xyz();
454  //otherwise estimate where one would be.
455  } else if ( res.has("CA") && res.has("C") && res.has("N") ) {
456  //locations of other bb atoms
457  xyzVector< core::Real > CA_xyz ( res.atom("CA").xyz() );
458  xyzVector< core::Real > C_xyz ( res.atom("C").xyz() );
459  xyzVector< core::Real > N_xyz ( res.atom("N").xyz() );
460 // //figure out where CB would be
461 // xyzVector< Real > v1( midpoint( C_xyz, N_xyz) );
462 // xyzVector< Real > v2( 2*CA_xzy - v1 ); //reflection of v1 about CA position
463 // Real d1( magnitdue( v1 - C_xyz) ); //distance from midpoint (v1 or v2) to an atom
464 // xyzVector< Real > dir_CB( cross(N_xyz - CA_xyz, C_xyz - CA_xyz).normalize() ); //direction of CB from V2
465 // xyzVector< Real > CB_xyz( v2 + dir_cb * d1);
466 // return CB_xyz;
467 
468  //another way to try, this gets the transform from the ideal residue type frame to the existing location
469  xyzVector< core::Real > halfpoint_input = midpoint( C_xyz, N_xyz );
470  HTReal input_frame( N_xyz, halfpoint_input, CA_xyz );
471  //now find CB position in ideal space
472  //lets use alanine as the ideal here
474  chemical::ResidueType const & restype= rts->name_map("ALA");//define ala
475  xyzVector< core::Real > idealN = ( restype.atom( restype.atom_index("N" ) ).ideal_xyz() );
476  xyzVector< core::Real > idealCA = ( restype.atom( restype.atom_index("CA") ).ideal_xyz() );
477  xyzVector< core::Real > idealC = ( restype.atom( restype.atom_index("C") ).ideal_xyz() );
478  xyzVector< core::Real > idealCB = ( restype.atom( restype.atom_index("CB") ).ideal_xyz() );
479  //now use the HT to map from ideal space to the current residue position
480  xyzVector< core::Real > ideal_halfpoint = 0.5 * ( idealN + idealC );
481  HTReal ideal_frame( idealN, ideal_halfpoint, idealCA );
482  //do not normalize because the distance is important
483  xyzVector< core::Real > CB_ideal_local = ideal_frame.to_local_coordinate( idealCB );
484  xyzVector< core::Real > CB_xyz( input_frame * CB_ideal_local );
485  return CB_xyz;
486  } else {
487  return res.xyz( res.nbr_atom() ); // neighbor atom for non protein
488  }//end if no CB
489 
490 } //end select_coord_for_residue
491 
492 ///@details figures out if res1 and res2 are pointing at eachother
493 ///@details the angle is the max angle between the two residues, dist_cutoff is how far the coords are from eachother
496  core::Real angle_cutoff /*degrees*/,
497  core::Real dist_cutoff ){
498  using namespace numeric;
499  bool is_pointed_at(false);
500  core::Real dist_squared(dist_cutoff * dist_cutoff);
501  //get the vectors for the residues in question
502  xyzVector< core::Real > res1_vector ( cbeta_vector( res1) );
503  //find CB to other action coordinate residue
504  xyzVector< core::Real > base_position = select_coord_for_residue ( res1 );
505  xyzVector< core::Real > dest_position = select_coord_for_residue ( res2 );
506  //see if the base and destination are close enough to be considered
507  if ( base_position.distance_squared( dest_position ) <= dist_squared){
508  //find the vector between residues, then calculate the dot product
509  xyzVector< core::Real > base_to_dest = (dest_position - base_position).normalize();
510  core::Real r1_dot_r2 = dot_product (res1_vector, base_to_dest);
511  core::Real costheta = std::cos( conversions::to_radians( angle_cutoff ) );
512  // is projection larger than cos(theta)?
513  if (r1_dot_r2 > costheta){
514  is_pointed_at = true;
515 // #ifndef NDEBUG
516 // std::cout<< "Residue meets angle cutoff: "<< r1_dot_r2 << " cutoff( costheata=" << costheta <<") and has distance "
517 // << numeric::distance_squared( base_position, dest_position ) <<" cutoff( "<< dist_squared<<")."<<std::endl;
518 // #endif
519  }
520  }
521  return is_pointed_at;
522 }//end res1_pointed_at_res2
523 
524 }//end namespace util
525 }//operation
526 }//task
527 }//pack
528 }//end namespace core
529