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
forge
build
SegmentRebuild.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
/// @file protocols/forge/build/SegmentRebuild.hh
11
/// @brief instruction to rebuild a segment
12
/// @author Yih-En Andrew Ban (yab@u.washington.edu)
13
14
#ifndef INCLUDED_protocols_forge_build_SegmentRebuild_hh
15
#define INCLUDED_protocols_forge_build_SegmentRebuild_hh
16
17
// unit headers
18
#include <
protocols/forge/build/SegmentRebuild.fwd.hh
>
19
20
// package headers
21
#include <
protocols/forge/build/BuildInstruction.hh
>
22
23
// project headers
24
// AUTO-REMOVED #include <core/conformation/Conformation.fwd.hh>
25
#include <
core/conformation/signals/LengthEvent.fwd.hh
>
26
#include <
core/pose/Pose.fwd.hh
>
27
28
// C++ headers
29
#include <string>
30
31
#include <utility/vector1.hh>
32
33
34
35
namespace
protocols {
36
namespace
forge {
37
namespace
build {
38
39
40
/// @brief instruction to rebuild a segment
41
/// @remarks Handles both cut based rebuilding (i.e. loops) and continuous
42
/// rebuilding adjacent to the boundary of a chain, such as n-term/c-term
43
/// extensions.
44
class
SegmentRebuild
:
public
BuildInstruction
{
45
46
47
private
:
// typedefs
48
49
50
typedef
BuildInstruction
Super
;
51
52
53
public
:
// typedefs
54
55
56
typedef
Super::Size
Size
;
57
typedef
Super::Real
Real
;
58
59
typedef
Super::ResidueTypeSetCAP
ResidueTypeSetCAP
;
60
typedef
Super::LengthEvent
LengthEvent
;
61
typedef
Super::MoveMap
MoveMap
;
62
typedef
Super::Pose
Pose
;
63
64
typedef
Super::Positions
Positions
;
65
typedef
Super::String
String
;
66
67
68
public
:
// construct/destruct
69
70
71
/// @brief default constructor
72
SegmentRebuild
();
73
74
75
/// @brief sec.struct only constructor (poly-alanine for new region)
76
/// @param[in] interval rebuild this range of residues
77
/// @param[in] ss the secondary structure desired, also defines length of new build region
78
/// @param[in] rts the residue type set to use, default FA_STANDARD
79
/// @param[in] keep_known_bb_torsions_at_junctions Attempt to keep the omega
80
/// at original_interval().left-1, the phi at original_interval().left, and
81
/// the psi+omega at original_interval().right present from the original Pose
82
/// in the modified Pose.
83
/// @remarks length of the *one-letter* aa must equal the length of ss
84
SegmentRebuild
(
85
Interval
const
& i,
86
String
const
&
ss
,
87
ResidueTypeSetCAP
rts =
core::chemical::ChemicalManager::get_instance
()->
residue_type_set
(
core::chemical::FA_STANDARD
),
88
bool
const
keep_known_bb_torsions_at_junctions
=
false
89
);
90
91
92
/// @brief full constructor
93
/// @param[in] interval rebuild this range of residues
94
/// @param[in] ss the secondary structure desired, also defines length of new build region
95
/// @param[in] aa the annotated amino acid sequence desired, default is poly-alanine
96
/// @param[in] rts the residue type set to use, default FA_STANDARD
97
/// @param[in] keep_known_bb_torsions_at_junctions Attempt to keep the omega
98
/// at original_interval().left-1, the phi at original_interval().left, and
99
/// the psi+omega at original_interval().right present from the original Pose
100
/// in the modified Pose.
101
/// @remarks length of the *one-letter* aa must equal the length of ss
102
SegmentRebuild
(
103
Interval
const
& i,
104
String
const
& ss,
105
String
const
&
aa
,
106
ResidueTypeSetCAP
rts =
core::chemical::ChemicalManager::get_instance
()->
residue_type_set
(
core::chemical::FA_STANDARD
),
107
bool
const
keep_known_bb_torsions_at_junctions
=
false
108
);
109
110
111
/// @brief copy constructor
112
SegmentRebuild
(
SegmentRebuild
const
& rval );
113
114
115
/// @brief default destructor
116
virtual
117
~SegmentRebuild
();
118
119
120
public
:
// assignment
121
122
123
/// @brief copy assignment
124
SegmentRebuild
&
operator =
(
SegmentRebuild
const
& rval );
125
126
127
public
:
// virtual constructors
128
129
130
/// @brief clone this object
131
virtual
132
BuildInstructionOP
clone
()
const
;
133
134
135
public
:
// accessors
136
137
138
/// @brief get secondary structure string
139
inline
140
String
const
&
ss
()
const
{
141
return
ss_
;
142
}
143
144
145
/// @brief get annotated amino acid string
146
inline
147
String
const
&
aa
()
const
{
148
return
aa_
;
149
}
150
151
152
/// @brief Attempt to keep the omega at original_interval().left-1, the phi
153
/// at original_interval().left and the psi+omega at original_interval().right
154
/// present from the original Pose in the modified Pose? Default False
155
inline
156
bool
keep_known_bb_torsions_at_junctions
()
const
{
157
return
keep_known_bb_torsions_at_junctions_
;
158
}
159
160
161
public
:
// virtual accessors
162
163
164
/// @brief is the original interval storing valid information, or is empty
165
/// or being used for something else?
166
/// @return true, stores valid interval
167
inline
168
virtual
169
bool
original_interval_valid
()
const
{
170
return
true
;
171
}
172
173
174
/// @brief a copy of the working range of residues specifying the modified region
175
/// @remarks this can change if listening to Conformation LengthEvents
176
inline
177
virtual
178
Interval
interval
()
const
{
179
return
interval_
;
180
}
181
182
183
/// @brief return a copy of the set of positions within the new region
184
/// that were pre-existing in the original Pose prior to modify()
185
/// @return An empty set -- no positions are pre-existing.
186
virtual
187
Positions
preexisting_positions
()
const
;
188
189
190
/// @brief return a copy of the set of positions that are "new" and did
191
/// not exist in the original Pose.
192
/// @return A set of positions spanning the entire modified interval -- all
193
/// positions are undefined.
194
virtual
195
Positions
new_positions
()
const
;
196
197
198
/// @brief return a copy of the set of positions within the newly modified
199
/// region that has a defined conformation. E.g. existing or copied residues.
200
/// @return An empty set -- no positions are defined.
201
/// @details This set can change wrt length changes in Pose/Conformation being
202
/// watched.
203
virtual
204
Positions
defined_positions
()
const
;
205
206
207
/// @brief return a copy of the set of positions within the newly modified
208
/// region that has an undefined conformation. E.g. newly created residues.
209
/// @return A set of positions spanning the entire modified interval -- all
210
/// positions are undefined.
211
/// @details This set can change wrt length changes in Pose/Conformation being
212
/// watched.
213
virtual
214
Positions
undefined_positions
()
const
;
215
216
217
/// @brief return a copy of the MoveMap that defines the moveable/fixed
218
/// positions/dofs for this instruction
219
/// @return a MoveMap with [interval.left, interval.right] bb & chi set to true
220
/// at the MoveMapTorsionID level
221
/// @details This set can change wrt length changes in Pose/Conformation being
222
/// watched.
223
virtual
224
MoveMap
movemap
()
const
;
225
226
227
public
:
// virtual Conformation observer interface
228
229
230
/// @brief update indexing on residue append
231
virtual
232
void
on_residue_append
(
LengthEvent
const
& event );
233
234
235
/// @brief update indexing on residue prepend
236
virtual
237
void
on_residue_prepend
(
LengthEvent
const
& event );
238
239
240
/// @brief update indexing on residue delete
241
virtual
242
void
on_residue_delete
(
LengthEvent
const
& event );
243
244
245
public
:
// original positions
246
247
248
/// @brief return the set of positions within the original interval that
249
/// will be kept in this BuildInstruction
250
/// @return An empty set -- no positions are kept.
251
virtual
252
Positions
original_kept_positions
()
const
;
253
254
255
/// @brief return set of positions within the original interval that will
256
/// be deleted in this BuildInstruction
257
/// @return A set containing all positions in the original interval.
258
virtual
259
Positions
original_deleted_positions
()
const
;
260
261
262
public
:
// instruction comparison
263
264
265
/// @brief return set of any fixed positions necessary with respect to the original
266
/// interval and original Pose numbering
267
/// @remarks Used for ensuring build regions for instructions do not overlap and
268
/// so that jumps may be placed correctly. If SegmentRebuild has dependencies,
269
/// the set of positions shrinks from the endpoints of [original_left - 1, original_right + 1]
270
/// down to an empty set in the assumption that the user is requesting an
271
/// advanced feature and knows what they're doing around the endpoints,
272
/// e.g. rebuilding directly adjacent to a swapped out section.
273
/// @return empty set if no fixed positions
274
virtual
275
Positions
original_fixed_positions
()
const
;
276
277
278
/// @brief return set of any mutable positions necessary with respect to the original
279
/// interval and original Pose numbering
280
/// @remarks Used for ensuring build regions for instructions do not overlap and
281
/// so that jumps may be placed correctly.
282
/// @return empty set if no mutable positions
283
virtual
284
Positions
original_mutable_positions
()
const
;
285
286
287
public
:
// virtual object descriptor
288
289
290
/// @brief does this object create undefined backbone in the modified region?
291
/// @return true
292
inline
293
virtual
294
bool
creates_undefined_backbone
()
const
{
295
return
true
;
296
}
297
298
299
protected
:
// virtual Pose modification methods
300
301
302
/// @brief are dependencies satisfied so that modify_impl() can complete
303
/// successfully?
304
/// @return always True, this BuildInstruction has no dependencies
305
inline
306
virtual
307
bool
dependencies_satisfied
()
const
{
308
return
true
;
309
}
310
311
312
/// @brief do the actual work of modifying the Pose
313
virtual
314
void
modify_impl
(
Pose
& pose );
315
316
317
protected
:
// virtual mutators
318
319
320
/// @brief do the actual reset of intervals, positions, etc to initial state
321
virtual
322
void
reset_accounting_impl
();
323
324
325
private
:
// data
326
327
328
/// @brief the working range of residues
329
/// @remarks this range can shift if listening to a Pose/Conformation and the number
330
/// of residues changes
331
Interval
interval_
;
332
333
334
/// @brief secondary structure string, also defines length of extension
335
String
ss_
;
336
337
338
/// @brief annotated amino acid string, length of the one-letter version
339
/// must be equal to length of ss
340
String
aa_
;
341
342
343
/// @brief Attempt to keep the omega at original_interval().left-1, the phi
344
/// at original_interval().left and the psi+omega at original_interval().right
345
/// present from the original Pose in the modified Pose?
346
/// @details If True, during modify(), will (1) set the omega of interval_.left-1
347
/// in the newly modified Pose equal to the omega of the original Pose at
348
/// original_interval().left-1, (2) set the phi of interval_.left in
349
/// the newly modified Pose equal to the phi of the original Pose in
350
/// original_interval().right, and (3) set the psi+omega of interval_.right
351
/// in the newly modified Pose equal to the original psi+omega of
352
/// original_interval().right. Default False.
353
bool
keep_known_bb_torsions_at_junctions_
;
354
355
356
};
357
358
359
}
// namespace build
360
}
// namespace forge
361
}
// namespace protocols
362
363
364
#endif
/* INCLUDED_protocols_forge_build_SegmentRebuild_HH */
Generated on Sat Jun 1 2013 11:51:47 for Rosetta 3.5 by
1.8.4