Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
21 
22 // Package headers
23 // AUTO-REMOVED #include <protocols/match/Hit.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 
49 {
50 public:
51  typedef core::Size Size;
52 
53 public:
55 
56  /// @brief Write out the coordinates for a particular residue; the kinemage tag
57  /// is assumed to have been writen already.
58  void
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:
76  bool dominant_;
77  bool animate_;
78  bool group_; // false for subgroup
80 };
81 
83 {
84 public:
85  typedef core::Size Size;
87 
88 public:
91  WriteUpstreamCoordinateKinemage( std::ostream & ostr );
92 
94 
95  virtual
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
126 
127  virtual
128  Size
130 
131  void
133 
134  void
136 
137  void
139 
140  void
141  set_n_downstream_to_output( Size n_downstream_to_output );
142 
143  bool
145  return return_pseudo_hits_;
146  }
147 
148  void
149  return_pseudo_hits( bool setting ) {
150  return_pseudo_hits_ = setting;
151  }
152 
153 private:
155  std::ofstream file_out_;
156  std::ostream & ostr_;
158  mutable Size nkins_;
159 
164 
166 };
167 
169 {
170 public:
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
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
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:
233 
236 
237  bool animate_;
238  bool dominant_;
239  bool group_;
241 
244  std::ofstream file_out_;
245  std::ostream & ostr_;
246 
248 };
249 
251 {
252 public:
255 
256  virtual
257  void
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.
272 {
273 public:
276 
277  virtual
278  void
280  Hit const & hit,
281  std::ostream & ostr
282  ) const;
283 
284  void
286 
287  void
289 
290  virtual
291  void
292  set_downstream_master( std::string const & master );
293 
294 private:
295 
300 
301 };
302 
303 }
304 }
305 }
306 
307 #endif