Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
EnzdesJobInputter.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/enzdes/EnzdesJobInputter.cc
11 /// @brief job inputter that adds some stuff for enzdes to the pose
12 /// @author Florian Richter ( floric@u.washington.edu), Sagar Khare (khares@u.washington.edu)
13 
14 ///Unit headers
17 
18 //package headers
19 #include <protocols/jd2/Job.hh>
23 
24 ///Project headers
25 #include <basic/options/option.hh>
26 #include <core/pose/Pose.hh>
30 
31 #ifdef WIN32
32 // required for VS2005 build
34 #endif
35 
36 ///Utility headers
37 #include <basic/Tracer.hh>
38 
39 ///C++ headers
40 #include <string>
41 
42 // option key includes
43 #include <basic/options/keys/enzdes.OptionKeys.gen.hh>
44 
45 #include <utility/vector1.hh>
46 
47 
48 static basic::Tracer TR("protocols.enzdes.EnzdesJobInputter");
49 
50 namespace protocols {
51 namespace enzdes {
52 
54  : enz_loops_file_(NULL)
55 {
56  TR << "Instantiate EnzdesJobInputter" << std::endl;
57  if( basic::options::option[ basic::options::OptionKeys::enzdes::enz_loops_file ].user() ){
58 
60  if( !enz_loops_file_->read_loops_file( basic::options::option[ basic::options::OptionKeys::enzdes::enz_loops_file ] ) ){
61  utility_exit_with_message("Reading enzdes loops file failed");
62  }
63  }
64 }
65 
67 }
68 
69 void
71  TR << "EnzdesJobInputter::pose_from_job" << std::endl;
72 
73  std::string input_tag( job->input_tag() );
75  if( enz_loops_file_){
78  segob->clear();
79  for( core::Size i =1; i <= enz_loops_file_->num_loops(); ++i){
80  segob->add_segment(enz_loops_file_->loop_info( i )->start(), enz_loops_file_->loop_info( i )->stop() + 1 /*segment convention*/ );
81  }
83  }
84 
85  load_pose_into_job(pose, job);
86 }
87 
88 //CREATOR SECTION
91 {
92  return "EnzdesJobInputter";
93 }
94 
97  return new EnzdesJobInputter;
98 }
99 
100 }//enzdes
101 }//protocols