Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AtomTreeDiffJobOutputter.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/AtomTreeDiffJobOutputter.hh
11 /// @brief header file for AtomTreeDiffJobOutputter class
12 /// @author Gordon Lemmon (gordon.h.lemmon@vanderbilt.edu); Rocco Moretti (rmoretti@u.washington.edu)
13 
14 
15 #ifndef INCLUDED_protocols_jd2_AtomTreeDiffJobOutputter_hh
16 #define INCLUDED_protocols_jd2_AtomTreeDiffJobOutputter_hh
17 
18 //unit headers
22 #include <protocols/jd2/Job.fwd.hh>
23 
24 //project headers
25 #include <core/pose/Pose.hh>
27 
28 //utility headers
29 #include <utility/file/FileName.hh>
30 #include <utility/io/ozstream.hh>
31 
32 //C++ headers
33 #include <string>
34 #include <set>
35 
36 #include <utility/vector1.hh>
37 
38 
39 namespace protocols {
40 namespace jd2 {
41 
42 ///@details this is a middle-layer implementation of JobOutputter for file-based output. It handles scorefile output, as scorefiles are common to file-outputting methods.
44 {
45 public:
46 
48 
50 
51  //////////////////////////////creating output functions/////////////////////////////////////////
52 
53  ///@brief this function outputs the final result of a job.
54  void final_pose( JobCOP job, core::pose::Pose const & pose );
55 
56  ///@brief this function is intended for saving mid-protocol poses; for example the final centroid structure in a combined centroid/fullatom protocol.
57  void other_pose( JobCOP job, core::pose::Pose const & pose, std::string const & tag, int copy_count = -1, bool score_only = false );
58 
59  /////////////////////////////////state of output functions/////////////////////////////////
60 
61  ///@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.
62  bool job_has_completed( JobCOP job );
63 
64  ///@brief this is the master function for determining the unique output identifier for a job
66 
67  ///@brief what precision should the atom_tree_diff be ouput at?
68  void set_precision(int bb_precision, int sc_precision, int bondlen_precision);
69 
70  ///@brief use input as reference pose?
71  void use_input_for_ref(bool use_input=true);
72 
73 private:
74 
75  ///@brief Appends pose to the silent file
76  void
77  dump_pose(
78  std::string const & tag,
79  core::pose::Pose const & pose,
80  std::map< std::string, core::Real > scores,
81  JobCOP job
82  );
83 
84  utility::io::ozstream out_;
86  std::set< std::string > used_tags_;
90 
91  ///@brief precision to output atom tree diff at.
93 
94  ///@brief use input as reference pose? (default false)
95  bool use_input_;
96 
97 }; // AtomTreeDiffJobOutputter
98 
99 } // namespace jd2
100 } // namespace protocols
101 
102 #endif //INCLUDED_protocols_jd2_AtomTreeDiffJobOutputter_HH