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
match
output
PDBWriter.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
// :noTabs=false:tabSize=4:indentSize=4:
4
//
5
// (c) Copyright Rosetta Commons Member Institutions.
6
// (c) This file is part of the Rosetta software suite and is made available under license.
7
// (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
8
// (c) For more information, see http://www.rosettacommons.org. Questions about this can be
9
// (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
10
11
/// @file protocols/match/output/PDBWriter.hh
12
/// @brief
13
/// @author Florian Richter (floric@u.washington.edu) june 2009
14
15
#ifndef INCLUDED_protocols_match_output_PDBWriter_hh
16
#define INCLUDED_protocols_match_output_PDBWriter_hh
17
18
// Unit headers
19
#include <
protocols/match/output/PDBWriter.fwd.hh
>
20
21
// Package Headers
22
#include <
core/conformation/Residue.fwd.hh
>
23
24
// AUTO-REMOVED #include <protocols/match/Hit.hh> // REQUIRED FOR WINDOWS
25
#include <
protocols/match/Hit.fwd.hh
>
26
#include <
protocols/match/MatcherTask.fwd.hh
>
27
// AUTO-REMOVED #include <protocols/match/downstream/DownstreamBuilder.hh>
28
#include <
protocols/match/output/MatchGrouper.fwd.hh
>
29
#include <
protocols/match/output/OutputWriter.hh
>
30
#include <
protocols/match/output/UpstreamHitCacher.fwd.hh
>
31
// AUTO-REMOVED #include <protocols/match/output/WriteUpstreamCoordinateKineamge.fwd.hh>
32
33
// Utility headers
34
#include <utility/pointer/ReferenceCount.hh>
35
36
// C++ headers
37
#include <map>
38
#include <set>
39
40
#include <
core/pose/Pose.fwd.hh
>
41
#include <
protocols/match/downstream/DownstreamBuilder.fwd.hh
>
42
#include <utility/vector1.hh>
43
#include <iterator>
44
45
46
namespace
protocols {
47
namespace
match
{
48
namespace
output {
49
50
class
PDBWriter
:
public
OutputWriter
51
{
52
53
public
:
54
typedef
std::pair< core::Size, core::Size >
SizePair
;
55
56
typedef
OutputWriter
Parent
;
57
58
public
:
59
60
PDBWriter
();
61
62
virtual
~PDBWriter
();
63
64
virtual
65
void
66
prepare_for_output_writing
();
67
68
virtual
69
void
70
record_match
(
match
const
& m );
71
72
virtual
73
void
74
record_match
(
match_dspos1
const
& m );
75
76
//core::pose::PoseCOP
77
//create_output_pose_from_dspos1_match(
78
// match_dspos1 const & m );
79
80
void
81
set_coordinate_cacher
(
UpstreamHitCacherOP
);
82
83
void
84
set_prefix
(
std::string
const
&
prefix
);
85
86
void
87
initialize_from_matcher_task
(
88
MatcherTaskCOP
mtask
89
);
90
91
void
92
set_downstream_builder
(
93
Size
geomcst_id,
94
downstream::DownstreamBuilderCOP
dsbuilder
95
);
96
97
void
98
assemble_remark_lines
(
99
core::pose::Pose
& outpose,
100
utility::vector1< core::conformation::ResidueCOP >
const
& upstream_matchres,
101
std::map< core::Size, core::Size >
const
& redundant_upstream_res,
102
utility::vector1< core::Size >
const
& ex_geom_ids_for_upstream_res
103
)
const
;
104
105
core::pose::PoseCOP
106
create_output_upstream_pose
(
107
utility::vector1< core::conformation::ResidueCOP >
const
& upstream_matchres,
108
std::map< core::Size, core::Size >
const
& redundant_upstream_res,
109
utility::vector1< core::Size >
const
& ex_geom_ids_for_upstream_res
110
);
111
112
std::string
113
signature_string
(
114
utility::vector1< core::conformation::ResidueCOP >
const
& upstream_matchres
115
)
const
;
116
117
core::Size
118
num_geom_cst
()
const
;
119
120
std::string
121
scaf_name
()
const
;
122
123
std::string
124
cstfile_name
()
const
;
125
126
std::string
127
prefix
()
const
;
128
129
protected
:
130
131
UpstreamHitCacherOP
132
coordinate_cacher
();
133
134
utility::vector1< downstream::DownstreamBuilderCOP >
const
&
135
dsbuilders
();
136
137
std::string
138
assemble_outtag
(
139
utility::vector1< core::conformation::ResidueCOP >
const
& upstream_matchres
140
);
141
142
143
private
:
144
145
UpstreamHitCacherOP
coordinate_cacher_
;
146
147
// whether to write the whole pose or only the matched residues
148
bool
write_matchres_only_
;
149
150
std::string
scaf_name_
,
cstfile_name_
,
prefix_
;
151
152
core::Size
num_written_
;
153
core::Size
num_geom_cst_
;
154
155
//needed to build the downstream target for pdb writing
156
utility::vector1< downstream::DownstreamBuilderCOP >
dsbuilders_
;
157
158
//
159
core::pose::PoseCOP
orig_upstream_pose_
;
160
core::pose::PoseCOP
downstream_pose_from_task_
;
161
162
//map to keep track of the output names
163
std::map< std::string, SizePair >
signature_map_
;
164
165
//which of the cst res to write separate matches for
166
utility::vector1< bool >
output_dsgeom_for_geomcst_
;
167
168
//info about what the targets are for upstream only matching
169
std::map< core::Size, core::Size >
upstream_only_geom_cst_
;
170
171
};
172
173
/// @brief an output writer that uses a grouper to group matches and
174
/// then writes out one pdb file per group, with the different hits
175
/// from the group in different MODEL sections
176
class
CloudPDBWriter
:
public
PDBWriter
177
{
178
179
public
:
180
typedef
PDBWriter
parent
;
181
typedef
utility::vector1< std::set< upstream_hit >
>
UpstreamHitSets
;
182
typedef
utility::vector1< std::set< downstream_hit >
>
DownstreamHitSets
;
183
184
CloudPDBWriter
(
MatchGrouperOP
grouper );
185
186
virtual
~CloudPDBWriter
();
187
188
virtual
189
void
190
prepare_for_output_writing
();
191
192
void
193
end_output_writing
();
194
195
/// @brief no writing in this function, only saving the hits according
196
/// to what group they belong to
197
virtual
198
void
199
record_match
(
match
const
& m );
200
201
virtual
202
void
203
record_match
(
match_dspos1
const
& m );
204
205
206
/// @brief this is where the actual writing happens
207
void
208
write_match_groups
();
209
210
//accessors
211
public
:
212
213
utility::vector1< UpstreamHitSets >
const
&
match_groups_ushits
()
const
;
214
utility::vector1< DownstreamHitSets >
const
&
match_groups_dshits
()
const
;
215
utility::vector1< match_dspos1 >
const
&
representative_group_matches
()
const
;
216
217
utility::vector1< std::set< downstream_hit >::const_iterator
>
const
&
ds_hitset_its
()
const
;
218
utility::vector1< std::set< downstream_hit >::const_iterator
>
const
&
ds_hitset_end_its
()
const
;
219
protected
:
220
221
void
222
setup_hitset_iterators_for_group
(
223
core::Size
const
group );
224
225
void
226
clear_match_data
();
227
228
private
:
229
230
MatchGrouperOP
grouper_
;
231
232
utility::vector1< UpstreamHitSets >
match_groups_ushits_
;
233
utility::vector1< DownstreamHitSets >
match_groups_dshits_
;
234
utility::vector1< std::string >
unique_match_names_
;
235
utility::vector1< match_dspos1 >
representative_group_matches_
;
236
237
utility::vector1< std::set< upstream_hit >::const_iterator
>
us_hitset_its_
;
238
utility::vector1< std::set< upstream_hit >::const_iterator
>
us_hitset_end_its_
;
239
utility::vector1< std::set< downstream_hit >::const_iterator
>
ds_hitset_its_
;
240
utility::vector1< std::set< downstream_hit >::const_iterator
>
ds_hitset_end_its_
;
241
242
};
243
244
/// @brief helper class for the MatcherMover that will put a match
245
/// into a supplied pose
246
class
PoseMatchOutputWriter
:
public
CloudPDBWriter
{
247
248
public
:
249
250
typedef
CloudPDBWriter
parent
;
251
252
PoseMatchOutputWriter
(
MatchGrouperOP
grouper );
253
254
~PoseMatchOutputWriter
();
255
256
void
257
insert_match_into_pose
(
258
core::pose::Pose
& pose,
259
core::Size
match_group
260
);
261
262
void
263
insert_match_into_pose
(
264
core::pose::Pose
& pose
265
);
266
267
void
268
end_output_writing
();
269
270
271
};
272
273
274
}
275
}
276
}
277
278
#endif
Generated on Sat Jun 1 2013 11:59:43 for Rosetta 3.5 by
1.8.4