![]() |
Rosetta
2021.16
|
#include <JobOutputter.hh>

Public Member Functions | |
| JobOutputter () | |
| constructor – reads cmd-line to initialize evaluators More... | |
| ~JobOutputter () override | |
| virtual void | flush () |
| this function is meant to be redefined in child classes to allow for flushing of memory buffers. Here's the long version: The SilentFileJobOutputter wanted to buffer output, but needed to guaruntee that the output would be flushed at end of runtime. The original implementation was to A) bend over backward to ensure that the destructor was run (JobOutputter lives inside static JobDistributor, which was previously not destructed because it's static) and B) flush the buffers in the destructor. This caused a problem because the buffer-flushing tried to use the Tracers, which had already been destructed...boom crash. More... | |
| virtual void | file (JobCOP job, std::string const &data)=0 |
| this function takes a string and writes it to disk (separately from Tracer output). use some sort of extention option system - default .dat? .data? More... | |
| virtual void | final_pose (JobOP job, core::pose::Pose const &pose, std::string const &tag="")=0 |
| this function outputs the final result of a job. More... | |
| virtual void | other_pose (JobOP job, core::pose::Pose const &pose, std::string const &tag, int copy_count=-1, bool score_only=false)=0 |
| this function is intended for saving mid-protocol poses; for example the final centroid structure before the fullatom stage begins in a combined centroid / fullatom protocol. More... | |
| virtual void | starting_pose (core::pose::Pose const &) |
| optionally pass a starting (reference) pose to a JobOutputter for later comparison purposes and/or as interface for initializing evaluators More... | |
| virtual bool | job_has_completed (JobCOP job)=0 |
| this function is not used for output, but it belongs here since it needs to check the same output locations as the class normally writes to. This class checks wherever output goes to see if the job's expected output already exists (on disk or whatever). This is the most basic form of checkpointing. More... | |
| virtual std::string | output_name (JobCOP job)=0 |
| this is the master function for determining the unique output identifier for a job - should this be defined in the base class? More... | |
| virtual std::string | filename (JobCOP) const |
| void | add_evaluation (evaluation::PoseEvaluatorOP) |
| void | set_evaluators (evaluation::PoseEvaluators const &) |
| void | clear_evaluators () |
| clear the list of evaluators More... | |
| evaluation::PoseEvaluatorsCOP | evaluators () const |
| void | evaluate (core::pose::Pose &pose, std::string tag, core::io::silent::SilentStruct &pss) const |
| void | call_output_observers (core::pose::Pose const &pose, JobOP job) const |
| call all output_observers More... | |
| void | set_defaults () |
| clear the list of evaluators More... | |
Protected Member Functions | |
| std::string | affixed_numbered_name (JobCOP job) |
| this function generates the affixed, numbered name for the job as prefix + input + suffix + number (affixes from options system). This function is deliberately not virtual, this should be a common mechanism; your JobOutputter can not call it if it would like. More... | |
Private Member Functions | |
| JobOutputter & | operator= (JobOutputter const &rhs) |
| operator= defined for the sake of the remove-headers-in-headers initiative. As of this writing, there is no reason to actually call this function, so it is declared but UNIMPLEMENTED to force compiler errors if you try to do this (instead of allowing the compiler to autogenerate the code). If you have a valid need for this function, feel free to implement it properly and make it a public function. More... | |
| JobOutputter (JobOutputter const &cpy) | |
| operator= defined for the sake of the remove-headers-in-headers initiative. As of this writing, there is no reason to actually call this function, so it is declared but UNIMPLEMENTED to force compiler errors if you try to do this (instead of allowing the compiler to autogenerate the code). If you have a valid need for this function, feel free to implement it properly and make it a public function. More... | |
Private Attributes | |
| evaluation::PoseEvaluatorsOP | evaluators_ |
| std::string | prefix_ |
| std::string | suffix_ |
| bool | no_nstruct_label_ |
the JobOutputter class is responsible for dealing with output, as well as determining what jobs have already been output and what sort of name is associated with a job. Derived classes will be responsible for output such as PDBS, PDBS.tar.gz and silent files.
| protocols::jd2::JobOutputter::JobOutputter | ( | ) |
constructor – reads cmd-line to initialize evaluators
References evaluators_, protocols::jd2::mem_tr, and set_defaults().
|
overridedefault |
|
private |
operator= defined for the sake of the remove-headers-in-headers initiative. As of this writing, there is no reason to actually call this function, so it is declared but UNIMPLEMENTED to force compiler errors if you try to do this (instead of allowing the compiler to autogenerate the code). If you have a valid need for this function, feel free to implement it properly and make it a public function.
| void protocols::jd2::JobOutputter::add_evaluation | ( | evaluation::PoseEvaluatorOP | ev_in | ) |
add another PoseEvaluator to the list of evaluations
References evaluators_.
|
protected |
this function generates the affixed, numbered name for the job as prefix + input + suffix + number (affixes from options system). This function is deliberately not virtual, this should be a common mechanism; your JobOutputter can not call it if it would like.
this is copied from protocols/jobdist/Jobs.cc, r24761 Checks the current JobInputter input source from the singleton instance of JobDistributor. If a PDB_FILE, it will deliberately discard any path information in the input tag as well as any file name extension (since input tags are usually file names). Otherwise, it will keep the entire input tag as-is.
References protocols::vip::base_name(), protocols::jd2::JobDistributor::get_instance(), no_nstruct_label_, protocols::jd2::JobInputterInputSource::PDB_FILE, prefix_, protocols::jd2::JobInputterInputSource::SCREENING_FILE, protocols::jd2::JobInputterInputSource::SERIALIZED_POSE_FILE, protocols::sparta::split(), and suffix_.
Referenced by protocols::jd2::NoOutputJobOutputter::output_name(), protocols::jd2::ScoreOnlyJobOutputter::output_name(), protocols::jd2::AtomTreeDiffJobOutputter::output_name(), protocols::jd2::wwPDBJobOutputter::output_name(), protocols::jd2::SilentFileJobOutputter::output_name(), and protocols::features::DatabaseJobOutputter::output_name().
| void protocols::jd2::JobOutputter::call_output_observers | ( | core::pose::Pose const & | pose, |
| JobOP | job | ||
| ) | const |
call all output_observers
Referenced by protocols::jd2::ScoreOnlyJobOutputter::final_pose(), protocols::jd2::AtomTreeDiffJobOutputter::final_pose(), protocols::jd2::wwPDBJobOutputter::final_pose(), protocols::dna::PDBOutput::final_pose(), protocols::jd2::SilentFileJobOutputter::final_pose(), protocols::jd2::RNA_DeNovoJobOutputter::final_pose(), protocols::features::DatabaseJobOutputter::final_pose(), protocols::jd2::ScoreOnlyJobOutputter::other_pose(), protocols::jd2::AtomTreeDiffJobOutputter::other_pose(), protocols::jd2::wwPDBJobOutputter::other_pose(), protocols::jd2::RNA_DeNovoJobOutputter::other_pose(), protocols::jd2::SilentFileJobOutputter::other_pose(), and protocols::features::DatabaseJobOutputter::other_pose().
| void protocols::jd2::JobOutputter::clear_evaluators | ( | ) |
clear the list of evaluators
References evaluators_.
| void protocols::jd2::JobOutputter::evaluate | ( | core::pose::Pose & | pose, |
| std::string | tag, | ||
| core::io::silent::SilentStruct & | pss | ||
| ) | const |
run the PoseEvaluators on the pose evaluation creates string value pairs which end up in the SilentStruct energy object instead of filling things into a SilentStruct we could provide a different interface... wait until Steven has finished his string/value pair output
References evaluators().
Referenced by protocols::jd2::SilentFileJobOutputter::dump_pose().
| evaluation::PoseEvaluatorsCOP protocols::jd2::JobOutputter::evaluators | ( | ) | const |
|
pure virtual |
this function takes a string and writes it to disk (separately from Tracer output). use some sort of extention option system - default .dat? .data?
Implemented in protocols::jd2::FileJobOutputter, and protocols::jd2::NoOutputJobOutputter.
|
inlinevirtual |
Reimplemented in protocols::jd2::RNA_DeNovoJobOutputter, and protocols::jd2::SilentFileJobOutputter.
Referenced by protocols::jd2::mmCIFJobOutputter::dump_pose().
|
pure virtual |
this function outputs the final result of a job.
Implemented in protocols::features::DatabaseJobOutputter, protocols::jd2::FileJobOutputter, protocols::jd2::RNA_DeNovoJobOutputter, protocols::jd2::SilentFileJobOutputter, protocols::dna::PDBOutput, protocols::jd2::AtomTreeDiffJobOutputter, protocols::jd2::wwPDBJobOutputter, protocols::jd2::ScoreOnlyJobOutputter, protocols::jd2::NoOutputJobOutputter, and protocols::enzdes::EnzdesJobOutputter.
|
virtual |
this function is meant to be redefined in child classes to allow for flushing of memory buffers. Here's the long version: The SilentFileJobOutputter wanted to buffer output, but needed to guaruntee that the output would be flushed at end of runtime. The original implementation was to A) bend over backward to ensure that the destructor was run (JobOutputter lives inside static JobDistributor, which was previously not destructed because it's static) and B) flush the buffers in the destructor. This caused a problem because the buffer-flushing tried to use the Tracers, which had already been destructed...boom crash.
base implementation does nothing
New solution: re-forbid use of destructors within the static JobDistributor system, and create a flush function to force this stuff out. So here it is:
Reimplemented in protocols::features::DatabaseJobOutputter, protocols::jd2::RNA_DeNovoJobOutputter, and protocols::jd2::SilentFileJobOutputter.
this function is not used for output, but it belongs here since it needs to check the same output locations as the class normally writes to. This class checks wherever output goes to see if the job's expected output already exists (on disk or whatever). This is the most basic form of checkpointing.
Implemented in protocols::features::DatabaseJobOutputter, protocols::jd2::RNA_DeNovoJobOutputter, protocols::jd2::SilentFileJobOutputter, protocols::jd2::FileJobOutputter, protocols::jd2::wwPDBJobOutputter, protocols::jd2::AtomTreeDiffJobOutputter, protocols::jd2::ScoreOnlyJobOutputter, protocols::jd2::NoOutputJobOutputter, and protocols::enzdes::EnzdesJobOutputter.
|
private |
operator= defined for the sake of the remove-headers-in-headers initiative. As of this writing, there is no reason to actually call this function, so it is declared but UNIMPLEMENTED to force compiler errors if you try to do this (instead of allowing the compiler to autogenerate the code). If you have a valid need for this function, feel free to implement it properly and make it a public function.
|
pure virtual |
this function is intended for saving mid-protocol poses; for example the final centroid structure before the fullatom stage begins in a combined centroid / fullatom protocol.
Implemented in protocols::features::DatabaseJobOutputter, protocols::jd2::RNA_DeNovoJobOutputter, protocols::jd2::SilentFileJobOutputter, protocols::jd2::FileJobOutputter, protocols::jd2::wwPDBJobOutputter, protocols::jd2::AtomTreeDiffJobOutputter, protocols::jd2::ScoreOnlyJobOutputter, and protocols::jd2::NoOutputJobOutputter.
|
pure virtual |
this is the master function for determining the unique output identifier for a job - should this be defined in the base class?
Implemented in protocols::features::DatabaseJobOutputter, protocols::jd2::RNA_DeNovoJobOutputter, protocols::jd2::SilentFileJobOutputter, protocols::jd2::FileJobOutputter, protocols::jd2::wwPDBJobOutputter, protocols::jd2::AtomTreeDiffJobOutputter, protocols::jd2::ScoreOnlyJobOutputter, and protocols::jd2::NoOutputJobOutputter.
| void protocols::jd2::JobOutputter::set_defaults | ( | ) |
clear the list of evaluators
References no_nstruct_label_, prefix_, and suffix_.
Referenced by JobOutputter().
| void protocols::jd2::JobOutputter::set_evaluators | ( | evaluation::PoseEvaluators const & | ev_in | ) |
set a list of Evaluations ( the list will be copied, the evaluations are OPs )
References evaluators_.
|
virtual |
optionally pass a starting (reference) pose to a JobOutputter for later comparison purposes and/or as interface for initializing evaluators
optionally pass a starting (reference) pose to a JobOutputter for comparison purposes and/or as interface for initializing evaluators. (Currently does nothing in this base class.)
Reimplemented in protocols::dna::PDBOutput.
|
private |
Referenced by add_evaluation(), clear_evaluators(), evaluators(), JobOutputter(), and set_evaluators().
|
private |
Referenced by affixed_numbered_name(), and set_defaults().
|
private |
Referenced by affixed_numbered_name(), and set_defaults().
|
private |
Referenced by affixed_numbered_name(), and set_defaults().
1.8.7