Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PoseInputStreamJobInputter.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 //
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/PoseInputStreamJobInputter.cc
11 /// @brief
12 /// @author James Thompson
13 
15 #include <protocols/jd2/Job.hh>
18 
19 #include <core/pose/Pose.hh>
20 // AUTO-REMOVED #include <core/pose/util.hh>
23 #include <core/chemical/util.hh>
25 
26 #include <basic/options/option.hh>
27 #include <basic/options/keys/out.OptionKeys.gen.hh>
28 #include <basic/Tracer.hh>
29 #include <utility/vector1.hh>
30 #include <utility/exit.hh>
31 
32 #include <ObjexxFCL/string.functions.hh>
33 
34 #include <string>
35 
36 //Auto Headers
38 #include <core/kinematics/Jump.hh>
39 
40 
41 static basic::Tracer tr("protocols.jd2.PoseInputStreamJobInputter");
42 
43 namespace protocols {
44 namespace jd2 {
45 
47  tr.Debug << "Instantiate PoseInputStreamJobInputter" << std::endl;
48 }
49 
51 
53  core::pose::Pose & pose, JobOP /*job*/
54 ) {
55  tr.Debug << "PoseInputStreamJobInputter::pose_from_job" << std::endl;
56  pose.clear();
57  if ( input_.has_another_pose() ) {
58  input_.fill_pose( pose, *rsd_set_ );
59  } else {
60  utility_exit_with_message( "Error: no more poses!" );
61  }
62 }
63 
64 /// @details this function determines what jobs exist from -in::file::silent and
65 /// -in::file::tags
67  tr.Debug << "PoseInputStreamJobInputter::fill_jobs" << std::endl;
68 
69  jobs.clear(); //should already be empty anyway
70 
71  using core::Size;
72  using std::string;
73  using utility::vector1;
74  using core::pose::Pose;
76  using namespace core::import_pose::pose_stream;
77 
79 
80  using namespace basic::options;
81  using namespace basic::options::OptionKeys;
82  Size const nstruct( option[ out::nstruct ]() );
83  Size const shuffle_nstruct( option[ out::shuffle_nstruct ]() );
84  vector1< JobOP > inner_jobs;
86 
87  for ( core::Size index = 1; index <= shuffle_nstruct; ++index ) {
88  InnerJobOP ijob( new InnerJob( "job_" + ObjexxFCL::string_of(index), nstruct ) );
89  jobs.push_back( JobOP( new Job( ijob, index ) ) );
90  tr.Trace << "pushing " << ijob->input_tag() << " nstruct index " << index << std::endl;
91  }
92 
93 } // fill_jobs
94 
97 }
98 
99 //CREATOR SECTION
102 {
103  return "PoseInputStreamJobInputter";
104 }
105 
108  return new PoseInputStreamJobInputter;
109 }
110 
111 } // jd2
112 } // protocols