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
WriteUpstreamCoordinateKineamge.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/WriteUpstreamCoordinateKinemage.hh
12
/// @brief
13
/// @author Alex Zanghellini (zanghell@u.washington.edu)
14
/// @author Andrew Leaver-Fay (aleaverfay@gmail.com), porting to mini
15
16
#ifndef INCLUDED_protocols_match_output_WriteUpstreamCoordinateKineamge_hh
17
#define INCLUDED_protocols_match_output_WriteUpstreamCoordinateKineamge_hh
18
19
// Unit headers
20
#include <
protocols/match/output/WriteUpstreamCoordinateKineamge.fwd.hh
>
21
22
// Package headers
23
// AUTO-REMOVED #include <protocols/match/Hit.hh>
24
#include <
protocols/match/upstream/UpstreamBuilder.hh
>
25
#include <
protocols/match/downstream/DownstreamAlgorithm.hh
>
26
#include <
protocols/match/downstream/ClassicMatchAlgorithm.fwd.hh
>
27
28
// AUTO-REMOVED #include <protocols/match/BumpGrid.hh>
29
30
// Project headers
31
#ifdef WIN32
32
#include <
core/id/AtomID.hh
>
33
#endif
34
35
// C++ headers
36
// AUTO-REMOVED #include <string>
37
// AUTO-REMOVED #include <iostream>
38
#include <fstream>
39
40
#include <utility/vector1_bool.hh>
41
42
43
namespace
protocols {
44
namespace
match
{
45
namespace
output {
46
47
48
class
ResidueKinemageWriter
49
{
50
public
:
51
typedef
core::Size
Size
;
52
53
public
:
54
ResidueKinemageWriter
();
55
56
/// @brief Write out the coordinates for a particular residue; the kinemage tag
57
/// is assumed to have been writen already.
58
void
59
write_rsd_coords
(
60
std::ostream & ostr,
61
Size
const
scaffold_build_point_id,
62
Size
const
upstream_conf_id,
63
core::conformation::Residue
const
& rsd,
64
bool
is_instance =
false
65
)
const
;
66
67
void
dominant
(
bool
setting );
68
void
animate
(
bool
setting );
69
void
group
(
bool
setting );
70
void
write_virtual_atoms
(
bool
setting );
71
72
void
master
(
std::string
const
& setting );
73
74
private
:
75
std::string
master_
;
76
bool
dominant_
;
77
bool
animate_
;
78
bool
group_
;
// false for subgroup
79
bool
write_virtual_atoms_
;
80
};
81
82
class
WriteUpstreamCoordinateKinemage
:
public
downstream::DownstreamAlgorithm
83
{
84
public
:
85
typedef
core::Size
Size
;
86
typedef
core::Vector
Vector
;
87
88
public
:
89
WriteUpstreamCoordinateKinemage
();
90
WriteUpstreamCoordinateKinemage
(
std::string
const
& fname );
91
WriteUpstreamCoordinateKinemage
( std::ostream & ostr );
92
93
virtual
~WriteUpstreamCoordinateKinemage
();
94
95
virtual
96
downstream::DownstreamAlgorithmOP
97
clone
()
const
;
98
99
virtual
100
std::list< Hit >
101
build
(
102
Size
const
scaffold_build_point_id,
103
Size
const
upstream_conf_id,
104
core::conformation::Residue
const
& upstream_residue
105
)
const
;
106
107
/// @brief This method returns 'true' whether or not it's ClassicMatchAlgorithm is set
108
/// as it should not have its hits_to_include_with_partial_match method invoked.
109
virtual
110
bool
111
upstream_only
()
const
;
112
113
/// @brief This method returns 'true' since when it does return hits, it's those generated
114
/// by the ClassicMatchAlgorithm
115
virtual
116
bool
117
generates_primary_hits
()
const
;
118
119
120
/// @brief This method should not be invoked on this class,
121
/// since it returns "true" in its upstream_only
122
/// method.
123
virtual
124
HitPtrListCOP
125
hits_to_include_with_partial_match
(
match_dspos1
const
& m )
const
;
126
127
virtual
128
Size
129
n_possible_hits_per_upstream_conformation
()
const
;
130
131
void
132
set_kinemage_file_name
(
std::string
const
&
filename
);
133
134
void
135
set_match_algorithm
(
downstream::ClassicMatchAlgorithmCOP
algorithm );
136
137
void
138
set_downstream_writer
(
DownstreamCoordinateKinemageWriterCOP
dswriter );
139
140
void
141
set_n_downstream_to_output
(
Size
n_downstream_to_output );
142
143
bool
144
return_pseudo_hits
()
const
{
145
return
return_pseudo_hits_
;
146
}
147
148
void
149
return_pseudo_hits
(
bool
setting ) {
150
return_pseudo_hits_
= setting;
151
}
152
153
private
:
154
std::string
kinemage_file_name_
;
155
std::ofstream
file_out_
;
156
std::ostream &
ostr_
;
157
mutable
Size
last_scaffold_build_point_
;
158
mutable
Size
nkins_
;
159
160
downstream::ClassicMatchAlgorithmCOP
match_algorithm_
;
161
DownstreamCoordinateKinemageWriterCOP
dswriter_
;
162
Size
n_downstream_to_output_
;
163
mutable
Size
n_output_so_far_
;
164
165
bool
return_pseudo_hits_
;
166
};
167
168
class
WriteUpstreamHitKinemage
:
public
upstream::UpstreamResidueProcessor
169
{
170
public
:
171
WriteUpstreamHitKinemage
();
172
WriteUpstreamHitKinemage
(
std::string
const
& fname );
173
WriteUpstreamHitKinemage
( std::ostream & ostr );
174
175
virtual
~WriteUpstreamHitKinemage
();
176
177
virtual
178
void
179
process_hit
(
180
Hit
const
& hit,
181
core::conformation::Residue
const
& upstream_conformation
182
);
183
184
/// @brief Non-virtual method to write out a kinemage for an upstream residue
185
void
186
output_hit
(
187
Hit
const
& hit,
188
core::conformation::Residue
const
& upstream_conformation
189
);
190
191
/// @brief non-virtual method to write out a kinemage for an upstream residue;
192
/// without invoking dswriter_->write_downstream_coordinates().
193
/// Only information about the upstream portion of the hit is needed.
194
void
195
output_upstream_coordinates
(
196
upstream_hit
const
& hit,
197
core::conformation::Residue
const
& upstream_conformation
198
);
199
200
void
201
start_new_match
();
202
203
void
204
set_kinemage_file
(
std::string
const
& fname );
205
206
void
207
set_dswriter
(
DownstreamCoordinateKinemageWriterOP
dswriter );
208
209
void
geom_id
(
Size
setting );
210
211
/// @brief Set the kinemage master for the upstream residue, overriding
212
/// the default master, which is "geom#"
213
void
214
set_master
(
std::string
const
& master );
215
216
/// @brief Set whether the default master should be used, or whether the
217
/// user-defined master should be used. If the user defined master is the
218
/// empty string, no master will be writen.
219
void
220
default_master
(
bool
setting );
221
222
/// @brief Returns whether or not the default master is being used.
223
bool
224
default_master
()
const
;
225
226
void
animate
(
bool
setting );
227
void
dominant
(
bool
setting );
228
void
group
(
bool
setting );
229
void
write_virtual_atoms
(
bool
setting );
230
231
private
:
232
Size
matches_output_count_
;
233
234
bool
use_default_master_
;
235
std::string
master_
;
236
237
bool
animate_
;
238
bool
dominant_
;
239
bool
group_
;
240
bool
write_virtual_atoms_
;
241
242
Size
geom_id_
;
243
std::string
kinemage_file_name_
;
244
std::ofstream
file_out_
;
245
std::ostream &
ostr_
;
246
247
DownstreamCoordinateKinemageWriterOP
dswriter_
;
248
};
249
250
class
DownstreamCoordinateKinemageWriter
:
public
utility::pointer::ReferenceCount
251
{
252
public
:
253
DownstreamCoordinateKinemageWriter
();
254
virtual
~DownstreamCoordinateKinemageWriter
();
255
256
virtual
257
void
258
write_downstream_coordinates
(
259
Hit
const
& hit,
260
std::ostream & ostr
261
)
const
= 0;
262
263
virtual
264
void
265
set_downstream_master
(
std::string
const
&
str
) = 0;
266
267
};
268
269
/// @brief Class for writing conformations of the downstream partner in a kinemage
270
/// description.
271
class
SingleDownstreamResidueWriter
:
public
DownstreamCoordinateKinemageWriter
272
{
273
public
:
274
SingleDownstreamResidueWriter
();
275
virtual
~SingleDownstreamResidueWriter
();
276
277
virtual
278
void
279
write_downstream_coordinates
(
280
Hit
const
& hit,
281
std::ostream & ostr
282
)
const
;
283
284
void
285
set_restype
(
core::chemical::ResidueTypeCOP
);
286
287
void
288
set_downstream_builder
(
downstream::DownstreamBuilderCOP
dsbuilder );
289
290
virtual
291
void
292
set_downstream_master
(
std::string
const
& master );
293
294
private
:
295
296
std::string
master_
;
297
core::chemical::ResidueTypeCOP
restype_
;
298
utility::vector1< core::id::AtomID >
all_atom_inds_
;
299
downstream::DownstreamBuilderCOP
dsbuilder_
;
300
301
};
302
303
}
304
}
305
}
306
307
#endif
Generated on Sat Jun 1 2013 11:59:48 for Rosetta 3.5 by
1.8.4