Rosetta 3.4
Public Types | Public Member Functions
protocols::jd2::Job Class Reference

#include <Job.hh>

Inheritance diagram for protocols::jd2::Job:
Inheritance graph
[legend]
Collaboration diagram for protocols::jd2::Job:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::list< std::string > Strings
 TODO these should be maps rather than lists.
typedef std::list< std::pair
< std::string, std::string > > 
StringStringPairs
typedef std::map< std::string,
core::Real
StringRealPairs

Public Member Functions

 Job (InnerJobOP inner_job, core::Size nstruct_index)
JobOP copy_without_output () const
 returns a copy of this object whose "output fields" are zeroed out. Used by the JobDistributor in cases where the job fails and must be retried to prevent accumulation of Job state after a failure. This implementation was chosen over a clear_all_output function to prevent mover A from deleting mover B's hard work! You probably should not be trying to call this function. The exception: If you want an intermediate-output pose (not the final pose) to not have the aggregated accessory data in the "real" Job object.
virtual ~Job ()
InnerJobCOP inner_job () const
 access to inner-job ... use is discouraged - use sparingly!
std::string const & input_tag () const
 return the input tag (a short string, generally)
InnerJobOP inner_job_nonconst ()
 nonconst access is intended only for the JobInputter to load poses into the InnerJob, and the Parser to add constraints, and the JobDistributor to delete completed inputs (recycle memory)
core::pose::PoseCOP get_pose () const
 get_pose : will return
void get_pose (core::pose::Pose &) const
 in-place copy of input pose
core::Size nstruct_index () const
core::Size nstruct_max () const
void add_string (std::string const &string_in)
 add an output string
void add_strings (Strings const &)
 add output strings
void add_string_string_pair (std::string const &string1, std::string const &string2)
 add a string/string pair
void add_string_real_pair (std::string const &string_in, core::Real const real_in)
 add a string/real pair
Strings::const_iterator output_strings_begin () const
Strings::const_iterator output_strings_end () const
StringStringPairs::const_iterator output_string_string_pairs_begin () const
StringStringPairs::const_iterator output_string_string_pairs_end () const
StringRealPairs::const_iterator output_string_real_pairs_begin () const
StringRealPairs::const_iterator output_string_real_pairs_end () const
void set_status_prefix (std::string prefix)
std::string const & status_prefix () const
bool completed () const
bool to_do () const
bool bad () const
void set_completed (bool value=true)
void set_bad (bool value=true)

Detailed Description

The Job class is directly used by the job distributor. It contains an index into nstruct and a lightweight pointer to an InnerJob (to share those heavier classes). It also directly contains job-associated output data. The idea here is that your scores, etc are associated with the job, not with a particular pose within that running job. Thus, the Job object is a better place to store them than the pose.


Member Typedef Documentation

typedef std::map< std::string, core::Real > protocols::jd2::Job::StringRealPairs
typedef std::list< std::string > protocols::jd2::Job::Strings

TODO these should be maps rather than lists.

typedef std::list< std::pair< std::string, std::string > > protocols::jd2::Job::StringStringPairs

Constructor & Destructor Documentation

protocols::jd2::Job::Job ( InnerJobOP  inner_job,
core::Size  nstruct_index 
)

Referenced by copy_without_output().

protocols::jd2::Job::~Job ( ) [virtual]

Member Function Documentation

void protocols::jd2::Job::add_string ( std::string const &  string_in)

add an output string

void protocols::jd2::Job::add_string_real_pair ( std::string const &  string_in,
core::Real const  real_in 
)

add a string/real pair

void protocols::jd2::Job::add_string_string_pair ( std::string const &  string1,
std::string const &  string2 
)

add a string/string pair

void protocols::jd2::Job::add_strings ( Strings const &  strings)

add output strings

adds output strings

bool protocols::jd2::Job::bad ( ) const

Referenced by to_do().

bool protocols::jd2::Job::completed ( ) const [inline]
JobOP protocols::jd2::Job::copy_without_output ( ) const

returns a copy of this object whose "output fields" are zeroed out. Used by the JobDistributor in cases where the job fails and must be retried to prevent accumulation of Job state after a failure. This implementation was chosen over a clear_all_output function to prevent mover A from deleting mover B's hard work! You probably should not be trying to call this function. The exception: If you want an intermediate-output pose (not the final pose) to not have the aggregated accessory data in the "real" Job object.

returns a copy of this object whose "output fields" are zeroed out. Used by the JobDistributor in cases where the job fails and must be retried to prevent accumulation of Job state after a failure. This implementation was chosen over a clear_all_output function to prevent mover A from deleting mover B's hard work! You probably should not be trying to call this function.

References Job().

Referenced by get_pose().

core::pose::PoseCOP protocols::jd2::Job::get_pose ( ) const

get_pose : will return

return a COP to the input pose

References copy_without_output(), protocols::jd2::JobDistributor::get_instance(), and protocols::jd2::JobDistributor::job_inputter().

void protocols::jd2::Job::get_pose ( core::pose::Pose pose) const
InnerJobCOP protocols::jd2::Job::inner_job ( ) const

access to inner-job ... use is discouraged - use sparingly!

--- DO NOT use my_job->inner_job()->get_pose() INSTEAD use my_job->get_pose()

InnerJobOP protocols::jd2::Job::inner_job_nonconst ( )

nonconst access is intended only for the JobInputter to load poses into the InnerJob, and the Parser to add constraints, and the JobDistributor to delete completed inputs (recycle memory)

std::string const & protocols::jd2::Job::input_tag ( ) const

return the input tag (a short string, generally)

core::Size protocols::jd2::Job::nstruct_index ( ) const
core::Size protocols::jd2::Job::nstruct_max ( ) const
Job::StringRealPairs::const_iterator protocols::jd2::Job::output_string_real_pairs_begin ( ) const
Job::StringRealPairs::const_iterator protocols::jd2::Job::output_string_real_pairs_end ( ) const
Job::StringStringPairs::const_iterator protocols::jd2::Job::output_string_string_pairs_begin ( ) const
Job::StringStringPairs::const_iterator protocols::jd2::Job::output_string_string_pairs_end ( ) const
Job::Strings::const_iterator protocols::jd2::Job::output_strings_begin ( ) const
Job::Strings::const_iterator protocols::jd2::Job::output_strings_end ( ) const
void protocols::jd2::Job::set_bad ( bool  value = true)
void protocols::jd2::Job::set_completed ( bool  value = true) [inline]
void protocols::jd2::Job::set_status_prefix ( std::string  prefix) [inline]
std::string const& protocols::jd2::Job::status_prefix ( ) const [inline]
bool protocols::jd2::Job::to_do ( ) const [inline]

References bad().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines