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
RotamerSubset.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_RotamerSubset_hh
16
#define INCLUDED_core_pack_rotamer_set_RotamerSubset_hh
17
18
//Unit headers
19
#include <
core/pack/rotamer_set/RotamerSubset.fwd.hh
>
20
21
// Package headers
22
#include <
core/pack/rotamer_set/RotamerSet.hh
>
23
#include <
core/pack/rotamer_set/RotamerSets.fwd.hh
>
24
25
26
//Project headers
27
#include <
core/conformation/Residue.fwd.hh
>
28
#include <
core/chemical/ResidueType.fwd.hh
>
29
// AUTO-REMOVED #include <core/pack/dunbrack/RotamerLibrary.fwd.hh>
30
// AUTO-REMOVED #include <core/scoring/trie/RotamerTrieBase.hh>
31
#include <
core/scoring/EnergyMap.fwd.hh
>
32
#include <
core/pack/task/PackerTask.fwd.hh
>
33
#include <
core/scoring/ScoreFunction.fwd.hh
>
34
#include <
core/pose/Pose.fwd.hh
>
35
#include <
core/graph/Graph.fwd.hh
>
36
37
38
// Utility headers
39
#include <utility/pointer/owning_ptr.hh>
40
// AUTO-REMOVED #include <utility/vector1.hh>
41
42
#include <
core/scoring/trie/RotamerTrieBase.fwd.hh
>
43
#include <utility/vector1.hh>
44
45
#ifdef WIN32
46
#include <
core/pack/rotamer_set/RotamerSet.fwd.hh
>
47
#include <
core/pack/rotamer_set/RotamerSet.hh
>
48
#include <
core/graph/Graph.hh
>
49
#endif
50
51
namespace
core {
52
namespace
pack {
53
namespace
rotamer_set {
54
55
/// @brief Container for a subset of rotamers that have been created
56
/// by another rotamer set. This subset object copies pointers to
57
/// the rotamers contained in another set, as opposed to cloning the
58
/// rotamers. It's main purpose is to manage the bookkeeping involved
59
/// in packing with a subset of rotamers (when it might be faster
60
/// to use a subset and to create an interaction graph specifically
61
/// for that subset than to simply pass an abreviated list of rotamers
62
/// to the SimAnnealer with the "rot_to_pack" vector).
63
class
RotamerSubset
:
public
RotamerSet
64
{
65
public
:
66
typedef
conformation::ResidueOP
ResidueOP
;
67
typedef
conformation::ResidueCOP
ResidueCOP
;
68
typedef
scoring::trie::RotamerTrieBaseOP
RotamerTrieBaseOP
;
69
70
public
:
71
RotamerSubset
(
72
RotamerSet
& rotset,
73
utility::vector1< Size >
const
& rotamer_subset
74
);
75
76
virtual
~RotamerSubset
();
77
78
virtual
79
void
80
add_rotamer
(
81
conformation::Residue
const
&
rotamer
82
);
83
84
virtual
85
Size
86
get_n_residue_types
()
const
;
87
88
virtual
89
Size
90
get_n_residue_groups
()
const
;
91
92
virtual
93
Size
94
get_residue_type_begin
(
Size
which_restype )
const
;
95
96
virtual
97
Size
98
get_residue_group_begin
(
Size
which_resgroup )
const
;
99
100
virtual
101
Size
102
get_n_rotamers_for_residue_type
(
Size
which_restype )
const
;
103
104
virtual
105
Size
106
get_n_rotamers_for_residue_group
(
Size
which_resgroup )
const
;
107
108
///@brief given a rotamer id, return an int which represents a type for this rotamer.
109
virtual
110
Size
111
get_residue_type_index_for_rotamer
(
Size
which_rotamer )
const
;
112
113
virtual
114
Size
115
get_residue_group_index_for_rotamer
(
Size
which_rotamer )
const
;
116
117
virtual
118
Size
119
num_rotamers
()
const
;
120
121
virtual
122
Size
123
id_for_current_rotamer
()
const
;
124
125
virtual
126
conformation::ResidueCOP
127
rotamer
(
Size
rot_id )
const
;
128
129
virtual
Rotamers::const_iterator
begin
()
const
{
return
rotamers_
.begin(); }
130
virtual
Rotamers::const_iterator
end
()
const
{
return
rotamers_
.end(); }
131
132
virtual
133
conformation::ResidueOP
134
nonconst_rotamer
(
Size
rot_id );
135
136
virtual
137
void
138
store_trie
(
Size
method_enum_id,
conformation::AbstractRotamerTrieOP
trie );
139
140
virtual
141
conformation::AbstractRotamerTrieCOP
142
get_trie
(
Size
method_enum_id )
const
;
143
144
/// @brief removes a single rotamer and causes a rotamer index update
145
virtual
146
void
147
drop_rotamer
(
Size
rot_id );
148
149
/// @brief rotamers_to_delete must be of size nrotmaers -- each position
150
/// in the array that's "true" is removed from the set of rotamers
151
virtual
152
void
153
drop_rotamers
(
utility::vector1< bool >
const
& rotamers_to_delete );
154
155
/// @brief deletes the rotamers in the list with the given indices.
156
/// The indices of these rotamers is presumed to be those before any delete operation.
157
/// e.g. if there are four rotamers, and rotamer_indices_to_delete includes 1 & 3,
158
/// then the rotamers that will remain are the rotamers originally indexed as 2 and 4,
159
/// even though their new indices will be 1 & 2.
160
virtual
161
void
162
drop_rotamers_by_index
(
utility::vector1< Size >
const
& rotamer_indices_to_delete );
163
164
private
:
165
/// @brief (private) No copy-constructor
166
RotamerSubset
(
RotamerSubset
const
& );
167
168
/// @brief declare that a new block of residue types has begun, and that new residues
169
/// are about to be pushed back. NOT IMPLEMENTED.
170
//void
171
//declare_new_residue_type();
172
173
/// @brief appends a rotamer to the list of rotamers, and increments the count
174
/// for the number of rotamers for the current value of n_residue_types. NOT IMPLEMENTED.
175
//void
176
//push_back_rotamer( conformation::ResidueOP );
177
178
/// @brief Borrow (steal) a rotamer held by another RotamerSet
179
/// without cloning that rotamer. That is, both sets will now point
180
/// at the same rotamer object, so if that rotamer changes for one set,
181
/// it changes for both.
182
void
183
steal_rotamer
(
conformation::ResidueOP
rotamer
);
184
185
186
/// @brief declare that a new block of residue types has begun, and that new residues
187
/// are about to be pushed back.
188
void
189
prepare_for_new_residue_type
(
core::chemical::ResidueType
const
& restype );
190
191
/// @brief should two residue types be considered the same residue type?
192
bool
193
different_restype
(
core::chemical::ResidueType
const
& rt1,
core::chemical::ResidueType
const
& rt2 )
const
;
194
195
/// @brief should two residue types be considered to belong to the same residue-type group?
196
bool
197
different_resgroup
(
core::chemical::ResidueType
const
& rt1,
core::chemical::ResidueType
const
& rt2 )
const
;
198
199
/// @brief This function should not be called directly -- it ought to be called only from prepare_for_new_residue_type
200
void
201
new_residue_type
();
202
203
/// @brief This function should not be called directly -- it ought to be called only from prepare_for_new_residue_type
204
void
205
new_residue_group
();
206
207
/// @brief appends a rotamer to the list of rotamers, and increments the count
208
/// for the number of rotamers for the current value of n_residue_types.
209
void
210
push_back_rotamer
(
conformation::ResidueOP
);
211
212
void
213
update_rotamer_offsets
()
const
;
214
215
216
217
public
:
// noop functions:
218
219
virtual
220
void
build_rotamers
(
221
pose::Pose
const
& the_pose,
222
scoring::ScoreFunction
const
& scorefxn,
223
task::PackerTask
const
& task,
224
graph::GraphCOP
packer_neighbor_graph,
225
bool
use_neighbor_context =
true
226
);
227
228
virtual
229
void
build_dependent_rotamers
(
230
RotamerSets
const
& rotamer_sets,
231
pose::Pose
const
& pose,
232
scoring::ScoreFunction
const
& scorefxn,
233
task::PackerTask
const
& task,
234
graph::GraphCOP
packer_neighbor_graph
235
);
236
237
virtual
238
void
239
compute_one_body_energies
(
240
pose::Pose
const
& pose,
241
scoring::ScoreFunction
const
& scorefxn,
242
task::PackerTask
const
& task,
243
graph::GraphCOP
packer_neighbor_graph,
244
utility::vector1< core::PackerEnergy >
& energies )
const
;
245
246
/// for OptE
247
virtual
248
void
249
compute_one_body_energy_maps
(
250
pose::Pose
const
& pose,
251
scoring::ScoreFunction
const
& scorefxn,
252
task::PackerTask
const
& task,
253
graph::GraphCOP
packer_neighbor_graph,
254
utility::vector1< scoring::EnergyMap >
& energies )
const
;
255
256
257
258
// DATA
259
private
:
260
261
Rotamers
rotamers_
;
262
263
mutable
Size
n_residue_types_
;
264
mutable
Size
n_residue_groups_
;
265
mutable
utility::vector1< Size >
residue_type_rotamers_begin_
;
266
mutable
utility::vector1< Size >
residue_group_rotamers_begin_
;
267
mutable
utility::vector1< Size >
n_rotamers_for_restype_
;
268
mutable
utility::vector1< Size >
n_rotamers_for_resgroup_
;
269
270
mutable
utility::vector1< Size >
residue_type_for_rotamers_
;
271
mutable
utility::vector1< Size >
residue_group_for_rotamers_
;
272
273
utility::vector1< conformation::AbstractRotamerTrieOP >
cached_tries_
;
274
275
mutable
Size
id_for_current_rotamer_
;
276
277
ResidueOP
current_rotamer_copy_
;
278
mutable
bool
rotamer_offsets_require_update_
;
279
};
280
281
}
// namespace rotamer_set
282
}
// namespace pack
283
}
// namespace core
284
285
286
#endif // INCLUDED_core_pack_RotamerSet_RotamerSet__HH
287
Generated on Sat Jun 1 2013 11:33:46 for Rosetta 3.5 by
1.8.4