Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SymmData.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 made available under the Rosetta Commons license.
5 // See http://www.rosettacommons.org/license
6 // (C) 199x-2007 University of Washington
7 // (C) 199x-2007 University of California Santa Cruz
8 // (C) 199x-2007 University of California San Francisco
9 // (C) 199x-2007 Johns Hopkins University
10 // (C) 199x-2007 University of North Carolina, Chapel Hill
11 // (C) 199x-2007 Vanderbilt University
12 
13 /// @brief Symmetry data container
14 /// @file core/conformation/symmetry/SymmData.hh
15 /// @author Ingemar Andre
16 
17 
18 #ifndef INCLUDED_core_conformation_symmetry_SymmData_hh
19 #define INCLUDED_core_conformation_symmetry_SymmData_hh
20 
21 
22 // Unit headers
27 
28 // Utility headers
29 #include <utility/pointer/owning_ptr.hh>
30 #include <utility/pointer/ReferenceCount.hh>
31 #include <core/types.hh>
32 
33 // C++ headers
34 #include <map>
35 
36 #include <utility/vector1_bool.hh>
37 #include <numeric/xyzMatrix.hh>
38 
39 
40 namespace core {
41 namespace conformation {
42 namespace symmetry {
43 
45 {
46 
47 // typedef utility::vector1< Size > Clones;
49 
50  public:
51 
52  SymmData();
53  SymmData( core::Size nres, core::Size njump );
54  SymmData( SymmData const &);
56  clone() const;
57  virtual ~SymmData();
58 
59  friend
60  bool
61  operator==(SymmData const & a, SymmData const & b);
62 
63  friend
64  bool
65  operator!=(SymmData const & a, SymmData const & b);
66 
67  //void test( SymmData tmp );
68 
69  private:
70 
78  bool recenter_;
81  std::vector< std::string > slide_order_string_;
82  std::vector< std::vector< std::string > > symm_transforms_;
83  std::vector< numeric::xyzMatrix< core::Real> > rotation_matrices_;
84  std::vector< numeric::xyzMatrix< core::Real> > translation_matrices_;
85  std::map< std::string, VirtualCoordinate > virtual_coordinates_;
86  std::map< std::string, std::pair< std::string, std::string > > jump_string_to_virtual_pair_;
87  std::map< std::string, Size > jump_string_to_jump_num_;
88  std::map< std::string, Size > virt_id_to_virt_num_;
89  std::map< std::string, Size > virt_id_to_subunit_num_;
90  std::map< std::string, char > virt_id_to_subunit_chain_;
91  std::map< std::string, std::string > virt_id_to_subunit_residue_;
92  std::map< Size, std::string > virt_num_to_virt_id_;
93  std::map< Size, std::string > subunit_num_to_virt_id_;
94  std::map< Size, WtedClones > jump_clones_;
95  std::map< Size, SymDof > dofs_;
96  std::vector< Size > allow_virtual_;
100 
107 
109  std::map<std::string,char> name2component_;
110  std::map<std::string,utility::vector1<char> > jname2components_;
111  std::map<std::string,utility::vector1<Size> > jname2subunits_;
112 
114 
115  public:
118 
119  public:
120  void
123  );
124  void
127  );
128  void
130  std::istream & infile
131  );
132 
133  //void read_symmetry_name();
134 
135  // void read_symmetry_type();
136 
137  //void read_transformation_matrixes();
138 
139  void
140  sanity_check();
141  void
142  show();
143 
144  public:
145  // Accessor functions
146 
147  std::string const &
148  get_symmetry_name() const;
149 
150  std::string const &
151  get_symmetry_type() const;
152 
153  core::Size
154  get_subunits() const;
155 
157 
158  core::Size
159  get_interfaces() const;
160 
161  core::Size
162  get_score_subunit() const;
163 
164  std::string const &
165  get_anchor_residue() const;
166 
167  bool
168  get_recenter() const;
169 
170  core::Size
171  get_root() const;
172 
175 
177  get_include_subunit() const;
178 
180  get_output_subunit() const;
181 
182  std::vector< numeric::xyzMatrix< core::Real > > const &
183  get_rotation_matrix() const;
184 
185  std::vector< numeric::xyzMatrix< core::Real > > const &
186  get_translation_matrix() const;
187 
188  //std::vector< std::vector< std::string> > get_symm_transforms() const;
189 
190  std::map< std::string, VirtualCoordinate > const &
191  get_virtual_coordinates() const;
192 
193  core::Size
194  get_num_virtual() const;
195 
196  std::map< Size, SymDof > const &
197  get_dofs() const;
198 
199  std::map< Size, WtedClones > const &
200  get_jump_clones() const;
201 
202  std::map< std::string, Size > const &
204 
205  std::map< std::string, Size > const &
206  get_virtual_id_to_num() const;
207 
208  std::map< std::string, Size > const &
210 
211  std::map< std::string, char > const &
213 
214  std::map< std::string, std::string > const &
216 
217  std::map< Size, std::string > const &
219 
220  std::map< Size, std::string > const &
221  get_virtual_num_to_id() const;
222 
223  std::map< std::string, std::pair< std::string, std::string > > const &
224  get_virtual_connects() const;
225 
226  SymSlideInfo const &
227  get_slide_info() const;
228 
229  core::Real
230  get_cell_a() const;
231 
232  core::Real
233  get_cell_b() const;
234 
235  core::Real
236  get_cell_c() const;
237 
238  core::Real
239  get_cell_alfa() const;
240 
241  core::Real
242  get_cell_beta() const;
243 
244  core::Real
245  get_cell_gamma() const;
246 
247  // Set functions
248  //void
249  //set_nres_subunit(
250  //Size nres_subunit );
251 
252  //void
253  //set_njump_subunit(
254  //Size njump_subunit );
255 
256  void
258  std::string symm_name );
259 
260  void
262  std::string symm_type );
263 
264  void
265  set_subunits(
266  core::Size num_subunits );
267 
268  void
270  core::Size interfaces );
271 
272  void
274  std::string anchor
275  );
276 
277  void
278  set_score_multiply_subunit( utility::vector1< Size > & score_multiply_vector );
279 
280  void
281  set_slide_info( SymSlideInfo slide_info );
282 
283  void
285  std::vector< numeric::xyzMatrix< core::Real > > rotation_matrices );
286 
287  void
289  std::vector< numeric::xyzMatrix< core::Real > > translation_matrices );
290 
291  void
293  std::vector< std::vector< std::string> > symm_transforms );
294 
295  void
296  set_cell_a(
297  core::Real cell_a );
298 
299  void
300  set_cell_b(
301  core::Real cell_b );
302 
303  void
304  set_cell_c(
305  core::Real cell_c );
306 
307  void
309  core::Real cell_alfa );
310 
311  void
313  core::Real cell_beta );
314 
315  void
316  get_cell_gamma( core::Real cell_gamma );
317 
318  utility::vector1<char> const & get_components() const;
319  std::map<std::string,char> const & get_subunit_name_to_component() const;
320  std::map<std::string,utility::vector1<char> > const & get_jump_name_to_components() const;
321  std::map<std::string,utility::vector1<Size> > const & get_jump_name_to_subunits() const;
322 
323  std::string const & get_parent_jump(std::string const & jname) const;
324  std::string const & get_parent_virtual(std::string const & vname) const;
325  bool is_ancestor_virtual(std::string const & ancestor, std::string const & child) const;
326  std::string const & get_least_common_ancertor_jump(std::string const & jname1, std::string const & jname2) const;
327  std::string const & get_least_common_ancertor_virtual(std::string const & vname1, std::string const & vname2) const;
328 
331 
332 };
333 
334 } // symmetry
335 } // conformation
336 } // core
337 #endif