Rosetta  2021.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
protocols::match::output::UpstreamHitCacher Class Reference

#include <UpstreamHitCacher.hh>

Inheritance diagram for protocols::match::output::UpstreamHitCacher:
Inheritance graph
[legend]

Public Types

typedef
utility::fixedsizearray1
< core::Size, 2 > 
ScaffoldRotamerPair
 
typedef utility::OrderedTuple
< ScaffoldRotamerPair
ScaffoldRotamerTuple
 

Public Member Functions

 UpstreamHitCacher (MatcherCOP matcher)
 
 ~UpstreamHitCacher () override
 
void set_cache_size (core::Size n_rotamers_to_cache)
 
core::conformation::ResidueCOP upstream_conformation_for_hit (core::Size geometric_constraint_id, Hit const &hit)
 
void process_hit (Hit const &hit, core::conformation::Residue const &upstream_conformation) override
 The method by which the UpstreamHitCacher communicates with the UpstreamBuilders. CAUTION: this class should not be handed to an UpstreamBuilder directly. It should only hand itself to an UpstreamBuilder. Ask the UpstreamHitCacher for a particular hit, and it will call recover_rotamer() on the upstream builder; it's doing bookkeeping in the background and that bookkeeping is important for the success of this function. More...
 
- Public Member Functions inherited from protocols::match::upstream::UpstreamResidueProcessor
 ~UpstreamResidueProcessor () override
 

Private Member Functions

void resize_arrays ()
 Allocate space in the arrays dependent on n_geometric_constraints_ and n_confs_to_cache_. More...
 
core::Size already_in_queue (core::Size cst_id, ScaffoldRotamerTuple const &rotid) const
 Returns 0 if the scaffold/rotamer pair is not already in the queue, and the non-zero index in the queue if it is. More...
 
core::Size fetch (core::Size cst_id, ScaffoldRotamerTuple const &rotid)
 Construct the rotamer for the requested scaffold/rotamer pair and put it into the queue, evicting the previous queue resident if necessary. More...
 

Private Attributes

MatcherCOP matcher_
 
core::Size n_geometric_constraints_
 
core::Size n_confs_to_cache_
 
utility::vector1< std::map
< ScaffoldRotamerTuple,
core::Size > > 
index_for_rotamer_
 
core::Size which_cst_being_processed_
 
utility::vector1< core::Sizequeue_head_
 
utility::vector1
< utility::vector1
< ScaffoldRotamerTuple > > 
scafrot_pair_for_conf_
 
utility::vector1
< utility::vector1
< core::conformation::ResidueCOP > > 
upstream_confs_
 

Member Typedef Documentation

Constructor & Destructor Documentation

protocols::match::output::UpstreamHitCacher::UpstreamHitCacher ( MatcherCOP  matcher)

References resize_arrays().

protocols::match::output::UpstreamHitCacher::~UpstreamHitCacher ( )
overridedefault

Member Function Documentation

core::Size protocols::match::output::UpstreamHitCacher::already_in_queue ( core::Size  cst_id,
ScaffoldRotamerTuple const &  rotid 
) const
private

Returns 0 if the scaffold/rotamer pair is not already in the queue, and the non-zero index in the queue if it is.

References core::sequence::end, and index_for_rotamer_.

Referenced by upstream_conformation_for_hit().

core::Size protocols::match::output::UpstreamHitCacher::fetch ( core::Size  cst_id,
ScaffoldRotamerTuple const &  rotid 
)
private

Construct the rotamer for the requested scaffold/rotamer pair and put it into the queue, evicting the previous queue resident if necessary.

References protocols::match::Hit::first(), matcher_, queue_head_, protocols::match::Hit::scaffold_build_id(), and which_cst_being_processed_.

Referenced by upstream_conformation_for_hit().

void protocols::match::output::UpstreamHitCacher::process_hit ( Hit const &  hit,
core::conformation::Residue const &  upstream_conformation 
)
overridevirtual

The method by which the UpstreamHitCacher communicates with the UpstreamBuilders. CAUTION: this class should not be handed to an UpstreamBuilder directly. It should only hand itself to an UpstreamBuilder. Ask the UpstreamHitCacher for a particular hit, and it will call recover_rotamer() on the upstream builder; it's doing bookkeeping in the background and that bookkeeping is important for the success of this function.

Implements protocols::match::upstream::UpstreamResidueProcessor.

References core::sequence::end, index_for_rotamer_, n_confs_to_cache_, queue_head_, protocols::match::Hit::scaffold_build_id(), scafrot_pair_for_conf_, protocols::match::Hit::upstream_conf_id(), upstream_confs_, and which_cst_being_processed_.

void protocols::match::output::UpstreamHitCacher::resize_arrays ( )
private

Allocate space in the arrays dependent on n_geometric_constraints_ and n_confs_to_cache_.

References index_for_rotamer_, n_confs_to_cache_, n_geometric_constraints_, queue_head_, scafrot_pair_for_conf_, and upstream_confs_.

Referenced by set_cache_size(), and UpstreamHitCacher().

void protocols::match::output::UpstreamHitCacher::set_cache_size ( core::Size  n_rotamers_to_cache)
core::conformation::ResidueCOP protocols::match::output::UpstreamHitCacher::upstream_conformation_for_hit ( core::Size  geometric_constraint_id,
Hit const &  hit 
)

Member Data Documentation

utility::vector1< std::map< ScaffoldRotamerTuple, core::Size > > protocols::match::output::UpstreamHitCacher::index_for_rotamer_
private
MatcherCOP protocols::match::output::UpstreamHitCacher::matcher_
private

Referenced by fetch().

core::Size protocols::match::output::UpstreamHitCacher::n_confs_to_cache_
private
core::Size protocols::match::output::UpstreamHitCacher::n_geometric_constraints_
private

Referenced by resize_arrays().

utility::vector1< core::Size > protocols::match::output::UpstreamHitCacher::queue_head_
private

Referenced by fetch(), process_hit(), and resize_arrays().

utility::vector1< utility::vector1< ScaffoldRotamerTuple > > protocols::match::output::UpstreamHitCacher::scafrot_pair_for_conf_
private

Referenced by process_hit(), and resize_arrays().

utility::vector1< utility::vector1< core::conformation::ResidueCOP > > protocols::match::output::UpstreamHitCacher::upstream_confs_
private
core::Size protocols::match::output::UpstreamHitCacher::which_cst_being_processed_
private

Referenced by fetch(), and process_hit().


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