Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
20 
21 // Package Headers
23 
24 // AUTO-REMOVED #include <protocols/match/Hit.hh> // REQUIRED FOR WINDOWS
27 // AUTO-REMOVED #include <protocols/match/downstream/DownstreamBuilder.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>
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 
57 
58 public:
59 
60  PDBWriter();
61 
62  virtual ~PDBWriter();
63 
64  virtual
65  void
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
82 
83  void
84  set_prefix( std::string const & prefix );
85 
86  void
88  MatcherTaskCOP mtask
89  );
90 
91  void
93  Size geomcst_id,
95  );
96 
97  void
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 
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 
115  ) const;
116 
117  core::Size
118  num_geom_cst() const;
119 
121  scaf_name() const;
122 
124  cstfile_name() const;
125 
127  prefix() const;
128 
129 protected:
130 
133 
135  dsbuilders();
136 
140  );
141 
142 
143 private:
144 
146 
147  // whether to write the whole pose or only the matched residues
149 
151 
154 
155  //needed to build the downstream target for pdb writing
157 
158  //
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
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;
183 
184  CloudPDBWriter( MatchGrouperOP grouper );
185 
186  virtual ~CloudPDBWriter();
187 
188  virtual
189  void
191 
192  void
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
209 
210 //accessors
211 public:
212 
216 
219 protected:
220 
221  void
223  core::Size const group );
224 
225  void
227 
228 private:
229 
231 
236 
241 
242 };
243 
244 /// @brief helper class for the MatcherMover that will put a match
245 /// into a supplied pose
247 
248 public:
249 
251 
253 
255 
256  void
258  core::pose::Pose & pose,
259  core::Size match_group
260  );
261 
262  void
264  core::pose::Pose & pose
265  );
266 
267  void
269 
270 
271 };
272 
273 
274 }
275 }
276 }
277 
278 #endif