Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
InnerJob.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/InnerJob.hh
11 /// @brief header file for Job classes, part of August 2008 job distributor as
12 /// planned at RosettaCon08. This file is responsible for three ideas: "inner"
13 /// jobs, "outer" jobs (with which the job distributor works) and job container
14 /// (currently just typdefed in the .fwd.hh)
15 /// @author Steven Lewis smlewi@gmail.com
16 
17 #ifndef INCLUDED_protocols_jd2_InnerJob_hh
18 #define INCLUDED_protocols_jd2_InnerJob_hh
19 
20 //unit headers
21 // AUTO-REMOVED #include <protocols/jd2/Job.fwd.hh>
22 
23 //project headers
24 #include <core/pose/Pose.fwd.hh>
25 
26 #include <protocols/jd2/JobInputter.fwd.hh> //for friendship
27 #include <protocols/jd2/Parser.fwd.hh> //for friendship
28 #include <protocols/jd2/JobDistributor.fwd.hh> //for friendship
29 
30 //utility headers
31 #include <utility/pointer/ReferenceCount.hh>
32 #include <core/types.hh>
33 
34 //C++ headers
35 #include <string>
36 // AUTO-REMOVED #include <list>
37 
38 #include <utility/vector1.hh>
39 
40 
41 namespace protocols {
42 namespace jd2 {
43 
44 /// @details The InnerJob class is responsible for knowing input requirements
45 /// for a given job - how many nstruct, and what the input is. InnerJobs are
46 /// relatively heavy; there is no need to duplicate a series of InnerJobs for
47 /// each index into nstruct. The companion Job class handles the nstruct index
48 /// and has a pointer to an InnerJob (which is shared across many Jobs).
49 /// InnerJob also holds a PoseOP to maintain the unmodified input pose for that
50 /// job.
52 
53 public:
54  ///@brief ctor. Note that it takes only the input tag and max nstruct,
55  /// pose instantiation is deferred until the pose is needed
57 
58  ///@brief ctor. Note that it takes only the input tag and max nstruct,
59  /// pose instantiation is deferred until the pose is needed
60  InnerJob( core::pose::PoseCOP, std::string const & input_tag, core::Size nstruct_max );
61 
62  virtual ~InnerJob();
63 
64  ///@brief Note: only compare if the pointers to the poses are to the
65  ///same location
66  friend
67  bool
68  operator==(InnerJob const & a, InnerJob const & b);
69 
70 
71  friend
72  bool
73  operator!=(InnerJob const & a, InnerJob const & b);
74 
75  virtual
76  void
77  show( std::ostream & out ) const;
78 
79  friend
80  std::ostream &
81  operator<< ( std::ostream & out, const InnerJob & inner_job );
82 
83  ///@brief return the input tag (a string of space separated PDB filenames)
84  std::string const & input_tag() const;
85 
86  ///@brief
87  core::Size nstruct_max() const;
88 
89  ///@brief return a COP to the input pose
90  /// DO NOT USE OUTSIDE OF JD2 NAMESPACE
92 
93  void set_bad( bool value = true ) {
94  bad_ = value;
95  }
96 
97  bool bad() const {
98  return bad_;
99  }
100 
101 protected:
102  /// @brief set the input pose.
103  /// this function is deliberately heavily protected. Parser uses it to
104  /// re-load the pose after adding constraints. JobInputter is its primary
105  /// client (using it to load poses). JobDistributor uses it to set the PoseCOP
106  /// to NULL when done with the input.
107  void set_pose( core::pose::PoseCOP pose );
108 
112 
113 private:
117  bool bad_;
118 }; // InnerJob
119 
120 } // namespace jd2
121 } // namespace protocols
122 
123 #endif //INCLUDED_protocols_jd2_InnerJob_HH