Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Ramachandran2B.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/Ramachandran.hh
11 /// @brief Ramachandran potential class delcaration
12 /// @author Guoli Wang
13 
14 #ifndef INCLUDED_core_scoring_Ramachandran2B_hh
15 #define INCLUDED_core_scoring_Ramachandran2B_hh
16 
17 // Unit Headers
19 //#include <core/scoring/ProteinTorsion.hh>
20 
21 // Project Headers
22 #include <core/types.hh>
23 #include <core/chemical/AA.hh>
24 #include <core/pose/Pose.fwd.hh>
27 
28 // Utility Headers
29 #include <utility/pointer/ReferenceCount.hh>
30 
31 // ObjexxFCL Headers
32 #include <ObjexxFCL/FArray1D.hh>
33 #include <ObjexxFCL/FArray2D.hh>
34 // AUTO-REMOVED #include <ObjexxFCL/FArray2A.hh>
35 #include <ObjexxFCL/FArray3D.hh>
36 #include <ObjexxFCL/FArray4D.hh>
37 
38 #include <utility/vector1.hh>
39 
40 // C++ Headers
41 #include <map>
42 
43 
44 namespace core {
45 namespace scoring {
46 
47 
49 {
50 public:
51  typedef pose::Pose Pose;
52  typedef chemical::AA AA;
53 
54 public:
56  virtual ~Ramachandran2B() ; // auto-removing definition from header{}
57 
58  Real
60  AA const res_aa,
61  Real const phi,
62  Real const psi
63  ) const;
64 
65  // Guoli Wang
66  void
68  conformation::Residue const & res,
69  chemical::AA const left_aa,
70  chemical::AA const right_aa,
71  Real & rama,
72  Real & drama_dphi,
73  Real & drama_dpsi
74  ) const;
75 
76  Real
78  conformation::Residue const &rsd,
79  chemical::AA const &neighbor,
80  Real &drama_dphi,
81  Real &drama_dpsi
82  ) const;
83 
84  Real
86  conformation::Residue const &rsd,
87  chemical::AA const &neighbor
88  ) const;
89 
90  Real
92  conformation::Residue const & rsd,
93  chemical::AA const &neighbor,
94  Real &drama_dphi,
95  Real &drama_dpsi
96  ) const;
97 
98  Real
100  conformation::Residue const & rsd,
101  chemical::AA const &neighbor
102  ) const;
103 
104  Real
105  RamaE(
106  conformation::Residue const & rsd,
107  Real &drama_dphi,
108  Real &drama_dpsi
109  ) const;
110 
111  Real
112  RamaE(
113  conformation::Residue const & rsd
114  ) const;
115  // finished
116 
117  void
119  conformation::Residue const & res,
120  Real & rama,
121  Real & drama_dphi,
122  Real & drama_dpsi
123  ) const;
124 
125  void
127  AA const res_aa,
128  Real const phi,
129  Real const psi,
130  Real & rama,
131  Real & drama_dphi,
132  Real & drama_dpsi
133  ) const;
134 
135  void
137  Real const phi,
138  Real const psi,
139  Real & rama,
140  Real & drama_dphi,
141  Real & drama_dpsi,
142  Real const entropy,
143  ObjexxFCL::
144  FArray2A< Real > const & rama_for_res
145  ) const;
146 
147  // AS: for neighbor-dependent rama sampling
148  void
150  AA const left_aa,
151  AA const pos_aa,
152  Real & phi,
153  Real & psi
154  ) const;
155 
156  void
158  AA const pos_aa,
159  AA const right_aa,
160  Real & phi,
161  Real & psi
162  ) const;
163 
164  /// @brief function for torsion-bin specific but otherwise random phi/psi angles
165  /// @author Amelie Stein
166 
167  void
169  AA const left_aa,
170  AA const pos_aa,
171  Real & phi,
172  Real & psi,
173  char const torsion_bin
174  ) const;
175 
176  void
178  AA const pos_aa,
179  AA const right_aa,
180  Real & phi,
181  Real & psi,
182  char const torsion_bin
183  ) const;
184 
185 
186  core::Size get_torsion_bin_index(char torsion_bin) const;
187 
188  void
190 
191  void
193  AA const left_aa,
194  AA const pos_aa,
195  std::map< char, core::Size > & tb_frequencies ) const;
196 
197  void
199  AA const pos_aa,
200  AA const right_aa,
201  std::map< char, core::Size > & tb_frequencies ) const;
202 
203 
204 
205 
206  ///////////////////////////////
207  // unused??
208  void
210  Pose & pose,
211  ScoreFunction const & scorefxn
212  ) const;
213 
214  void
216  Pose const & pose
217  ) const;
218 
219 
220 private:
221 
222  void read_rama();
223  void init_rama_sampling_table_left( const char torsion_bin ); // AS: for neighbor-dependent rama sampling in KIC/NGK
224  void init_rama_sampling_table_right( const char torsion_bin );
225 
226  //static bool rama_initialized_;
227  ObjexxFCL::FArray3D< Real > ram_energ_;
228  ObjexxFCL::FArray1D< Real > ram_entropy_;
229  ObjexxFCL::FArray4D< Real > ram_energ_left_;
230  ObjexxFCL::FArray2D< Real > ram_entropy_left_;
231  ObjexxFCL::FArray4D< Real > ram_energ_right_;
232  ObjexxFCL::FArray2D< Real > ram_entropy_right_;
233 
234  static int const n_phi_ = 36;
235  static int const n_psi_ = 36;
236  static Real const binw_; // 360 / n_phi_ = 10;
237  static int const n_aa_ = 20; // Ramachandran score defined for the cananical AAs only.
238  static int const nullaa = 21; // Guoli Wang
239 
241 
242  static ObjexxFCL::FArray4D< Real > left_ram_probabil_; // AS: probability of each phi/psi combination given the left & actual AA
245 
246  static ObjexxFCL::FArray4D< Real > right_ram_probabil_; // AS: probability of each phi/psi combination given the actual & right AA
249 
252 
253 
254 };
255 
256 }
257 }
258 
259 #endif