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
backrub
BackrubMover.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/backrub/BackrubMover.hh
11
/// @brief definition of BackrubMover class and functions
12
/// @author Colin A. Smith (colin.smith@ucsf.edu)
13
14
15
#ifndef INCLUDED_protocols_backrub_BackrubMover_hh
16
#define INCLUDED_protocols_backrub_BackrubMover_hh
17
18
#include <
protocols/backrub/BackrubMover.fwd.hh
>
19
20
21
// Core Headers
22
#include <
core/id/DOF_ID_Range.fwd.hh
>
23
#include <
core/pose/Pose.fwd.hh
>
24
#include <
core/kinematics/tree/Atom.fwd.hh
>
25
26
// Protocols Headers
27
#include <
protocols/branch_angle/BranchAngleOptimizer.hh
>
28
#include <
protocols/canonical_sampling/ThermodynamicMover.hh
>
29
#include <
protocols/backrub/BackrubSegment.hh
>
30
#include <
protocols/moves/DataMap.fwd.hh
>
31
#include <
protocols/filters/Filter.fwd.hh
>
32
33
// Utility Headers
34
// AUTO-REMOVED #include <utility/vector0.hh>
35
// AUTO-REMOVED #include <utility/vector1.hh>
36
// AUTO-REMOVED #include <numeric/conversions.hh>
37
#include <utility/keys/Key3Vector.hh>
38
39
// Numeric Headers
40
#include <numeric/IntervalSet.fwd.hh>
41
42
// C++ Headers
43
#include <map>
44
45
#include <utility/vector0_bool.hh>
46
#include <utility/vector1.hh>
47
#include <numeric/NumericTraits.hh>
48
49
50
namespace
protocols {
51
namespace
backrub {
52
53
54
/// @brief class for applying backrub moves to arbitrary protein segments
55
class
BackrubMover
:
public
protocols::canonical_sampling::ThermodynamicMover
{
56
57
public
:
58
59
BackrubMover
();
60
61
BackrubMover
(
62
BackrubMover
const
& mover
63
);
64
65
virtual
protocols::moves::MoverOP
clone
()
const
;
66
virtual
protocols::moves::MoverOP
fresh_instance
()
const
;
67
68
void
69
init_with_options
();
70
71
virtual
72
void
73
parse_my_tag
(
74
utility::tag::TagPtr
const
tag,
75
protocols::moves::DataMap
& data,
76
protocols::filters::Filters_map
const
& filters,
77
protocols::moves::Movers_map
const
& movers,
78
core::pose::Pose
const
& pose
79
);
80
81
virtual
82
void
83
initialize_simulation
(
84
core::pose::Pose
& pose,
85
protocols::canonical_sampling::MetropolisHastingsMover
const
&
metropolis_hastings_mover
,
86
core::Size
cycle
//non-zero if trajectory is restarted
87
);
88
89
// @brief apply the backrub move to a Pose object
90
void
91
apply
(
92
Pose
& pose
93
);
94
virtual
std::string
get_name
()
const
;
95
96
/// @brief get the segment ID for a given starting and ending atom
97
/// @detailed
98
/// if the segment ID does not exist, 0 is returned
99
Size
100
segment_id
(
101
core::id::AtomID
start_atomid,
102
core::id::AtomID
end_atomid
103
)
104
{
105
for
(
Size
i = 1; i <=
segments_
.size(); ++i) {
106
if
(
segments_
[i].start_atomid() == start_atomid &&
segments_
[i].end_atomid() == end_atomid)
return
i;
107
}
108
109
return
0;
110
}
111
112
/// @brief determine whether a given segment exists
113
bool
114
has_segment
(
115
core::id::AtomID
start_atomid,
116
core::id::AtomID
end_atomid
117
)
118
{
119
return
segment_id
(start_atomid, end_atomid);
120
}
121
122
/// @brief get a particular segment
123
BackrubSegment
const
&
124
segment
(
125
core::Size
segment_id
126
)
127
{
128
return
segments_
[
segment_id
];
129
}
130
131
/// @brief remove all segements
132
void
133
clear_segments
()
134
{
135
segments_
.clear();
136
}
137
138
/// @brief get the number of segments
139
core::Size
140
num_segments
()
141
{
142
return
segments_
.size();
143
}
144
145
/// @brief add a segment to the mover
146
Size
147
add_segment
(
148
core::id::AtomID
start_atomid,
149
core::id::AtomID
end_atomid,
150
core::Real
max_angle_disp = 0
151
);
152
153
/// @brief add segments between a list of mainchain atomids
154
core::Size
155
add_mainchain_segments
(
156
utility::vector1<core::id::AtomID>
atomids,
157
core::Size
min_atoms
,
158
core::Size
max_atoms
159
);
160
161
/// @brief add segments between mainchain atoms in contiguous stretches of residues
162
core::Size
163
add_mainchain_segments
(
164
utility::vector1<core::Size>
resnums,
165
utility::vector1<std::string>
atomnames,
166
core::Size
min_atoms
,
167
core::Size
max_atoms
168
);
169
170
/// @brief add segments between mainchain atoms using stored parameters
171
core::Size
172
add_mainchain_segments
();
173
174
/// @brief add segments between mainchain atoms using command line options
175
core::Size
176
add_mainchain_segments_from_options
();
177
178
/// @brief optimize branching atoms for all segment pivot atoms
179
void
180
optimize_branch_angles
(
181
Pose
& pose
182
);
183
184
/// @brief get residues to pivot if no segments manually defined
185
utility::vector1<core::Size>
const
&
186
pivot_residues
()
const
;
187
188
/// @brief set residues to pivot if no segments manually defined
189
void
190
set_pivot_residues
(
191
utility::vector1<core::Size>
const
&
pivot_residues
192
);
193
194
/// @brief get atom names to pivot if no segments manually defined
195
utility::vector1<std::string>
const
&
196
pivot_atoms
()
const
;
197
198
/// @brief set atom names to pivot if no segments manually defined
199
void
200
set_pivot_atoms
(
201
utility::vector1<std::string>
const
&
pivot_atoms
202
);
203
204
/// @brief get minimum segment length if no segments manually defined
205
core::Size
206
min_atoms
()
const
;
207
208
/// @brief set minimum segment length if no segments manually defined
209
void
210
set_min_atoms
(
211
core::Size
min_atoms
212
);
213
214
/// @brief get maximum segment length if no segments manually defined
215
core::Size
216
max_atoms
()
const
;
217
218
/// @brief set maximum segment length if no segments manually defined
219
void
220
set_max_atoms
(
221
core::Size
max_atoms
222
);
223
224
/// @brief get maximum angular displacement for 4 atom segments
225
core::Real
226
max_angle_disp_4
()
const
;
227
228
/// @brief set maximum angular displacement for 4 atom segments
229
void
230
set_max_angle_disp_4
(
231
core::Real
max_angle_disp_4
232
);
233
234
/// @brief get maximum angular displacement for 7 atom segments
235
core::Real
236
max_angle_disp_7
()
const
;
237
238
/// @brief set maximum angular displacement for 7 atom segments
239
void
240
set_max_angle_disp_7
(
241
core::Real
max_angle_disp_7
242
);
243
244
/// @brief get maximum angular displacement slope for other atom segments
245
core::Real
246
max_angle_disp_slope
()
const
;
247
248
/// @brief set maximum angular displacement slope for other atom segments
249
void
250
set_max_angle_disp_slope
(
251
core::Real
max_angle_disp_slope
252
);
253
254
/// @brief get whether detailed balance is preserved (i.e. no branch angle optimization during moves)
255
virtual
256
bool
257
preserve_detailed_balance
()
const
;
258
259
/// @brief set whether detailed balance is preserved (i.e. no branch angle optimization during moves)
260
virtual
261
void
262
set_preserve_detailed_balance
(
263
bool
preserve_detailed_balance
264
);
265
266
/// @brief get whether to exit during initialize_simulation if the mm_bend term isn't turned on
267
bool
268
require_mm_bend
()
const
;
269
270
/// @brief set whether to exit during initialize_simulation if the mm_bend term isn't turned on
271
void
272
set_require_mm_bend
(
273
bool
require_mm_bend
274
);
275
276
/// @brief get the TorsionIDs perturbed by the mover during moves, along with their ranges
277
virtual
278
utility::vector1<core::id::TorsionID_Range>
279
torsion_id_ranges
(
280
core::pose::Pose
& pose
281
);
282
283
/// @brief get the DOF_IDs perturbed by the mover during moves, along with their ranges
284
virtual
285
utility::vector1<core::id::DOF_ID_Range>
286
dof_id_ranges
(
287
core::pose::Pose
& pose
288
);
289
290
/// @brief do a manual rotation about the given segment
291
void
292
rotate_segment
(
293
Pose
& pose,
294
Size
segment_id
,
295
core::Real
angle,
296
utility::vector0<core::Real>
& start_constants,
297
utility::vector0<core::Real>
& end_constants
298
);
299
300
/// @brief get a random angle for a segment subject to bond angle and rotation constraints
301
core::Real
302
random_angle
(
303
Pose
& pose,
304
Size
segment_id
,
305
utility::vector0<core::Real>
& start_constants,
306
utility::vector0<core::Real>
& end_constants
307
);
308
309
/// @brief get the branch angle optimizer stored in the mover
310
protocols::branch_angle::BranchAngleOptimizer
&
311
branchopt
()
312
{
313
return
branchopt_
;
314
}
315
316
/// @brief set the id for the next move (i.e. nonrandom)
317
core::Size
318
next_segment_id
()
const
;
319
320
/// @brief set the id for the next move (i.e. nonrandom)
321
void
322
set_next_segment_id
(
323
core::Size
next_segment_id
324
);
325
326
/// @brief get id the last backrub segment moved
327
core::Size
328
last_segment_id
()
const
;
329
330
/// @brief get the name of the atom at the start of the last segment
331
std::string
332
last_start_atom_name
()
const
;
333
334
/// @brief get the name of the atom at the end of the last segment
335
std::string
336
last_end_atom_name
()
const
;
337
338
/// @brief get the last rotation angle
339
core::Real
340
last_angle
()
const
;
341
342
/// @brief update string describing the move type
343
void
344
update_type
();
345
346
private
:
347
348
utility::vector1<protocols::backrub::BackrubSegment>
segments_
;
349
protocols::branch_angle::BranchAngleOptimizer
branchopt_
;
350
std::map<protocols::backrub::BackrubSegment::BondAngleKey, core::Size>
bond_angle_map_
;
351
utility::vector1<core::Size>
pivot_residues_
;
352
utility::vector1<std::string>
pivot_atoms_
;
353
core::Size
min_atoms_
;
354
core::Size
max_atoms_
;
355
core::Real
max_angle_disp_4_
;
356
core::Real
max_angle_disp_7_
;
357
core::Real
max_angle_disp_slope_
;
358
core::Size
next_segment_id_
;
359
core::Size
last_segment_id_
;
360
std::string
last_start_atom_name_
;
361
std::string
last_end_atom_name_
;
362
core::Real
last_angle_
;
363
bool
preserve_detailed_balance_
;
364
bool
require_mm_bend_
;
365
};
366
367
/// @brief calculate constants necessary for calculating internal angles/derivatives
368
void
369
backrub_rotation_constants
(
370
core::kinematics::tree::AtomCOP
PM2_atom,
371
core::kinematics::tree::AtomCOP
PM1_atom,
372
core::kinematics::tree::AtomCOP
P_atom,
373
core::kinematics::tree::AtomCOP
PP1_atom,
374
core::kinematics::tree::AtomCOP
PP2_atom,
375
core::kinematics::tree::AtomCOP
REF_atom,
376
utility::vector0<double>
& constants,
377
core::Real
const
alpha_min = 0,
378
core::Real
const
alpha_max = numeric::NumericTraits<core::Real>::pi(),
379
numeric::IntervalSet<core::Real> *tau_intervals = NULL
380
);
381
382
/// @brief calculate internal coordinate values for any tau value
383
void
384
backrub_rotation_angles
(
385
utility::vector0<core::Real>
const
& constants,
386
core::Real
const
tau,
387
core::Real
& bondange,
388
core::Real
& torsion1,
389
core::Real
& torsion2
390
);
391
392
}
// moves
393
}
// protocols
394
395
#endif
Generated on Sat Jun 1 2013 11:43:26 for Rosetta 3.5 by
1.8.4