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
core
io
silent
ProteinSilentStruct.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
// :noTabs=false:tabSize=4:indentSize=4:
4
//
5
// (c) Copyright Rosetta Commons Member Institutions.
6
// (c) This file is part of the Rosetta software suite and is made available under license.
7
// (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
8
// (c) For more information, see http://www.rosettacommons.org. Questions about this can be
9
// (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
10
11
/// @file core/io/silent/ProteinSilentStruct.hh
12
///
13
/// @brief Representation of rosetta++ protein silent-file structures.
14
/// @author James Thompson, Mike Tyka
15
16
#ifndef INCLUDED_core_io_silent_ProteinSilentStruct_hh
17
#define INCLUDED_core_io_silent_ProteinSilentStruct_hh
18
19
// mini headers
20
#include <
core/types.hh
>
21
#include <
core/pose/Pose.fwd.hh
>
22
23
#include <
core/conformation/symmetry/SymmetryInfo.hh
>
24
// AUTO-REMOVED #include <core/conformation/symmetry/SymDof.hh>
25
26
#include <
core/io/silent/SilentStruct.hh
>
27
#include <
core/kinematics/FoldTree.hh
>
28
#include <
core/kinematics/Jump.hh
>
29
30
#include <utility/pointer/ReferenceCount.hh>
31
32
// C++ Headers
33
#include <string>
34
35
#include <utility/vector1.hh>
36
37
38
namespace
core {
39
namespace
io {
40
namespace
silent {
41
42
43
44
template
<
class
T>
45
class
ProteinSilentStruct_Template
:
public
SilentStruct
{
46
47
public
:
48
ProteinSilentStruct_Template
(
49
core::pose::Pose
const
& pose,
50
std::string
tag =
"empty_tag"
,
51
bool
fa =
false
52
) :
fullatom_
( fa )
53
{
54
bJumps_use_IntraResStub_
=
false
;
55
symminfo_
=
new
core::conformation::symmetry::SymmetryInfo
();
56
symminfo_
->set_use_symmetry(
false
);
57
fill_struct
( pose, tag );
58
}
// ProteinSilentStruct
59
60
/// @brief Constructors.
61
ProteinSilentStruct_Template
(
Size
const
nres_in )
62
{
63
nres
( nres_in );
64
fullatom_
=
false
;
65
decoy_tag
(
"empty_tag"
);
66
resize
( nres_in );
67
//fold_tree_ = core::kinematics::FoldTree();
68
bJumps_use_IntraResStub_
=
false
;
69
symminfo_
=
new
core::conformation::symmetry::SymmetryInfo
();
70
symminfo_
->set_use_symmetry(
false
);
71
}
72
73
ProteinSilentStruct_Template
()
74
{
75
nres
( 0 );
76
decoy_tag
(
"empty_tag"
);
77
fullatom
(
false
);
78
bJumps_use_IntraResStub_
=
false
;
79
symminfo_
=
new
core::conformation::symmetry::SymmetryInfo
();
80
symminfo_
->set_use_symmetry(
false
);
81
}
82
83
// ProteinSilentStruct_Template(
84
// core::pose::Pose const & pose,
85
// std::string tag = "empty_tag",
86
// bool fa = false
87
// );
88
89
/// @brief Returns a new ProteinSilentStruct with a copy of the information
90
/// in this ProteinSilentStruct.
91
virtual
SilentStructOP
clone
()
const
{
92
return
new
ProteinSilentStruct_Template<T>
( *this );
93
}
94
95
// destructor
96
~ProteinSilentStruct_Template
() {}
97
98
/// @brief Test if this ProteinSilentStruct is equal to the given
99
/// ProteinSilentStruct_Template<T> in terms of conformation. Doesn't check energies.
100
ProteinSilentStruct_Template<T>
&
operator=
(
101
ProteinSilentStruct_Template<T>
const
& src
102
);
103
104
/// @brief Tells this ProteinSilentStruct object to initialize itself from
105
//the given set of lines.
106
virtual
bool
init_from_lines
(
107
utility::vector1< std::string >
const
& lines,
108
SilentFileData
& container
109
);
110
111
/// @brief Configure the conformation of the given Pose with the
112
/// conformational data within this ProteinSilentStruct.
113
/// Calls pose.clear() and rebuilds Pose from scratch using FA_STANDARD
114
/// residue types.
115
virtual
void
fill_pose
(
116
core::pose::Pose
& pose
117
)
const
;
118
119
/// @brief Configure the conformation of the given Pose with the
120
/// conformational data within this ProteinSilentStruct. Calls pose.clear()
121
/// and rebuilds Pose from scratch using the user-specified residue types.
122
virtual
void
fill_pose
(
123
core::pose::Pose
& pose,
124
core::chemical::ResidueTypeSet
const
& residue_set
125
)
const
;
126
127
/// @brief opposite of fill_pose
128
virtual
void
fill_struct
(
129
core::pose::Pose
const
& pose,
130
std::string
tag =
"empty_tag"
131
);
132
133
/// @brief Prints the conformation information within this
134
// ProteinSilentStruct to the given std::ostream.
135
virtual
void
print_conformation
( std::ostream & output )
const
;
136
137
/// @brief data getters/setters
138
bool
fullatom
()
const
{
139
return
fullatom_
;
140
}
141
142
virtual
void
fullatom
(
bool
fullatom
) {
143
fullatom_
=
fullatom
;
144
}
145
146
Real
phi
(
Size
const
seqpos )
const
{
147
return
phi_
[seqpos];
148
}
149
150
Real
psi
(
Size
const
seqpos )
const
{
151
return
psi_
[seqpos];
152
}
153
154
Real
omega
(
Size
const
seqpos )
const
{
155
return
omega_
[seqpos];
156
}
157
158
char
secstruct
(
Size
const
seqpos )
const
{
159
return
secstruct_
[seqpos];
160
}
161
162
// not safe, therefore deprecated.
163
164
Real
chi
(
Size
const
seqpos,
Size
const
chi_num )
const
;
165
166
/// @brief returns the number of chis at this position.
167
Size
n_chi
(
Size
const
seqpos )
const
;
168
169
numeric::xyzVector<T>
const
&
coords
(
Size
const
seqpos )
const
{
170
return
coords_
[seqpos];
171
}
172
173
utility::vector1< numeric::xyzVector<T>
>
const
&
coords
()
const
{
174
return
coords_
;
175
}
176
177
void
phi
(
Size
const
seqpos,
Real
const
phi
) {
178
phi_
[seqpos] =
phi
;
179
}
180
181
void
psi
(
Size
const
seqpos,
Real
const
psi
) {
182
psi_
[seqpos] =
psi
;
183
}
184
185
void
omega
(
Size
const
seqpos,
Real
const
omega
) {
186
omega_
[seqpos] =
omega
;
187
}
188
189
void
secstruct
(
Size
const
seqpos,
char
const
ss ) {
190
secstruct_
[seqpos] = ss;
191
}
192
193
utility::vector1< Size >
const
&
chain_endings
()
const
{
194
return
chain_endings_
;
195
}
196
197
/// @brief set the list of chain endings
198
/// @remarks All positions in the list must be strictly less than the
199
/// number of residues in the data. If this condition is not met the
200
/// routine will fail-fast, so remember to resize() properly prior to
201
/// calling this function.
202
void
chain_endings
(
utility::vector1< Size >
const
& endings );
203
204
/// @brief add a chain ending to the list
205
/// @remarks All positions in the list must be strictly less than the
206
/// number of residues in the data. If this condition is not met
207
/// the routine will fail-fast, so remember to resize() properly prior
208
/// to calling this function.
209
void
add_chain_ending
(
Size
const
seqpos );
210
211
void
chi
(
Size
const
seqpos,
utility::vector1< T >
const
& chis );
212
213
void
chi
(
Size
const
seqpos,
Size
const
chi_num,
Real
const
chi
);
214
215
Size
max_chi
()
const
;
216
217
void
coords
(
Size
const
seqpos,
numeric::xyzVector<T>
const
&
coords
) {
218
coords_
[seqpos] =
coords
;
219
}
220
221
void
fold_tree
(
kinematics::FoldTree
const
& f ) {
222
fold_tree_
= f;
223
}
224
225
kinematics::FoldTree
const
&
fold_tree
( )
const
{
226
return
fold_tree_
;
227
}
228
229
//lin Symmetry
230
// @lin - move these to the .cc file so you can only include SymmetryInfo.fwd.hh!
231
bool
is_symmetric
()
const
{
return
symminfo_
->get_use_symmetry(); }
232
233
void
symmetry_info
(
core::conformation::symmetry::SymmetryInfo
& s ) {
234
symminfo_
=
new
core::conformation::symmetry::SymmetryInfo
( s );
235
}
236
237
core::conformation::symmetry::SymmetryInfoCOP
symmetry_info
( )
const
{
238
return
symminfo_
;
239
}
240
241
void
add_jump
(
kinematics::Jump
const
&
jump
) {
242
jumps_
.push_back( jump.
rt
() );
243
}
244
245
void
add_rt
(
kinematics::RT
const
& rt ) {
246
jumps_
.push_back( rt );
247
}
248
249
/// @brief returns the number of jumps held in this container.
250
Size
njumps
()
const
{
251
return
jumps_
.size();
252
}
253
254
// it's really odd that this function is called jump, but returns an RT.
255
kinematics::RT
const
&
jump
(
Size
const
jump_num )
const
{
256
return
jumps_
[ jump_num ];
257
}
258
259
// @brief returns the positions of the CA atoms in this
260
// ProteinSilentStruct. Useful for RMS calculations.
261
virtual
ObjexxFCL::FArray2D< Real >
get_CA_xyz
()
const
;
262
263
// model quality-related methods.
264
virtual
Real
CA_rmsd
(
ProteinSilentStruct_Template<T>
other_pss );
265
266
/// @brief calculates the RMSD between the C-alpha atoms of a Pose built from
267
/// the torsions in this ProteinSilentStruct and the C-alpha atoms from this
268
/// ProteinSilentStruct.
269
virtual
Real
get_debug_rmsd
();
270
271
static
bool
is_single_precision
();
272
273
protected
:
274
/// @brief parse the chain endings string from an input stream
275
void
parse_chain_endings
( std::istream & stream );
276
277
/// @brief return the chain endings string
278
std::string
chain_endings_str
()
const
;
279
280
private
:
// private member functions
281
/// @brief Re-dimension the storage capacity of this ProteinSilentStruct to
282
/// the given number of residues.
283
void
resize
(
Size
const
nres_in );
284
285
void
resize_chi
();
286
public
:
287
virtual
core::Size
mem_footprint
()
const
;
288
protected
:
289
const
static
Size
max_chi_
= 4;
// maximum number of chis for the classic rosetta++ silent-file format
290
bool
fullatom_
;
291
292
typename
utility::vector1< char >
secstruct_
;
293
typename
utility::vector1< T >
phi_
;
294
typename
utility::vector1< T >
psi_
;
295
typename
utility::vector1< T >
omega_
;
296
typename
utility::vector1< numeric::xyzVector < T >
>
coords_
;
297
utility::vector1< kinematics::RT >
jumps_
;
298
bool
bJumps_use_IntraResStub_
;
299
kinematics::FoldTree
fold_tree_
;
300
core::conformation::symmetry::SymmetryInfoOP
symminfo_
;
301
utility::vector1< Size >
chain_endings_
;
302
303
private
:
304
typename
utility::vector1< utility::vector1< T >
>
chi_
;
305
306
};
// class ProteinSilentStruct_Template
307
308
309
}
// namespace silent
310
}
// namespace io
311
}
// namespace core
312
313
#endif
314
315
// I will be removing this #include in not too long; if you need to use
316
// this class, you'll also have to #include the .tmpl.hh file.
317
// #include <core/io/silent/ProteinSilentStruct.tmpl.hh>
Generated on Sat Jun 1 2013 11:33:02 for Rosetta 3.5 by
1.8.4