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
fldsgn
topology
StrandPairing.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 part of the Rosetta software suite and is made available under license.
5
// The Rosetta software is developed by the contributing members of the Rosetta Commons consortium.
6
// Copyright in the Rosetta software belongs to the developers and their institutions.
7
// For more information, see www.rosettacommons.org.
8
9
/// @file ./src/protocols/fldsgn/topology/StrandPairing.hh
10
/// @brief
11
/// @author Nobuyasu Koga ( nobuyasu@u.washington.edu )
12
13
#ifndef INCLUDED_protocols_fldsgn_topology_StrandPairing_hh
14
#define INCLUDED_protocols_fldsgn_topology_StrandPairing_hh
15
16
// Unit headers
17
#include <
protocols/fldsgn/topology/StrandPairing.fwd.hh
>
18
19
// Project headers
20
#include <
core/types.hh
>
21
#include <
protocols/fldsgn/topology/DimerPairing.fwd.hh
>
22
// AUTO-REMOVED #include <protocols/fldsgn/topology/SS_Info2.hh>
23
24
// Utility headers
25
#include <utility/pointer/ReferenceCount.hh>
26
27
#include <
protocols/fldsgn/topology/SS_Info2.fwd.hh
>
28
#include <utility/vector1.hh>
29
#include <map>
30
#include <string>
31
32
33
namespace
protocols {
34
namespace
fldsgn {
35
namespace
topology {
36
37
class
StrandPairing
:
public
utility::pointer::ReferenceCount
{
38
public
:
39
40
typedef
std::string
String
;
41
typedef
core::Size
Size
;
42
typedef
core::Real
Real
;
43
typedef
protocols::fldsgn::topology::SS_Info2_OP
SS_Info2_OP
;
44
typedef
protocols::fldsgn::topology::SS_Info2_COP
SS_Info2_COP
;
45
46
public
:
// construct/destruct
47
48
49
/// @brief default constructor
50
StrandPairing
();
51
52
/// @brief value constructor
53
StrandPairing
(
54
Size
const
s1
,
55
Size
const
s2
,
56
Size
const
b1,
57
Size
const
b2,
58
Size
const
p,
59
Real
const
rs,
60
char
const
o
61
);
62
63
/// @brief value constructor
64
StrandPairing
(
65
Size
const
s1
,
66
Size
const
s2
,
67
Real
const
rs,
68
char
const
o
69
);
70
71
/// @brief copy constructor
72
StrandPairing
(
String
const
& spair);
73
74
/// @brief copy constructor
75
StrandPairing
(
StrandPairing
const
& sp );
76
77
/// @brief default destructor
78
virtual
~StrandPairing
();
79
80
/// @brief clone this object
81
StrandPairingOP
clone
();
82
83
/// @brief return strand pairing
84
friend
85
std::ostream &
operator<<
(std::ostream & out,
const
StrandPairing
&sp);
86
87
88
public
:
//accessors
89
90
91
/// @brief the strand number of the 1st strand in strand pairing
92
inline
Size
s1
()
const
{
return
s1_
; }
93
94
/// @brief the strand number of the 2nd strand in strand pairing
95
inline
Size
s2
()
const
{
return
s2_
; }
96
97
/// @brief the residue number of the beginning of 1st strand
98
inline
Size
begin1
()
const
{
return
begin1_
; }
99
100
/// @brief the residue number of the end of 1st strand
101
inline
Size
end1
()
const
{
return
end1_
; }
102
103
/// @brief the residue number of the beginning of 2nd strand
104
inline
Size
begin2
()
const
{
return
begin2_
; }
105
106
/// @brief the residue number of the end of 2nd strand
107
inline
Size
end2
()
const
{
return
end2_
; }
108
109
/// @brief the number of register shift between the strands
110
inline
Real
rgstr_shift
()
const
{
return
rgstr_shift_
; }
111
112
/// @brief the pleating at the begining of strand_pairing
113
inline
utility::vector1< Size >
pleats1
()
const
{
return
pleats1_
; }
114
115
/// @brief the pleating at the end of strand_pairing
116
inline
utility::vector1< Size >
pleats2
()
const
{
return
pleats2_
; }
117
118
/// @brief orientation, parallel or anti-parallel, of strand pairing
119
inline
char
orient
()
const
{
return
orient_
; }
120
121
/// @brief whether the strand pairing have bulge or not
122
inline
bool
has_bulge
()
const
{
return
has_bulge_
; }
123
124
/// @brief StrandPairing is descripbed as s1()-s2().orient().rgstr_shift()
125
/// For example, 2-3.A.1 means 2nd and 3rd strands make anti-parallel strand_pairing with register shift 1
126
inline
String
name
()
const
{
return
name_
; }
127
128
/// @brief residue pair
129
Size
residue_pair
(
Size
const
res );
130
131
132
public
:
133
134
135
/// @brief elongate strand pairings
136
bool
elongate
(
Size
const
r1,
Size
const
r2,
Size
const
p1,
Size
const
p2 );
137
138
/// @brief
139
bool
add_pair
(
Size
const
r1,
Size
const
r2,
char
const
orient
,
Real
const
rgstr );
140
141
/// @brief the length of 1st strand
142
Size
size1
()
const
;
143
144
/// @brief the length of 2nd strand
145
Size
size2
()
const
;
146
147
/// @brief is parallel
148
bool
is_parallel
()
const
;
149
150
/// @brief whether input residue is included in this StrandPairinge or not
151
bool
is_member
(
Size
const
res );
152
153
/// @brief reset begin1_, begin2_, and end1_, end2_ based on ssinfo
154
void
redefine_begin_end
(
SS_Info2_COP
const
ss_info );
155
156
157
private
:
// initialize
158
159
160
void
initialize
();
161
162
163
private
:
// data
164
165
166
/// @brief Strand number of first strand in the strand pair
167
Size
s1_
;
168
169
/// @brief Strand number of second strand in the strand pair
170
Size
s2_
;
171
172
/// @brief end resides of first and second strands
173
Size
begin1_
,
end1_
,
begin2_
,
end2_
;
174
175
/// @brief pleats of end residues
176
utility::vector1< Size >
pleats1_
,
pleats2_
;
177
178
/// @brief register shift between two strands
179
Real
rgstr_shift_
;
180
181
/// @brief two strands make a sheet by parallel, "P", anti parallel, "A", and
182
/// if not defined, "N"
183
char
orient_
;
184
185
/// @brief
186
bool
has_bulge_
;
187
188
/// @brief strand_pairing as in the style: s1_-s2_.orient_.rgstr_shift_
189
String
name_
;
190
191
/// @brief residue pair
192
std::map< Size, Size >
residue_pair_
;
193
194
195
};
196
197
198
////////////////////////////////////////////////////////////////////////////////////////////////////////////
199
class
StrandPairingSet
:
public
utility::pointer::ReferenceCount
{
200
public
:
// typedef
201
202
203
typedef
std::string
String
;
204
typedef
core::Size
Size
;
205
typedef
utility::vector1< Size >
VecSize
;
206
typedef
protocols::fldsgn::topology::SS_Info2
SS_Info2
;
207
typedef
protocols::fldsgn::topology::SS_Info2_COP
SS_Info2_COP
;
208
typedef
protocols::fldsgn::topology::DimerPairing
DimerPairing
;
209
typedef
protocols::fldsgn::topology::DimerPairings
DimerPairings
;
210
211
212
public
:
// construct/destruct
213
214
215
/// @brief default constructor
216
StrandPairingSet
();
217
218
/// @brief value constructor
219
StrandPairingSet
(
StrandPairings
const
&
strand_pairings
);
220
221
/// @brief value constructor
222
StrandPairingSet
(
SS_Info2
const
& ssinfo,
DimerPairings
const
& dimer_pairs );
223
224
/// @brief value constructor
225
StrandPairingSet
(
String
const
& spairstring,
SS_Info2_COP
const
ssinfo = NULL );
226
227
/// @brief copy constructor
228
StrandPairingSet
(
StrandPairingSet
const
& s );
229
230
/// @brief default destructor
231
virtual
~StrandPairingSet
();
232
233
/// @brief clone this object
234
StrandPairingSetOP
clone
()
const
;
235
236
/// @brief return strand pairing
237
friend
std::ostream &
operator<<
( std::ostream & out,
const
StrandPairingSet
&s );
238
239
240
public
:
// mutators
241
242
243
/// @brief add StrandPairingOP to StandPairingSet
244
void
push_back
(
StrandPairingOP
const
sop );
245
246
/// @brief add StrandPairingOP to StandPairingSet
247
void
push_back_and_finalize
(
StrandPairingOP
const
sop );
248
249
/// @brief clear data of this StrandPairingSet
250
void
clear
();
251
252
253
public
:
// accessors
254
255
256
/// @brief return begin of iterator of strand_pairings_
257
StrandPairings::const_iterator
begin
() {
return
strand_pairings_
.begin(); }
258
259
/// @brief return end of iterator of strand_pairings_
260
StrandPairings::const_iterator
end
() {
return
strand_pairings_
.end(); }
261
262
/// @brief
263
Size
size
()
const
;
264
265
266
public
:
// accessors
267
268
/// @brief
269
bool
finalized
()
const
{
return
finalized_
; }
270
271
/// @brief return all strand pairings
272
Size
num_strands
()
const
{
return
num_strands_
; };
273
274
/// @brief return all strand pairings
275
StrandPairings
const
&
strand_pairings
()
const
;
276
277
/// @brief return one of the strand_pairings given a number
278
StrandPairingOP
strand_pairing
(
Size
const
s )
const
;
279
280
/// @brief return the pointer of the strand pairing, given the two strand numbers of s1, and s2
281
/// if s1 and s2 does not make pairing, return 0
282
StrandPairingOP
strand_pairing
(
Size
const
s1,
Size
const
s2 )
const
;
283
284
/// @brief return strand number of neighbor strands of a input strand
285
VecSize
const
&
neighbor_strands
(
Size
const
s )
const
;
286
287
288
public
:
289
290
291
/// @brief the name of StrandPairingSet is expressed by the combination of strand pairings
292
/// For example, 2kl8 of ferredoxin-like fold is described as 1-3.A.0;2-3.A.0;1-4.A.0
293
String
name
()
const
;
294
295
/// @brief the name of StrandPairingSet without register shift
296
/// For example, 2kl8 of ferredoxin-like fold is described as 1-3.A;2-3.A;1-4.A
297
String
name_wo_rgstr
()
const
;
298
299
300
public
:
301
302
303
/// @brief make the number of strand pairing as two
304
void
make_strand_neighbor_two
();
305
306
/// @brief remove a set of strand pairings from datay
307
void
drop_strand_pairs
(
StrandPairings
const
& drop_spairs );
308
309
/// @brief finalize this and create_map_strand_pairings
310
void
finalize
();
311
312
313
private
:
314
315
316
void
initialize_by_dimer_pairs
(
SS_Info2
const
& ssinfo,
DimerPairings
const
& dimer_pairs );
317
318
319
private
:
// data
320
321
322
/// @brief vector1 including owning pointers of StrandPairing
323
StrandPairings
strand_pairings_
;
324
325
/// @brief the name of StrandPairingSet is expressed by the combination of strand pairings
326
/// For example, 2kl8 of ferredoxin-like fold is given as 1-3.A.0;2-3.A.0;1-4.A.0
327
String
spairset_name_
;
328
329
/// @brief the total number of strands included in StrandPairingSet
330
Size
num_strands_
;
331
332
/// @brief whether the map_strand_pairings_ is initialized or not
333
bool
finalized_
;
334
335
/// @brief 2D table of the pointers of strand pairings, which are sorted by the strand number
336
utility::vector1< utility::vector1< StrandPairingOP >
>
map_strand_pairings_
;
337
338
// @brief neighbor strasnd
339
mutable
std::map< Size, VecSize >
neighbor_strands_
;
340
341
// @brief
342
StrandPairingOP
empty_
;
343
344
345
346
};
// StrandPairingSet
347
348
}
// namespace topology
349
}
// namespace fldsgn
350
}
// namespace protocols
351
352
#endif
Generated on Sat Jun 1 2013 11:36:21 for Rosetta 3.5 by
1.8.4