Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MembranePotential.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/MembranePotential.hh
11 /// @brief Membrane Potential
12 /// @author Bjorn Wallner
13 
14 
15 #ifndef INCLUDED_core_scoring_MembranePotential_hh
16 #define INCLUDED_core_scoring_MembranePotential_hh
17 
18 #include <core/types.hh>
19 
20 // Unit headers
22 // AUTO-REMOVED #include <core/scoring/MembraneTopology.fwd.hh>
23 // AUTO-REMOVED #include <core/scoring/MembraneTopology.hh>
25 
26 // Package headers
27 // AUTO-REMOVED #include <core/scoring/EnergyGraph.fwd.hh>
29 
30 // Project headers
31 #include <core/pose/Pose.fwd.hh>
32 
33 #include <basic/datacache/CacheableData.hh>
34 
35 // Utility headers
36 // AUTO-REMOVED #include <utility/vector1.hh>
37 #include <numeric/xyzVector.hh>
38 #include <ObjexxFCL/FArray1D.hh>
39 #include <ObjexxFCL/FArray2D.hh>
40 #include <ObjexxFCL/FArray3D.hh>
41 #include <ObjexxFCL/FArray4D.hh>
42 
43 #include <utility/vector1.hh>
44 
45 
46 namespace core {
47 namespace scoring {
48 
49 class MembraneEmbed : public basic::datacache::CacheableData {
50 
51 public:
52  MembraneEmbed(): calculated_(false), spanning_(false) {};
53  MembraneEmbed( MembraneEmbed const & src );
54 
55  basic::datacache::CacheableDataOP
56  clone() const
57  {
58  return new MembraneEmbed( *this );
59  }
60 
61  Size
62  size() const{
63  return depth_.size();
64  }
65 
66  Real &
67  depth(Size const seqpos)
68  {
69  return depth_[seqpos];
70  }
71 
72  void
73  set_normal(Vector const & v)
74  {
75  normal_=v;
76  }
77  void
78  set_center(Vector const & v)
79  {
80  center_=v;
81  }
82  void
83  set_penalty(Real const & p)
84  {
85  penalty_=p;
86  }
87 
88  Real
89  depth(Size const seqpos) const
90  {
91  return depth_[seqpos];
92  }
93 
94  bool &
96  {
97  return spanning_;
98  }
99 
100  bool
101  spanning() const
102  {
103  return spanning_;
104  }
105 
106  bool
107  calculated() const
108  {
109  return calculated_;
110  }
111 
112  bool &
114  {
115  return calculated_;
116  }
117 
118  Vector const &
119  normal() const
120  {
121  return normal_;
122  }
123 
124  Vector const &
125  center() const
126  {
127  return center_;
128  }
129 
130  Real const &
131  penalty() const
132  {
133  return penalty_;
134  }
135 
136  void
137  initialize( pose::Pose const & pose );
138 
139 private:
144  bool spanning_;
147 };
148 
150 
151 public:
153 
154  ///
155  void
156  evaluate_env(
157  pose::Pose const & pose,
158  conformation::Residue const & rsd,
159  Real const MembraneDepth,
160  Real & membrane_env_score
161  ) const;
162  //
163 
164  void
165  evaluate_env(
166  pose::Pose const & pose,
167  conformation::Residue const & rsd,
168  Real & membrane_env_score
169  ) const;
170 
171  ///
172  void
174  pose::Pose const & pose,
175  conformation::Residue const & rsd,
176  Real & membrane_cb_score
177  ) const;
178 
179  ///
180  void
182  pose::Pose const & pose,
183  conformation::Residue const & rsd1,
184  conformation::Residue const & rsd2,
185  Real const cendist,
186  Real & membrane_pair_score
187  ) const;
188 
189  void
190  finalize( pose::Pose & pose ) const;
191 
192  void
193  compute_membrane_embedding( pose::Pose & pose) const;
194 
195  void
197  Vector & normal,
198  Vector & center) const;
199 
200 
201  void tm_projection_penalty(pose::Pose const & pose,Real & tm_proj) const;
202  void tm_projection_penalty(pose::Pose const & pose, Vector const & normal,Vector const & center,Real & tm_proj) const;
203 
205  void non_helix_in_membrane_penalty(pose::Pose const & pose, Vector const & normal,Vector const & center,Real & non_helix_in_membrane_penalty) const;
206 
207  void termini_penalty(pose::Pose const & pose, Real & termini_penalty) const;
208  void termini_penalty(pose::Pose const & pose, Vector const & normal,Vector const & center,Real & termin_penalty) const;
209 
210  bool
212  {
213  return Menv_penalties_;
214  }
215 
216  bool
217  Membed_init() const
218  {
219  return Membed_init_;
220  }
221 
222 protected:
223 
224 private:
225 
226  void score_normal_center(pose::Pose const & pose,
227  Vector const & normal,
228  Vector const & center,
229  Real & score) const;
230  void search_memb_normal(Vector & n,
231  Real const & alpha,
232  Real const & theta) const; //vmyy
233  void search_memb_center(Vector & c,
234  Vector & n,
235  Real const & delta) const; //vmyy
236  void rot_perturb_vector(Vector & v, Real const & std_dev) const; //bw does not belong here
237  void rigid_perturb_vector(Vector & v, Real const & std_dev) const; //bw does not belong here
238  bool check_spanning(pose::Pose const & pose, Vector const & normal,Vector const & center) const;
239 
240 private: // data
241 
242  ObjexxFCL::FArray3D< Real > mem_env_log6_;
243  ObjexxFCL::FArray3D< Real > mem_env_log10_;
244  ObjexxFCL::FArray1D< Real > mem_cbeta_den6_;
245  ObjexxFCL::FArray1D< Real > mem_cbeta_den12_;
246  ObjexxFCL::FArray1D< Real > mem_cbeta_2TM_den6_;
247  ObjexxFCL::FArray1D< Real > mem_cbeta_2TM_den12_;
248  ObjexxFCL::FArray1D< Real > mem_cbeta_4TM_den6_;
249  ObjexxFCL::FArray1D< Real > mem_cbeta_4TM_den12_;
250  ObjexxFCL::FArray4D< Real > mem_pair_log_;
251 
257 
263 
268 
288 };
289 
290  MembraneEmbed const & MembraneEmbed_from_pose( pose::Pose const & pose );
292 
293 } // ns scoring
294 } // ns core
295 
296 #endif