Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
P_AA_pp_Energy.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/P_AA_pp_Energy.hh
11 /// @brief Probability of observing an amino acid, given its phi/psi energy method declaration
12 /// @author Andrew Leaver-Fay
13 
14 
15 // Unit headers
18 
19 // Package headers
21 #include <core/scoring/P_AA.hh>
25 
26 // Project headers
27 #include <core/id/TorsionID.hh>
28 #include <core/pose/Pose.hh>
29 // AUTO-REMOVED #include <core/conformation/Conformation.hh>
31 
32 // Numeric headers
33 #include <numeric/conversions.hh>
34 
35 #include <core/kinematics/Jump.hh>
36 #include <utility/vector1.hh>
37 
38 
39 namespace core {
40 namespace scoring {
41 namespace methods {
42 
43 
44 /// @details This must return a fresh instance of the P_AA_pp_Energy class,
45 /// never an instance already in use
49 ) const {
50  return new P_AA_pp_Energy;
51 }
52 
55  ScoreTypes sts;
56  sts.push_back( p_aa_pp );
57  return sts;
58 }
59 
60 
61 
62 /// ctor
65  p_aa_( ScoringManager::get_instance()->get_P_AA() )
66 {}
67 
68 /// clone
71 {
72  return new P_AA_pp_Energy;
73 }
74 
75 /////////////////////////////////////////////////////////////////////////////
76 // methods for ContextIndependentOneBodyEnergies
77 /////////////////////////////////////////////////////////////////////////////
78 
79 ///
80 void
82  conformation::Residue const & rsd,
83  pose::Pose const &,
84  EnergyMap & emap
85 ) const
86 {
87  // ignore scoring residues which have been marked as "REPLONLY" residues (only the repulsive energy will be calculated)
89  return;
90  }
91 
92  emap[ p_aa_pp ] += p_aa_.P_AA_pp_energy( rsd );
93 }
94 
95 
96 bool
98 {
99  return true;
100 }
101 
102 
103 Real
105  conformation::Residue const & rsd,
106  ResSingleMinimizationData const &,// min_data,
107  id::DOF_ID const &,// dof_id,
108  id::TorsionID const & tor_id,
109  pose::Pose const &,// pose,
110  ScoreFunction const &,// sfxn,
111  EnergyMap const & weights
112 ) const
113 {
114  // ignore scoring residues which have been marked as "REPLONLY" residues (only the repulsive energy will be calculated)
116  return 0.0;
117  }
118 
119  if ( ! tor_id.valid() ) return 0.0;
120  return numeric::conversions::degrees( weights[ p_aa_pp ] * p_aa_.get_Paa_pp_deriv( rsd, tor_id ));
121 }
122 
123 ///
124 Real
126  id::DOF_ID const &,// dof_id,
127  id::TorsionID const & tor_id,
128  pose::Pose const & pose,
129  ScoreFunction const &, //sfxn,
130  EnergyMap const & weights
131 ) const
132 {
133  // ignore scoring residues which have been marked as "REPLONLY" residues (only the repulsive energy will be calculated)
134  if ( pose.residue( tor_id.rsd() ).has_variant_type( core::chemical::REPLONLY ) ){
135  return 0.0;
136  }
137 
138  if ( ! tor_id.valid() ) return 0.0;
139  return numeric::conversions::degrees( weights[ p_aa_pp ] * p_aa_.get_Paa_pp_deriv( pose.residue( tor_id.rsd() ), tor_id ));
140 }
141 
142 /// @brief P_AA_pp_Energy is context independent; indicates that no
143 /// context graphs are required
144 void
146 {}
149 {
150  return 1; // Initial versioning
151 }
152 
153 
154 } // methods
155 } // scoring
156 } // core
157