Rosetta 3.5
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
protocols
scoring
methods
pcs
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
36
#include <
protocols/scoring/methods/pcs/PseudocontactShiftInput.fwd.hh
>
37
#include <
protocols/scoring/methods/pcs/PseudocontactShiftTensor.fwd.hh
>
38
#include <
protocols/scoring/methods/pcs/PseudocontactShiftData.fwd.hh
>
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
58
#include <
protocols/scoring/methods/pcs/PseudocontactShiftInput.hh
>
59
#include <
protocols/scoring/methods/pcs/PseudocontactShiftTensor.hh
>
60
#include <
protocols/scoring/methods/pcs/PseudocontactShiftData.hh
>
61
#endif
62
63
64
65
namespace
protocols{
66
namespace
scoring{
67
namespace
methods{
68
namespace
pcs
{
69
70
class
PCS_data_per_lanthanides
{
71
private
:
72
std::string
const
filename_
;
73
core::Size
n_pcs_
;
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_
;
81
core::Real
const
weight_
;
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 )
85
core::Real
normalization_factor_
;
86
public
:
87
//PCS_data_per_lanthanides(std::string, PCS_file_data & P_f_d, core::Real const weight);
88
89
PCS_data_per_lanthanides
(
std::string
,
core::Real
const
weight,
utility::vector1< PCS_line_data >
& PCS_d_l_a);
90
91
private
:
92
PCS_data_per_lanthanides
();
93
94
public
:
95
~PCS_data_per_lanthanides
();
96
97
PCS_data_per_lanthanides
(
PCS_data_per_lanthanides
const
&other);
98
99
PCS_data_per_lanthanides
&
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
106
update_my_A_matrix
(
utility::vector1
<
utility::vector1<core::Real>
> & A_all);
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
133
std::string
134
get_filename
()
const
;
135
136
core::Size
137
get_n_pcs
()
const
;
138
139
utility::vector1<core::Size>
const
&
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
150
calculate_tensor_and_cost_with_svd
(
PCS_tensor
&PCS_t);
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
:
159
core::Size
n_lanthanides_
;
160
core::Size
n_pcs_spin_
;
161
utility::vector1<PCS_line_data>
PCS_data_line_all_spin_
;
162
utility::vector1<PCS_data_per_lanthanides>
PCS_data_per_lanthanides_all_
;
163
utility::vector1< utility::vector1<core::Real>
>
A_all_
;
164
utility::vector1<core::Real>
X_all_
;
165
utility::vector1<core::Real>
Y_all_
;
166
utility::vector1<core::Real>
Z_all_
;
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
190
utility::vector1<core::Real>
const
&
191
get_X_all
()
const
;
192
193
utility::vector1<core::Real>
const
&
194
get_Y_all
()
const
;
195
196
utility::vector1<core::Real>
const
&
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
206
update_matrix_A_all
(
core::Real
const
X
,
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
214
utility::vector1<PCS_data_per_lanthanides>
&
215
get_pcs_data_per_lanthanides_all
();
216
217
const
utility::vector1<PCS_line_data>
&
218
get_PCS_data_line_all_spin
()
const
;
219
220
const
utility::vector1<PCS_data_per_lanthanides>
&
221
get_pcs_data_per_lanthanides_all
()
const
;
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
232
fill_A_line
(
utility::vector1<core::Real>
& A_line,
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
Generated on Sat Jun 1 2013 12:10:42 for Rosetta 3.5 by
1.8.4