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
pack
rotamer_set
RotamerSet_.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 core/pack/rotamer_set/RotamerSet_.hh
11
/// @brief rotamer set implementation class
12
/// @author Andrew Leaver-Fay (leaverfa@email.unc.edu)
13
14
15
#ifndef INCLUDED_core_pack_rotamer_set_RotamerSet__hh
16
#define INCLUDED_core_pack_rotamer_set_RotamerSet__hh
17
18
//Unit headers
19
#include <
core/pack/rotamer_set/RotamerSet_.fwd.hh
>
20
21
//Package headers
22
#include <
core/pack/rotamer_set/RotamerSet.hh
>
23
#include <
core/pack/rotamer_set/BumpSelector.hh
>
24
#include <
core/pack/rotamer_set/RotamerSets.fwd.hh
>
25
26
27
//Project headers
28
#include <
core/conformation/Residue.fwd.hh
>
29
#include <
core/chemical/ResidueType.fwd.hh
>
30
#include <
core/pack/dunbrack/RotamerLibrary.fwd.hh
>
31
#ifdef WIN32
32
#include <
core/scoring/trie/RotamerTrieBase.hh
>
33
#endif
34
35
#include <
core/scoring/EnergyMap.fwd.hh
>
36
37
// Utility headers
38
#include <utility/pointer/owning_ptr.hh>
39
// AUTO-REMOVED #include <utility/vector1.hh>
40
41
#include <
core/scoring/trie/RotamerTrieBase.fwd.hh
>
42
#include <utility/vector1.hh>
43
44
45
namespace
core {
46
namespace
pack {
47
namespace
rotamer_set {
48
49
/// @brief Container for a set of rotamers for use in packing.
50
/// Rotamers are sorted into groups of the same residue type.
51
/// Offsets into these rotamer groups are maintained by this class, as is
52
/// information concerning the "original rotamer" -- the rotamer
53
/// present on the input pose before packing began.
54
class
RotamerSet_
:
public
RotamerSet
55
{
56
public
:
57
typedef
conformation::ResidueOP
ResidueOP
;
58
typedef
conformation::ResidueCOP
ResidueCOP
;
59
typedef
pack::dunbrack::ChiSetOP
ChiSetOP
;
60
typedef
scoring::trie::RotamerTrieBaseOP
RotamerTrieBaseOP
;
61
62
public
:
63
RotamerSet_
();
64
virtual
~RotamerSet_
();
65
66
virtual
67
void
build_rotamers
(
68
pose::Pose
const
& the_pose,
69
scoring::ScoreFunction
const
& scorefxn,
70
task::PackerTask
const
& task,
71
graph::GraphCOP
packer_neighbor_graph,
72
bool
use_neighbor_context =
true
73
);
74
75
76
/// @brief Build rotamers that depend on positions of rotamers built in a previous pass
77
virtual
78
void
build_dependent_rotamers
(
79
RotamerSets
const
& rotamer_sets,
80
pose::Pose
const
& pose,
81
scoring::ScoreFunction
const
& scorefxn,
82
task::PackerTask
const
& task,
83
graph::GraphCOP
packer_neighbor_graph
84
);
85
86
87
virtual
88
void
89
add_rotamer
(
90
conformation::Residue
const
&
rotamer
91
);
92
93
virtual
94
Size
95
get_n_residue_types
()
const
;
96
97
virtual
98
Size
99
get_n_residue_groups
()
const
;
100
101
virtual
102
Size
103
get_residue_type_begin
(
Size
which_restype )
const
;
104
105
virtual
106
Size
107
get_residue_group_begin
(
Size
which_resgroup )
const
;
108
109
virtual
110
Size
111
get_n_rotamers_for_residue_type
(
Size
which_resgroup )
const
;
112
113
virtual
114
Size
115
get_n_rotamers_for_residue_group
(
Size
which_resgroup )
const
;
116
117
virtual
118
Size
119
get_residue_type_index_for_rotamer
(
Size
which_rotamer )
const
;
120
121
virtual
122
Size
123
get_residue_group_index_for_rotamer
(
Size
which_rotamer )
const
;
124
125
126
/// @brief Computes the packers "one body energies" for the set of rotamers.
127
virtual
128
void
129
compute_one_body_energies
(
130
pose::Pose
const
& pose,
131
scoring::ScoreFunction
const
& scorefxn,
132
task::PackerTask
const
& task,
133
graph::GraphCOP
packer_neighbor_graph,
134
utility::vector1< core::PackerEnergy >
& energies )
const
;
135
136
137
/// for OPTE
138
virtual
139
void
140
compute_one_body_energy_maps
(
141
pose::Pose
const
& pose,
142
scoring::ScoreFunction
const
& scorefxn,
143
task::PackerTask
const
& task,
144
graph::GraphCOP
packer_neighbor_graph,
145
utility::vector1< scoring::EnergyMap >
& energies )
const
;
146
147
/*
148
virtual
149
void
150
compute_two_body_energies(
151
RotamerSet const & other,
152
pose::Pose const & pose,
153
scoring::ScoreFunction const & scorefxn,
154
ObjexxFCL::FArray2< Energy > & pair_energy_table ) const;
155
*/
156
157
virtual
158
Size
159
num_rotamers
()
const
;
160
161
virtual
162
Size
163
id_for_current_rotamer
()
const
;
164
165
virtual
166
conformation::ResidueCOP
167
rotamer
(
Size
rot_id )
const
;
168
169
virtual
Rotamers::const_iterator
begin
()
const
{
return
rotamers_
.begin(); }
170
virtual
Rotamers::const_iterator
end
()
const
{
return
rotamers_
.end(); }
171
172
virtual
173
conformation::ResidueOP
174
nonconst_rotamer
(
Size
rot_id );
175
176
virtual
177
void
178
store_trie
(
Size
method_enum_id,
conformation::AbstractRotamerTrieOP
trie );
179
180
virtual
181
conformation::AbstractRotamerTrieCOP
182
get_trie
(
Size
method_enum_id )
const
;
183
184
/// @brief removes a single rotamer and causes a rotamer index update
185
virtual
186
void
187
drop_rotamer
(
Size
rot_id );
188
189
/// @brief rotamers_to_delete must be of size nrotmaers -- each position
190
/// in the array that's "true" is removed from the set of rotamers
191
virtual
192
void
193
drop_rotamers
(
utility::vector1< bool >
const
& rotamers_to_delete );
194
195
/// @brief deletes the rotamers in the list with the given indices.
196
/// The indices of these rotamers is presumed to be those before any delete operation.
197
/// e.g. if there are four rotamers, and rotamer_indices_to_delete includes 1 & 3,
198
/// then the rotamers that will remain are the rotamers originally indexed as 2 and 4,
199
/// even though their new indices will be 1 & 2.
200
virtual
201
void
202
drop_rotamers_by_index
(
utility::vector1< Size >
const
& rotamer_indices_to_delete );
203
204
private
:
205
RotamerSet_
(
RotamerSet_
const
& );
206
207
208
protected
:
209
/// @brief Creates a set of rotamers for a particular residue type
210
/// (the concrete residue type) while relying on the rotamer-
211
/// building instructions within the PackerTask.
212
/// Use the residue in the input pose at position resid_ as the existing residue.
213
virtual
214
void
build_rotamers_for_concrete_virt
(
215
pose::Pose
const
& pose,
216
scoring::ScoreFunction
const
& scorefxn,
217
task::PackerTask
const
& task,
218
chemical::ResidueTypeCOP
concrete_residue,
219
graph::GraphCOP
packer_neighbor_graph,
220
bool
use_neighbor_context =
true
221
);
222
223
/// @brief Creates a set of rotamers for a particular residue type
224
/// (the concrete residue type) while relying on the rotamer-
225
/// building instructions within the PackerTask.
226
void
build_rotamers_for_concrete
(
227
pose::Pose
const
& pose,
228
scoring::ScoreFunction
const
& scorefxn,
229
task::PackerTask
const
& task,
230
chemical::ResidueTypeCOP
concrete_residue,
231
conformation::Residue
const
& existing_residue,
232
graph::GraphCOP
packer_neighbor_graph,
233
bool
use_neighbor_context =
true
234
);
235
236
237
/// @brief Build rotamers of a specific type that depend on positions of rotamers built in a previous pass
238
/// Use an input "existing residue" which may or may not reflect the coordinates of the residue at
239
/// pose.residue( resid_ );
240
void
241
build_dependent_rotamers_for_concrete
(
242
RotamerSets
const
& rotamer_sets,
243
pose::Pose
const
& pose,
244
scoring::ScoreFunction
const
&,
// scorefxn,
245
task::PackerTask
const
& task,
246
conformation::Residue
const
& existing_residue,
247
chemical::ResidueTypeCOP
concrete_residue,
248
graph::GraphCOP
packer_neighbor_graph
249
);
250
251
252
/// @brief Creates a sets of rotamers for an "optimize H" repacking
253
void
254
build_optimize_H_rotamers
(
255
pose::Pose
const
& pose,
256
task::PackerTask
const
& task,
257
chemical::ResidueTypeCOP
concrete_residue,
258
conformation::Residue
const
& existing_residue
259
);
260
261
public
:
262
/// @brief Pushes standard-deviation multiples that should be sampled
263
/// for this residue -- if this residue has more neighbors within 10A
264
/// than the task-specified cutoff for buriedness, then extra rotamer
265
/// samples are added to the extra_chi_steps vector, otherwise, the
266
/// vector is not modified.
267
void
set_extra_samples
(
268
task::PackerTask
const
& task,
269
int
num_10A_neighbors,
270
int
chi,
271
chemical::ResidueTypeCOP
concrete_residue,
272
utility::vector1< Real >
& extra_chi_steps
273
)
const
;
274
275
public
:
276
/// @brief Computes the "bump energy" of a rotamer: the bump energy is the
277
/// sum of rotamer's interactions with 1) the backbone-and-side chains of
278
/// neighboring residues that are held fixed during this repacking optimization
279
/// and 2) the backbones of neighboring residues that are changable during this
280
/// repacking optimization.
281
virtual
282
core::PackerEnergy
283
bump_check
(
284
ResidueCOP
rotamer
,
285
scoring::ScoreFunction
const
& sf,
286
pose::Pose
const
& pose,
287
task::PackerTask
const
& task,
288
graph::GraphCOP
packer_neighbor_graph
289
)
const
;
290
291
private
:
292
293
/// @brief declare that a new block of residue types has begun, and that new residues
294
/// are about to be pushed back.
295
void
296
prepare_for_new_residue_type
(
core::chemical::ResidueType
const
& restype );
297
298
/// @brief should two residue types be considered the same residue type?
299
bool
300
different_restype
(
core::chemical::ResidueType
const
& rt1,
core::chemical::ResidueType
const
& rt2 )
const
;
301
302
/// @brief should two residue types be considered to belong to the same residue-type group?
303
bool
304
different_resgroup
(
core::chemical::ResidueType
const
& rt1,
core::chemical::ResidueType
const
& rt2 )
const
;
305
306
/// @brief This function should not be called directly -- it ought to be called only from prepare_for_new_residue_type
307
void
308
new_residue_type
();
309
310
/// @brief This function should not be called directly -- it ought to be called only from prepare_for_new_residue_type
311
void
312
new_residue_group
();
313
314
/// @brief appends a rotamer to the list of rotamers, and increments the count
315
/// for the number of rotamers for the current value of n_residue_types.
316
void
317
push_back_rotamer
(
conformation::ResidueOP
);
318
319
void
320
update_rotamer_offsets
()
const
;
321
322
// DATA
323
private
:
324
325
BumpSelector
bump_selector_
;
326
Rotamers
rotamers_
;
327
328
mutable
Size
n_residue_types_
;
329
mutable
Size
n_residue_groups_
;
330
mutable
utility::vector1< Size >
residue_type_rotamers_begin_
;
331
mutable
utility::vector1< Size >
residue_group_rotamers_begin_
;
332
mutable
utility::vector1< Size >
n_rotamers_for_restype_
;
333
mutable
utility::vector1< Size >
n_rotamers_for_resgroup_
;
334
335
mutable
utility::vector1< Size >
residue_type_for_rotamers_
;
336
mutable
utility::vector1< Size >
residue_group_for_rotamers_
;
337
338
utility::vector1< conformation::AbstractRotamerTrieOP >
cached_tries_
;
339
340
mutable
Size
id_for_current_rotamer_
;
341
342
ResidueOP
current_rotamer_copy_
;
343
mutable
bool
rotamer_offsets_require_update_
;
344
};
345
346
}
// namespace rotamer_set
347
}
// namespace pack
348
}
// namespace core
349
350
351
#endif // INCLUDED_core_pack_RotamerSet_RotamerSet__HH
352
Generated on Sat Jun 1 2013 11:33:45 for Rosetta 3.5 by
1.8.4