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
jumping
JumpSetup.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 JumpSetup
11
/// @brief read jump-definition file setups fold tree an chainbreak variants
12
/// loop code didn't work because fold-tree to complicated ( overlapping loops )
13
/// @detailed
14
/// @author Oliver Lange
15
16
17
#ifndef INCLUDED_protocols_jumping_JumpSetup_hh
18
#define INCLUDED_protocols_jumping_JumpSetup_hh
19
20
21
// Unit Headers
22
#include <
protocols/jumping/JumpSetup.fwd.hh
>
23
24
// Package Headers
25
//#include <protocols/jumping/PairingLibrary.hh>
26
#include <
protocols/jumping/JumpSample.hh
>
27
28
// Project Headers
29
#include <
core/types.hh
>
30
#include <
core/kinematics/ShortestPathInFoldTree.fwd.hh
>
31
#include <
core/kinematics/MoveMap.fwd.hh
>
32
33
#include <
core/pose/Pose.fwd.hh
>
34
#include <
core/fragment/FrameList.fwd.hh
>
35
#include <
core/fragment/FragSet.fwd.hh
>
36
//#include <core/scoring/constraints/ConstraintForest.fwd.hh>
37
38
39
// ObjexxFCL Headers
40
#include <ObjexxFCL/FArray1D.hh>
41
#include <ObjexxFCL/FArray2D.hh>
42
43
// Utility headers
44
// AUTO-REMOVED #include <utility/vector1.hh>
45
#include <utility/pointer/ReferenceCount.hh>
46
47
//// C++ headers
48
#include <cstdlib>
49
#include <string>
50
51
#include <utility/vector1.hh>
52
53
54
55
namespace
protocols {
56
namespace
jumping {
57
58
59
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
60
///@brief two numbers, i.e., jump start end residue, or cut-regions...
61
class
Interval
{
62
public
:
63
Interval
() {};
64
65
Interval
(
core::Size
start
,
core::Size
end
) :
66
start_
( start ),
end_
( end ) {};
67
core::Size
start
() {
return
start_
; };
68
core::Size
stop
() {
return
end_
; };
69
core::Size
end
() {
return
end_
; };
70
core::Size
start_
;
71
core::Size
end_
;
72
};
73
74
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
75
/// forward declaration
76
class
JumpSample
;
77
78
class
JumpSetup
;
79
80
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
81
///@brief virtual base class: can create a set of jumps and cuts
82
class
BaseJumpSetup
:
public
utility::pointer::ReferenceCount
{
83
public
:
84
///@brief Automatically generated virtual destructor for class deriving directly from ReferenceCount
85
virtual
~BaseJumpSetup
();
86
virtual
87
JumpSample
88
create_jump_sample
( )
const
= 0;
89
90
///@brief returns an ordered FragSet that is compatible with the JumpSample
91
/// default: generate jumps from ss-library according to JumpSample
92
// if the movemap allows sampling of the down-residue but not the up-residue:
93
// include a jump with torsions only for the "down" residue
94
// if the movemap allows neither sampling of up or down, don't include the jump
95
virtual
core::fragment::FragSetOP
96
generate_jump_frags
(
JumpSample
const
&,
core::kinematics::MoveMap
const
& mm)
const
;
97
98
///@brief take from a given JumpSample only those Jumps, which could also have been created by create_jump_sample()
99
virtual
100
JumpSample
clean_jumps
(
JumpSample
const
& )
const
= 0;
101
102
virtual
std::string
type_name
()
const
= 0;
103
104
};
105
106
107
/// @brief output operator
108
std::ostream &
operator <<
(std::ostream & os,
JumpSample
const
&
t
);
109
110
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
111
class
JumpSetup
:
public
BaseJumpSetup
{
112
public
:
113
class
JumpDef
{
114
public
:
115
JumpDef
(
Interval
jump,
Interval
cut_reg ) :
116
jump_
( jump ),
cut_reg_
( cut_reg) { };
117
118
Interval
jump_
;
119
Interval
cut_reg_
;
120
};
121
122
std::string
type_name
()
const
{
123
return
"JumpSetup"
;
124
}
125
public
:
126
127
typedef
utility::vector1< JumpDef >::const_iterator
const_iterator
;
128
typedef
utility::vector1< JumpDef >::iterator
iterator
;
129
130
//@brief c'stor
131
JumpSetup
(
Size
total_residue
) :
132
total_residue_
( total_residue )
133
{};
134
135
//@brief add a new jump to the list
136
void
137
add_jump
(
JumpDef
const
& jd ) {
138
jumps_
.push_back ( jd );
139
jump_sample_
=
JumpSample
( *
this
);
140
}
141
142
void
143
add_jump
(
Interval
const
& jump,
Interval
const
& cut_reg ) {
144
add_jump
(
JumpDef
( jump, cut_reg ) );
145
jump_sample_
=
JumpSample
( *
this
);
146
}
147
148
void
149
add_jump
(
core::Size
js,
core::Size
je,
core::Size
crs,
core::Size
cre ) {
150
add_jump
(
JumpDef
(
Interval
( js, je ),
Interval
( crs, cre ) ) );
151
jump_sample_
=
JumpSample
( *
this
);
152
}
153
154
core::Size
155
size
()
const
{
156
return
jumps_
.size();
157
};
158
159
const_iterator
160
begin
()
const
{
161
return
jumps_
.begin();
162
};
163
164
const_iterator
165
end
()
const
{
166
return
jumps_
.end();
167
};
168
169
void
clear
() {
170
jumps_
.clear();
171
}
172
void
173
read_file
(
std::string
file );
174
175
JumpSample
176
create_jump_sample
( )
const
177
{
return
jump_sample_
; }
178
179
JumpSample
180
clean_jumps
(
JumpSample
const
& js )
const
181
{
182
std::cerr <<
"ERROR: JumpSetup::clean_jumps() not implemented"
<< std::endl;
183
return
js;
184
}
185
186
void
set_jump_sample
(
JumpSample
const
& jump_sample ) {
187
jump_sample_
= jump_sample;
188
}
189
190
core::Size
191
total_residue
()
const
{
192
return
total_residue_
;
193
}
194
195
196
private
:
197
utility::vector1< JumpDef >
jumps_
;
198
core::Size
total_residue_
;
199
JumpSample
jump_sample_
;
200
};
201
202
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
203
class
JumpsFromAllPairings
:
public
BaseJumpSetup
{
204
public
:
205
206
JumpsFromAllPairings
(
const
core::Size
total_residue,
core::scoring::dssp::PairingsList
const
& jumps, ObjexxFCL::FArray1D_float
const
& cut_probability ) :
total_residue_
(total_residue),
jumps_
(jumps),
cut_prob_
(cut_probability) {
207
}
208
209
JumpSample
create_jump_sample
()
const
{
210
return
JumpSample
(
total_residue_
,
jumps_
,
cut_prob_
);
211
}
212
213
private
:
214
core::Size
total_residue_
;
215
core::scoring::dssp::PairingsList
jumps_
;
216
ObjexxFCL::FArray1D_float
cut_prob_
;
217
};
218
219
220
//class JumpsFromConstraintForest : public BaseJumpSetup {
221
//public:
222
//
223
// JumpsFromConstraintForest(
224
// const core::Size total_residue,
225
// core::scoring::constraints::ConstraintForestOP forest,
226
// ObjexxFCL::FArray1D_float const& cut_probability );
227
//
228
// JumpSample create_jump_sample() const;
229
// ~JumpsFromConstraintForest();
230
//
231
// /// @brief Unimplemented!
232
// JumpSample
233
// clean_jumps( JumpSample const& js ) const;
234
//
235
//private:
236
// core::Size total_residue_;
237
// core::scoring::constraints::ConstraintForestOP forest_;
238
// ObjexxFCL::FArray1D_float cut_prob_;
239
//};
240
241
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
242
class
JumpSelector
:
public
BaseJumpSetup
{
243
public
:
244
245
class
JumpWeightDef
{
246
public
:
247
JumpWeightDef
(
Interval
jump,
core::Real
weight ) :
248
jump_
( jump ),
weight_
( weight) { };
249
250
Interval
jump_
;
251
core::Real
weight_
;
252
};
253
254
std::string
type_name
()
const
{
255
return
"JumpSelector"
;
256
}
257
258
public
:
259
typedef
utility::vector1< JumpWeightDef >
JumpList
;
260
typedef
JumpList::const_iterator
const_iterator
;
261
typedef
JumpList::iterator
iterator
;
262
263
JumpSelector
();
264
JumpSelector
(
std::string
ss );
265
~JumpSelector
();
266
267
//@brief add a new jump to the list
268
void
269
add_jump
(
JumpWeightDef
const
& jd ) {
270
jumps_
.push_back ( jd );
271
total_weight_
+=jd.
weight_
;
272
}
273
274
void
275
add_jump
(
Interval
const
& jump,
core::Real
weight ) {
276
add_jump
(
JumpWeightDef
( jump, weight ) );
277
}
278
279
void
280
add_jump
(
core::Size
js,
core::Size
je,
core::Real
weight ) {
281
add_jump
(
JumpWeightDef
(
Interval
( js, je ), weight ) );
282
}
283
284
core::Size
285
size
()
const
{
286
return
jumps_
.size();
287
};
288
289
const_iterator
290
begin
()
const
{
291
return
jumps_
.begin();
292
};
293
294
const_iterator
295
end
()
const
{
296
return
jumps_
.end();
297
};
298
299
void
300
read_file
(
std::string
file );
301
302
Interval
303
select_random
()
const
;
304
305
JumpSample
306
create_jump_sample
( )
const
;
307
308
JumpSample
309
clean_jumps
(
JumpSample
const
& js )
const
{
310
std::cerr <<
"NOT IMPLEMENTED"
<< std::endl;
311
return
js;
312
};
313
314
void
315
set_secstruct
(
std::string
ss ) {
316
secstruct_
= ss;
317
}
318
319
private
:
320
std::string
secstruct_
;
321
core::pose::PoseCOP
native_pose_
;
322
JumpList
jumps_
;
323
core::Real
total_weight_
;
324
core::Size
min_loop_length_
;
// minimum length required to introduce cut
325
core::Size
loop_extension_
;
// grow loops at either side ( to consilidate things like LLL..LLL into a single loop-region
326
core::Size
nr_jumps_min_
;
327
core::Size
nr_jumps_max_
;
328
};
329
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
330
}
//jumping
331
}
//protocols
332
#endif
Generated on Sat Jun 1 2013 11:55:34 for Rosetta 3.5 by
1.8.4