Rosetta
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Private Attributes | List of all members
protocols::jobdist::PlainPdbJobDistributor Class Reference

Distributor for use with plain old PDB files. Use is strongly discouraged in production environments! More...

#include <JobDistributors.hh>

Inheritance diagram for protocols::jobdist::PlainPdbJobDistributor:
Inheritance graph
[legend]

Public Types

typedef BaseJobDistributor parent
 

Public Member Functions

 PlainPdbJobDistributor (JobVector jobs, std::string outfile_name="none")
 
 ~PlainPdbJobDistributor () override
 
void startup () override
 Allows setting of inprogress. More...
 
virtual std::string get_output_filename (std::string const &tag)
 Translates an output tag name to an output PDB file name. More...
 
void dump_pose_and_map (std::string const &tag, core::pose::Pose &pose) override
 Writes pose and basic score data to a standard PDB file. More...
 
void temp_file (std::string const &tag) override
 Opens a temp file (.in_progress) More...
 
void score_map (std::map< std::string, core::Real > &score_map_in) override
 Virtual function for score_map that is needed for main_plain_mover sets the score_map. More...
 
virtual std::string get_output_filename ()
 
- Public Member Functions inherited from protocols::jobdist::BaseJobDistributor
 BaseJobDistributor (JobVector const &jobs)
 
 BaseJobDistributor (BaseJobDistributor const &)
 
 ~BaseJobDistributor () override
 
bool next_job (BasicJobOP &job, int &struct_n)
 If true, sets the next Job and nstruct number to be processed. Deliberately not virtual: should not be overriden. Uses the "find_available_job" method, which is common to both MPI and standard protocols, but used in slightly different manners. More...
 
virtual void shutdown ()
 Must be called by client after last call to next_job(). If overriden by a subclass, it MUST call the superclass implementation. More...
 
virtual void begin_critical_section ()
 Signal that if at all possible, we would like to not be killed while in the critical section. If overriden by a subclass, it MUST call the superclass implementation. More...
 
virtual void end_critical_section ()
 Signal that if at all possible, we would like to not be killed while in the critical section. If overriden by a subclass, it MUST call the superclass implementation. More...
 
void disable_ignorefinished ()
 
void enable_ignorefinished ()
 
void disable_output ()
 
void enable_output ()
 
void disable_inprogress ()
 
void enable_inprogress ()
 
bool ignorefinished () const
 
bool nooutput () const
 
bool inprogress () const
 
void set_proc_id (core::Size proc_id, core::Size nproc)
 
virtual std::string get_current_output_tag ()
 get output_tag for current job's current nstruct More...
 

Protected Types

typedef utility::vector1< BasicJobOPJobVector
 
- Protected Types inherited from protocols::jobdist::BaseJobDistributor
typedef utility::vector1< BasicJobOPJobVector
 

Protected Member Functions

bool is_finished (BasicJobOP const &job, int struct_n) override
 Is the given nstruct number of the given input job already finished by the local process? To be implemented by subclasses. More...
 
virtual void dump_scores (utility::io::ozstream &out, std::string const &tag, core::pose::Pose &pose)
 Writes score data to PDB file in YAML format. More...
 
- Protected Member Functions inherited from protocols::jobdist::BaseJobDistributor
virtual void checkpoint_read ()
 Restore state from checkpoint file, if it exists. More...
 
virtual void checkpoint_write ()
 Save state to checkpoint file, overwriting previous. More...
 
virtual void checkpoint_clear ()
 Remove checkpoint file (at end of batch) More...
 
int current_nstruct ()
 accessor for current_nstruct_ More...
 
BasicJobOP current_job ()
 accessor for current_job owning pointer More...
 
int get_next_random_range (int low, int high)
 

Private Attributes

bool scorefile_
 
utility::file::FileName scorefile_name_
 
std::map< std::string, core::Realscore_map_
 

Additional Inherited Members

- Protected Attributes inherited from protocols::jobdist::BaseJobDistributor
bool ignorefinished_
 ignore already done jobs - redo everything ! More...
 
bool nooutput_
 do not write files - useful such things as statistics or rescoring ! More...
 
bool inprogress_
 write .in_progress files for multiple processor runs More...
 
int start_time_
 starttime More...
 
int random_counter_
 RandomStore - needed for. More...
 
utility::vector1< core::Realrandom_store_
 

Detailed Description

Distributor for use with plain old PDB files. Use is strongly discouraged in production environments!

This class is deliberately designed for each process to write its own PDB files in its own directory; it checks for pre-existing files only for use by stopped and re-started jobs, NOT for coordinating between processes. (To coordinate, it would have to "touch" the non-existant file in next_job() before starting to process it, but see AtomtreeDiffJobDistributor for an explanation of why coordinating processes via the filesystem is a bad idea.)

Member Typedef Documentation

◆ JobVector

◆ parent

Constructor & Destructor Documentation

◆ PlainPdbJobDistributor()

protocols::jobdist::PlainPdbJobDistributor::PlainPdbJobDistributor ( JobVector  jobs,
std::string  outfile_name = "none" 
)

References scorefile_, and scorefile_name_.

◆ ~PlainPdbJobDistributor()

protocols::jobdist::PlainPdbJobDistributor::~PlainPdbJobDistributor ( )
overridedefault

Member Function Documentation

◆ dump_pose_and_map()

void protocols::jobdist::PlainPdbJobDistributor::dump_pose_and_map ( std::string const &  tag,
core::pose::Pose pose 
)
overridevirtual

◆ dump_scores()

void protocols::jobdist::PlainPdbJobDistributor::dump_scores ( utility::io::ozstream &  out,
std::string const &  tag,
core::pose::Pose pose 
)
protectedvirtual

Writes score data to PDB file in YAML format.

In order for this to work as expected, the Pose's cached energies must match up with the (current) conformation. A good time to do this is at the end of your protocol's apply() method: scorefxn( pose ); scorefxn.accumulate_residue_total_energies( pose );

References core::pose::Pose::energies(), core::scoring::n_score_types, core::conformation::Residue::name(), core::scoring::name_from_score_type(), core::conformation::membrane::out, core::pose::Pose::residue(), core::scoring::Energies::residue_total_energies(), protocols::hybridization::score, core::pose::Pose::size(), core::scoring::Energies::total_energies(), and core::scoring::Energies::weights().

Referenced by dump_pose_and_map().

◆ get_output_filename() [1/2]

std::string protocols::jobdist::BaseJobDistributor::get_output_filename
virtual

◆ get_output_filename() [2/2]

std::string protocols::jobdist::PlainPdbJobDistributor::get_output_filename ( std::string const &  tag)
virtual

Translates an output tag name to an output PDB file name.

References protocols::wum::mpi_rank(), protocols::hybridization::path, and core::id::to_string().

◆ is_finished()

bool protocols::jobdist::PlainPdbJobDistributor::is_finished ( BasicJobOP const &  job,
int  struct_n 
)
overrideprotectedvirtual

Is the given nstruct number of the given input job already finished by the local process? To be implemented by subclasses.

Implements protocols::jobdist::BaseJobDistributor.

References protocols::abinitio::filename(), get_output_filename(), and protocols::jobdist::BaseJobDistributor::ignorefinished().

◆ score_map()

void protocols::jobdist::PlainPdbJobDistributor::score_map ( std::map< std::string, core::Real > &  )
inlineoverridevirtual

Virtual function for score_map that is needed for main_plain_mover sets the score_map.

Needed if a score_map is to be output by the derived class

Reimplemented from protocols::jobdist::BaseJobDistributor.

References score_map_.

◆ startup()

void protocols::jobdist::PlainPdbJobDistributor::startup ( )
overridevirtual

Allows setting of inprogress.

Over riding baseclass to enable inprogress file.

Reimplemented from protocols::jobdist::BaseJobDistributor.

References protocols::jobdist::BaseJobDistributor::enable_inprogress(), and protocols::jobdist::BaseJobDistributor::startup().

◆ temp_file()

void protocols::jobdist::PlainPdbJobDistributor::temp_file ( std::string const &  tag)
overridevirtual

Opens a temp file (.in_progress)

Reimplemented from protocols::jobdist::BaseJobDistributor.

References get_output_filename().

Member Data Documentation

◆ score_map_

std::map< std::string, core::Real > protocols::jobdist::PlainPdbJobDistributor::score_map_
private

Referenced by dump_pose_and_map(), and score_map().

◆ scorefile_

bool protocols::jobdist::PlainPdbJobDistributor::scorefile_
private

◆ scorefile_name_

utility::file::FileName protocols::jobdist::PlainPdbJobDistributor::scorefile_name_
private

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