Rosetta
Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Friends | List of all members
protocols::denovo_design::components::StructureDataFactory Class Reference

Singleton for creating StructureData objects. More...

#include <StructureDataFactory.hh>

Inheritance diagram for protocols::denovo_design::components::StructureDataFactory:
Inheritance graph
[legend]

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 >
 

Detailed Description

Singleton for creating StructureData objects.

Member Typedef Documentation

◆ WriteableCacheableDataMap

typedef std::map< std::string, std::set< basic::datacache::WriteableCacheableDataOP > > protocols::denovo_design::components::StructureDataFactory::WriteableCacheableDataMap

Constructor & Destructor Documentation

◆ StructureDataFactory()

protocols::denovo_design::components::StructureDataFactory::StructureDataFactory ( )
private

Private constructor for singleton.

Member Function Documentation

◆ add_perm_remark()

void protocols::denovo_design::components::StructureDataFactory::add_perm_remark ( core::io::Remarks remarks,
std::string const &  rem_value 
) const
private

adds a remark to remarks object

References protocols::denovo_design::add_remark(), and REMARK_NUM.

Referenced by save_into_pose().

◆ attach_observer()

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

◆ clear_cached_data()

void protocols::denovo_design::components::StructureDataFactory::clear_cached_data ( core::pose::Pose pose) const
private

◆ 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().

◆ create_from_cacheable_data()

StructureData protocols::denovo_design::components::StructureDataFactory::create_from_cacheable_data ( std::istream &  raw_stream) const

◆ create_from_motifs() [1/2]

StructureData protocols::denovo_design::components::StructureDataFactory::create_from_motifs ( std::string const &  motif_str) const

creates a StructureData from a motif string

Parameters
[in]motifsString of secstruct/abego motifs (e.g. "1LX-5EB-2LG-5EB-1LA-1LB-1LG-10HA-1LX" )
Returns
StructureData containing one segment per motif with the specified secondary structure and abego. Each motif is connected to the previous and next motifs. Segments are named by their secondary structure (e.g. L01, E01, L02, E02, L03, H01, L04 )

◆ create_from_motifs() [2/2]

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

Parameters
[in]motifsString of secstruct/abego motifs (e.g. "1LX-5EB-2LG-5EB-1LA-1LB-1LG-10HA-1LX" )
[in]prefixName 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, ... ]
Returns
StructureData containing one segment per motif with the specified secondary structure and abego. Each motif is connected to the previous and next motifs. Segments are named by their secondary structure (e.g. L01, E01, L02, E02, L03, H01, L04 )

References protocols::denovo_design::components::add_segments_for_chain(), and protocols::denovo_design::parse_motif_string().

◆ create_from_pose() [1/2]

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

Parameters
[in]poseThe input pose

Referenced by protocols::denovo_design::residue_selectors::NamedSegmentSelector::apply(), get_from_pose(), and retrieve_cached_data_ptr().

◆ create_from_pose() [2/2]

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

Parameters
[in]poseThe input pose
[in]prefixA 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().

◆ create_from_remarks()

StructureData protocols::denovo_design::components::StructureDataFactory::create_from_remarks ( core::io::Remarks const &  rem) const

◆ create_from_xml()

StructureData protocols::denovo_design::components::StructureDataFactory::create_from_xml ( std::istream &  xmltag) const

◆ detach_observer()

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

◆ get_from_const_pose()

StructureData const & protocols::denovo_design::components::StructureDataFactory::get_from_const_pose ( core::pose::Pose const &  pose) const

◆ get_from_pose()

StructureData const & protocols::denovo_design::components::StructureDataFactory::get_from_pose ( core::pose::Pose pose) const

◆ has_cached_data()

bool protocols::denovo_design::components::StructureDataFactory::has_cached_data ( core::pose::Pose const &  pose) const

◆ infer_from_pose()

StructureData protocols::denovo_design::components::StructureDataFactory::infer_from_pose ( core::pose::Pose const &  pose,
SegmentName const &  prefix 
) const
private

◆ observer_attached()

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

◆ retrieve_cached_data()

StructureData const & protocols::denovo_design::components::StructureDataFactory::retrieve_cached_data ( core::pose::Pose const &  pose) const
private

◆ retrieve_cached_data_ptr()

StructureDataOP protocols::denovo_design::components::StructureDataFactory::retrieve_cached_data_ptr ( core::pose::Pose pose) const
private

◆ retrieve_observer()

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.

◆ save_into_pose()

void protocols::denovo_design::components::StructureDataFactory::save_into_pose ( core::pose::Pose pose,
StructureData const &  sd 
) const

◆ set_cached_data()

void protocols::denovo_design::components::StructureDataFactory::set_cached_data ( core::pose::Pose pose,
StructureData const &  sd 
) const
private

Friends And Related Function Documentation

◆ utility::SingletonBase< StructureDataFactory >

friend class utility::SingletonBase< StructureDataFactory >
friend

Member Data Documentation

◆ REMARK_NUM

int const protocols::denovo_design::components::StructureDataFactory::REMARK_NUM = 994
static

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