Rosetta  2021.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
protocols::jd3::InnerLarvalJob Class Reference

#include <InnerLarvalJob.hh>

Inheritance diagram for protocols::jd3::InnerLarvalJob:
Inheritance graph
[legend]

Public Member Functions

 InnerLarvalJob ()
 
 InnerLarvalJob (core::Size nstruct, core::Size job_node)
 
 InnerLarvalJob (InnerLarvalJob const &src)
 
 ~InnerLarvalJob () override
 
bool sources_same (InnerLarvalJob const &other) const
 Determine if two jobs are defined with the same set of InputSources. More...
 
virtual bool operator== (InnerLarvalJob const &other) const
 Mutual comparison of this inner job to the other inner job so that if either one thinks it's not the same as the other, then it returns false. Invokes the same_type() function on both this and other. More...
 
virtual bool operator!= (InnerLarvalJob const &other) const
 
virtual bool same_type (InnerLarvalJob const &other) const
 returns true if this is the same type as other; does not call other.same_type() More...
 
virtual void show (std::ostream &out) const
 
basic::datacache::ConstDataMap
const & 
const_data_map () const
 Read access to the ConstDataMap that the InnerLarvalJob holds. More...
 
basic::datacache::ConstDataMap & const_data_map ()
 Write access to the ConstDataMap that the InnerLarvalJob holds. The objects pointed to by the const data map can be shared between two InnerLarvalJobs, but the data maps themselves should not be shared. More...
 
core::Size job_node () const
 Return the job node this InnerLarvalJob belongs to If the Job Node has not been set, we return 0. More...
 
core::Size n_input_sources () const
 Return the number of pose input sources for this job. More...
 
core::Size nstruct_max () const
 The number of job replicates to be performed for this InnerLarvalJob. More...
 
void input_source (InputSourceCOP setting)
 Set the single InputSource for this job. More...
 
void clear_input_sources ()
 Clear the vector of InputSources. More...
 
void append_input_source (InputSourceCOP setting)
 Append a InputSource to the vector of them. More...
 
std::string input_tag () const
 Return the input tag – a string that describes the input structure, but that is in no way a complete description of the job. The job_tag instead should be looked to as the name to use to identify information about this job: a single input structure may be used for multiple jobs. More...
 
void input_tag (std::string const &setting)
 Set the input tag – if it is not set, then the InputSources will be used, the file names / tags being concatenated together, separated by underscores. More...
 
virtual std::string job_tag () const
 Return the job tag – a string that describes what task is being performed and and (usually) what input structure that job is being performed upon. This is the tag can be defined by the user in the job-definition XML file. More...
 
void job_tag (std::string const &setting)
 Set the job tag. If not set, then the input tag will be returned. More...
 
std::string outputter () const
 Return the outputter class; i.e. the key used by the PoseOutputterFactory. More...
 
void outputter (std::string const &setting)
 Set the outputter class for this job; i.e. the key used by the PoseOutputterFactory. More...
 
utility::tag::TagCOP jobdef_tag () const
 
void jobdef_tag (utility::tag::TagCOP setting)
 
void nstruct_max (core::Size setting)
 Set the total number of Nstruct for this InnerLarvelJob (IE - how many LarvalJobs will we need?) More...
 
void job_node (core::Size setting)
 Set the Job Node for this ILJ. More...
 
InputSource const & input_source () const
 Read access to the InputSource object that describes how the Pose for this job should be constructed. Requires that there is only a single InputSource for this job. More...
 
InputSourceCOP const & input_source_cop () const
 
InputSource const & input_source (core::Size index) const
 Retrieve a particular InputSource. More...
 
InputSourceCOP const & input_source_cop (core::Size index) const
 
utility::vector1< JobResultID >
const & 
input_job_result_indices () const
 The list of the JobResults required to mature this LarvalJob, by global index of the already-executed (Lavral)Jobs. More...
 
void add_input_job_result_index (JobResultID job_result_id)
 Add a required input by the pair representing 1) the global index of the job that produced the JobResult, and 2) the index of that JobResult among all the results produced by that job. More...
 
void set_bad (bool setting=true)
 Store the fact that this job is bad, for some reason or another, e.g. it has malformed inputs. More...
 
bool bad () const
 Has this job been labeled as bad? More...
 

Private Member Functions

std::string concatenated_input_source_names () const
 construct a string from the input_sources_ More...
 

Private Attributes

std::string input_tag_
 
std::string job_tag_
 
std::string outputter_
 
utility::vector1< InputSourceCOPinput_sources_
 
core::Size nstruct_
 
core::Size job_node_ = 0
 
utility::vector1< JobResultIDinput_job_result_indices_
 What set of JobResults are required as inputs for the JobQueen to mature larval jobs that point at this InnerLarvalJob into a full job? More...
 
bool bad_
 
basic::datacache::ConstDataMapOP const_data_cache_
 The InnerLarvalJob holds a const data cache to ensure that if two InnerLarvalJobs point to the same piece of data, modification to one of the InnerLarvalJobs objects cannot disrupt the other InnerLarvalJob. Arbitrary data can be cached here by the JobQueen as she initializes the InnerLarvalJobs. More...
 
utility::tag::TagCOP jobdef_tag_
 

Friends

std::ostream & operator<< (std::ostream &out, const InnerLarvalJob &inner_job)
 

Detailed Description

The InnerLarvalJob class is responsible for holding the input requirements for a given job - how many nstruct, and what the input is. InnerLarvalJobs are relatively heavy; there is no need to duplicate a series of InnerLarvalJobs for each index into nstruct. The companion Job class handles the nstruct index and has a pointer to an InnerLarvalJob (which is shared across many Jobs). The JobQueen has considerable leeway in how she shares data held in the InnerLarvalJobs she creates: if all of the options for a set of InnerLarvalJob are identical, and they differ only in their input structure, then she can, e.g. share a single JobOptions object between all of them. InnerLarvalJobs are serialized by the JobDistributor and shipped between nodes. For this reason, they should not be loaded with ResourceManager-managed data (that data should not get shipped between nodes, though it should be instantiatable on any node), but they may need to store Poses, as would be necessary in any multi-round protocol, where the JobResults from round i are the starting points for round i+1.

Constructor & Destructor Documentation

protocols::jd3::InnerLarvalJob::InnerLarvalJob ( )
protocols::jd3::InnerLarvalJob::InnerLarvalJob ( core::Size  nstruct,
core::Size  job_node 
)
protocols::jd3::InnerLarvalJob::InnerLarvalJob ( InnerLarvalJob const &  src)
protocols::jd3::InnerLarvalJob::~InnerLarvalJob ( )
overridedefault

Member Function Documentation

void protocols::jd3::InnerLarvalJob::add_input_job_result_index ( JobResultID  job_result_id)

Add a required input by the pair representing 1) the global index of the job that produced the JobResult, and 2) the index of that JobResult among all the results produced by that job.

References input_job_result_indices_.

void protocols::jd3::InnerLarvalJob::append_input_source ( InputSourceCOP  setting)

Append a InputSource to the vector of them.

References input_sources_.

bool protocols::jd3::InnerLarvalJob::bad ( ) const

Has this job been labeled as bad?

References bad_.

void protocols::jd3::InnerLarvalJob::clear_input_sources ( )

Clear the vector of InputSources.

References input_sources_.

std::string protocols::jd3::InnerLarvalJob::concatenated_input_source_names ( ) const
private

construct a string from the input_sources_

References input_sources_.

Referenced by input_tag().

basic::datacache::ConstDataMap const & protocols::jd3::InnerLarvalJob::const_data_map ( ) const

Read access to the ConstDataMap that the InnerLarvalJob holds.

References const_data_cache_.

basic::datacache::ConstDataMap & protocols::jd3::InnerLarvalJob::const_data_map ( )

Write access to the ConstDataMap that the InnerLarvalJob holds. The objects pointed to by the const data map can be shared between two InnerLarvalJobs, but the data maps themselves should not be shared.

References const_data_cache_.

utility::vector1< JobResultID > const & protocols::jd3::InnerLarvalJob::input_job_result_indices ( ) const

The list of the JobResults required to mature this LarvalJob, by global index of the already-executed (Lavral)Jobs.

References input_job_result_indices_.

void protocols::jd3::InnerLarvalJob::input_source ( InputSourceCOP  setting)
InputSource const & protocols::jd3::InnerLarvalJob::input_source ( ) const

Read access to the InputSource object that describes how the Pose for this job should be constructed. Requires that there is only a single InputSource for this job.

Read access to the InputSource object that describes how the Pose for this job should be constructed.

References input_sources_.

InputSource const & protocols::jd3::InnerLarvalJob::input_source ( core::Size  index) const

Retrieve a particular InputSource.

References input_sources_.

InputSourceCOP const & protocols::jd3::InnerLarvalJob::input_source_cop ( ) const

References input_sources_.

InputSourceCOP const & protocols::jd3::InnerLarvalJob::input_source_cop ( core::Size  index) const

References input_sources_.

std::string protocols::jd3::InnerLarvalJob::input_tag ( ) const

Return the input tag – a string that describes the input structure, but that is in no way a complete description of the job. The job_tag instead should be looked to as the name to use to identify information about this job: a single input structure may be used for multiple jobs.

References concatenated_input_source_names(), and input_tag_.

Referenced by protocols::jd3::pose_outputters::PDBPoseOutputter::determine_job_tag(), protocols::jd3::pose_outputters::SilentFilePoseOutputter::determine_job_tag(), protocols::jd3::pose_outputters::DeNovoSilentFilePoseOutputter::determine_job_tag(), and job_tag().

void protocols::jd3::InnerLarvalJob::input_tag ( std::string const &  setting)

Set the input tag – if it is not set, then the InputSources will be used, the file names / tags being concatenated together, separated by underscores.

References input_tag_.

core::Size protocols::jd3::InnerLarvalJob::job_node ( ) const
void protocols::jd3::InnerLarvalJob::job_node ( core::Size  setting)

Set the Job Node for this ILJ.

References job_node(), and job_node_.

std::string protocols::jd3::InnerLarvalJob::job_tag ( ) const
virtual

Return the job tag – a string that describes what task is being performed and and (usually) what input structure that job is being performed upon. This is the tag can be defined by the user in the job-definition XML file.

Can be overridden by child classes that require distinct logic.

Reimplemented in protocols::jd3::chunk_library::ChunkLibraryInnerLarvalJob, and protocols::jd3::full_model::FullModelInnerLarvalJob.

References input_tag(), and job_tag_.

Referenced by protocols::jd3::pose_outputters::PDBPoseOutputter::determine_job_tag(), protocols::jd3::pose_outputters::SilentFilePoseOutputter::determine_job_tag(), and protocols::jd3::pose_outputters::DeNovoSilentFilePoseOutputter::determine_job_tag().

void protocols::jd3::InnerLarvalJob::job_tag ( std::string const &  setting)

Set the job tag. If not set, then the input tag will be returned.

References job_tag_.

utility::tag::TagCOP protocols::jd3::InnerLarvalJob::jobdef_tag ( ) const
void protocols::jd3::InnerLarvalJob::jobdef_tag ( utility::tag::TagCOP  setting)

References jobdef_tag_.

core::Size protocols::jd3::InnerLarvalJob::n_input_sources ( ) const

Return the number of pose input sources for this job.

References input_sources_.

core::Size protocols::jd3::InnerLarvalJob::nstruct_max ( ) const

The number of job replicates to be performed for this InnerLarvalJob.

References nstruct_.

void protocols::jd3::InnerLarvalJob::nstruct_max ( core::Size  setting)

Set the total number of Nstruct for this InnerLarvelJob (IE - how many LarvalJobs will we need?)

References nstruct_.

bool protocols::jd3::InnerLarvalJob::operator!= ( InnerLarvalJob const &  other) const
virtual
bool protocols::jd3::InnerLarvalJob::operator== ( InnerLarvalJob const &  other) const
virtual

Mutual comparison of this inner job to the other inner job so that if either one thinks it's not the same as the other, then it returns false. Invokes the same_type() function on both this and other.

Mutual comparison of this inner job to the other inner job so that if either one thinks it's not the same as the other, then it returns false. Invokes the same() function on both this and other.

Note: only compare if the pointers to the poses are to the same location

Reimplemented in protocols::jd3::standard::StandardInnerLarvalJob, protocols::jd3::chunk_library::ChunkLibraryInnerLarvalJob, and protocols::jd3::full_model::FullModelInnerLarvalJob.

References const_data_cache_, input_tag_, job_node_, job_tag_, nstruct_, outputter_, same_type(), and sources_same().

std::string protocols::jd3::InnerLarvalJob::outputter ( ) const
void protocols::jd3::InnerLarvalJob::outputter ( std::string const &  setting)

Set the outputter class for this job; i.e. the key used by the PoseOutputterFactory.

References outputter_.

bool protocols::jd3::InnerLarvalJob::same_type ( InnerLarvalJob const &  other) const
virtual

returns true if this is the same type as other; does not call other.same_type()

Since this is the base-class function, then by construction other is equivalent to this.

Note
classes derived from InnerLarvalJob must perform dynamic casts to ensure the other InnerLarvalJob has the same type as them

Reimplemented in protocols::jd3::standard::StandardInnerLarvalJob, protocols::jd3::chunk_library::ChunkLibraryInnerLarvalJob, and protocols::jd3::full_model::FullModelInnerLarvalJob.

Referenced by operator==().

void protocols::jd3::InnerLarvalJob::set_bad ( bool  setting = true)

Store the fact that this job is bad, for some reason or another, e.g. it has malformed inputs.

References bad_.

void protocols::jd3::InnerLarvalJob::show ( std::ostream &  out) const
virtual
bool protocols::jd3::InnerLarvalJob::sources_same ( InnerLarvalJob const &  other) const

Determine if two jobs are defined with the same set of InputSources.

References input_sources_.

Referenced by operator==().

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const InnerLarvalJob inner_job 
)
friend

Member Data Documentation

bool protocols::jd3::InnerLarvalJob::bad_
private

Referenced by bad(), and set_bad().

basic::datacache::ConstDataMapOP protocols::jd3::InnerLarvalJob::const_data_cache_
private

The InnerLarvalJob holds a const data cache to ensure that if two InnerLarvalJobs point to the same piece of data, modification to one of the InnerLarvalJobs objects cannot disrupt the other InnerLarvalJob. Arbitrary data can be cached here by the JobQueen as she initializes the InnerLarvalJobs.

Referenced by const_data_map(), and operator==().

utility::vector1< JobResultID > protocols::jd3::InnerLarvalJob::input_job_result_indices_
private

What set of JobResults are required as inputs for the JobQueen to mature larval jobs that point at this InnerLarvalJob into a full job?

Referenced by add_input_job_result_index(), and input_job_result_indices().

utility::vector1< InputSourceCOP > protocols::jd3::InnerLarvalJob::input_sources_
private
std::string protocols::jd3::InnerLarvalJob::input_tag_
private

Referenced by input_tag(), and operator==().

core::Size protocols::jd3::InnerLarvalJob::job_node_ = 0
private

Referenced by job_node(), and operator==().

std::string protocols::jd3::InnerLarvalJob::job_tag_
private

Referenced by job_tag(), and operator==().

utility::tag::TagCOP protocols::jd3::InnerLarvalJob::jobdef_tag_
private

Referenced by jobdef_tag().

core::Size protocols::jd3::InnerLarvalJob::nstruct_
private

Referenced by nstruct_max(), and operator==().

std::string protocols::jd3::InnerLarvalJob::outputter_
private

Referenced by operator==(), and outputter().


The documentation for this class was generated from the following files: