Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
core::io::silent::SilentFileData Class Reference

Abstract base class for classes that read and write different types of silent-files. Silent-files can contain SilentStruct objects which are expected, to be uniquely identified by some sort of string-based tag inside the file. More...

#include <SilentFileData.hh>

Inheritance diagram for core::io::silent::SilentFileData:
Inheritance graph
[legend]

Classes

class  const_iterator
 const_iterator class for SilentFileData container. More...
 
class  iterator
 Iterator class for SilentFileData container. More...
 

Public Member Functions

 SilentFileData (SilentFileOptions const &options)
 
 SilentFileData (std::string const &filename, SilentFileOptions const &options)
 
 SilentFileData (std::string const &filename, bool const store_argv_in_file, bool const strict_column_mode, std::string const &silent_struct_type, SilentFileOptions const &options)
 
bool read_file (std::string const &filename)
 Read in the SilentStruct objects contained in the given filename. this version will throw an exception if things go wrong (boolean return value is thus always true) More...
 
bool _read_file (std::string const &filename, bool throw_exception_on_bad_structs=false)
 Read in the SilentStruct objects contained in the given filename. this version returns with a boolean to tell you about success. More...
 
bool read_file (std::string const &filename, utility::vector1< std::string > const &tags)
 Read in the SilentStruct objects contained in the given filename. Ignore any SilentStruct with a tag not in the tags vector. throw an exception if things go wrong (returned boolean always true) More...
 
bool read_stream (std::istream &data, utility::vector1< std::string > const &tags, bool throw_exception_on_bad_structs, std::string filename="read_from_stream")
 
bool _read_file (std::string const &filename, utility::vector1< std::string > const &tags, bool throw_exception_on_bad_structs=false)
 Read in the SilentStruct objects contained in the given filename. Ignore any SilentStruct with a tag not in the tags vector. returns with a boolean to tell about success. More...
 
bool store_argv_in_file () const
 Returns true if this silent-file plans on storing option.get_argv() as a comment in the silent-file, false otherwise. More...
 
void store_argv_in_file (bool new_setting)
 Sets a boolean variable governing if this silent-file plans on storing option.get_argv() as a comment in the silent-file. More...
 
bool write_silent_struct (SilentStruct &s, std::string const &filename, bool bWriteScoreOnly=false) const
 Write the given silent-struct to the given outfile. More...
 
bool _write_silent_struct (SilentStruct &s, std::ostream &out, bool bWriteScoreOnly=false) const
 Write the given silent-struct, including the header, to the given ostream. More...
 
bool write_silent_struct (SilentStruct &s, std::ostream &out, bool bWriteScoreOnly=false) const
 Write the given silent-struct, minus the header, to the given ostream. More...
 
void write_comment (std::ostream &out, std::string const &line) const
 Write a comment to the given output stream. More...
 
Size size () const
 Returns the number of structures contained in this container. More...
 
int nres () const
 Returns the number of residues in the first structure in this object. Not guaranteed to be fixed for all structures in this container. More...
 
void set_filename (std::string filename)
 Sets the filename that this SilentFileData object will write to. More...
 
void set_verbose (bool const setting)
 Sets the filename that this SilentFileData object will write to. More...
 
SilentStructOP operator[] (std::string tag)
 
std::string const & filename () const
 Gets the filename that this SilentFileData object will write to. More...
 
utility::vector1< std::string > tags () const
 Return all tags in this container. More...
 
utility::vector1< std::string > read_tags_fast (std::string const &filename) const
 quickly read a list of tags from a silent-input file. Only checks lines beginning with SCORE: strings. More...
 
utility::vector1< SilentStructOPstructure_list ()
 Function to access the vector of silent structure owning pointers ordered as they were in the input file. More...
 
std::string get_sequence (std::string const &filename)
 
std::tuple< utility::vector1
< int >, utility::vector1
< char >, utility::vector1
< std::string > > 
get_resnum (std::string const &filename)
 
bool read_tags_fast (std::string const &filename, utility::vector1< std::string > &) const
 quickly read a list of tags from a silent-input file. Only checks lines beginning with SCORE: strings. More...
 
bool matched_tags (std::string const &expression, std::string const &mode, utility::vector1< std::string > &tags_in_file) const
 return mode=first,last,all matched tags – currently matching 'expression*' to tags in file, boost::regexp possible later More...
 
bool strict_column_mode () const
 Returns a boolean indicating whether or not the strict_column_mode is turned on when printing scores. More...
 
void strict_column_mode (bool new_mode)
 Sets value for strict column mode. See strict_column_mode() for more information. More...
 
void set_record_source (bool const &new_mode)
 
bool has_tag (std::string const &tag) const
 Returns true if we have a SilentStruct matching the given tag, false otherwise. More...
 
utility::vector1< std::string > comment_lines ()
 Returns a vector1 of the comment lines read in from a silent-file. Comment lines are any lines in the silent-file beginning with a # character. More...
 
void comment_line (std::string const &line)
 Adds a comment-line that will be printed in write_all method. Comment lines are simply lines in the silent-file that begin with the # character, and are printed in the write_all method. More...
 
void score_filter (Real const score_fraction)
 Removes the worst ( 1 - score_fraction ) percent of the decoys by score. The value of score_fraction should be between 0 and 1.0. More...
 
void reverse_score_filter (Real const score_fraction)
 
void order_by_energy ()
 Orders silent structs by energy. More...
 
void add_structure_replace_tag_if_necessary (SilentStructOP &new_struct)
 
void add_structure (SilentStructOP const &new_struct)
 Adds a SilentStructOP to the structure_map_. If the SilentStruct's tag already exists in the structure_map_, a new tag is assigned. Careful with this method, as it stores an owning pointer. If you change the SilentStruct later, it will change your already stored structures. More...
 
bool add_as_other_struct_if_relevant (SilentStructOP const &new_struct)
 In stepwise modeling, sometimes poses carry refs to 'other poses'. More...
 
void push_back (SilentStructOP const &new_struct)
 push_back to provide compatibility with other std containers. More...
 
void add_structure (SilentStruct const &new_struct)
 Saves a copy of the silent struct. This method is: More...
 
SilentStruct const & get_structure (const std::string &tag) const
 Return a SilentStruct referred to by the given tag. Assumes that we have checked the tag!! More...
 
void clear_structure_map ()
 Remove all of the SilentStruct objects from this object. More...
 
void clear ()
 Clears all of the data associated with this object. More...
 
void clear_shared_silent_data ()
 Clears all of the data associated with this object. More...
 
 ~SilentFileData () override
 Destructor. More...
 
void write_all (std::string const &filename, bool bWriteScoreOnly=false) const
 write all SilentStruct objects in the structure_map_ to the given filename. More...
 
void renumber_all_decoys ()
 renumber all of the decoys in this SilentFileData object. This obliterates decoy tag associated with every SilentStruct object, and tries to sensibly number the decoys with similar and increasingly numbered decoy tags. More...
 
SilentStructOP create_SilentStructOP ()
 creates a SilentStructOP using command-line options. Just a wrapper around SilentStructFactory::get_instance()->get_silent_struct_in(). More...
 
SharedSilentDataOP get_shared_silent_data (SharedSilentDataType ssdt) const
 SharedSilentData methods. More...
 
void set_shared_silent_data (SharedSilentDataType ssdt, SharedSilentDataOP ssd_op) const
 
bool has_shared_silent_data (SharedSilentDataType ssdt) const
 
iterator begin ()
 Returns an iterator to the start of the members of this container. More...
 
const_iterator begin () const
 Returns an iterator to the start of the members of this container. More...
 
iterator end ()
 Returns an iterator to the end of the members of this container. More...
 
const_iterator end () const
 Returns an iterator to the end of the members of this container. More...
 
iterator get_iterator_for_tag (const std::string &tag)
 
const_iterator get_iterator_for_tag (const std::string &tag) const
 

Private Member Functions

bool read_silent_struct_type_from_remark (std::string const &line, bool const header=false)
 
bool read_full_model_parameters_from_remark (std::string const &line, bool const header=false)
 Look for FULL_MODEL_PARAMETERS in REMARK line from header. More...
 
bool check_if_rna_from_sequence_line (std::string const &sequence_line)
 This is somewhat redundant if the silent file has a "REMARK RNA" line, but some older silent files didn't do that. More...
 
bool line_starts_with_score (std::string const &line) const
 Are the first six characters of a line "SCORE:"? More...
 
bool line_starts_with_sequence (std::string const &line) const
 Are the first nine characters of a line "SEQUENCE:"? More...
 
bool line_starts_with_other (std::string const &line) const
 Are the first six characters of a line "OTHER:"? More...
 
bool line_starts_with_remark (std::string const &line) const
 Are the first six characters of a line "REMARK "? More...
 
bool line_starts_with_other_header_string (std::string const &line) const
 Does a line start with another header string? More...
 
bool is_score_type_line (std::string const &line) const
 Is a line (that is assumed to start with "SCORE:") a score type line or a score line? More...
 
void lines_from_header_line_collection (std::map< SilentFileHeaderLine, std::string > const &header_lines, utility::vector1< std::string > &all_lines) const
 Given a list of non-header lines read from a silent file and a map of certain types of single-occurance header lines to strings, copy the single-occurance header lines to the top of the list of lines. More...
 

Private Attributes

Structure_Map structure_map_
 mapping from tags to structure data pointers More...
 
utility::vector1< SilentStructOPstructure_list_
 mapping from index in a silent file to data pointers, for situations in which the ordering in the file matters. More...
 
utility::vector1< std::string > comment_lines_
 
std::map< SharedSilentDataType,
SharedSilentDataOP
shared_silent_data_
 
std::string filename_
 
bool store_argv_in_file_
 
bool strict_column_mode_
 
bool record_source_
 
std::string silent_struct_type_
 
bool verbose_
 
core::pose::full_model_info::FullModelParametersOP full_model_parameters_
 
SilentFileOptions options_
 

Detailed Description

Abstract base class for classes that read and write different types of silent-files. Silent-files can contain SilentStruct objects which are expected, to be uniquely identified by some sort of string-based tag inside the file.

Constructor & Destructor Documentation

core::io::silent::SilentFileData::SilentFileData ( SilentFileOptions const &  options)
core::io::silent::SilentFileData::SilentFileData ( std::string const &  filename,
SilentFileOptions const &  options 
)
core::io::silent::SilentFileData::SilentFileData ( std::string const &  filename,
bool const  store_argv_in_file,
bool const  strict_column_mode,
std::string const &  silent_struct_type,
SilentFileOptions const &  options 
)
core::io::silent::SilentFileData::~SilentFileData ( )
override

Destructor.

References clear_structure_map().

Member Function Documentation

bool core::io::silent::SilentFileData::_read_file ( std::string const &  filename,
bool  throw_exception_on_bad_structs = false 
)
bool core::io::silent::SilentFileData::_read_file ( std::string const &  filename,
utility::vector1< std::string > const &  tags,
bool  throw_exception_on_bad_structs = false 
)

Read in the SilentStruct objects contained in the given filename. Ignore any SilentStruct with a tag not in the tags vector. returns with a boolean to tell about success.

References read_stream().

bool core::io::silent::SilentFileData::_write_silent_struct ( SilentStruct s,
std::ostream &  out,
bool  bWriteScoreOnly = false 
) const

Write the given silent-struct, including the header, to the given ostream.

Unlike write_silent_struct(), this method writes both the header and the body of the silent file to the given stream. Therefore this is probably the more appropriate method to use in high-level codes.

References core::io::silent::SilentStruct::print_header(), and write_silent_struct().

Referenced by protocols::trajectory::DbTrajectoryWriter::write_cache_to_db(), and protocols::canonical_sampling::DbTrajectoryRecorder::write_cache_to_db().

bool core::io::silent::SilentFileData::add_as_other_struct_if_relevant ( SilentStructOP const &  new_struct)

In stepwise modeling, sometimes poses carry refs to 'other poses'.

stepwise modeling can involve holding references to 'other poses' which, taken together correspond to the full model of the pose.

References has_tag(), and structure_map_.

Referenced by add_structure().

void core::io::silent::SilentFileData::add_structure ( SilentStructOP const &  new_struct)
void core::io::silent::SilentFileData::add_structure ( SilentStruct const &  new_struct)

Saves a copy of the silent struct. This method is:

  • SAFE! in the sense that it actually copies the SilentStruct object, not just the pointer to the object.
  • SLOW! in the sense that copying the object takes a small amount of time.

References add_structure(), and core::io::silent::SilentStruct::clone().

void core::io::silent::SilentFileData::add_structure_replace_tag_if_necessary ( SilentStructOP new_struct)
iterator core::io::silent::SilentFileData::begin ( )
inline

Returns an iterator to the start of the members of this container.

References structure_map_.

Referenced by protocols::wum::SilentStructStore::add(), protocols::noesy_assign::NoesyModule::assign(), protocols::abinitio::IterativeBase::collect_hedgeing_decoys_from_batches(), protocols::abinitio::AbrelaxApplication::do_rerun(), protocols::canonical_sampling::mc_convergence_checks::Pool_RMSD::fill_pool(), core::import_pose::pose_stream::LazySilentFilePoseInputStream::fill_pose(), protocols::jd3::full_model_inputters::SilentFileFullModelInputter::full_model_from_input_source(), protocols::canonical_sampling::MetropolisHastingsMover::get_checkpoints(), protocols::stepwise::legacy::modeler::rna::import_pose_from_silent_file(), protocols::jd2::archive::ArchiveBase::init_from_decoy_set(), core::import_pose::FullModelPoseBuilder::initialize_input_poses_from_options(), core::import_pose::pose_stream::LazySilentFilePoseInputStream::LazySilentFilePoseInputStream(), protocols::jd2::archive::ArchiveBase::load_decoys(), protocols::ligand_docking::ga_ligand_dock::GALigandDock::load_initial_pool(), protocols::ligand_docking::ga_ligand_dock::GALigandDock::load_reference_pool(), protocols::denovo_design::components::SheetDB::load_sheetlist_from_file(), protocols::toolbox::KClusterData::load_silent_file(), nres(), order_by_energy(), protocols::checkpoint::pose_from_binary_silent_file(), core::import_pose::process_input_file(), protocols::toolbox::DecoySetEvaluation::push_back_CA_xyz_from_silent_file(), protocols::wum::SilentStructStore::read_from_stream(), protocols::abinitio::IterativeAbrelax::read_structures(), protocols::jd2::archive::ArchiveBase::read_structures(), protocols::canonical_sampling::SilentTrajectoryRecorder::restart_simulation(), protocols::abinitio::HedgeArchive::restore_status(), reverse_score_filter(), protocols::toolbox::KClusterData::save_all_in_one(), protocols::toolbox::KClusterData::save_cluster_tree(), score_filter(), protocols::comparative_modeling::ThreadingJobInputter::ThreadingJobInputter(), protocols::jobdist::universal_main(), and write_all().

const_iterator core::io::silent::SilentFileData::begin ( ) const
inline

Returns an iterator to the start of the members of this container.

References structure_map_.

bool core::io::silent::SilentFileData::check_if_rna_from_sequence_line ( std::string const &  sequence_line)
private

This is somewhat redundant if the silent file has a "REMARK RNA" line, but some older silent files didn't do that.

References silent_struct_type_.

Referenced by read_stream().

void core::io::silent::SilentFileData::clear ( )
inline
void core::io::silent::SilentFileData::clear_shared_silent_data ( )
inline

Clears all of the data associated with this object.

References shared_silent_data_.

void core::io::silent::SilentFileData::clear_structure_map ( )
inline

Remove all of the SilentStruct objects from this object.

References structure_list_, and structure_map_.

Referenced by clear(), renumber_all_decoys(), and ~SilentFileData().

void core::io::silent::SilentFileData::comment_line ( std::string const &  line)
inline

Adds a comment-line that will be printed in write_all method. Comment lines are simply lines in the silent-file that begin with the # character, and are printed in the write_all method.

References comment_lines_.

utility::vector1< std::string > core::io::silent::SilentFileData::comment_lines ( )
inline

Returns a vector1 of the comment lines read in from a silent-file. Comment lines are any lines in the silent-file beginning with a # character.

References comment_lines_.

Referenced by protocols::wum::SilentStructStore::read_from_stream().

SilentStructOP core::io::silent::SilentFileData::create_SilentStructOP ( )

creates a SilentStructOP using command-line options. Just a wrapper around SilentStructFactory::get_instance()->get_silent_struct_in().

References full_model_parameters_, options_, and silent_struct_type_.

Referenced by read_stream().

iterator core::io::silent::SilentFileData::end ( )
inline

Returns an iterator to the end of the members of this container.

References structure_map_.

Referenced by protocols::wum::SilentStructStore::add(), protocols::noesy_assign::NoesyModule::assign(), protocols::abinitio::IterativeBase::collect_hedgeing_decoys_from_batches(), protocols::abinitio::AbrelaxApplication::do_rerun(), protocols::canonical_sampling::mc_convergence_checks::Pool_RMSD::fill_pool(), core::import_pose::pose_stream::LazySilentFilePoseInputStream::fill_pose(), core::import_pose::pose_stream::LazySilentFilePoseInputStream::has_another_pose(), protocols::stepwise::legacy::modeler::rna::import_pose_from_silent_file(), protocols::jd2::archive::ArchiveBase::init_from_decoy_set(), protocols::jd2::archive::ArchiveBase::load_decoys(), protocols::ligand_docking::ga_ligand_dock::GALigandDock::load_initial_pool(), protocols::ligand_docking::ga_ligand_dock::GALigandDock::load_reference_pool(), protocols::denovo_design::components::SheetDB::load_sheetlist_from_file(), protocols::toolbox::KClusterData::load_silent_file(), order_by_energy(), protocols::checkpoint::pose_from_binary_silent_file(), core::import_pose::process_input_file(), protocols::toolbox::DecoySetEvaluation::push_back_CA_xyz_from_silent_file(), protocols::wum::SilentStructStore::read_from_stream(), protocols::abinitio::IterativeAbrelax::read_structures(), protocols::jd2::archive::ArchiveBase::read_structures(), core::import_pose::pose_stream::LazySilentFilePoseInputStream::reset(), protocols::abinitio::HedgeArchive::restore_status(), reverse_score_filter(), protocols::toolbox::KClusterData::save_all_in_one(), protocols::toolbox::KClusterData::save_cluster_tree(), score_filter(), protocols::comparative_modeling::ThreadingJobInputter::ThreadingJobInputter(), protocols::jobdist::universal_main(), and write_all().

const_iterator core::io::silent::SilentFileData::end ( ) const
inline

Returns an iterator to the end of the members of this container.

References structure_map_.

std::string const& core::io::silent::SilentFileData::filename ( ) const
inline
iterator core::io::silent::SilentFileData::get_iterator_for_tag ( const std::string &  tag)
inline
const_iterator core::io::silent::SilentFileData::get_iterator_for_tag ( const std::string &  tag) const
inline

References structure_map_.

std::tuple< utility::vector1< int >, utility::vector1< char >, utility::vector1< std::string > > core::io::silent::SilentFileData::get_resnum ( std::string const &  filename)
std::string core::io::silent::SilentFileData::get_sequence ( std::string const &  filename)
SharedSilentDataOP core::io::silent::SilentFileData::get_shared_silent_data ( SharedSilentDataType  ssdt) const
SilentStruct const& core::io::silent::SilentFileData::get_structure ( const std::string &  tag) const
inline
bool core::io::silent::SilentFileData::has_shared_silent_data ( SharedSilentDataType  ssdt) const

References shared_silent_data_.

Referenced by write_silent_struct().

bool core::io::silent::SilentFileData::has_tag ( std::string const &  tag) const
inline
bool core::io::silent::SilentFileData::is_score_type_line ( std::string const &  line) const
private

Is a line (that is assumed to start with "SCORE:") a score type line or a score line?

Considered a score type line if and only if the second whitespace-separated chunk is "score" or "total_score"; otherwise, considered a score line.

Author
Vikram K. Mulligan (vmull.nosp@m.ig@u.nosp@m.w.edu).

Referenced by read_stream().

bool core::io::silent::SilentFileData::line_starts_with_other ( std::string const &  line) const
private

Are the first six characters of a line "OTHER:"?

Author
Vikram K. Mulligan (vmull.nosp@m.ig@u.nosp@m.w.edu).

Referenced by read_stream().

bool core::io::silent::SilentFileData::line_starts_with_other_header_string ( std::string const &  line) const
private

Does a line start with another header string?

Includes strings like "ANNOTATED_SEQUENCE", "FOLD_TREE", etc.

Author
Vikram K. Mulligan (vmull.nosp@m.ig@u.nosp@m.w.edu).

Referenced by read_stream().

bool core::io::silent::SilentFileData::line_starts_with_remark ( std::string const &  line) const
private

Are the first six characters of a line "REMARK "?

Author
Vikram K. Mulligan (vmull.nosp@m.ig@u.nosp@m.w.edu).

Referenced by read_stream().

bool core::io::silent::SilentFileData::line_starts_with_score ( std::string const &  line) const
private

Are the first six characters of a line "SCORE:"?

Both score type lines and score lines start with "SCORE:".

Author
Vikram K. Mulligan (vmull.nosp@m.ig@u.nosp@m.w.edu).

Referenced by read_stream().

bool core::io::silent::SilentFileData::line_starts_with_sequence ( std::string const &  line) const
private

Are the first nine characters of a line "SEQUENCE:"?

Author
Vikram K. Mulligan (vmull.nosp@m.ig@u.nosp@m.w.edu).

Referenced by read_stream().

void core::io::silent::SilentFileData::lines_from_header_line_collection ( std::map< SilentFileHeaderLine, std::string > const &  header_lines,
utility::vector1< std::string > &  all_lines 
) const
private

Given a list of non-header lines read from a silent file and a map of certain types of single-occurance header lines to strings, copy the single-occurance header lines to the top of the list of lines.

Author
Vikram K. Mulligan (vmull.nosp@m.ig@u.nosp@m.w.edu).

References core::io::silent::SFHEADER_SCORE_LINE, core::io::silent::SFHEADER_SCORE_TYPE_LINE, and core::io::silent::SFHEADER_SEQUENCE_LINE.

Referenced by read_stream().

bool core::io::silent::SilentFileData::matched_tags ( std::string const &  expression,
std::string const &  mode,
utility::vector1< std::string > &  tags_in_file 
) const

return mode=first,last,all matched tags – currently matching 'expression*' to tags in file, boost::regexp possible later

References filename(), and core::io::silent::tr().

Referenced by protocols::canonical_sampling::SilentTrajectoryRecorder::restart_simulation().

int core::io::silent::SilentFileData::nres ( ) const

Returns the number of residues in the first structure in this object. Not guaranteed to be fixed for all structures in this container.

References begin().

SilentStructOP core::io::silent::SilentFileData::operator[] ( std::string  tag)

References has_tag(), and structure_map_.

void core::io::silent::SilentFileData::order_by_energy ( )

Orders silent structs by energy.

References begin(), end(), structure_list_, and structure_map_.

void core::io::silent::SilentFileData::push_back ( SilentStructOP const &  new_struct)
inline

push_back to provide compatibility with other std containers.

References add_structure().

bool core::io::silent::SilentFileData::read_file ( std::string const &  filename)

Read in the SilentStruct objects contained in the given filename. this version will throw an exception if things go wrong (boolean return value is thus always true)

References _read_file(), options_, and core::io::silent::SilentFileOptions::read_through_errors().

Referenced by protocols::canonical_sampling::CanonicalSamplingMover::apply(), protocols::abinitio::KinematicAbinitio::apply(), protocols::noesy_assign::NoesyModule::assign(), protocols::optimize_weights::IterativeOptEDriver::collect_ddG_of_mutation_data(), protocols::abinitio::IterativeBase::collect_hedgeing_decoys_from_batches(), protocols::abinitio::AbrelaxApplication::do_distributed_rerun(), protocols::abinitio::AbrelaxApplication::do_rerun(), protocols::canonical_sampling::mc_convergence_checks::Pool_RMSD::fill_pool(), core::import_pose::pose_stream::LazySilentFilePoseInputStream::fill_pose(), protocols::jd3::full_model_inputters::SilentFileFullModelInputter::full_model_from_input_source(), protocols::stepwise::modeler::rna::get_binary_rna_silent_struct_safe(), protocols::canonical_sampling::MetropolisHastingsMover::get_checkpoints(), protocols::jd2::archive::ArchiveManager::go(), protocols::stepwise::legacy::modeler::rna::import_pose_from_silent_file(), core::import_pose::FullModelPoseBuilder::initialize_input_poses_from_options(), protocols::ddg::ddGMover::is_any_pdb_empty(), core::import_pose::pose_stream::LazySilentFilePoseInputStream::LazySilentFilePoseInputStream(), protocols::monte_carlo::GenericSimulatedAnnealer::load_checkpoint_file(), protocols::jd2::archive::ArchiveBase::load_decoys(), protocols::ligand_docking::ga_ligand_dock::GALigandDock::load_initial_pool(), protocols::optimize_weights::IterativeOptEDriver::load_pose(), protocols::ligand_docking::ga_ligand_dock::GALigandDock::load_reference_pool(), protocols::denovo_design::components::SheetDB::load_sheetlist_from_file(), protocols::toolbox::KClusterData::load_silent_file(), protocols::indexed_structure_store::SilentStructureStoreBackend::load_store(), protocols::checkpoint::pose_from_binary_silent_file(), core::import_pose::process_input_file(), protocols::jd2::archive::BaseArchiveManager::read_returning_decoys(), protocols::canonical_sampling::SilentTrajectoryRecorder::restart_simulation(), protocols::abinitio::HedgeArchive::restore_status(), protocols::toolbox::KClusterData::save_all_in_one(), protocols::toolbox::KClusterData::save_cluster_tree(), protocols::comparative_modeling::ThreadingJobInputter::ThreadingJobInputter(), and protocols::jobdist::universal_main().

bool core::io::silent::SilentFileData::read_file ( std::string const &  filename,
utility::vector1< std::string > const &  tags 
)

Read in the SilentStruct objects contained in the given filename. Ignore any SilentStruct with a tag not in the tags vector. throw an exception if things go wrong (returned boolean always true)

References _read_file(), options_, and core::io::silent::SilentFileOptions::read_through_errors().

bool core::io::silent::SilentFileData::read_full_model_parameters_from_remark ( std::string const &  line,
bool const  header = false 
)
private

Look for FULL_MODEL_PARAMETERS in REMARK line from header.

References full_model_parameters_.

Referenced by read_stream().

bool core::io::silent::SilentFileData::read_silent_struct_type_from_remark ( std::string const &  line,
bool const  header = false 
)
private

The first remarks line in a silent file block described the type of silent file that is comming. For example, REMARK BINARY SILENTFILE

References silent_struct_type_, and core::io::silent::tr().

Referenced by read_stream().

bool core::io::silent::SilentFileData::read_stream ( std::istream &  data,
utility::vector1< std::string > const &  tags,
bool  throw_exception_on_bad_structs,
std::string  filename = "read_from_stream" 
)
utility::vector1< std::string > core::io::silent::SilentFileData::read_tags_fast ( std::string const &  filename) const
bool core::io::silent::SilentFileData::read_tags_fast ( std::string const &  filename,
utility::vector1< std::string > &  tags_in_file 
) const

quickly read a list of tags from a silent-input file. Only checks lines beginning with SCORE: strings.

void core::io::silent::SilentFileData::renumber_all_decoys ( )

renumber all of the decoys in this SilentFileData object. This obliterates decoy tag associated with every SilentStruct object, and tries to sensibly number the decoys with similar and increasingly numbered decoy tags.

References clear_structure_map(), structure_list_, and structure_map_.

void core::io::silent::SilentFileData::reverse_score_filter ( Real const  score_fraction)
void core::io::silent::SilentFileData::score_filter ( Real const  score_fraction)

Removes the worst ( 1 - score_fraction ) percent of the decoys by score. The value of score_fraction should be between 0 and 1.0.

References begin(), end(), reverse_score_filter(), structure_list_, structure_map_, and core::io::silent::tr().

void core::io::silent::SilentFileData::set_filename ( std::string  filename)
inline
void core::io::silent::SilentFileData::set_record_source ( bool const &  new_mode)
inline

References record_source_.

void core::io::silent::SilentFileData::set_shared_silent_data ( SharedSilentDataType  ssdt,
SharedSilentDataOP  ssd_op 
) const
void core::io::silent::SilentFileData::set_verbose ( bool const  setting)
inline

Sets the filename that this SilentFileData object will write to.

References verbose_.

Size core::io::silent::SilentFileData::size ( ) const
inline
bool core::io::silent::SilentFileData::store_argv_in_file ( ) const
inline

Returns true if this silent-file plans on storing option.get_argv() as a comment in the silent-file, false otherwise.

References store_argv_in_file_.

Referenced by write_silent_struct().

void core::io::silent::SilentFileData::store_argv_in_file ( bool  new_setting)
inline

Sets a boolean variable governing if this silent-file plans on storing option.get_argv() as a comment in the silent-file.

References store_argv_in_file_.

bool core::io::silent::SilentFileData::strict_column_mode ( ) const
inline

Returns a boolean indicating whether or not the strict_column_mode is turned on when printing scores.

If strict_column_mode() is true, then the first SilentStruct printed to this SilentFileData object sets the EnergyNames that will be printed for all other SilentStruct objects. Extra EnergyNames in subsequent SilentStruct objects are ignored. If new objects are missing energies that should be printed in strict_column_mode, missing energy values are set to zero. In !strict_column_mode(), when each SilentStruct is printed, a new SCORE: header is printed if energies differ from last printed SilentStruct.

References strict_column_mode_.

Referenced by protocols::abinitio::AbrelaxApplication::fold(), and write_silent_struct().

void core::io::silent::SilentFileData::strict_column_mode ( bool  new_mode)
inline

Sets value for strict column mode. See strict_column_mode() for more information.

References strict_column_mode_.

utility::vector1<SilentStructOP> core::io::silent::SilentFileData::structure_list ( )
inline

Function to access the vector of silent structure owning pointers ordered as they were in the input file.

References structure_list_.

utility::vector1< std::string > core::io::silent::SilentFileData::tags ( ) const
void core::io::silent::SilentFileData::write_all ( std::string const &  filename,
bool  bWriteScoreOnly = false 
) const
void core::io::silent::SilentFileData::write_comment ( std::ostream &  out,
std::string const &  line 
) const

Write a comment to the given output stream.

Referenced by write_silent_struct().

bool core::io::silent::SilentFileData::write_silent_struct ( SilentStruct s,
std::string const &  filename,
bool  bWriteScoreOnly = false 
) const

Write the given silent-struct to the given outfile.

References core::io::silent::SilentStruct::print_header(), core::io::silent::SilentStruct::print_score_header(), store_argv_in_file(), and write_comment().

Referenced by _write_silent_struct(), protocols::loophash::Mover_LoopHashRefine::apply(), protocols::normalmode::NormalModeRelaxMover::apply(), protocols::recces::scratch::ThermalSamplingMover::apply(), protocols::loophash::LoopHashLibrary::apply(), protocols::rna::denovo::RNA_DeNovoProtocol::apply(), protocols::simple_moves::PeriodicBoxMover::apply(), protocols::ddg::ddGMover::apply(), protocols::electron_density::DockIntoDensityMover::apply_multi(), protocols::boinc::boincOutputFilter(), protocols::abinitio::AbrelaxApplication::do_distributed_rerun(), core::optimization::AtomTreeMultifunc::dump(), core::optimization::CartesianMultifunc::dump(), protocols::canonical_sampling::CanonicalSamplingMover::dump_decoy_or_score(), protocols::mpi_refinement::Serial_Refine::dump_structures(), protocols::loophash::MPI_LoopHashRefine::dump_structures(), protocols::mpi_refinement::MPI_Refinement::dump_structures(), protocols::canonical_sampling::mc_convergence_checks::HPool_RMSD::evaluate(), protocols::rna::denovo::export_packer_results(), protocols::abinitio::AbrelaxApplication::fold(), protocols::stepwise::legacy::modeler::rna::StepWiseRNA_Clusterer::get_best_neighboring_shift_RMSD_and_output_silent_file(), protocols::stepwise::modeler::rna::get_binary_rna_silent_struct_safe(), protocols::energy_based_clustering::EnergyBasedClusteringProtocol::go(), protocols::recces::RECCES_Mover::more_dump_stuff(), protocols::frag_picker::FragmentPicker::nonlocal_pairs(), protocols::jobdist::not_universal_main(), protocols::stepwise::modeler::rna::output_data(), protocols::abinitio::Protocol::output_debug_structure(), protocols::loops::loop_closure::ccd::SlidingWindowLoopClosure::output_debug_structure(), protocols::relax::RelaxProtocolBase::output_debug_structure(), protocols::abinitio::MembraneAbinitio::output_debug_structure(), protocols::magnesium::MgScanner::output_mg_to_silent_file(), protocols::frag_picker::FragmentCandidate::output_silent(), protocols::stepwise::modeler::align::StepWiseLegacyClustererSilentBased::output_silent_file(), protocols::stepwise::legacy::modeler::rna::StepWiseRNA_Clusterer::output_silent_file(), protocols::rna::denovo::RNA_DeNovoProtocol::output_silent_struct(), protocols::stepwise::legacy::modeler::protein::output_silent_struct(), protocols::stepwise::monte_carlo::output_to_silent_file(), protocols::cluster::ClusterBase::print_clusters_silentfile(), protocols::stepwise::legacy::modeler::rna::StepWiseRNA_Clusterer::recalculate_rmsd_and_output_silent_file(), protocols::ddg::ddGMover::relax_wildtype_structure(), protocols::md::MDBase::report_silent(), protocols::abinitio::run_boinc_debug(), protocols::toolbox::KClusterData::save_all_in_one(), protocols::toolbox::KClusterData::save_cluster_tree(), protocols::jd2::archive::ArchiveBase::save_decoys(), protocols::wum::SilentStructStore::serialize(), protocols::jobdist::universal_main(), write_all(), protocols::jd2::write_score_tracer(), and write_silent_struct().

bool core::io::silent::SilentFileData::write_silent_struct ( SilentStruct s,
std::ostream &  out,
bool  bWriteScoreOnly = false 
) const

Member Data Documentation

utility::vector1< std::string > core::io::silent::SilentFileData::comment_lines_
private
std::string core::io::silent::SilentFileData::filename_
private

Referenced by clear(), filename(), and set_filename().

core::pose::full_model_info::FullModelParametersOP core::io::silent::SilentFileData::full_model_parameters_
private
SilentFileOptions core::io::silent::SilentFileData::options_
private
bool core::io::silent::SilentFileData::record_source_
private

Referenced by read_stream(), and set_record_source().

std::map< SharedSilentDataType, SharedSilentDataOP > core::io::silent::SilentFileData::shared_silent_data_
mutableprivate
std::string core::io::silent::SilentFileData::silent_struct_type_
private
bool core::io::silent::SilentFileData::store_argv_in_file_
private

Referenced by clear(), and store_argv_in_file().

bool core::io::silent::SilentFileData::strict_column_mode_
private

Referenced by clear(), and strict_column_mode().

utility::vector1< SilentStructOP > core::io::silent::SilentFileData::structure_list_
private

mapping from index in a silent file to data pointers, for situations in which the ordering in the file matters.

Referenced by add_structure(), clear_structure_map(), order_by_energy(), renumber_all_decoys(), reverse_score_filter(), score_filter(), and structure_list().

Structure_Map core::io::silent::SilentFileData::structure_map_
private
bool core::io::silent::SilentFileData::verbose_
private

Referenced by read_stream(), and set_verbose().


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