Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PseudocontactShiftData.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  /// @begin
11  ///
12  /// @file PseudocontactShiftData.hh
13  ///
14  /// @brief Hold the PCS data on which the SVD will be applyed
15  ///
16  /// @detailed
17  ///
18  /// @param
19  ///
20  /// @return
21  ///
22  /// @remarks
23  ///
24  /// @references
25  ///
26  /// @authorsv Christophe Schmitz
27  ///
28  /// @last_modified June 2009
29  ////////////////////////////////////////////////
30 
31 
32 #ifndef INCLUDED_protocols_scoring_methods_pcs_PseudocontactShiftData_hh
33 #define INCLUDED_protocols_scoring_methods_pcs_PseudocontactShiftData_hh
34 
35 // Package headers
39 
40 // Project headers
41 #include <basic/datacache/CacheableData.hh>
42 #include <core/pose/Pose.fwd.hh>
43 #include <core/types.hh>
44 
45 // Numeric headers
46 #include <basic/svd/SVD_Solver.hh>
47 
48 // ObjexxFCL headers
49 #include <ObjexxFCL/FArray2D.hh>
50 #include <ObjexxFCL/FArray1D.hh>
51 
52 // C++ headers
53 // AUTO-REMOVED #include <iostream>
54 
55 #include <utility/vector1.hh>
56 
57 #ifdef WIN32
61 #endif
62 
63 
64 
65 namespace protocols{
66 namespace scoring{
67 namespace methods{
68 namespace pcs{
69 
71 private:
74 
75  utility::vector1<core::Size> A_index_; //index on the giant matrix A to build all the smalls matrix A_
76 
77  ObjexxFCL::FArray2D< core::Real > fstyle_A_; //We are going to SVD Ax = b
78  ObjexxFCL::FArray1D< core::Real > fstyle_b_; //I should make this one const
79 
80  basic::svd::SVD_Solver svd_s_;
82  core::Real normalization_1_; // SQRT(SUMi( PCS(calc,i)^2 ) )
83  core::Real normalization_2_; // Standard deviation
84  core::Real normalization_3_; // SQRT(SUMi( PCS(calc,i)^2 )/N )
86 public:
87  //PCS_data_per_lanthanides(std::string, PCS_file_data & P_f_d, core::Real const weight);
88 
90 
91 private:
93 
94 public:
96 
98 
100  operator=( PCS_data_per_lanthanides const & other );
101 
102  void
103  set_A_index(core::Size j, core::Size n_pcs_spin_);
104 
105  void
107 
108  core::Real
109  get_weight() const;
110 
111  /*
112  core::Real
113  get_normalization_1() const;
114 
115  core::Real
116  get_normalization_2() const;
117 
118  core::Real
119  get_normalization_3() const;
120  */
121 
122  core::Real
123  get_normalization_factor() const;
124 
125 
126  //For Debugging purpose
127  /*
128  void
129  print_index_A() const;
130  */
131 
132 
134  get_filename() const;
135 
136  core::Size
137  get_n_pcs() const;
138 
140  get_A_index() const;
141 
142  ObjexxFCL::FArray1D< core::Real > const &
143  get_fstyle_b() const;
144 
145  friend
146  std::ostream &
147  operator << ( std::ostream& out, const PCS_data_per_lanthanides &PCS_d_p_l );
148 
149  core::Real
151 
152  //core::Real calculate_tensor_and_cost_with_svd_precalc(PCS_tensor &PCS_t);
153 };
154 
155 
156 
157 class PCS_data : public basic::datacache::CacheableData {
158 private:
167 
168 public:
169  PCS_data();
170 
171  ~PCS_data();
172 
173  PCS_data(PCS_data_input & P_d_i);
174 
175  PCS_data(PCS_data_input & P_d_i, utility::vector1< bool > const exclude_residues );
176 
177  PCS_data(PCS_data const &other);
178 
179  PCS_data &
180  operator=( PCS_data const & src );
181 
182  virtual basic::datacache::CacheableDataOP
183  clone() const;
184 
185  //void update_matrix_fstyle_A();
186 
187  core::Size
188  get_n_lanthanides() const;
189 
191  get_X_all() const;
192 
194  get_Y_all() const;
195 
197  get_Z_all() const;
198 
199  core::Size
200  where_is_line(PCS_line_data & P_l_d);
201 
202  void
203  update_X_Y_Z_all(core::pose::Pose const & pose); //To be called each time the pose is changed
204 
205  void
207  core::Real const Y,
208  core::Real const Z);
209 
210  //void print_matrix_A_all() const;
211 
212  //void svd_matrix_A_all();
213 
216 
219 
222 
223  friend std::ostream &
224  operator<<(std::ostream& out, const PCS_data & P_d);
225 
226 private:
227  void
228  update_matrix_A();
229 };
230 
231 void
233  core::Real const xM,
234  core::Real const yM,
235  core::Real const zM,
236  core::Real const x,
237  core::Real const y,
238  core::Real const z
239 );
240 
241 }//namespace pcs
242 }//namespace methods
243 }//namespace scoring
244 }//namespace protocols
245 #endif