Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RotData.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-2008 University of Washington
7 // (C) 199x-2008 University of California Santa Cruz
8 // (C) 199x-2008 University of California San Francisco
9 // (C) 199x-2008 Johns Hopkins University
10 // (C) 199x-2008 University of North Carolina, Chapel Hill
11 // (C) 199x-2008 Vanderbilt University
12 
13 #ifndef INCLUDED_protocols_make_rot_lib_rotdata_HH
14 #define INCLUDED_protocols_make_rot_lib_rotdata_HH
15 
16 // core headers
17 #include <core/types.hh>
18 
19 // utility headers
20 #include <utility/vector1.hh>
21 #include <utility/vector1.functions.hh> //for arg_min(vector1<>)
22 
23 // numeric headers
24 #include <numeric/angle.functions.hh>
25 
26 namespace protocols {
27 namespace MakeRotLib {
28 
29 using namespace core;
30 using namespace utility;
31 
32 // Define Rotamer Data class and variable
33 class RotData {
34  private:
35  Real phi_, psi_, omega_, min_omega_, epsilon_, min_epsilon_;
38  Size num_chi_; // number of chi angles in AA
39  Size num_clusters_; // number of clusters
40  Size cluster_num_; // cluster id
41  vector1<Real> inp_chi_; // starting chi angles
42  vector1<Real> min_chi_; // minimized chi angles
43  vector1<int> lib_chi_val_; // rotamer number for dunbrack format
44  vector1<Real> std_dev_; // standard deviation of chi angles
45  vector1<Real> cen_dst_; // distance from each centroid
46 
47  // for debuging
54 
55 public:
56  void set_twist( Real twist ) {
57  twist_ = twist;
58  }
59  void set_inter_rep( Real inter_rep ) {
60  inter_rep_ = inter_rep;
61  }
62  void set_inter_atr( Real inter_atr ) {
63  inter_atr_ = inter_atr;
64  }
65  void set_intra_rep( Real intra_rep ) {
66  intra_rep_ = intra_rep;
67  }
68  void set_intra_atr( Real intra_atr ) {
69  intra_atr_ = intra_atr;
70  }
71  void set_solvation( Real solvation ) {
72  solvation_ = solvation;
73  }
74 
76  return twist_;
77  }
79  return inter_rep_;
80  }
82  return inter_atr_;
83  }
85  return intra_rep_;
86  }
88  return intra_atr_;
89  }
91  return solvation_;
92  }
93 
94  public:
95  // ctor
96  RotData( Size NumChi, Size NumCluster );
97 
98  // setters and getters
99  void set_phi (Real Phi) {
100  phi_ = Phi;
101  }
102  void set_psi (Real Psi) {
103  psi_ = Psi;
104  }
105  void set_omega (Real Omega) {
106  omega_ = Omega;
107  }
108  void set_min_omega (Real MinOmega) {
109  min_omega_ = MinOmega;
110  }
111  void set_epsilon (Real Epsilon) {
112  epsilon_ = Epsilon;
113  }
114  void set_min_epsilon (Real MinEpsilon) {
115  min_epsilon_ = MinEpsilon;
116  }
118  return phi_;
119  }
121  return psi_;
122  }
124  return omega_;
125  }
127  return min_omega_;
128  }
130  return epsilon_;
131  }
133  return min_epsilon_;
134  }
135 
137  energy_ = Energy;
138  }
139 
141  return energy_;
142  }
143 
145  probability_ = Probability;
146  }
147 
149  return probability_;
150  }
151 
152  void set_num_chi(Size Num_Chi) {
153  num_chi_ = Num_Chi;
154  }
155 
157  return num_chi_;
158  }
159 
160  void set_num_clusters( Size num ) {
161  num_clusters_ = num;
162  }
163 
165  return num_clusters_;
166  }
167 
168  void set_cluster_num (Size Cluster_Num) {
169  cluster_num_ = Cluster_Num;
170  }
171 
173  return cluster_num_;
174  }
175 
176  void set_inp_chi( Real angle, Size num ) {
177  inp_chi_[ num ] = numeric::nonnegative_principal_angle_degrees( angle );
178  }
179 
181  return inp_chi_[ num ];
182  }
183 
184  void set_min_chi ( Real angle, Size num) {
185  min_chi_[ num ] = numeric::nonnegative_principal_angle_degrees( angle );
186  }
187 
189  return min_chi_[ num ];
190  }
191 
192  void set_lib_chi_val ( int val, Size num) {
193  lib_chi_val_[ num ] = val;
194  }
195 
197  return lib_chi_val_[ num ];
198  }
199 
200  void set_std_dev (Real STD, Size num) {
201  std_dev_[ num ] = STD;
202  }
203 
205  return std_dev_[ num ];
206  }
207 
208  void set_cen_dist(Real dist , Size num) {
209  cen_dst_[ num ]= dist;
210  }
211 
213  return cen_dst_[ num ];
214  }
215 
217  return arg_min( cen_dst_ ); //gets index of closest centroid
218  }
219 
220 };
221 
222 } // namespace MakeRotLib
223 } // namespace protocols
224 
225 #endif // INCLUDED_protocols_makerotlib_rotdata_HH