Rosetta  2020.50
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Private Attributes | List of all members
protocols::jobdist::AtomTreeDiffJobDistributor Class Reference

Distributor for use with atomtree_diff silent files. More...

#include <JobDistributors.hh>

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

Public Types

typedef BaseJobDistributor parent
 

Public Member Functions

 AtomTreeDiffJobDistributor (JobVector jobs, std::string outfile_name)
 
 ~AtomTreeDiffJobDistributor () override
 
virtual void dump_pose (std::string const &tag, std::map< std::string, core::Real > const &scores, core::pose::Pose const &ref_pose, core::pose::Pose const &pose)
 Appends pose to the silent file. More...
 
virtual void set_precision (int bb_precision, int sc_precision, int bondlen_precision)
 Sets number of digits used in writing atomtree diff. More...
 
void shutdown () override
 Must be called by client after last call to next_job(). If overriden by a subclass, it MUST call the superclass implementation. More...
 
- 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 startup ()
 Must be called by client before first 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...
 
virtual void dump_pose_and_map (std::string const &, core::pose::Pose &)
 Virtual function for dump_pose that is needed for main_plain_mover. More...
 
virtual void temp_file (std::string const &)
 Virtual function for temp_file main_plain_mover. More...
 
virtual void score_map (std::map< std::string, core::Real > &)
 Virtual function for score_map that is needed for main_plain_mover sets the score_map. 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...
 
virtual std::string get_output_filename ()
 

Protected Types

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

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...
 
- 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

utility::io::ozstream out_
 
std::set< std::string > used_tags_
 
core::pose::Pose const * last_ref_pose_
 
int bb_precision_
 
int sc_precision_
 
int bondlen_precision_
 

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 atomtree_diff silent files.

This class is deliberately designed for each process to work on its own silent file (and preferrably in its own directory); unlike Rosetta++, we DO NOT share silent files among multiple processes. First, true atomic file locking is impossible on most distributed file systems (e.g. NFS), meaning that files may be corrupted by multiple simultaneous writes. For long-running processes, collisions may be rare, but as we scale to more processors it becomes increasingly dangerous. Second, many processes writing to the same file (or even directory) can cause tremendous file system bottlenecks, possibly bringing down the cluster; ask Keith or Chance in the Baker lab for details.

Member Typedef Documentation

Constructor & Destructor Documentation

protocols::jobdist::AtomTreeDiffJobDistributor::AtomTreeDiffJobDistributor ( JobVector  jobs,
std::string  outfile_name 
)
protocols::jobdist::AtomTreeDiffJobDistributor::~AtomTreeDiffJobDistributor ( )
overridedefault

Member Function Documentation

void protocols::jobdist::AtomTreeDiffJobDistributor::dump_pose ( std::string const &  tag,
std::map< std::string, core::Real > const &  scores,
core::pose::Pose const &  ref_pose,
core::pose::Pose const &  pose 
)
virtual
bool protocols::jobdist::AtomTreeDiffJobDistributor::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 used_tags_.

void protocols::jobdist::AtomTreeDiffJobDistributor::set_precision ( int  bb_precision,
int  sc_precision,
int  bondlen_precision 
)
virtual

Sets number of digits used in writing atomtree diff.

References bb_precision_, bondlen_precision_, and sc_precision_.

void protocols::jobdist::AtomTreeDiffJobDistributor::shutdown ( )
overridevirtual

Must be called by client after last call to next_job(). If overriden by a subclass, it MUST call the superclass implementation.

If overriden by a subclass, it MUST call the superclass implementation.

Reimplemented from protocols::jobdist::BaseJobDistributor.

References out_, and protocols::jobdist::BaseJobDistributor::shutdown().

Referenced by protocols::jobdist::main_atom_tree_diff_mover().

Member Data Documentation

int protocols::jobdist::AtomTreeDiffJobDistributor::bb_precision_
private

Referenced by dump_pose(), and set_precision().

int protocols::jobdist::AtomTreeDiffJobDistributor::bondlen_precision_
private

Referenced by dump_pose(), and set_precision().

core::pose::Pose const* protocols::jobdist::AtomTreeDiffJobDistributor::last_ref_pose_
private

Referenced by dump_pose().

utility::io::ozstream protocols::jobdist::AtomTreeDiffJobDistributor::out_
private
int protocols::jobdist::AtomTreeDiffJobDistributor::sc_precision_
private

Referenced by dump_pose(), and set_precision().

std::set< std::string > protocols::jobdist::AtomTreeDiffJobDistributor::used_tags_
private

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