Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
EnvEnergy.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/EnvPairEnergy.cc
11 /// @brief Statistically derived rotamer pair potential class implementation
12 /// @author Phil Bradley
13 /// @author Andrew Leaver-Fay
14 
15 
16 // Unit headers
20 
21 // Package headers
25 // AUTO-REMOVED #include <core/scoring/EnergyGraph.hh>
26 
27 // Project headers
28 #include <core/pose/Pose.hh>
31 
33 #include <utility/vector1.hh>
34 
35 
36 // Utility headers
37 
38 // C++
39 
40 namespace core {
41 namespace scoring {
42 namespace methods {
43 
44 
45 /// @details This must return a fresh instance of the EnvEnergy class,
46 /// never an instance already in use
50 ) const {
51  return new EnvEnergy;
52 }
53 
56  ScoreTypes sts;
57  sts.push_back( env );
58  sts.push_back( cbeta );
59  return sts;
60 }
61 
62 
63 
64 /// c-tor
66  parent( new EnvEnergyCreator ),
67  potential_( ScoringManager::get_instance()->get_EnvPairPotential() )
68 {}
69 
70 
71 /// clone
74 {
75  return new EnvEnergy;
76 }
77 
78 
79 /////////////////////////////////////////////////////////////////////////////
80 // scoring
81 /////////////////////////////////////////////////////////////////////////////
82 
83 
84 ///
85 void
87 {
88  // compute interpolated number of neighbors at various distance cutoffs
91 }
92 
93 
94 ///////////////////////////////////////
95 //
96 // ENV SCORE AND CBETA SCORE
97 void
99  conformation::Residue const & rsd,
100  pose::Pose const & pose,
101  EnergyMap & emap
102 ) const
103 {
104  // ignore scoring residues which have been marked as "REPLONLY" residues (only the repulsive energy will be calculated)
106  return;
107  }
108  if(rsd.aa()==core::chemical::aa_unk) return;
109 
110  Real env_score( 0.0 ), cb_score6( 0.0 ), cb_score12( 0.0 ), cb_score( 0.0 );
111 
113  env_score, cb_score6, cb_score12 );
114 
115  env_score *= 2.019;
116  cb_score = 2.667 * ( cb_score6 + cb_score12 ) * 0.3;
117 
119 
120  emap[ env ] += env_score * rsd_wt;
121  emap[ cbeta ] += cb_score * rsd_wt;
122 } // residue_energy
123 
124 void
126  pose::Pose & pose,
127  ScoreFunction const &,
128  EnergyMap &
129 ) const
130 {
131  potential_.finalize( pose );
132 }
135 {
136  return 1; // Initial versioning
137 }
138 
139 }
140 }
141 }