Rosetta 3.4
Public Member Functions | Protected Member Functions
protocols::jd2::JobOutputter Class Reference

#include <JobOutputter.hh>

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

List of all members.

Public Member Functions

 JobOutputter ()
virtual ~JobOutputter ()
virtual void flush ()
 this function is meant to be redefined in child classes to allow for flushing of memory buffers.
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?
virtual void final_pose (JobCOP job, core::pose::Pose const &pose)=0
 this function outputs the final result of a job.
virtual void other_pose (JobCOP 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 in a combined centroid/fullatom protocol.
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
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.
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?
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
evaluation::PoseEvaluatorsCOP evaluators () const
void evaluate (core::pose::Pose &pose, std::string tag, core::io::silent::SilentStruct &pss) const

Protected Member Functions

std::string affixed_numbered_name (JobCOP job)
 this function provides the extended name, not just the output name. e.g output_name returns 1UBQ_0001, this returns 1UBQ_0001.pdb

Detailed Description

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.


Constructor & Destructor Documentation

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

Member Function Documentation

void protocols::jd2::JobOutputter::add_evaluation ( evaluation::PoseEvaluatorOP  ev_in)

add another PoseEvaluator to the list of evaluations

std::string protocols::jd2::JobOutputter::affixed_numbered_name ( JobCOP  job) [protected]

this function provides the extended name, not just the output name. e.g output_name returns 1UBQ_0001, this returns 1UBQ_0001.pdb

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(), protocols::jd2::JobInputterInputSource::PDB_FILE, and core::io::pdb::split().

Referenced by protocols::jd2::SilentFileJobOutputter::output_name(), protocols::jd2::ScoreOnlyJobOutputter::output_name(), protocols::jd2::PDBJobOutputter::output_name(), protocols::jd2::NoOutputJobOutputter::output_name(), protocols::jd2::AtomTreeDiffJobOutputter::output_name(), and protocols::features::DatabaseJobOutputter::output_name().

void protocols::jd2::JobOutputter::clear_evaluators ( )

clear the list of 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

return the list of PoseEvaluators

Referenced by evaluate().

virtual void protocols::jd2::JobOutputter::file ( JobCOP  job,
std::string const &  data 
) [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.

virtual std::string protocols::jd2::JobOutputter::filename ( JobCOP  ) const [inline, virtual]
virtual void protocols::jd2::JobOutputter::final_pose ( JobCOP  job,
core::pose::Pose const &  pose 
) [pure virtual]
void protocols::jd2::JobOutputter::flush ( ) [virtual]

this function is meant to be redefined in child classes to allow for flushing of memory buffers.

base implementation does nothing

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.

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, and protocols::jd2::SilentFileJobOutputter.

Referenced by protocols::jd2::FileJobOutputter::file().

virtual bool protocols::jd2::JobOutputter::job_has_completed ( JobCOP  job) [pure virtual]

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::enzdes::EnzdesJobOutputter, protocols::features::DatabaseJobOutputter, protocols::jd2::AtomTreeDiffJobOutputter, protocols::jd2::FileJobOutputter, protocols::jd2::NoOutputJobOutputter, protocols::jd2::PDBJobOutputter, protocols::jd2::ScoreOnlyJobOutputter, and protocols::jd2::SilentFileJobOutputter.

virtual void protocols::jd2::JobOutputter::other_pose ( JobCOP  job,
core::pose::Pose const &  pose,
std::string const &  tag,
int  copy_count = -1,
bool  score_only = false 
) [pure virtual]

this function is intended for saving mid-protocol poses; for example the final centroid structure in a combined centroid/fullatom protocol.

Implemented in protocols::features::DatabaseJobOutputter, protocols::jd2::AtomTreeDiffJobOutputter, protocols::jd2::FileJobOutputter, protocols::jd2::NoOutputJobOutputter, protocols::jd2::PDBJobOutputter, protocols::jd2::ScoreOnlyJobOutputter, and protocols::jd2::SilentFileJobOutputter.

virtual std::string protocols::jd2::JobOutputter::output_name ( JobCOP  job) [pure virtual]
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 )

void protocols::jd2::JobOutputter::starting_pose ( core::pose::Pose const &  ) [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.


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