Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HSSTriplet.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 // This file is part of the Rosetta software suite and is made available under license.
5 // The Rosetta software is developed by the contributing members of the Rosetta Commons consortium.
6 // Copyright in the Rosetta software belongs to the developers and their institutions.
7 // For more information, see www.rosettacommons.org.
8 
9 /// @file ./src/protocols/fldsgn/topology/HSSTriplet.hh
10 /// @brief
11 /// @author Nobuyasu Koga ( nobuyasu@u.washington.edu )
12 
13 #ifndef INCLUDED_protocols_fldsgn_topology_HSSTriplet_hh
14 #define INCLUDED_protocols_fldsgn_topology_HSSTriplet_hh
15 
16 // Unit headers
19 
20 // Project headers
21 #include <core/types.hh>
22 
23 #include <utility/vector1.hh>
24 #include <utility/pointer/ReferenceCount.hh>
25 #include <map>
26 #include <string>
27 
28 namespace protocols {
29 namespace fldsgn {
30 namespace topology {
31 
33 public:
34 
35 
36  typedef core::Size Size;
37  typedef core::Real Real;
40 
42 public:
43 
44 
45  /// @brief default constructor
47  helix_( 0 ),
48  strand1_( 0 ),
49  strand2_( 0 ),
50  hsheet_dist_( 0.0 ),
51  hs_angle_( 0.0 ),
52  hs1_dist_( 0.0 ),
53  hs2_dist_( 0.0 ),
54  ss_dist_( 0.0 ),
55  ss_orient_( "" ),
56  hs1_orient_( "" ),
57  hs2_orient_( "" ),
58  left_handed_( false ),
60  {}
61 
62  /// @Brief value constructor
64  Size const h,
65  Size const s1,
66  Size const s2
67  ):
68  helix_( h ),
69  strand1_( s1 ),
70  strand2_( s2 ),
71  hsheet_dist_( 0.0 ),
72  hs_angle_( 0.0 ),
73  hs1_dist_( 0.0 ),
74  hs2_dist_( 0.0 ),
75  ss_dist_( 0.0 ),
76  ss_orient_( "" ),
77  hs1_orient_( "" ),
78  hs2_orient_( "" ),
79  left_handed_( false ),
81  {}
82 
83  /// @brief value constructor
84  HSSTriplet( String const & hss );
85 
86  /// @brief default destructor
87  virtual ~HSSTriplet() ; // auto-removing definition from header{}
88 
89  /// @brief copy constructor
90  HSSTriplet( HSSTriplet const & hss );
91 
92 
93  /// @brief operator ==
94  inline
95  bool operator ==( HSSTriplet const & rval ) const {
96  return ( helix_ == rval.helix_ && strand1_ == rval.strand1_ && strand2_ == rval.strand2_ );
97  }
98 
99 
100 public:
101 
102 
103  /// @brief IO Operator
104  friend std::ostream & operator<<(std::ostream & out, const HSSTriplet & s );
105 
106 
107 public:
108 
109 
110  inline
111  Size helix() const
112  {
113  return helix_;
114  }
115 
116  inline
117  Size strand1() const
118  {
119  return strand1_;
120  }
121 
122  inline
123  Size strand2() const
124  {
125  return strand2_;
126  }
127 
128 
129 public:
130 
131 
132  /// @brief reutrn distance between sheet ( defined by the 2 strands ) and helix
133  Real hsheet_dist() const;
134 
135  /// @brief return distance between sheet ( defined by the 2 strands ) and helix
136  Real hs_angle() const;
137 
138  /// @brief distance between mid helix and midpoint of 1st strand
139  Real hs1_dist() const;
140 
141  /// @brief distance between mid helix and midpoint of 2nd strand
142  Real hs2_dist() const;
143 
144  /// @brief distance between midpoints of strands
145  Real ss_dist() const;
146 
147  /// @brief orientation between strands
148  String ss_orient() const;
149 
150  /// @brief orientation between helix and 1st strand
151  String hs1_orient() const;
152 
153  /// @brief orientation between helix and 2nd strand
154  String hs2_orient() const;
155 
156  /// @brief hsstriplet is left handed or not
157  bool left_handed() const;
158 
159  /// @brief geometry is initialized or not
160  inline
162  {
164  }
165 
166 
167 public:
168 
169 
170  void calc_geometry( SS_Info2_COP const ssinfo );
171 
172 
173 private:
174 
175 
176  /// @brief helix of hsstriplet
178 
179  /// @brief 1st strand of hsstriplet
181 
182  /// @brief 2nd strand of hsstriplet
184 
185  /// @brief distance between sheet ( defined by the 2 strands ) and helix
187 
188  /// @brief distance between sheet ( defined by the 2 strands ) and helix
190 
191  /// @brief distance between mid helix and midpoint of strand1
193 
194  /// @brief distance between mid helix and midpoint of strand2
196 
197  /// @brief distance between midpoints of strands
199 
200  /// @brief orientation between strands
202 
203  /// @brief orientation between helix and 1st strand
205 
206  /// @brief orientation between helix and 2nd strand
208 
209  /// @brief hsstriplet is left-handed or not
211 
212  /// @brief geometry is initialized
214 
215 
216 }; // HSSTriplet
217 
218 
220 public:
221 
222 
223  typedef core::Size Size;
225 
226 
227 public:
228 
229 
230  /// @brief default constructor
231  HSSTripletSet();
232 
233  /// @brief value constructor
234  HSSTripletSet( HSSTriplets const & s );
235 
236  /// @brief value constructor
237  HSSTripletSet( String const & s );
238 
239  /// @brief copy constructor
240  HSSTripletSet( HSSTripletSet const & s );
241 
242  /// @brief destructor
243  virtual ~HSSTripletSet();
244 
245 
246 public:// operator
247 
248 
249  /// @brief IO Operator
250  friend std::ostream & operator<<(std::ostream & out, const HSSTripletSet & s );
251 
252 
253 public: //mutator
254 
255 
256  /// @brief
257  void add_hsstriplets( HSSTriplets const & s );
258 
259  /// @brief
260  void push_back( HSSTripletOP const hssop );
261 
262  /// @brief
263  void clear();
264 
265 
266 public: // accessor
267 
268 
269  /// @brief return an interator that points to the first HSSTripletOP
271  return hss_triplets_.begin();
272  }
273 
274  /// @brief return an interator that points beyond the last HSSTripletOP
276  return hss_triplets_.end();
277  }
278 
279  /// @brief return an const interator that points to the first HSSTripletOP
281  return hss_triplets_.begin();
282  }
283 
284  /// @brief return an const interator that points beyond the last HSSTripletOP
286  return hss_triplets_.end();
287  }
288 
289  /// @brief return the size of vector of hss_triplets_
290  Size size() const {
291  return hss_triplets_.size();
292  }
293 
294 
295 public: //accessor
296 
297 
298  /// @brief
299  HSSTripletOP hss_triplet( Size const helix );
300 
301 
302  /// @brief
303  HSSTriplets const & hss_triplets() const;
304 
305 
306 private: //data
307 
308 
309 
311 
312 
313  std::map< Size, HSSTripletOP > helix2hss_;
314 
315 
316 }; // HSSTripletSet
317 
318 
319 } // namespace topology
320 } // namespace fldsgn
321 } // namespace protocols
322 
323 #endif