Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PDBJobOutputter.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 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file protocols/jd2/PDBJobOutputter.hh
11 /// @brief header file for PDBJobOutputter class, part of August 2008 job distributor as planned at RosettaCon08
12 /// @author Steven Lewis smlewi@gmail.com
13 
14 
15 #ifndef INCLUDED_protocols_jd2_PDBJobOutputter_hh
16 #define INCLUDED_protocols_jd2_PDBJobOutputter_hh
17 
18 //unit headers
21 #include <protocols/jd2/Job.fwd.hh>
22 
23 //project headers
24 #include <core/pose/Pose.fwd.hh>
25 
26 //utility headers
27 // AUTO-REMOVED #include <utility/io/ozstream.hh>
28 
29 //C++ headers
30 #include <string>
31 
32 #include <utility/vector1.hh>
33 #include <utility/io/ozstream.fwd.hh>
34 #include <iostream>
35 
36 
37 namespace protocols {
38 namespace jd2 {
39 
40 ///@details this simplest implementation of JobOutputter outputs raw PDBs and associated files, uncompressed.
42 {
43 public:
44 
46 
48 
49  virtual ~PDBJobOutputter();
50 
51  //////////////////////////////creating output functions/////////////////////////////////////////
52 
53  ///@brief this function takes a string and writes it to disk (separately from Tracer output). This implementation writes a single file whose filename is based on the job and a user-specified extension (default .data)
54  // virtual --> moved to FileJobOutputter
55  // void file( JobCOP job, std::string const & data );
56 
57  ///@brief this function outputs the final result of a job. This implementation will write a PDB file (plus scores).
58  virtual
59  void final_pose( JobCOP job, core::pose::Pose const & pose );
60 
61  ///@brief this function is intended for saving mid-protocol poses; for example the final centroid structure in a combined centroid/fullatom protocol. This implementation will write a PDB file (plus scores).
62  virtual
63  void other_pose( JobCOP job, core::pose::Pose const & pose, std::string const & tag, int copy_count = -1, bool score_only = false );
64 
65  /////////////////////////////////state of output functions/////////////////////////////////
66 
67  ///@brief this function is not used for output, but it belongs here since it needs to check the same output locations as the class normally writes to. This class checks wherever output goes to see if the job's expected output already exists (on disk or whatever). This is the most basic form of checkpointing. The base implementation looks for a pdb with the job's name already in existence.
68  virtual
69  bool job_has_completed( JobCOP job );
70 
71  ///@brief this is the master function for determining the unique output identifier for a job
72  virtual
74 
75 protected:
76  ///@brief this private function provides the extended name, not just the output name. e.g output_name returns 1UBQ_0001, this returns 1UBQ_0001.pdb. In this case the extension is .pdb
77  virtual
79 
80  ////////////////////////////////////////score-related functions///////////////////////////////////
81 
82  ///@brief this function extracts the pose's scores for printing
83  virtual
84  void extract_scores( core::pose::Pose const & pose, utility::io::ozstream & out );
85 
86  //THIS FUNCTION WILL MOVE HIGHER IN THE HIERARCHY AT SOME POINT
87  ///@brief this function extracts the pose's scores for printing
88  virtual
89  void extract_data_from_Job( JobCOP job, utility::io::ozstream & out );
90 
91  //This function is deprecated for now - might return in the future
92 // ///@brief this function extracts the pose's extra data/scores for printing
93 // virtual
94 // void extract_extra_scores( core::pose::Pose const & pose, utility::io::ozstream & out );
95 
96  //////////////////////////////////////protected PDB output/////////////////////////////////////
97  ///@brief handles ozstream output; shared by both pdb output functions
98  virtual
99  void dump_pose( JobCOP job, core::pose::Pose const & pose, utility::io::ozstream & out );
100 
101  ////////////////////////////////////////data////////////////////////////////////////
102 private:
105 }; // PDBJobOutputter
106 
107 } // namespace jd2
108 } // namespace protocols
109 
110 #endif //INCLUDED_protocols_jd2_PDBJobOutputter_HH