Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
18 
19 // Package Headers
20 #include <protocols/match/Hit.hh>
23 
24 // Project Headers
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 
38 
39 
40 void
42 {
43  upstream_kin_writer_->start_new_match();
44 
45  for ( Size ii = 1; ii <= m.size(); ++ii ) {
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
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 ) {
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
77 {
78  coordinate_cacher_ = cacher;
79 }
80 
81 void
83 {
84  assert( dswriters_.size() == 0 ); // only set once!
85  dswriters_.resize( n_geomcst );
86 }
87 
88 void
91 )
92 {
93  upstream_kin_writer_ = writer;
94 }
95 
96 void
98  Size geomcst_id,
100 )
101 {
102  dswriters_[ geomcst_id ] = ds_writer;
103 }
104 
105 }
106 }
107 }