Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
util.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/util.hh
11 /// @brief Nonmember functions for evaluating some or all energy methods on residues or residue pairs
12 /// @author Andrew Leaver-Fay (aleaverfay@gmail.com)
13 
14 #ifndef INCLUDED_core_scoring_util_HH
15 #define INCLUDED_core_scoring_util_HH
16 
17 #include <core/types.hh>
19 #include <core/pose/Pose.fwd.hh>
22 
23 #include <utility/vector1.hh>
24 
25 
26 namespace core {
27 namespace scoring {
28 
29 /// @brief With two bounding spheres for a pair of sidechains,
30 /// evaluate all the sidechain/sidechain energies. This will
31 /// avoid a call to EnergyMethod E's sidechain_sidechain_energiy
32 /// method if a) E's atomic_interaction_cutoff + r1sc_radius +
33 /// r2sc_radius < dist( r1sc_centroid, r2sc_centroid ) and b)
34 /// E returns "true" in a call to its divides_backbone_and_-
35 /// sidechain_energetics() method. Both context-dependent and
36 /// context-independent 2-body energies are evaluated in this
37 /// function.
38 void
40  conformation::Residue const & r1,
41  conformation::Residue const & r2,
42  Vector const & r1sc_centroid,
43  Vector const & r2sc_centroid,
44  Real const & r1sc_radius,
45  Real const & r2sc_radius,
46  pose::Pose const & pose,
47  ScoreFunction const & sfxn,
48  EnergyMap & emap
49 );
50 
51 /// @brief With two bounding spheres for a backbone and a sidechain,
52 /// evaluate all the backbone/sidechain energies. This will
53 /// avoid a call to EnergyMethod E's backbone_sidechain_energiy
54 /// method if either a) E's atomic_interaction_cutoff + r1bb_radius +
55 /// r2sc_radius < dist( r1bb_centroid, r2sc_centroid ) or b)
56 /// E returns "false" in a call to its divides_backbone_and_-
57 /// sidechain_energetics() method. The reason the call is avoided if
58 /// "false" is returned is that, the entirety of a residue-pair-energy
59 /// evaluation should be returned in the sidechain_sidechain_energy
60 /// evaluation, if E does not implement its own versions of the bb/bb,
61 /// bb/sc and sc/sc energy evaluation methods. Both context-dependent and
62 /// context-independent 2-body energies are evaluated in this
63 /// function.
64 void
66  conformation::Residue const & r1,
67  conformation::Residue const & r2,
68  Vector const & r1bb_centroid,
69  Vector const & r2sc_centroid,
70  Real const & r1bb_radius,
71  Real const & r2sc_radius,
72  pose::Pose const & pose,
73  ScoreFunction const & sfxn,
74  EnergyMap & emap
75 );
76 
77 /// @brief With two bounding spheres for a pair of backbones,
78 /// evaluate all the backbone/sidechain energies. This will
79 /// avoid a call to EnergyMethod E's backbone_backbone_energiy
80 /// method if either a) E's atomic_interaction_cutoff + r1bb_radius +
81 /// r2bb_radius < dist( r1bb_centroid, r2sc_centroid ) or b)
82 /// E returns "false" in a call to its divides_backbone_and_-
83 /// sidechain_energetics() method. The reason the call is avoided if
84 /// "false" is returned is that, the entirety of a residue-pair-energy
85 /// evaluation should be returned in the sidechain_sidechain_energy
86 /// evaluation, if E does not implement its own versions of the bb/bb,
87 /// bb/sc and sc/sc energy evaluation methods. Both context-dependent and
88 /// context-independent 2-body energies are evaluated in this
89 /// function.
90 void
92  conformation::Residue const & r1,
93  conformation::Residue const & r2,
94  Vector const & r1bb_centroid,
95  Vector const & r2bb_centroid,
96  Real const & r1bb_radius,
97  Real const & r2bb_radius,
98  pose::Pose const & pose,
99  ScoreFunction const & sfxn,
100  EnergyMap & emap
101 );
102 
103 /// @brief Compute the average coordinate of the backbone heavy atoms
104 /// (aka center of mass).
105 Vector
107  conformation::Residue const & r1
108 );
109 
110 /// @brief Given a representative point for the center of the backbone,
111 /// compute the largest distance of all backbone heavy atoms to that point.
112 Real
114  conformation::Residue const & r1,
115  Vector const & r1bb_centroid
116 );
117 
118 /// @brief Compute the average coordiante of the sidechain atoms, (aka center of mass)
119 /// or, if there are no side chain heavy atoms, compute the center of mass of the
120 /// backbone.
121 Vector
123  conformation::Residue const & r1
124 );
125 
126 /// @brief Given a representative point for the center of the sidechain,
127 /// compute the largest distance of all sidechain heavy atoms to that point.
128 Real
130  conformation::Residue const & r1,
131  Vector const & r1sc_centroid
132 );
133 
134 }
135 }
136 
137 #endif
138