Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
EnvPairPotential.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/methods/EnvPairPotential.hh
11 /// @brief Statistically derived rotamer pair potential class implementation
12 /// @author Phil Bradley
13 /// @author Andrew Leaver-Fay
14 
15 #ifndef INCLUDED_core_scoring_EnvPairPotential_hh
16 #define INCLUDED_core_scoring_EnvPairPotential_hh
17 
18 #include <core/types.hh>
19 
20 // Unit headers
22 
23 // Package headers
24 // AUTO-REMOVED #include <core/scoring/EnergyGraph.fwd.hh>
26 
27 // Project headers
28 #include <core/pose/Pose.fwd.hh>
29 
30 #include <basic/datacache/CacheableData.hh>
31 
32 // Utility headers
33 // AUTO-REMOVED #include <utility/vector1.hh>
34 
35 #include <ObjexxFCL/FArray1D.hh>
36 #include <ObjexxFCL/FArray2D.hh>
37 #include <ObjexxFCL/FArray3D.hh>
38 
39 #include <utility/vector1.hh>
40 
41 
42 // C++
43 
44 
45 namespace core {
46 namespace scoring {
47 
48 ////////////////////////////////////////////////////////////////////////////////////////////////////
49 /// @brief Keep track of the cenlist information
50 
51 class CenListInfo : public basic::datacache::CacheableData {
52 
53 public:
54 
55  CenListInfo(): calculated_(false) {};
56 
57  CenListInfo( CenListInfo const & src );
58 
59  basic::datacache::CacheableDataOP
60  clone() const
61  {
62  return new CenListInfo( *this );
63  }
64 
65  Size
66  size() const {
67  return fcen6_.size();
68  }
69 
70  Real
71  fcen6( Size const seqpos ) const
72  {
73  return fcen6_[ seqpos ];
74  }
75 
76  Real &
77  fcen6( Size const seqpos )
78  {
79  return fcen6_[ seqpos ];
80  }
81 
82  Real
83  fcen10( Size const seqpos ) const
84  {
85  return fcen10_[ seqpos ];
86  }
87 
88  Real &
89  fcen10( Size const seqpos )
90  {
91  return fcen10_[ seqpos ];
92  }
93 
94  Real
95  fcen12( Size const seqpos ) const
96  {
97  return fcen12_[ seqpos ];
98  }
99 
100  Real &
101  fcen12( Size const seqpos )
102  {
103  return fcen12_[ seqpos ];
104  }
105 
106  bool
107  calculated() const
108  {
109  return calculated_;
110  }
111 
112  bool &
114  {
115  return calculated_;
116  }
117 
118  void
119  initialize( pose::Pose const & pose );
120 
121  // Setter functions
122  void
123  set_fcen6( Size const seqpos, Real value )
124  {
125  fcen6_[ seqpos ] = value;
126  }
127 
128  void
129  set_fcen10( Size const seqpos, Real value )
130  {
131  fcen10_[ seqpos ] = value;
132  }
133 
134  void
135  set_fcen12( Size const seqpos, Real value )
136  {
137  fcen12_[ seqpos ] = value;
138  }
139 
140 private:
145 };
146 
148 
149 public:
151 
152  ///
153  void
155  pose::Pose & pose
156  ) const;
157 
158  void
159  finalize( pose::Pose & pose ) const;
160 
161  ///
162  void
164  pose::Pose const & pose,
165  conformation::Residue const & rsd,
166  Real & env_score,
167  Real & cb_score6,
168  Real & cb_score12
169  ) const;
170 
171  ///
172  void
174  conformation::Residue const & rsd1,
175  conformation::Residue const & rsd2,
176  Real const cendist,
177  Real & pair_contribution,
178  Real & cenpack_contribution
179  ) const;
180 
181 protected:
183 
184 
185  CenListInfo const & cenlist_from_pose( pose::Pose const & ) const;
187 
188 private:
189 
190  void
191  fill_cenlist(
192  CenListInfo & cenlist,
193  Size const res1,
194  Size const res2,
195  Real const cendist
196  ) const;
197 
198  void
199  truncate_cenlist_values( CenListInfo & cenlist ) const;
200 
201 private: // data
202 
203  ObjexxFCL::FArray2D< Real > env_log_;
204  ObjexxFCL::FArray1D< Real > cbeta_den6_;
205  ObjexxFCL::FArray1D< Real > cbeta_den12_;
206  ObjexxFCL::FArray3D< Real > pair_log_;
207  ObjexxFCL::FArray1D< Real > cenpack_log_;
208 
212 
213  //cems transition regions between environment bins
214  //cems transition is from +/- sqrt(36+pad6) +/- sqrt(100+pad10) etc
220 
226 
231 
237 
239 
240 };
241 } // ns scoring
242 } // ns core
243 
244 #endif