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
canonical_sampling
mc_convergence_checks
HierarchicalLevel.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
#ifndef INCLUDED_protocols_canonical_sampling_mc_convergence_checks_HierarchicalLevel_hh
11
#define INCLUDED_protocols_canonical_sampling_mc_convergence_checks_HierarchicalLevel_hh
12
13
#include <
core/pose/Pose.hh
>
14
#include <
protocols/canonical_sampling/mc_convergence_checks/HierarchicalLevel.fwd.hh
>
15
#include <
protocols/canonical_sampling/mc_convergence_checks/Pool_ConvergenceCheck.hh
>
16
#include <
core/types.hh
>
17
// AUTO-REMOVED #include <core/io/silent/SilentFileData.hh>
18
#include <
core/io/silent/SilentStruct.hh
>
19
#include <ObjexxFCL/FArray2D.hh>
20
21
#include <utility/vector1.hh>
22
#include <list>
23
24
//Auto Headers
25
namespace
protocols {
26
namespace
canonical_sampling {
27
namespace
mc_convergence_checks {
28
29
typedef
ObjexxFCL::FArray2D<double>
FArray2D_double
;
30
typedef
utility::vector1< core::Size >
Address
;
31
32
struct
PoolData
{
33
public
:
34
PoolData
();
35
PoolData
(
Pool_RMSD_OP
pool,
utility::vector1<core::Size>
& address,
core::Size
nlevels );
36
PoolData
(
Pool_RMSD_OP
pool,
utility::vector1<core::Size>
& address);
37
38
void
39
setup
(
core::Size
nlevels );
40
41
Pool_RMSD_OP
pool_
;
42
utility::vector1<core::Size>
address_
;
43
core::Size
nlevels_
;
44
45
};
46
47
48
class
HierarchicalLevel
:
public
Pool_RMSD
{
49
50
public
:
51
52
HierarchicalLevel
(
core::Size
nlevels
,
std::string
filename
);
53
54
HierarchicalLevel
(
core::Size
nlevels );
55
56
HierarchicalLevel
(
core::Size
level
,
core::Size
max_levels );
57
58
std::string
&
59
filename
();
60
61
// void
62
// union_of_addresses( Address& addr1, Address& addr2, Address& union_addr );
63
64
void
65
fill_top_level
(
Pool_RMSD_OP
& top_level_pool );
66
67
void
68
get_addresses_at_level
(
utility::vector1< Address >
& );
69
70
void
71
debug_print_hierarchy
();
72
73
void
74
debug_print_size_per_level
();
75
76
void
77
print_addresses_at_level
();
78
79
HierarchicalLevelOP
80
next_level
();
81
82
core::Size
83
size
();
84
85
core::Size
86
level_size
(
core::Size
level );
87
88
core::Size
89
pool_size
(
Address
&
address
,
core::Size
level );
90
91
core::Size
92
top_level_pool_size
();
93
94
Address
&
95
address
(
core::Size
index );
//returns address of pool at index
96
97
void
98
radius
(
core::Real
radius
);
99
100
core::Real
101
radius
();
102
103
core::Real
104
level_radius
(
core::Size
level );
105
106
core::Size
107
level
();
108
109
core::Size
110
nlevels
();
111
112
void
113
max_cache_size
(
core::Size
max_size );
114
115
core::Size
116
max_cache_size
();
117
118
bool
119
has_next_level
();
120
121
void
122
clear
();
123
124
void
125
add_new
(
core::pose::Pose
const
& pose,
126
std::string
&
tag
,
127
Address
& address,
128
bool
write_to_file,
129
core::Size
new_level );
130
131
void
132
add_new
(
core::io::silent::SilentStruct
&,
133
std::string
& tag,
134
Address
& address,
135
bool
write_to_file,
136
core::Size
new_level );
137
138
bool
139
add_new
(
FArray2D_double
&,
140
std::string
& tag,
141
Address
& address);
142
143
bool
144
add_new
(
FArray2D_double
&,
145
std::string
& tag,
146
Address
& address,
147
bool
resolve_remaining_levels );
148
149
void
150
add_to_top_level
(
FArray2D_double
&,
std::string
& tag );
151
152
153
bool
154
equal_addresses
(
Address
& address1,
155
Address
& address2);
156
157
core::Size
158
evaluate
(
core::pose::Pose
const
& pose,
159
std::string
& best_decoy,
160
utility::vector1< core::Real >
& best_rmsd,
161
Address
& address);
162
163
core::Size
164
evaluate
(
core::io::silent::SilentStruct
const
& ,
165
std::string
& best_decoy,
166
utility::vector1< core::Real >
& best_rmsd,
167
Address
& address);
168
169
core::Size
170
evaluate
(
FArray2D_double
&,
171
std::string
& best_decoy,
172
utility::vector1< core::Real >
& best_rmsd,
173
Address
& address);
174
175
core::Size
176
evaluate
(
FArray2D_double
&,
177
std::string
& best_decoy,
178
utility::vector1< core::Real >
& best_rmsd,
179
Address
& address,
180
bool
reset_all_levels,
181
bool
load_if_missing );
182
183
184
/**
185
core::Size
186
evaluate( FArray2D_double&,
187
std::string & best_decoy,
188
core::Real & best_rmsd,
189
Address & best_indices,
190
utility::vector1< Address > & prev_address,
191
utility::vector1< core::Size > & prev_indices );
192
**/
193
/**
194
std::list<PoolData> &
195
get_cache(); //for debugging
196
**/
197
// void
198
// write_headers_to_all_files_in_hierarchy();
199
200
std::string
201
lib_full_path
(
Address
& address );
//made public for debugging
202
203
bool
204
address_exists_in_cache
(
Address
& addr );
205
206
bool
207
level_find
(
Address
& address,
core::Size
const
& level, std::list<PoolData>::iterator& );
208
209
bool
210
pool_exists
(
Address
& address );
//simply checks if appropriate filename exists
211
212
void
213
round
(
core::Real
& rmsd );
214
215
void
216
test_round
();
217
218
// Undefined, commenting out to fix PyRosetta build
219
//core::Size
220
//next_free_address( Address& address, core::Size level );
221
222
void
223
write_headers_to_hierarchy
(
core::io::silent::SilentStructOP
& ss );
224
225
void
226
debug_print_addresses
();
227
228
229
core::Size
230
first_zero_pos
(
Address
& address );
231
232
233
protected
:
234
235
private
:
236
237
void
238
sort_pool
(
Pool_RMSD_OP
& pool_ptr );
239
240
core::Size
241
find_address
(
Address
& query,
utility::vector1< Address >
& addresses );
242
243
void
244
string_to_address
(
std::string
&,
Address
& );
245
246
void
247
address_to_string
(
std::string
&,
Address
& );
248
249
void
250
sort_addresses
(
utility::vector1< Address >
& addresses );
251
252
bool
253
less_than
(
Address
& addr1,
Address
& addr2 );
254
255
void
256
max_level_index
(
Address
&);
257
258
259
void
260
reset
(
Address
& addr,
261
utility::vector1< core::Real >
&
rms
);
262
263
void
264
print_address
(
Address
& address );
265
266
267
core::Size
268
num_matching_levels
(
Address
& address1,
269
Address
& address2 );
270
271
void
272
add_elem_to_cache
(
FArray2D_double
&
coords
,
std::string
& tag,
Address
& input_addr );
273
274
std::list<PoolData>::iterator
275
find
(
Address
& address);
276
277
PoolData
278
load_pool
(
Address
& address );
279
280
281
/**
282
std::string
283
lib_full_path(std::string tag_origin );
284
**/
285
286
std::list<PoolData>
pool_cache_
;
287
core::Size
max_cache_size_
;
288
core::Size
const
level_
;
289
core::Size
const
max_levels_
;
290
core::Real
radius_
;
291
core::Size
num_clusters_in_level_
;
292
std::string
filename_
;
293
core::Size
next_free_address_index_
;
294
bool
first_time_writing_
;
295
296
HierarchicalLevelOP
next_level_
;
297
};
298
299
}
300
}
301
}
302
303
#endif //INCLUDED_protocols_canonical_sampling_mc_convergence_check_HierarchicalLevel_HH
Generated on Sat Jun 1 2013 11:43:54 for Rosetta 3.5 by
1.8.4