Rosetta
|
Singleton for creating StructureData objects. More...
#include <StructureDataFactory.hh>
Public Types | |
typedef std::map< std::string, std::set< basic::datacache::WriteableCacheableDataOP > > | WriteableCacheableDataMap |
Public Member Functions | |
void | save_into_pose (core::pose::Pose &pose, StructureData const &sd) const |
stores the data of this permutation into a pose for later retrieval StructureData stored in a pose this way can be retrieved by calling get_from_pose(), or get_from_const_pose() More... | |
void | clear_from_pose (core::pose::Pose &pose) const |
clears all structuredata information (including cached xml) from this pose. More... | |
StructureData const & | get_from_pose (core::pose::Pose &pose) const |
retrieves a StructureData object from the pose observable cache creates one if necessary More... | |
StructureData const & | get_from_const_pose (core::pose::Pose const &pose) const |
retrieves a StructureData object from the pose observable cache Creates a StructureData using the pose (but doesn't attach it) if the cached StructureData could not be retrieved properly More... | |
StructureData | create_from_pose (core::pose::Pose const &pose) const |
retrieves a StructureData object from the pose data cache Creates a StructureData using the pose (but doesn't store it) if the cached StructureData is not present More... | |
StructureData | create_from_pose (core::pose::Pose const &pose, SegmentName const &prefix) const |
retrieves a StructureData object from the pose data cache Creates a StructureData using the pose (but doesn't store it) if the cached StructureData is not present. Adds id_val as a prefix for all new segments More... | |
StructureData | create_from_cacheable_data (std::istream &raw_stream) const |
creates from CacheableData stream More... | |
StructureData | create_from_xml (std::istream &xmltag) const |
creates a StructureData from an xml stringstream More... | |
StructureData | create_from_remarks (core::io::Remarks const &rem) const |
creates SD from description stored in PDB remarks More... | |
StructureData | create_from_motifs (std::string const &motif_str) const |
creates a StructureData from a motif string More... | |
StructureData | create_from_motifs (std::string const &motif_str, SegmentName const &prefix) const |
creates a StructureData from a motif string, optionally prefixing a string to the name of each segment More... | |
bool | observer_attached (core::pose::Pose const &pose) const |
checks for a StructureData in the pose observer cache Returns true if one is found, false otherwise More... | |
StructureDataObserverCOP | retrieve_observer (core::pose::Pose const &pose) const |
returns observer pointer if the pose has one cached pointer returned can be null if no StructureData is present in the cache More... | |
void | attach_observer (core::pose::Pose &pose) const |
attaches cacheable observer. Sets up cached SD if there isn't one More... | |
void | detach_observer (core::pose::Pose &pose) const |
detaches cacheable observer and removes from observable cache More... | |
bool | has_cached_data (core::pose::Pose const &pose) const |
checks whether StructureData is stored in the pose's datacache More... | |
Static Public Attributes | |
static int const | REMARK_NUM = 994 |
Private Member Functions | |
StructureDataFactory () | |
Private constructor for singleton. More... | |
StructureData | infer_from_pose (core::pose::Pose const &pose, SegmentName const &prefix) const |
sets data from a given pose's information, not taking into account PDB remarks More... | |
StructureDataOP | retrieve_cached_data_ptr (core::pose::Pose &pose) const |
StructureData const & | retrieve_cached_data (core::pose::Pose const &pose) const |
retrieves a StructureData object from the pose's datacache More... | |
void | set_cached_data (core::pose::Pose &pose, StructureData const &sd) const |
stores a StructureData in the pose's datacache More... | |
void | clear_cached_data (core::pose::Pose &pose) const |
clears stored StructureData from the pose's datacache More... | |
void | add_perm_remark (core::io::Remarks &remarks, std::string const &rem_value) const |
adds a remark to remarks object More... | |
Friends | |
class | utility::SingletonBase< StructureDataFactory > |
Singleton for creating StructureData objects.
typedef std::map< std::string, std::set< basic::datacache::WriteableCacheableDataOP > > protocols::denovo_design::components::StructureDataFactory::WriteableCacheableDataMap |
|
private |
Private constructor for singleton.
|
private |
adds a remark to remarks object
References protocols::denovo_design::add_remark(), and REMARK_NUM.
Referenced by save_into_pose().
void protocols::denovo_design::components::StructureDataFactory::attach_observer | ( | core::pose::Pose & | pose | ) | const |
attaches cacheable observer. Sets up cached SD if there isn't one
attaches cacheable observer. Overwrites whatever was there before
References core::pose::Pose::observer_cache(), retrieve_cached_data_ptr(), core::pose::datacache::ObserverCache::set(), core::pose::datacache::STRUCTUREDATA_OBSERVER, and protocols::TR().
Referenced by protocols::denovo_design::movers::AlignResiduesMover::apply().
|
private |
clears stored StructureData from the pose's datacache
References protocols::denovo_design::components::StructureData::class_name(), and core::pose::Pose::data().
Referenced by clear_from_pose().
void protocols::denovo_design::components::StructureDataFactory::clear_from_pose | ( | core::pose::Pose & | pose | ) | const |
clears all structuredata information (including cached xml) from this pose.
References clear_cached_data(), detach_observer(), and core::pose::Pose::pdb_info().
StructureData protocols::denovo_design::components::StructureDataFactory::create_from_cacheable_data | ( | std::istream & | raw_stream | ) | const |
creates from CacheableData stream
References protocols::denovo_design::components::clean_from_storage(), create_from_xml(), and protocols::TR().
Referenced by protocols::denovo_design::components::StructureDataCreator::create_data().
StructureData protocols::denovo_design::components::StructureDataFactory::create_from_motifs | ( | std::string const & | motif_str | ) | const |
creates a StructureData from a motif string
[in] | motifs | String of secstruct/abego motifs (e.g. "1LX-5EB-2LG-5EB-1LA-1LB-1LG-10HA-1LX" ) |
StructureData protocols::denovo_design::components::StructureDataFactory::create_from_motifs | ( | std::string const & | motif_str, |
SegmentName const & | prefix | ||
) | const |
creates a StructureData from a motif string, optionally prefixing a string to the name of each segment
[in] | motifs | String of secstruct/abego motifs (e.g. "1LX-5EB-2LG-5EB-1LA-1LB-1LG-10HA-1LX" ) |
[in] | prefix | Name to be prepended before the segment names. If empty, names will be as [ L01, E01, L02, ... ]. If set to "myprefix", names will be as [ myprefix.L01, myprefix.E01, ... ] |
References protocols::denovo_design::components::add_segments_for_chain(), and protocols::denovo_design::parse_motif_string().
StructureData protocols::denovo_design::components::StructureDataFactory::create_from_pose | ( | core::pose::Pose const & | pose | ) | const |
retrieves a StructureData object from the pose data cache Creates a StructureData using the pose (but doesn't store it) if the cached StructureData is not present
retrieves a StructureData object from the pose observable cache Creates a StructureData using the pose (but doesn't attach it) if the cached StructureData could not be retrieved properly
[in] | pose | The input pose |
Referenced by protocols::denovo_design::residue_selectors::NamedSegmentSelector::apply(), get_from_pose(), and retrieve_cached_data_ptr().
StructureData protocols::denovo_design::components::StructureDataFactory::create_from_pose | ( | core::pose::Pose const & | pose, |
SegmentName const & | prefix | ||
) | const |
retrieves a StructureData object from the pose data cache Creates a StructureData using the pose (but doesn't store it) if the cached StructureData is not present. Adds id_val as a prefix for all new segments
[in] | pose | The input pose |
[in] | prefix | A prefix to be added to the segments in the pose. For example, if prefix is empty, the first helix would be named 'H01', but if prefix is set to 'pose1', the first helix will be named 'pose.H01' |
References protocols::denovo_design::components::StructureData::check_pose_consistency(), create_from_remarks(), has_cached_data(), infer_from_pose(), core::pose::Pose::pdb_info(), retrieve_cached_data(), protocols::denovo_design::components::StructureData::save_remarks(), and protocols::TR().
StructureData protocols::denovo_design::components::StructureDataFactory::create_from_remarks | ( | core::io::Remarks const & | rem | ) | const |
creates SD from description stored in PDB remarks
References create_from_xml(), protocols::denovo_design::get_remark_line(), REMARK_NUM, and protocols::TR().
Referenced by protocols::denovo_design::movers::MakeAsymmetricStructureDataMover::apply(), and create_from_pose().
StructureData protocols::denovo_design::components::StructureDataFactory::create_from_xml | ( | std::istream & | xmltag | ) | const |
creates a StructureData from an xml stringstream
References protocols::denovo_design::components::StructureData::parse_tag().
Referenced by create_from_cacheable_data(), and create_from_remarks().
void protocols::denovo_design::components::StructureDataFactory::detach_observer | ( | core::pose::Pose & | pose | ) | const |
detaches cacheable observer and removes from observable cache
References core::pose::datacache::ObserverCache::clear(), core::pose::Pose::observer_cache(), and core::pose::datacache::STRUCTUREDATA_OBSERVER.
Referenced by clear_from_pose().
StructureData const & protocols::denovo_design::components::StructureDataFactory::get_from_const_pose | ( | core::pose::Pose const & | pose | ) | const |
retrieves a StructureData object from the pose observable cache Creates a StructureData using the pose (but doesn't attach it) if the cached StructureData could not be retrieved properly
retrieves a StructureData object from the pose observable cache utility_exit() if no StructureData object is found
References retrieve_cached_data().
Referenced by protocols::denovo_design::movers::FoldTreeFromFoldGraphMover::apply(), protocols::denovo_design::constraints::FileConstraintGenerator::apply(), protocols::denovo_design::residue_selectors::NamedSegmentSelector::apply(), protocols::denovo_design::movers::FoldArchitectMover::create_loops(), protocols::fldsgn::filters::SecondaryStructureFilter::get_filtered_secstruct(), protocols::fldsgn::filters::SheetTopologyFilter::get_filtered_sheet_topology(), get_from_pose(), protocols::fldsgn::filters::HSSTripletFilter::get_hss3s(), and protocols::denovo_design::residue_selectors::PairedSheetResidueSelector::get_sheet_topology().
StructureData const & protocols::denovo_design::components::StructureDataFactory::get_from_pose | ( | core::pose::Pose & | pose | ) | const |
retrieves a StructureData object from the pose observable cache creates one if necessary
References create_from_pose(), get_from_const_pose(), has_cached_data(), and save_into_pose().
Referenced by protocols::denovo_design::movers::AlignResiduesMover::align_residues(), and protocols::denovo_design::movers::FoldArchitectMover::fold_attempt().
bool protocols::denovo_design::components::StructureDataFactory::has_cached_data | ( | core::pose::Pose const & | pose | ) | const |
checks whether StructureData is stored in the pose's datacache
checks whether a pose contains a structuredata in its datacache
References protocols::denovo_design::components::StructureData::class_name(), core::pose::Pose::data(), and protocols::denovo_design::components::get_writeable_cacheable_map().
Referenced by protocols::denovo_design::movers::FoldTreeFromFoldGraphMover::apply(), protocols::denovo_design::constraints::FileConstraintGenerator::apply(), protocols::denovo_design::residue_selectors::NamedSegmentSelector::apply(), create_from_pose(), protocols::denovo_design::movers::FoldArchitectMover::fold_attempt(), protocols::fldsgn::SheetConstraintGenerator::get_abego(), protocols::fldsgn::filters::SecondaryStructureFilter::get_filtered_secstruct(), protocols::fldsgn::filters::SheetTopologyFilter::get_filtered_sheet_topology(), get_from_pose(), protocols::denovo_design::residue_selectors::PairedSheetResidueSelector::get_sheet_topology(), and retrieve_cached_data_ptr().
|
private |
sets data from a given pose's information, not taking into account PDB remarks
[in] | pose | The input pose |
[in] | prefix | A prefix to be added to the segments in the pose. For example, if prefix is empty, the first helix would be named 'H01', but if prefix is set to 'pose1', the first helix will be named 'pose.H01' |
References core::scoring::abego, protocols::denovo_design::abego_str(), protocols::denovo_design::components::StructureData::add_covalent_bond(), protocols::denovo_design::components::add_segments_for_chain(), core::chemical::ResidueType::atom_name(), core::conformation::Conformation::chain_endings(), core::pose::Pose::conformation(), core::conformation::Residue::connected_residue_at_resconn(), protocols::simple_filters::dssp(), core::conformation::Residue::is_polymer(), core::conformation::Residue::n_non_polymeric_residue_connections(), core::pose::Pose::residue(), core::conformation::Residue::residue_connect_atom_index(), core::pose::Pose::size(), protocols::TR(), and core::conformation::Residue::type().
Referenced by create_from_pose().
bool protocols::denovo_design::components::StructureDataFactory::observer_attached | ( | core::pose::Pose const & | pose | ) | const |
checks for a StructureData in the pose observer cache Returns true if one is found, false otherwise
References core::pose::datacache::ObserverCache::is_attached(), core::pose::Pose::observer_cache(), and core::pose::datacache::STRUCTUREDATA_OBSERVER.
Referenced by retrieve_observer().
|
private |
retrieves a StructureData object from the pose's datacache
References protocols::denovo_design::components::StructureData::class_name(), core::pose::Pose::data(), and protocols::denovo_design::components::get_writeable_cacheable_map().
Referenced by create_from_pose(), and get_from_const_pose().
|
private |
StructureDataObserverCOP protocols::denovo_design::components::StructureDataFactory::retrieve_observer | ( | core::pose::Pose const & | pose | ) | const |
returns observer pointer if the pose has one cached pointer returned can be null if no StructureData is present in the cache
References observer_attached(), core::pose::Pose::observer_cache(), and core::pose::datacache::STRUCTUREDATA_OBSERVER.
void protocols::denovo_design::components::StructureDataFactory::save_into_pose | ( | core::pose::Pose & | pose, |
StructureData const & | sd | ||
) | const |
stores the data of this permutation into a pose for later retrieval StructureData stored in a pose this way can be retrieved by calling get_from_pose(), or get_from_const_pose()
References add_perm_remark(), protocols::denovo_design::components::StructureData::check_pose_consistency(), core::pose::Pose::pdb_info(), protocols::denovo_design::components::StructureData::retrieve_remarks(), and set_cached_data().
Referenced by protocols::denovo_design::movers::AlignResiduesMover::align_residues(), get_from_pose(), and retrieve_cached_data_ptr().
|
private |
stores a StructureData in the pose's datacache
References protocols::denovo_design::components::StructureData::class_name(), and core::pose::Pose::data().
Referenced by save_into_pose().
|
friend |
|
static |