Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Ramachandran.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 Andrew Leaver-Fay (leaverfa@email.unc.edu)
13 
14 #ifndef INCLUDED_core_scoring_Ramachandran_hh
15 #define INCLUDED_core_scoring_Ramachandran_hh
16 
17 // Unit Headers
19 // AUTO-REMOVED #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 #include <utility/vector1.hh>
31 
32 // Numeric headers
33 #include <numeric/interpolation/spline/Bicubic_spline.hh>
34 
35 
36 // ObjexxFCL Headers
37 // AUTO-REMOVED #include <ObjexxFCL/FArray1D.hh>
38 // AUTO-REMOVED #include <ObjexxFCL/FArray2D.hh>
39 // AUTO-REMOVED #include <ObjexxFCL/FArray4D.hh>
40 
41 #include <utility/vector1.hh>
42 #include <ObjexxFCL/FArray2D.fwd.hh>
43 #include <ObjexxFCL/FArray4D.fwd.hh>
44 
45 // C++ Headers
46 #include <map>
47 
48 
49 namespace core {
50 namespace scoring {
51 
53 {
54 public:
55  typedef pose::Pose Pose;
56  typedef chemical::AA AA;
57 
58 public:
59  Ramachandran();
60 
62  std::string const & rama_map_filename,
63  bool use_bicubic_interpolation
64  );
65 
66  virtual ~Ramachandran() ; // auto-removing definition from header{}
67 
68 
69  Real
71  AA const res_aa,
72  Real const phi,
73  Real const psi
74  ) const;
75 
76  void
78  conformation::Residue const & res,
79  Real & rama,
80  Real & drama_dphi,
81  Real & drama_dpsi
82  ) const;
83 
84  void
86  AA const res_aa,
87  Real const phi,
88  Real const psi,
89  Real & rama,
90  Real & drama_dphi,
91  Real & drama_dpsi
92  ) const;
93 
94  void
96  bool use_bicubic_interpolation,
97  bool rama_not_squared,
98  AA const res_aa,
99  Real const phi,
100  Real const psi,
101  Real & rama,
102  Real & drama_dphi,
103  Real & drama_dpsi
104  ) const;
105 
106  void
108  AA const res_aa,
109  Real & phi,
110  Real & psi
111  ) const;
112 
113 
114  /// @brief functions for torsion-bin specific but otherwise random phi/psi angles
115  /// @author Amelie Stein
116 
117 
118  void
120  AA const res_aa,
121  Real & phi,
122  Real & psi,
123  char const torsion_bin
124  ) const;
125 
126  core::Size get_torsion_bin_index(char torsion_bin) const;
127 
128  void
130 
131  void
132  get_entries_per_torsion_bin( AA const res_aa, std::map< char, core::Size > & tb_frequencies ) const;
133 
134 
135  ///////////////////////////////
136  // unused??
137  void
139  Pose & pose,
140  ScoreFunction const & scorefxn
141  ) const;
142 
143  void
145  Pose const & pose
146  ) const;
147 
148  //Real get_rama_score_residue_deriv( int res, Pose const & a_pose, ProteinTorsion torsion ) const;
149  void eval_procheck_rama( Pose const & a_pose,
150  Real & favorable, Real & allowed, Real & generous ) const;
151 
152 
153 private:
154 
155  void read_rama(
156  std::string const & rama_map_filename,
157  bool use_bicubic_interpolation);
158 
159  void init_rama_sampling_table( char const torsion_bin );
160 /*
161  static
162  void
163  procheck_map_initializer( FArray1D_string & map );
164 */
165  static bool rama_initialized_;
166  //static utility::vector1< utility::vector1 < FArray2D< Real > > > > ram_probabil_;
167  static ObjexxFCL::FArray4D< Real > ram_probabil_;
168  //static utility::vector1< utility::vector1 < FArray2D_int > > > ram_counts_;
169  static ObjexxFCL::FArray4D_int ram_counts_;
170  //static utility::vector1< utility::vector1 < FArray2D< Real > > > > ram_energ_;
171  static ObjexxFCL::FArray4D< Real > ram_energ_;
173 
174  static int const n_phi_ = 36;
175  static int const n_psi_ = 36;
176  static Real const binw_; // 360 / n_phi_ = 10;
179  static int const n_aa_ = 20; // Ramachandran score defined for the cananical AAs only.
180  static ObjexxFCL::FArray2D< Real > ram_entropy_;
181  utility::vector1< utility::vector1< utility::vector1< Real > > > rama_sampling_table_; // vector of allowed phi/psi pairs for each residue
182  utility::vector1 < utility::vector1< utility::vector1< utility::vector1< Real > > > > rama_sampling_table_by_torsion_bin_; // first entry will be a letter indicating the torsion bin, the rest is like in the regular rama_sampling_table_
183 
184 
185 /*
186  static bool procheck_map_initialized_
187  static FArray1D_string procheck_map_;
188 */
189 
190 };
191 
192 }
193 }
194 
195 #endif