Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JobInputter.cc
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/jd2/JobInputter.cc
12 /// @brief August 2008 job distributor as planned at RosettaCon08 - Interface base class JobInputter
13 /// @author Steven Lewis smlewi@gmail.com
14 
15 ///Unit headers
17 
18 ///Project headers
19 #include <protocols/jd2/Job.hh>
21 
22 #include <core/pose/Pose.hh>
23 
24 #include <basic/options/option.hh>
25 #include <basic/options/keys/out.OptionKeys.gen.hh>
26 #include <basic/options/keys/run.OptionKeys.gen.hh>
27 
28 #include <utility/vector1.hh>
29 
30 
31 ///Utility headers
32 
33 ///C++ headers
34 
35 namespace protocols {
36 namespace jd2 {
37 
39 
40 ///@brief this code is here to restrict the use of inner_job_nonconst (this class is a friend class and can do it)
42  job->inner_job_nonconst()->set_pose( core::pose::PoseCOP( new core::pose::Pose(pose) ) );
43 }
44 
45 ///@brief this code is here to restrict the use of inner_job_nonconst (this class is a friend class and can do it)
47  job->inner_job_nonconst()->set_pose( pose );
48 }
49 
50 ///@brief this code is here to restrict the use of inner_job_nonconst (this class is a friend class and can do it)
52  using namespace basic::options;
53  using namespace basic::options::OptionKeys;
54 
55  if ( option[ run::shuffle ]() ) {
56  return option[ out::shuffle_nstruct ]();
57  } else {
58  return option[ out::nstruct ]();
59  }
60 }
61 
65 ) {
66  switch(source) {
67  case JobInputterInputSource::NONE: return "None";
68  case JobInputterInputSource::UNKNOWN: return "Uknown";
69  case JobInputterInputSource::POSE: return "Pose";
70  case JobInputterInputSource::SILENT_FILE: return "SilentFile";
71  case JobInputterInputSource::PDB_FILE: return "PdbFile";
72  case JobInputterInputSource::ATOM_TREE_FILE: return "AtomTreeFile";
73  case JobInputterInputSource::DATABASE: return "Database";
74  case JobInputterInputSource::RESOURCE_MANAGED_JOB: return "ResourceManagerJob";
75  default:
76  utility_exit_with_message("Unrecognized JobInputterInputSource");
77  }
78 }
79 
80 } // jd2
81 } // protocols