Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Parser.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/Parser.hh
11 /// @brief header file for Parser class, part of August 2008 job distributor
12 /// @author Steven Lewis smlewi@gmail.com
13 
14 
15 #ifndef INCLUDED_protocols_jd2_Parser_hh
16 #define INCLUDED_protocols_jd2_Parser_hh
17 
18 //unit headers
20 #include <protocols/jd2/Job.fwd.hh>
22 
23 //project headers
24 #include <core/pose/Pose.fwd.hh>
25 
26 //utility headers
27 #include <utility/pointer/ReferenceCount.hh>
28 
29 #include <utility/vector1.hh>
30 
31 
32 namespace protocols {
33 namespace jd2 {
34 
35 ///@details the Parser class can create a protocol (made of Movers) from an XML file. This interface class describes its functionality for the August 08 job distributor.
36 
38 {
39 public:
43 public:
44 
45  virtual ~Parser();
46 
47  ///@brief generate_mover_from_job is the function called by the job distributor to request a mover. It is defined in the base class (this class) and handles unpackaging the job and passes the work to generate_mover_from_pose. The pose is repackaged into the JobOP so that jobs starting off that pose are properly modified.
48  ///@param [in] JobOP job this is the job we're working on (contains the input pose)
49  ///@param [in/out] mover this is a mover; the function can choose to overwrite the input with a new mover
50  ///@param [in] bool new_input true if this is different input (a different pose) from the last job distributor cycle
51  void
52  generate_mover_from_job( JobOP job, MoverOP & mover, bool new_input );
53 
54  ///@brief generate_mover_from_pose is overloaded by derived classes to parse as desired. The pose is passed by nonconst reference - the function is thus allowed to modify this pose (preferably not at all, but by adding constraints if necessary). This pose will stay modified for jobs starting off that pose. The function is expected to use its return bool to signal whether the pose has changed or not (and thus whether it needs to be repackaged back into the InnerJob). This function should return IMMEDIATELY with false if it chooses not to modify the mover or pose.
55  ///@param [in] JobOP job this is the job we're working on (contains the input pose's name)
56  ///@param [in/out] pose this is the "starting pose" for a series of jobs; the function is allowed to modify it by adding constraints if necessary
57  ///@param [in/out] mover this is a mover; the function can choose to overwrite the input with a new mover
58  ///@param [in] bool new_input true if this is different input (a different pose) from the last job distributor cycle
59  ///@param [out] bool the return value states whether or not the pose has been changed - it will be repackaged into the InnerJob only as necessary
60  virtual
61  bool
62  generate_mover_from_pose( JobCOP job, Pose & pose, MoverOP & mover, bool new_input, std::string const xml_file ) = 0;
63 
64 }; // Parser
65 
66 } // namespace jd2
67 } // namespace protocols
68 
69 #endif //INCLUDED_protocols_jd2_Parser_HH