![]() |
Rosetta
2021.16
|
#include <FragmentIO.hh>
Public Member Functions | |
| FragmentIO () | |
| FragmentIO (Size top, Size ncopies=1, bool bAnnotate=true) | |
| FragSetOP | read_data (std::string const &filename) |
| read a FragSet... note that this function caches the fragment set. i.e., if you read the same set from multiple positions in the code you get the same set. if you read a new file ... we'll check the cache for stale references and delete them. NOTE that this is using global data and is thread unsafe and is evil. More... | |
| FragSetOP | read_data_from_stream (std::string const &filename, std::istream &data) |
| void | read_frames_from_file (std::string const &filename, FrameList &) |
| void | read_frames_from_stream (std::string const &filename, std::string const &firstline, std::istream &data, FrameList &) |
| void | write_data (std::string const &file, FragSet const &frags) |
| FragFactory & | get_frag_factory () |
| void | set_top_frag_num (Size setting) |
| Updates the number of distinct fragments to keep. More... | |
| void | set_ncopies (Size setting) |
| Updates the number of copies of each fragment to keep (default 1) More... | |
| void | set_read_annotation (bool setting=true) |
| Toggles between reading annotated (true) and non-annotated (false) More... | |
| void | clean_frag_cache () |
| remove all FragSets that are not referenced outside the cache. More... | |
Private Types | |
| typedef std::map< std::string, FragSetOP > | FragFileCache |
Private Member Functions | |
| void | read_next_frames (std::istream &data, std::string &next_line, FrameList &next_frames) |
| void | read_frag_data (std::istream &data, std::string &next_line, FrameList &next_frames) |
Private Attributes | |
| Size | top_ |
| Size | ncopies_ |
| bool | bAnnotate_ |
Static Private Attributes | |
| static FragFactory | frag_factory_ |
| static FragFileCache | frag_cache_ |
|
private |
|
inline |
| void core::fragment::FragmentIO::clean_frag_cache | ( | ) |
remove all FragSets that are not referenced outside the cache.
Referenced by protocols::abinitio::IterativeBase::increment_stage(), and read_data().
| FragFactory & core::fragment::FragmentIO::get_frag_factory | ( | void | ) |
References frag_factory_.
| FragSetOP core::fragment::FragmentIO::read_data | ( | std::string const & | filename | ) |
read a FragSet... note that this function caches the fragment set. i.e., if you read the same set from multiple positions in the code you get the same set. if you read a new file ... we'll check the cache for stale references and delete them. NOTE that this is using global data and is thread unsafe and is evil.
Open a file and construct a FragmentSet from its contents. Note that this function stores the constructed FragmentSet in GLOBAL DATA making it ABSOLUTELY TERRIBLE.
References clean_frag_cache(), protocols::abinitio::filename(), frag_cache_, read_data_from_stream(), and core::fragment::tr().
Referenced by protocols::abinitio::abscript::AbscriptMover::add_frags(), protocols::parser::FragmentReader::apply(), protocols::abinitio::decide_on_beta_jumping_from_frags(), protocols::abinitio::abscript::determine_frag_size(), protocols::abinitio::IterativeBase::gen_enumerate_pairings(), protocols::abinitio::IterativeBase::gen_resample_fragments(), protocols::hybridization::HybridizeProtocol::HybridizeProtocol(), protocols::hybridization::HybridizeProtocol::init(), protocols::abinitio::DomainAssembly::parse_my_tag(), protocols::abinitio::abscript::FragmentCM::parse_my_tag(), protocols::abinitio::abscript::AbscriptLoopCloserCM::parse_my_tag(), protocols::hybridization::HybridizeProtocol::parse_my_tag(), protocols::struct_fragment::StructFragmentMover::read_frag_file(), protocols::topology_broker::read_frags(), protocols::loops::read_loop_fragments(), core::fragment::read_std_frags_from_cmd(), and protocols::mpi_refinement::WorkUnit_PartialAbinitio::run().
| FragSetOP core::fragment::FragmentIO::read_data_from_stream | ( | std::string const & | filename, |
| std::istream & | data | ||
| ) |
With the opened file, read the first line to determine the format of the fragment file, and then construct the appropriate FragmentSet. Note that this function does not store the fragment set in the abomination that is the frag_cache_
References bAnnotate_, ncopies_, read_frames_from_stream(), protocols::kinmatch::str(), top_, and core::fragment::tr().
Referenced by core::fragment::FragmentSetLoader::create_resource(), and read_data().
|
private |
References bAnnotate_, frag_factory_, core::fragment::FragFactory::frag_type(), ncopies_, top_, and core::fragment::tr().
Referenced by read_frames_from_stream().
| void core::fragment::FragmentIO::read_frames_from_file | ( | std::string const & | filename, |
| FrameList & | frames | ||
| ) |
References read_frames_from_stream(), and core::fragment::tr().
Referenced by protocols::abinitio::AbrelaxApplication::insert_template_frags().
| void core::fragment::FragmentIO::read_frames_from_stream | ( | std::string const & | filename, |
| std::string const & | firstline, | ||
| std::istream & | data, | ||
| FrameList & | all_frames | ||
| ) |
References bAnnotate_, ncopies_, read_frag_data(), read_next_frames(), top_, and core::fragment::tr().
Referenced by read_data_from_stream(), and read_frames_from_file().
|
private |
References frag_factory_, core::fragment::FragFactory::frame(), and core::fragment::tr().
Referenced by read_frames_from_stream().
|
inline |
Updates the number of copies of each fragment to keep (default 1)
References ncopies_.
Referenced by protocols::topology_broker::read_frags().
|
inline |
Toggles between reading annotated (true) and non-annotated (false)
References bAnnotate_.
Referenced by protocols::topology_broker::read_frags().
|
inline |
Updates the number of distinct fragments to keep.
References top_.
Referenced by protocols::topology_broker::read_frags().
| void core::fragment::FragmentIO::write_data | ( | std::string const & | file, |
| FragSet const & | frags | ||
| ) |
References core::fragment::FragSet::begin(), core::fragment::FragSet::end(), and core::conformation::membrane::out.
Referenced by protocols::struct_fragment::StructFragmentMover::apply(), protocols::loop_grower::FragmentExtension::apply(), protocols::abinitio::KinematicAbinitio::apply(), protocols::abinitio::IterativeBase::gen_resample_fragments(), and protocols::parser::FragSetLoader::load_data().
|
private |
Referenced by read_data_from_stream(), read_frag_data(), read_frames_from_stream(), and set_read_annotation().
|
staticprivate |
Referenced by read_data().
|
staticprivate |
Referenced by get_frag_factory(), read_frag_data(), and read_next_frames().
|
private |
Referenced by read_data_from_stream(), read_frag_data(), read_frames_from_stream(), and set_ncopies().
|
private |
Referenced by read_data_from_stream(), read_frag_data(), read_frames_from_stream(), and set_top_frag_num().
1.8.7