Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Parser.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/Parser.cc
12 /// @brief August 2008 job distributor as planned at RosettaCon08 - Interface base class Parser
13 /// @author Steven Lewis smlewi@gmail.com
14 
15 ///Unit headers
16 #include <protocols/jd2/Parser.hh>
17 
18 ///Package headers
19 #include <protocols/jd2/Job.hh>
21 
22 ///Project headers
23 #include <core/pose/Pose.hh>
24 
25 #include <utility/exit.hh>
26 #include <utility/vector1.hh>
27 #include <sstream>
28 
29 namespace protocols {
30 namespace jd2 {
31 
33 
34 ///@details the impetus for this function is that Parser is a friend of the InnerJob class and can modify the pose - actual mover generation/pose updating is handled by derived classes.
35 void
37 
38  //unpackage job
39  core::pose::Pose pose( *(job->get_pose()) );
40 
41  std::stringstream err_msg;
42  err_msg
43  << "Attempting to initiate job distribution for "
44  << "input job '" << job->input_tag() << "', "
45  << "but the generated pose has no residues."
46  << "make sure you specified a valid input PDB, silent file "
47  << "or database.";
48 
49  runtime_assert_string_msg( pose.total_residue() > 0, err_msg.str() );
50 
51  //returns true if there was a pose change (NOT if the mover changed)
52  if ( generate_mover_from_pose( job, pose, mover, new_input, ""/*xml_fname, this means go to options system*/ ) ){
53  //repackage pose into job
54  job->inner_job_nonconst()->set_pose( core::pose::PoseCOP( new core::pose::Pose(pose) ) );
55  }
56 
57  return;
58 }
59 
60 }//jd2
61 }//protocols