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
WriteKinemageOutputter.cc
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/WriteKinemageOutputter.cc
12
/// @brief Forward declaration of class to write output matches that have (presumably) passed the output filters.
13
/// @author Alex Zanghellini (zanghell@u.washington.edu)
14
/// @author Andrew Leaver-Fay (aleaverfay@gmail.com), porting to mini
15
16
// Unit headers
17
#include <
protocols/match/output/WriteKinemageOutputter.hh
>
18
19
// Package Headers
20
#include <
protocols/match/Hit.hh
>
21
#include <
protocols/match/output/UpstreamHitCacher.hh
>
22
#include <
protocols/match/output/WriteUpstreamCoordinateKineamge.hh
>
23
24
// Project Headers
25
#include <
core/conformation/Residue.hh
>
26
27
// Utility headers
28
#include <utility/pointer/ReferenceCount.hh>
29
30
#include <utility/vector1.hh>
31
32
33
namespace
protocols {
34
namespace
match
{
35
namespace
output {
36
37
WriteKinemageOutputter::~WriteKinemageOutputter
() {}
38
39
40
void
41
WriteKinemageOutputter::record_match
(
match
const
& m )
42
{
43
upstream_kin_writer_
->start_new_match();
44
45
for
(
Size
ii = 1; ii <= m.size(); ++ii ) {
46
core::conformation::ResidueCOP
conf =
47
coordinate_cacher_
->upstream_conformation_for_hit( ii, m[ ii ] );
48
49
upstream_kin_writer_
->set_dswriter(
dswriters_
[ ii ] );
50
upstream_kin_writer_
->geom_id( ii );
51
upstream_kin_writer_
->output_hit( m[ ii ], *conf );
52
}
53
}
54
55
void
56
WriteKinemageOutputter::record_match
(
match_dspos1
const
& m )
57
{
58
upstream_kin_writer_
->start_new_match();
59
Size
const
ds_hit_id = m.
originating_geom_cst_for_dspos
;
60
upstream_kin_writer_
->set_dswriter(
dswriters_
[ ds_hit_id ] );
61
62
for
(
Size
ii = 1; ii <= m.
upstream_hits
.size(); ++ii ) {
63
core::conformation::ResidueCOP
conf =
64
coordinate_cacher_
->upstream_conformation_for_hit( ii,
fake_hit
( m.
upstream_hits
[ ii ] ) );
65
66
upstream_kin_writer_
->geom_id( ii );
67
if
( ii == ds_hit_id ) {
68
upstream_kin_writer_
->output_hit(
full_hit
( m ), *conf );
69
}
else
{
70
upstream_kin_writer_
->output_upstream_coordinates( m.
upstream_hits
[ ii ], *conf );
71
}
72
}
73
}
74
75
void
76
WriteKinemageOutputter::set_coordinate_cacher
(
UpstreamHitCacherOP
cacher )
77
{
78
coordinate_cacher_
= cacher;
79
}
80
81
void
82
WriteKinemageOutputter::set_n_geomcst
(
Size
n_geomcst )
83
{
84
assert(
dswriters_
.size() == 0 );
// only set once!
85
dswriters_
.resize( n_geomcst );
86
}
87
88
void
89
WriteKinemageOutputter::set_kin_writer
(
90
WriteUpstreamHitKinemageOP
writer
91
)
92
{
93
upstream_kin_writer_
= writer;
94
}
95
96
void
97
WriteKinemageOutputter::set_downstream_writer
(
98
Size
geomcst_id,
99
DownstreamCoordinateKinemageWriterOP
ds_writer
100
)
101
{
102
dswriters_
[ geomcst_id ] = ds_writer;
103
}
104
105
}
106
}
107
}
Generated on Sat Jun 1 2013 11:59:48 for Rosetta 3.5 by
1.8.4