Rosetta  2020.11
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Private Attributes | List of all members
protocols::multistage_rosetta_scripts::MRSJobQueen Class Reference

Job Queen for MultiStage Rosetta Scripts (MRS) More...

#include <MRSJobQueen.hh>

Inheritance diagram for protocols::multistage_rosetta_scripts::MRSJobQueen:
Inheritance graph
[legend]

Public Member Functions

 MRSJobQueen ()
 
 ~MRSJobQueen () override
 
jd3::JobDigraphOP create_initial_job_dag () override
 The job dag encodes which job nodes are independent or dependant on each other. If you have a applicationwhere all inputs are independant and only a single run of a protocol is needed, Then do not override this method. More...
 
std::list< jd3::LarvalJobOPdetermine_job_list (jd3::JobDAGNodeID job_dag_node_index, Size max_njobs) override
 Create a list of LarvalJobs for each Node Index. Only can create max_njobs to save memory. More...
 
jd3::JobOP complete_larval_job_maturation (jd3::LarvalJobCOP larval_job, utility::options::OptionCollectionCOP job_options, utility::vector1< jd3::JobResultCOP > const &input_job_results) override
 The derived JobQueen must define the method that takes a larval job and the job-specific options and matures the larval job into a full job. More...
 
void note_job_completed (jd3::GlobalJobID job_id, jd3::JobStatus status, core::Size nresults, bool are_you_a_unit_test)
 this was only created for the unit test. Please do not call this. More...
 
void note_job_completed (core::Size, jd3::JobStatus, core::Size)
 
void note_job_completed (jd3::LarvalJobCOP job, jd3::JobStatus status, core::Size nresults) override
 The JD calls this function on completion of a LarvalJob, after updating the JobTracker. More...
 
void completed_job_summary (jd3::GlobalJobID job_id, jd3::ResultIndex result_index, jd3::JobSummaryOP summary)
 
void completed_job_summary (jd3::LarvalJobCOP job, jd3::ResultIndex result_index, jd3::JobSummaryOP summary) override
 As each job completes, this function is called for each result coming from a LarvalJob. More...
 
jd3::JobDAGNodeID stage_for_global_job_id (jd3::GlobalJobID global_job_id) const
 
std::list< jd3::JobResultIDjob_results_that_should_be_discarded () override
 The IDs of jobs that should be discarded, IE not kept in memory for the next set of job nodes. More...
 
std::list
< jd3::output::OutputSpecificationOP
jobs_that_should_be_output () override
 By default outputs all recently finished jobs for JD output (stored in recent_successes_). Override this method if you want to cull these lists. More...
 
TagManager const & tag_manager () const
 
void determine_validity_of_stage_tags ()
 
core::Size num_input_structs () const
 
core::Size num_stages () const
 
core::Size num_results_to_keep_for_stage (core::Size stage) const
 
- Public Member Functions inherited from protocols::jd3::standard::StandardJobQueen
 StandardJobQueen ()
 The StandardJobQueen constructor asks the PoseInputterFactory for a PoseInputter and creates a ResourceManager. More...
 
 ~StandardJobQueen () override
 
void update_job_dag (JobDigraphUpdater &updater) override
 Starting the Job ///. More...
 
protocols::jd3::JobOP mature_larval_job (protocols::jd3::LarvalJobCOP job, utility::vector1< JobResultCOP > const &input_job_results) override
 Mature the LarvalJob into a full Job that will be run on a processor. Calls complete_larval_job_maturation, which you will need to override. More...
 
output::ResultOutputterOP result_outputter (output::OutputSpecification const &spec) override
 Return the bag of of PoseOutputters (in the form of a MultipleOutputter) for the Pose that has been requested and specified by a particular OutputSpecification;. More...
 
bool has_job_previously_been_output (protocols::jd3::LarvalJobCOP job) override
 Checks the outputter to see if the job already has been output. Used for JD override behavior. More...
 
std::list
< deallocation::DeallocationMessageOP
deallocation_messages () override
 Resource Management ///. More...
 
void process_deallocation_message (deallocation::DeallocationMessageOP message) override
 A deallocation message first sent to the JobDistributor on this host originating from a remote JobQueen. If a derived JobQueen has deallocation messages she needs to recieve, she should override derived_process_deallocation_message. More...
 
void flush () override
 Send all buffered output to disk – called by the JobDistributor right before it shuts down if it hits an error or catches an exception that it cannot ignore. More...
 
std::string job_definition_xsd () const override
 XSD Functions ///. More...
 
std::string resource_definition_xsd () const override
 JobQueens may optionally define an XSD for their resource definition file which is fed to their resource manager (if they control one). If the JobDistributor is awakened with the flag "jd3::output_resource_xsd <output file>" on the command line, and if the derived JobQueen defines an XSD for resources she uses, then the JobDistributor will write out the resource definition XSD to the output file. The derived queen may return an empty string to indicate that no resources are definable for the resource manager. More...
 
void determine_preliminary_job_list_from_xml_file (std::string const &job_def_string)
 Read from an input string representing the contents of the job-definiton XML file and construct a set of PreliminaryLarvalJobs; this function is primarily useful for testing, but could be used to organize jobs by an enterprising job distributor or by another JobQueen. More...
 
- Public Member Functions inherited from protocols::jd3::JobQueen
 JobQueen ()
 
 ~JobQueen () override
 
JobDigraphOP create_and_set_initial_job_dag ()
 Creates the initial job dag using create_initial_job_dag function and sets it to the JQ. More...
 
void note_job_completed_and_track (LarvalJobCOP job, JobStatus status, Size nresults)
 Call note_job_completed in derived classes and track the job using the JobTracker. More...
 
LarvalJobs determine_job_list_and_track (JobDAGNodeID job_dag_node_index, Size max_njobs)
 Call determine_job_list in derived classes and track the jobs using the JobTracker. More...
 

Protected Member Functions

core::pose::PoseOP pose_for_job_derived (jd3::LarvalJobCOP job, utility::options::OptionCollection const &options)
 
core::pose::PoseOP pose_for_inner_job_derived (jd3::InnerLarvalJobCOP inner_job, utility::options::OptionCollection const &options)
 
void all_settings_to_defualt ()
 
jd3::LarvalJobOP get_nth_job_for_initial_stage (jd3::LocalJobID local_job_id)
 
jd3::LarvalJobOP get_nth_job_for_noninitial_stage (jd3::JobDAGNodeID stage, jd3::LocalJobID local_job_id)
 
void append_common_tag_subelements (utility::tag::XMLSchemaDefinition &xsd, utility::tag::XMLSchemaComplexTypeGenerator &ct_gen) const override
 Here, you specify which tags that are defined in the <common> element. More...
 
void parse_job_definition_tags (utility::tag::TagCOP common_block_tags, utility::vector1< jd3::standard::PreliminaryLarvalJob > const &) override
 This gives the derived JobQueen a chance to read any relevant information from the job-definition file. The second argument holds a PreliminaryLarvalJob for every job block and the PreliminaryLarvalJob itself has all of the information given in its corresponding block. More...
 
void parse_common_tag (utility::tag::TagCOP common_tag)
 
void parse_single_stage_tag (utility::tag::TagCOP subprotocol_tag)
 
void append_job_tag_subelements (utility::tag::XMLSchemaDefinition &job_definition_xsd, utility::tag::XMLSchemaComplexTypeGenerator &job_ct_gen) const override
 XML Schema ///. More...
 
void parse_single_job_tag (jd3::standard::PreliminaryLarvalJob const &prelim_larval_job, jd3::PrelimJobNodeID input_pose_id)
 
jd3::PrelimJobNodeID input_pose_id_for_jobid (jd3::GlobalJobID global_jobid) const
 
void print_job_lineage () const
 
void assign_output_index (jd3::LarvalJobCOP larval_job, jd3::ResultIndex result_index_for_job, core::Size n_results_for_job, jd3::JobOutputIndex &output_index) override
 The derived job queen may assign her own numbering to output Poses if she chooses. More...
 
void assign_output_index (jd3::GlobalJobID global_job_id, jd3::ResultIndex result_id, jd3::JobOutputIndex &output_index)
 
void cluster (jd3::JobDAGNodeID stage_about_to_start)
 
- Protected Member Functions inherited from protocols::jd3::standard::StandardJobQueen
virtual LarvalJobs next_batch_of_larval_jobs_for_job_node (JobDAGNodeID job_dag_node_index, Size max_njobs)
 Called during the SJQs determine_job_list function. Override this function to create LarvalJobs for nodes other than preliminary job nodes. More...
 
GlobalJobID current_job_index () const
 Get the current larval job index from the JobTracker. More...
 
virtual void determine_preliminary_job_list ()
 Preliminary Larval Jobs ///. More...
 
bool get_preliminary_larval_jobs_determined () const
 Has determine_preliminary_job_list been called? More...
 
PreliminaryLarvalJobTrackerget_prelim_larval_job_tracker ()
 Get write access to the PreliminaryLarvalJobTracker. More...
 
PreliminaryLarvalJobTracker const & get_prelim_larval_job_tracker () const
 Get read access to the PreliminaryLarvalJobTracker. More...
 
utility::vector1
< PreliminaryLarvalJob > const & 
get_preliminary_larval_jobs () const
 Read access to derived JobQueens to the preliminary job list. More...
 
virtual void note_preliminary_job_node_is_complete (PrelimJobNodeID pjn_index)
 Respond to the completion of a preliminary job node in derived SJQs. More...
 
virtual InnerLarvalJobs refine_preliminary_job (PreliminaryLarvalJob const &prelim_job)
 Optional Larval Job Creation ///. More...
 
virtual LarvalJobs expand_job_list (InnerLarvalJobOP inner_job, core::Size max_larval_jobs_to_create)
 Expand an InnerLarvalJob into a full set of LarvalJobs, creating nstruct LarvalJob objects Increments larval_job_counter_. More...
 
virtual StandardInnerLarvalJobOP create_inner_larval_job (core::Size nstruct, JobDAGNodeID job_node, PrelimJobNodeID preliminary_job_node) const
 Factory method for derived classes if they wish to rely on classes derived from StandardInnerLarvalJob. This is invoked by the StandardJobQueen in her determine_job_list method just as jobs are prepared. If the base StandardInnerLarvalJob class is desired, then do not override this method. More...
 
virtual LarvalJobOP create_larval_job (InnerLarvalJobOP job, NStructIndex nstruct_index, core::Size larval_job_index)
 Factory method for derived classes if they wish to rely on classes derived from LarvalJob. This is invoked by the StandardJobQueen in the expand_job_list method. If the base LarvalJob class is desired, then do not override this method. More...
 
InnerLarvalJobOP create_and_init_inner_larval_job_from_preliminary (core::Size nstruct, PrelimJobNodeID prelim_job_node, JobDAGNodeID job_node) const
 Adds information regarding the job definition (job tag, input source, jobdef tag, and outputter). Uses the PreliminaryInnerLarvalJob to do so. More...
 
void create_and_store_output_specification_for_job_result (LarvalJobCOP job, ResultIndex result_index, core::Size nresults)
 Output Specifications and Ouputters ///. More...
 
void create_and_store_output_specification_for_job_result (LarvalJobCOP job, utility::options::OptionCollection const &job_options, ResultIndex result_index, core::Size nresults)
 Create an output specification for a given job + result index and store it in the recent_successes_ list, which will be given to the JobDistributor upon request. More...
 
virtual
output::OutputSpecificationOP 
create_output_specification_for_job_result (LarvalJobCOP job, utility::options::OptionCollection const &job_options, ResultIndex result_index, core::Size nresults)
 Construct the OutputSpecification for a completed successful job. More...
 
JobOutputIndex build_output_index (protocols::jd3::LarvalJobCOP larval_job, ResultIndex result_index_for_job, Size n_results_for_job)
 Construct a JobOutputIndex for a given job based on "the obvious", but giving derived classes the chance to assign their own indices via the assign_output_index function. More...
 
virtual void derived_process_deallocation_message (deallocation::DeallocationMessageOP message)
 If the derived class has deallocation messages that it needs to broadcast to remote nodes and then to process on those remote nodes, then the StanardJobQueen will pass them along to the derived job queen using this function. More...
 
pose_outputters::PoseOutputterOP pose_outputter_for_job (InnerLarvalJob const &innerJob)
 Create or get the PoseOutputter from the job. Cache the Outputter in the SJQ. More...
 
pose_outputters::PoseOutputterOP pose_outputter_for_job (InnerLarvalJob const &innerJob, utility::options::OptionCollection const &job_options)
 Create or get the PoseOutputter from the job. Cache the Outputter in the SJQ. More...
 
pose_outputters::PoseOutputterOP pose_outputter_for_job (pose_outputters::PoseOutputSpecification const &spec)
 Find the PoseOutputter for a job specification, respecting the Job-distributor provided output file suffix. More...
 
utility::vector1
< pose_outputters::SecondaryPoseOutputterOP
secondary_outputters_for_job (InnerLarvalJob const &innerJob, utility::options::OptionCollection const &job_options)
 
core::pose::PoseOP pose_for_inner_job (InnerLarvalJobCOP inner_job)
 
core::pose::PoseOP pose_for_inner_job (InnerLarvalJobCOP inner_job, utility::options::OptionCollection const &options)
 Return a copy of the Pose to be used with the given inner job. More...
 
core::pose::PoseOP pose_for_job (LarvalJobCOP job, utility::options::OptionCollection const &options)
 Return a copy of the Pose to be used with the given job. Wrapper for pose_for_inner_job() More...
 
utility::options::OptionCollectionOP options_for_job (InnerLarvalJob const &inner_job) const
 Options Collection ///. More...
 
utility::options::OptionCollectionOP options_from_tag (utility::tag::TagCOP job_options_tags) const
 Create an OptionCollection from tags and OptionKeys stored in the SJQ. More...
 
pose_inputters::PoseInputterOP pose_inputter_for_job (InnerLarvalJob const &inner_job) const
 Access the pose inputter. More...
 
void add_options (utility::options::OptionKeyList const &opts)
 
void add_option (utility::options::OptionKey const &key)
 
void remove_default_input_element ()
 Override the basic specification of input elements as either PDBs, Silent Structures, or ResourceManager defined structures. This should be called during the derived class's constructor if it is to be used. More...
 
utility::tag::TagCOP common_block_tags () const
 Return the set of subtags that are common to the whole set of jobs in the Job definition file, if any are given. This set of tags is read from disk at most once per execution. More...
 
void set_common_block_precedes_job_blocks (bool setting)
 By default, the common block is given before the job blocks in the job definition file. Setting this value to false reverses the order and the common block goes at the end of the file. More...
 
void do_not_accept_all_pose_inputters_from_factory ()
 Expert Override Input/Output behavior ///. More...
 
void allow_pose_inputter (pose_inputters::PoseInputterCreatorOP creator)
 
void do_not_accept_all_pose_outputters_from_factory ()
 
void allow_pose_outputter (pose_outputters::PoseOutputterCreatorOP creator)
 
void set_default_outputter (pose_outputters::PoseOutputterCreatorOP creator)
 
- Protected Member Functions inherited from protocols::jd3::JobQueen
JobDigraph const & get_job_graph () const
 Get read access to the current job graph. More...
 
JobTrackerget_job_tracker ()
 Get write access to the current job tracker. More...
 
JobTracker const & get_job_tracker () const
 Get read access to the current job tracker. More...
 

Static Protected Member Functions

static std::string protocols_subelement_mangler (std::string const &name)
 
static std::string job_subelement_mangler (std::string const &name)
 

Private Attributes

bool has_been_initialized_
 
SortByLowEnergy sorter_
 
core::Size num_input_structs_
 
core::Size num_stages_
 
utility::vector1< core::Sizenum_total_jobs_for_stage_
 
utility::vector1< core::Sizenum_results_to_keep_for_stage_
 
utility::vector1< core::Sizemax_num_results_to_keep_per_instance_for_stage_
 
utility::vector1< core::Sizemax_num_results_to_keep_per_input_struct_for_stage_
 
utility::vector1< core::Sizenum_jobs_per_input_for_stage_
 
utility::vector1< core::Sizeresult_cutoffs_for_stage_
 
utility::vector1< core::Sizejob_results_have_been_discarded_for_stage_
 
utility::vector1
< jd3::dag_node_managers::NodeManagerOP
node_managers_
 
utility::vector1
< utility::tag::TagCOP > 
tag_for_stage_
 
TagManager tag_manager_
 
utility::vector1< std::string > outputters_
 
utility::vector1< std::string > input_job_tags_
 
utility::vector1< core::Sizenum_structs_output_for_input_job_tag_
 
utility::vector1< std::pair
< jd3::InnerLarvalJobOP,
core::Size > > 
current_inner_larval_job_for_stage_
 
jd3::JobGenealogistOP job_genealogist_
 
std::map< jd3::JobResultID,
jd3::output::OutputSpecificationOP
pose_output_specification_for_job_result_id_
 
PoseForPoseID most_recent_pose_id_
 
utility::vector1< std::pair
< core::Size,
utility::tag::TagCOP > > 
checkpoints_
 
utility::vector1
< utility::tag::TagCOP > 
cluster_metric_tag_for_stage_
 
utility::vector1< core::Sizenum_results_to_keep_after_clustering_for_stage_
 
utility::vector1
< std::unordered_map
< jd3::JobResultID,
cluster::ClusterMetricCOP,
JobResultID_hash > > 
cluster_data_for_results_of_stage_
 
utility::vector1
< jd3::JobResultID
most_recent_cluster_results_
 No need to store this data for more than one stage at a time. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from protocols::jd3::standard::StandardJobQueen
static std::string job_def_complex_type_name (std::string const &type)
 Naming function for the complexTypes in the job-definition XSD. More...
 

Detailed Description

Job Queen for MultiStage Rosetta Scripts (MRS)

Constructor & Destructor Documentation

protocols::multistage_rosetta_scripts::MRSJobQueen::MRSJobQueen ( )
protocols::multistage_rosetta_scripts::MRSJobQueen::~MRSJobQueen ( )
override

Member Function Documentation

void protocols::multistage_rosetta_scripts::MRSJobQueen::all_settings_to_defualt ( )
protected
void protocols::multistage_rosetta_scripts::MRSJobQueen::append_common_tag_subelements ( utility::tag::XMLSchemaDefinition &  xsd,
utility::tag::XMLSchemaComplexTypeGenerator &  ct_gen 
) const
overrideprotectedvirtual

Here, you specify which tags that are defined in the <common> element.

The derived JobQueen must inform the StandardJobQueen of any additional tags that belong as sub elements of the <Common> tag. The StandardJobQueen will have already appended the <Options> subtag before this function executes, so the only functions that the derived class should invoke of the XMLSchemaComplexTypeGenerator are its add_ordered_subelement_set_* functions, if you have additional subelements to add. Adding additional subelements to the complexType generator may require writing additional complexTypes to the XML Schema for the job definition file, and so that job definition xsd is passed in as well. The Tags in the <Common> block should be parsed for each Job in the mature_larval_job step; these tags are available to the derived class through the common_block_tags method. This is where data that is not constant over the course of the job can be declared (e.g. ScoreFunctions, the weights of which are often modified during the course of protocol execution), but data that is constant and that can be shared between multiple jobs ought to be initialized and held by the ResourceManager. Options provided in the <Common> block will supercede the command line, but will be overriden by any options provided for a particular job. (This is logic the StandardJobQueen manages).

Derived classes may choose to not override this method as a way to indicate that they have no common-block data that needs to be defined.

Reimplemented from protocols::jd3::standard::StandardJobQueen.

References protocols::multistage_rosetta_scripts::cluster::complex_type_name_for_cluster_metric(), protocols::filters::complex_type_name_for_filter(), protocols::moves::complex_type_name_for_mover(), protocols::parser::DataLoaderFactory::data_loader_ct_namer(), and protocols_subelement_mangler().

void protocols::multistage_rosetta_scripts::MRSJobQueen::append_job_tag_subelements ( utility::tag::XMLSchemaDefinition &  job_definition_xsd,
utility::tag::XMLSchemaComplexTypeGenerator &  ct_gen 
) const
overrideprotectedvirtual

XML Schema ///.

Here you can specify Schema's to use when creating your XSD for a specific JOB. AKA - you can add elements such as ResidueSelectors, task operations, etc. to parse.

The derived JobQueen must inform the StandardJobQueen of any additional tags that belong as sub elements of the <Job> tag. The StandardJobQueen will have already appended the <Input>, <Output>, and <Options> subtags before this function executes, so the only functions that the derived class should invoke of the XMLSchemaComplexTypeGenerator are its add_ordered_subelement_set_* functions, if you have additional subelements to add. Adding additional subelements to the complexType generator may require writing additional complexTypes to the XML Schema for the job definition file, and so that job definition xsd is passed in as well.

Derived classes may choose to not override this method as a way to indicate that they have no additional subtags of the <Job> tag they wish to add. This is a no-op implementation.

Reimplemented from protocols::jd3::standard::StandardJobQueen.

References protocols::parser::DataLoaderFactory::data_loader_ct_namer(), protocols::parser::ResidueSelectorLoader::loader_name(), and protocols::parser::ResidueSelectorLoader::res_selector_loader_ct_namer().

void protocols::multistage_rosetta_scripts::MRSJobQueen::assign_output_index ( jd3::LarvalJobCOP  larval_job,
jd3::ResultIndex  result_index_for_job,
core::Size  n_results_for_job,
jd3::JobOutputIndex output_index 
)
overrideprotectedvirtual

The derived job queen may assign her own numbering to output Poses if she chooses.

No-op implementation – leave the indices the way they were initialized.

Just before a job result is written to disk, the StandardJobQueen asks the derived job queen what indices should be used to identify the soon-to-be-output Pose. The default behavior is to use the nstruct index for the primary output index, and if there are multiple result Poses from a job, to use the result index (as is) for the secondary output index. These values will already have been loaded into the output_index before this function is called. This function will possibly be invoked more than a single time for a single job result, so it is important that the derived JobQueen not assume that it only happens once. This function will only be called on JQ0; it will not be called on any other JQs, so it is welcome to use information that would only be known on the "head node"

Reimplemented from protocols::jd3::standard::StandardJobQueen.

Referenced by jobs_that_should_be_output().

void protocols::multistage_rosetta_scripts::MRSJobQueen::assign_output_index ( jd3::GlobalJobID  global_job_id,
jd3::ResultIndex  result_id,
jd3::JobOutputIndex output_index 
)
protected
void protocols::multistage_rosetta_scripts::MRSJobQueen::cluster ( jd3::JobDAGNodeID  stage_about_to_start)
protected
JobOP protocols::multistage_rosetta_scripts::MRSJobQueen::complete_larval_job_maturation ( jd3::LarvalJobCOP  larval_job,
utility::options::OptionCollectionCOP  job_options,
utility::vector1< jd3::JobResultCOP > const &  input_job_results 
)
overridevirtual
void protocols::multistage_rosetta_scripts::MRSJobQueen::completed_job_summary ( jd3::GlobalJobID  job_id,
jd3::ResultIndex  result_index,
jd3::JobSummaryOP  summary 
)
void protocols::multistage_rosetta_scripts::MRSJobQueen::completed_job_summary ( jd3::LarvalJobCOP  job,
jd3::ResultIndex  result_index,
jd3::JobSummaryOP  summary 
)
inlineoverridevirtual

As each job completes, this function is called for each result coming from a LarvalJob.

Override this method to store any results you need.

Reimplemented from protocols::jd3::standard::StandardJobQueen.

References completed_job_summary().

JobDigraphOP protocols::multistage_rosetta_scripts::MRSJobQueen::create_initial_job_dag ( )
overridevirtual

The job dag encodes which job nodes are independent or dependant on each other. If you have a applicationwhere all inputs are independant and only a single run of a protocol is needed, Then do not override this method.

The StandardJobQueen provides an implementation of this function which returns the most straight-forward DAG representing a set of jobs that have no interdependencies: a DAG with a single node and no edges.

Override this method if you have a need for any more job nodes other than what is created from input structures and the Job Definition file.

The base class provides a digraph with a single node – that is, all the jobs are independent of each other. This is equivalent to the kind of jobs that could be run in JD2.

Reimplemented from protocols::jd3::standard::StandardJobQueen.

Reimplemented in protocols::multistage_rosetta_scripts::MRSJobQueenChecker.

References protocols::jd3::standard::StandardJobQueen::determine_preliminary_job_list(), has_been_initialized_, and num_stages_.

Referenced by protocols::multistage_rosetta_scripts::MRSJobQueenChecker::create_initial_job_dag().

std::list< LarvalJobOP > protocols::multistage_rosetta_scripts::MRSJobQueen::determine_job_list ( jd3::JobDAGNodeID  job_dag_node_index,
Size  max_njobs 
)
overridevirtual

Create a list of LarvalJobs for each Node Index. Only can create max_njobs to save memory.

The StandardJobQueen manages the process of creating the list of LarvalJobs that will later be matured into actual jobs and run by the JobDistributor. It is not recommended that derived job queens override this method; doing so will mean that some of the data the SJQ relies on will not be initialized – see comments on the SJQs data members below to understand the consequences of overriding this method.

It is recommended to override next_batch_of_larval_jobs_for_job_node instead of this method However, if you do override this - especially for more complicated protocols - be sure to call similar functions here

The process begins by first constructing the job definition and resource definition XSDs. With these schemas, the StandardJobQueen validates the input XML files (if present). The StandardJobQueen then populates preliminary versions of LarvalJob objects./ If the XSD includes "command line options" (which may be specified either from the command line or in the <options> sections of the Job XML file), the StandardJobQueen loads the preliminary LarvalJob objects with the options. These preliminary LarvalJob objects will not have been nstruct expanded (i.e. if there are 100 nstruct for each of 5 different jobs, then there will only be 5 preliminary larval jobs created). It then passes the preliminary LarvalJob list and the TagOP objects for each preliminary LarvalJob to the derived class through the refine_job_list method.

Reimplemented from protocols::jd3::standard::StandardJobQueen.

Reimplemented in protocols::multistage_rosetta_scripts::MRSJobQueenChecker.

References cluster(), cluster_data_for_results_of_stage_, cluster_metric_tag_for_stage_, current_inner_larval_job_for_stage_, protocols::jd3::JobQueen::get_job_tracker(), get_nth_job_for_initial_stage(), get_nth_job_for_noninitial_stage(), protocols::jd3::JobTracker::increment_current_job_index(), node_managers_, num_jobs_per_input_for_stage_, num_total_jobs_for_stage_, and protocols::TR().

void protocols::multistage_rosetta_scripts::MRSJobQueen::determine_validity_of_stage_tags ( )
LarvalJobOP protocols::multistage_rosetta_scripts::MRSJobQueen::get_nth_job_for_initial_stage ( jd3::LocalJobID  local_job_id)
protected
LarvalJobOP protocols::multistage_rosetta_scripts::MRSJobQueen::get_nth_job_for_noninitial_stage ( jd3::JobDAGNodeID  stage,
jd3::LocalJobID  local_job_id 
)
protected
jd3::PrelimJobNodeID protocols::multistage_rosetta_scripts::MRSJobQueen::input_pose_id_for_jobid ( jd3::GlobalJobID  global_jobid) const
inlineprotected
std::list< jd3::JobResultID > protocols::multistage_rosetta_scripts::MRSJobQueen::job_results_that_should_be_discarded ( )
overridevirtual

The IDs of jobs that should be discarded, IE not kept in memory for the next set of job nodes.

Override this method to note which jobs we don't need for the next set of Job Nodes.

Default implementation does not discard any job results.

Reimplemented from protocols::jd3::standard::StandardJobQueen.

References cluster_data_for_results_of_stage_, job_genealogist_, job_results_have_been_discarded_for_stage_, node_managers_, num_stages_, and pose_output_specification_for_job_result_id_.

static std::string protocols::multistage_rosetta_scripts::MRSJobQueen::job_subelement_mangler ( std::string const &  name)
inlinestaticprotected
std::list< output::OutputSpecificationOP > protocols::multistage_rosetta_scripts::MRSJobQueen::jobs_that_should_be_output ( )
overridevirtual

By default outputs all recently finished jobs for JD output (stored in recent_successes_). Override this method if you want to cull these lists.

Reimplemented from protocols::jd3::standard::StandardJobQueen.

References assign_output_index(), node_managers_, num_input_structs_, num_structs_output_for_input_job_tag_, pose_output_specification_for_job_result_id_, and protocols::TR().

void protocols::multistage_rosetta_scripts::MRSJobQueen::note_job_completed ( jd3::GlobalJobID  job_id,
jd3::JobStatus  status,
core::Size  nresults,
bool  are_you_a_unit_test 
)

this was only created for the unit test. Please do not call this.

References protocols::jd3::jd3_job_status_success, job_genealogist_, node_managers_, and stage_for_global_job_id().

void protocols::multistage_rosetta_scripts::MRSJobQueen::note_job_completed ( core::Size  ,
jd3::JobStatus  ,
core::Size   
)
inline
void protocols::multistage_rosetta_scripts::MRSJobQueen::note_job_completed ( jd3::LarvalJobCOP  job,
jd3::JobStatus  status,
core::Size  nresults 
)
overridevirtual

The JD calls this function on completion of a LarvalJob, after updating the JobTracker.

If you override this method, call the SJQs version first for PJN tracking and output.

Prepare this job for output by building an OutputSpecification for it and storing this specification in the list of recent successes. Note that tracking of completion of jobs from preliminary job nodes can only occur if the DerivedJobQueen invoked the SJQ's version of next_batch_of_larval_jobs_from_prelim in its determine_job_list method.

Reimplemented from protocols::jd3::standard::StandardJobQueen.

References protocols::jd3::standard::StandardJobQueen::create_output_specification_for_job_result(), protocols::jd3::jd3_job_status_success, job_genealogist_, node_managers_, num_stages_, protocols::jd3::standard::StandardJobQueen::options_for_job(), pose_output_specification_for_job_result_id_, stage_for_global_job_id(), and protocols::TR().

core::Size protocols::multistage_rosetta_scripts::MRSJobQueen::num_input_structs ( ) const
inline
core::Size protocols::multistage_rosetta_scripts::MRSJobQueen::num_results_to_keep_for_stage ( core::Size  stage) const
inline
core::Size protocols::multistage_rosetta_scripts::MRSJobQueen::num_stages ( ) const
inline
void protocols::multistage_rosetta_scripts::MRSJobQueen::parse_common_tag ( utility::tag::TagCOP  common_tag)
protected
void protocols::multistage_rosetta_scripts::MRSJobQueen::parse_job_definition_tags ( utility::tag::TagCOP  ,
utility::vector1< jd3::standard::PreliminaryLarvalJob > const &   
)
overrideprotectedvirtual

This gives the derived JobQueen a chance to read any relevant information from the job-definition file. The second argument holds a PreliminaryLarvalJob for every job block and the PreliminaryLarvalJob itself has all of the information given in its corresponding block.

Author
Jack Maguire, jackm.nosp@m.agui.nosp@m.re144.nosp@m.4@gm.nosp@m.ail.c.nosp@m.om

Reimplemented from protocols::jd3::standard::StandardJobQueen.

References input_job_tags_, job_results_have_been_discarded_for_stage_, num_input_structs_, num_stages_, num_structs_output_for_input_job_tag_, outputters_, parse_common_tag(), parse_single_job_tag(), protocols::multistage_rosetta_scripts::TagManager::set_num_input_pose_ids(), and tag_manager_.

void protocols::multistage_rosetta_scripts::MRSJobQueen::parse_single_job_tag ( jd3::standard::PreliminaryLarvalJob const &  prelim_larval_job,
jd3::PrelimJobNodeID  input_pose_id 
)
protected
void protocols::multistage_rosetta_scripts::MRSJobQueen::parse_single_stage_tag ( utility::tag::TagCOP  subprotocol_tag)
protected
core::pose::PoseOP protocols::multistage_rosetta_scripts::MRSJobQueen::pose_for_inner_job_derived ( jd3::InnerLarvalJobCOP  inner_job,
utility::options::OptionCollection const &  options 
)
protected
core::pose::PoseOP protocols::multistage_rosetta_scripts::MRSJobQueen::pose_for_job_derived ( jd3::LarvalJobCOP  job,
utility::options::OptionCollection const &  options 
)
protected
void protocols::multistage_rosetta_scripts::MRSJobQueen::print_job_lineage ( ) const
protected
static std::string protocols::multistage_rosetta_scripts::MRSJobQueen::protocols_subelement_mangler ( std::string const &  name)
inlinestaticprotected
jd3::JobDAGNodeID protocols::multistage_rosetta_scripts::MRSJobQueen::stage_for_global_job_id ( jd3::GlobalJobID  global_job_id) const
inline
TagManager const& protocols::multistage_rosetta_scripts::MRSJobQueen::tag_manager ( ) const
inline

References tag_manager_.

Member Data Documentation

utility::vector1< std::pair< core::Size, utility::tag::TagCOP > > protocols::multistage_rosetta_scripts::MRSJobQueen::checkpoints_
private

Referenced by parse_common_tag().

utility::vector1< std::unordered_map< jd3::JobResultID, cluster::ClusterMetricCOP, JobResultID_hash > > protocols::multistage_rosetta_scripts::MRSJobQueen::cluster_data_for_results_of_stage_
private
utility::vector1< utility::tag::TagCOP > protocols::multistage_rosetta_scripts::MRSJobQueen::cluster_metric_tag_for_stage_
private
utility::vector1< std::pair< jd3::InnerLarvalJobOP, core::Size > > protocols::multistage_rosetta_scripts::MRSJobQueen::current_inner_larval_job_for_stage_
private
bool protocols::multistage_rosetta_scripts::MRSJobQueen::has_been_initialized_
private
utility::vector1< std::string > protocols::multistage_rosetta_scripts::MRSJobQueen::input_job_tags_
private
jd3::JobGenealogistOP protocols::multistage_rosetta_scripts::MRSJobQueen::job_genealogist_
private
utility::vector1< core::Size > protocols::multistage_rosetta_scripts::MRSJobQueen::job_results_have_been_discarded_for_stage_
private
utility::vector1< core::Size > protocols::multistage_rosetta_scripts::MRSJobQueen::max_num_results_to_keep_per_input_struct_for_stage_
private
utility::vector1< core::Size > protocols::multistage_rosetta_scripts::MRSJobQueen::max_num_results_to_keep_per_instance_for_stage_
private
utility::vector1< jd3::JobResultID > protocols::multistage_rosetta_scripts::MRSJobQueen::most_recent_cluster_results_
private

No need to store this data for more than one stage at a time.

Referenced by cluster(), and get_nth_job_for_noninitial_stage().

PoseForPoseID protocols::multistage_rosetta_scripts::MRSJobQueen::most_recent_pose_id_
private
utility::vector1< jd3::dag_node_managers::NodeManagerOP > protocols::multistage_rosetta_scripts::MRSJobQueen::node_managers_
private
core::Size protocols::multistage_rosetta_scripts::MRSJobQueen::num_input_structs_
private
utility::vector1< core::Size > protocols::multistage_rosetta_scripts::MRSJobQueen::num_jobs_per_input_for_stage_
private
utility::vector1< core::Size > protocols::multistage_rosetta_scripts::MRSJobQueen::num_results_to_keep_after_clustering_for_stage_
private

Referenced by cluster(), and parse_common_tag().

utility::vector1< core::Size > protocols::multistage_rosetta_scripts::MRSJobQueen::num_results_to_keep_for_stage_
private
core::Size protocols::multistage_rosetta_scripts::MRSJobQueen::num_stages_
private
utility::vector1< core::Size > protocols::multistage_rosetta_scripts::MRSJobQueen::num_structs_output_for_input_job_tag_
private
utility::vector1< core::Size > protocols::multistage_rosetta_scripts::MRSJobQueen::num_total_jobs_for_stage_
private
utility::vector1< std::string > protocols::multistage_rosetta_scripts::MRSJobQueen::outputters_
private
std::map< jd3::JobResultID, jd3::output::OutputSpecificationOP > protocols::multistage_rosetta_scripts::MRSJobQueen::pose_output_specification_for_job_result_id_
private
utility::vector1< core::Size > protocols::multistage_rosetta_scripts::MRSJobQueen::result_cutoffs_for_stage_
private
SortByLowEnergy protocols::multistage_rosetta_scripts::MRSJobQueen::sorter_
private
utility::vector1< utility::tag::TagCOP > protocols::multistage_rosetta_scripts::MRSJobQueen::tag_for_stage_
private
TagManager protocols::multistage_rosetta_scripts::MRSJobQueen::tag_manager_
private

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