Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SS_Info.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/ScoringManager.hh
11 /// @brief Scoring manager class header
12 /// @author Andrew Leaver-Fay (leaverfa@email.unc.edu)
13 
14 
15 #ifndef INCLUDED_core_scoring_SS_Info_hh
16 #define INCLUDED_core_scoring_SS_Info_hh
17 
18 /// Unit headers
20 
21 /// Package headers
22 #include <core/types.hh>
24 #include <core/pose/Pose.fwd.hh>
25 #include <basic/datacache/CacheableData.hh>
26 
27 /// Utility headers
28 // AUTO-REMOVED #include <utility/vector1.hh>
29 
30 /// Numeric headers
31 #include <numeric/xyzVector.hh>
32 
33 // ObjexxFCL Headers
34 #include <ObjexxFCL/FArray1D.hh>
35 #include <ObjexxFCL/FArray2D.hh>
36 
37 // C++ headers
38 #include <string>
39 #include <iosfwd>
40 
41 #include <utility/vector1.hh>
42 
43 
44 namespace core {
45 namespace scoring {
46 
47 //////////////////////////////////////////////////////////////////////////////////////////////////////
48 class BB_Pos {
49 
50 public:
51 
52 
53  void
54  resize( int const nres );
55 
56  void
57  take_coordinates_from_pose( pose::Pose const & pose );
58 
59  /// @details accessor for N's coordinate on residue i, requires take_coordinates_from_pose have been recently called.
60  Vector const &
61  N( int const i ) const
62  {
63  return N_[i];
64  }
65 
66  /// @details accessor for CA's coordinate on residue i, requires take_coordinates_from_pose have been recently called.
67  Vector const &
68  CA( int const i ) const
69  {
70  return CA_[i];
71  }
72 
73  /// @details accessor for CB's coordinate on residue i, requires take_coordinates_from_pose have been recently called.
74  Vector const &
75  CB( int const i ) const
76  {
77  return CB_[i];
78  }
79 
80 
81  /// @details accessor for C's coordinate on residue i, requires take_coordinates_from_pose have been recently called.
82  Vector const &
83  C( int const i ) const
84  {
85  return C_[i];
86  }
87 
88  /// @details accessor for O's coordinate on residue i, requires take_coordinates_from_pose have been recently called.
89  Vector const &
90  O( int const i ) const
91  {
92  return O_[i];
93  }
94 
95 
96 private:
97 
98  bool bbindices_up_to_date( pose::Pose const & pose ) const;
99  void update_indices( pose::Pose const & pose );
100 
101 private: // DATA
107 
108  /// Residue types must match those of the pose for the indices
109  /// to match.
116 
117 };
118 
119 
120 
121 //////////////////////////////////////////////////////////////////////////////////////////////////////
122 
123 struct Strands {
124 
125  typedef ObjexxFCL::FArray1D< int > FArray1D_int;
126  typedef ObjexxFCL::FArray2D< int > FArray2D_int;
127 
128  /// @brief default constructor
129  Strands();
130 
131  /// @brief total residue constructor
132  Strands(
133  int const & total_residue
134  );
135 
136  /// @brief copy constructor
137  Strands(
138  Strands const & s
139  );
140 
141  /// @brief default destructor
142  ~Strands();
143 
144  ///
145  void
146  resize( Size const nres );
147 
148  void clear();
149 
150  /// @brief copy assignment
151  Strands const &
152  operator =( Strands const & s );
153 
154  friend
155  std::ostream &
156  operator<< ( std::ostream & out, Strands const & s );
157 
158  /// @brief number of strand dimers
160 
161  /// @brief residue number of strand dimer i
163 
164  /// @brief number of strands
166 
167  /// @brief strand number containing SS_dimer i
169 
170  /// @brief dimer number starting with position i
172 
173  /// @brief residue number of first non-E res
175 
176  /// @brief two neighbors, used for determining sheets
177  mutable FArray2D_int dimer_neighbor; // hack to allow updating in sspair
178 
179  /// @brief strand-strand score array, resized for each calculation:
180  // need to re-add this logic if it turns out to be useful
181  //ObjexxFCL::FArray2D< Real > strand_strand_score;
182 
183 };
184 
185 //////////////////////////////////////////////////////////////////////////////////////////////////////
186 
187 
188 struct Helices {
189 
190  typedef ObjexxFCL::FArray1D< int > FArray1D_int;
191  typedef ObjexxFCL::FArray2D< int > FArray2D_int;
192 
193  /// @brief default constructor
194  Helices();
195 
196  /// @brief total residue constructor
197  Helices(
198  int const & total_residue
199  );
200 
201  ///
202  void
203  resize( int const nres );
204 
205  /// @brief copy constructor
206  Helices(
207  Helices const & h
208  );
209 
210  /// @brief default destructor
211  ~Helices();
212 
213  /// @brief copy assignment
214  Helices const &
215  operator = ( Helices const & h );
216 
217  friend
218  std::ostream &
219  operator<< ( std::ostream & out, Helices const & s );
220 
221  /// @brief number of helices
223 
224 /// PRIVATE: !
225 
226  // variables
230 };
231 
232 
233 //////////////////////////////////////////////////////////////////////////////////////////////////////
234 class SS_Info : public basic::datacache::CacheableData {
235 public:
236 
237  basic::datacache::CacheableDataOP
238  clone() const
239  {
240  return new SS_Info( *this );
241  }
242 
243  void
244  resize( int const nres )
245  {
246  bb_pos_.resize( nres );
247  strands_.resize( nres );
248  helices_.resize( nres );
249  }
250 
251  ///
252  inline
253  BB_Pos const &
254  bb_pos() const
255  {
256  return bb_pos_;
257  }
258 
259  ///
260  inline
261  BB_Pos &
263  {
264  return bb_pos_;
265  }
266 
267  ///
268  inline
269  Strands const &
270  strands() const
271  {
272  return strands_;
273  }
274 
275  ///
276  inline
277  Strands &
279  {
280  return strands_;
281  }
282 
283  ///
284  inline
285  Helices const &
286  helices() const
287  {
288  return helices_;
289  }
290 
291  ///
292  inline
293  Helices &
295  {
296  return helices_;
297  }
298 
299 private:
300 
302 
304 
306 
307 };
308 
309 } // ns scoring
310 } // ns core
311 
312 #endif