Rosetta  2021.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
protocols::frag_picker::quota::ABEGO_SS_Pool Class Reference

represents a single pool used by quota selector More...

#include <ABEGO_SS_Pool.hh>

Inheritance diagram for protocols::frag_picker::quota::ABEGO_SS_Pool:
Inheritance graph
[legend]

Public Member Functions

 ABEGO_SS_Pool (core::Size, std::string, utility::vector1< std::pair< core::Size, core::Size > >, utility::vector1< core::Size >, utility::vector1< core::Real >, core::Real, core::Size, core::Size)
 Creates a pool of a given size and name. More...
 
bool accepts (char ss_type, char abego_type)
 
 ~ABEGO_SS_Pool () override
 
core::Size total_size () const override
 Says how many fragments (in total) may fit into this pool. More...
 
core::Size current_size () const override
 Says how many fragments are currently in this pool. More...
 
core::Size size_left () const override
 Says how many fragments can still be inserted into this pool. More...
 
bool could_be_accepted (ScoredCandidate candidate) const override
 
void resize (core::Size new_size)
 
void set_fraction (core::Real new_fraction) override
 Sets the fraction of this quota pool in the entire population of fragments. More...
 
void push (ScoredCandidate candidate) override
 Push a fragment candidate into the container. More...
 
bool add (ScoredCandidate) override
 Insert a fragment candidate to the container. More...
 
void clear () override
 removes all candidates from the container More...
 
core::Size count_candidates (core::Size) const override
 Check how many candidates have been already collected for a given position. More...
 
core::Size count_candidates () const override
 Check how many candidates have been already collected for all positions. More...
 
core::Size query_length () const override
 Check the size of query sequence that this object knows. More...
 
void insert (core::Size, CandidatesCollectorOP collector) override
 Inserts candidates from another Collector for a give position in the query Candidates may or may not get inserted depending on the candidate. More...
 
ScoredCandidatesVector1get_candidates (core::Size) override
 Returns all the candidate in this pool. More...
 
void print_report (std::ostream &, scores::FragmentScoreManagerOP) const override
 Describes what has been collected. More...
 
core::Real quota_score (ScoredCandidate candidate) const override
 provides the score for a candidate that was used to sort a quota pool More...
 
- Public Member Functions inherited from protocols::frag_picker::quota::QuotaPool
 QuotaPool (std::string const &pool_name, core::Real quota_fraction)
 Creates a pool of a given size and name. More...
 
 ~QuotaPool () override
 
std::string const & get_pool_name () const
 returns the name assigned to this quota pool More...
 
virtual void show_availability (std::ostream &where) const
 prints information on which fragments can be accepted by this pool and how many of them More...
 
core::Real get_fraction () const
 returns the fraction of this quota pool in the entire population of fragments More...
 

Private Attributes

core::Size total_size_
 
core::Size this_size_
 
core::Size buffer_factor_
 
ABEGO_SS_MapOP ss_abego_types_
 
utility::vector1< core::Sizecomponents_
 
utility::vector1< core::Realweights_
 
BoundedQuotaContainerOP storage_
 

Static Private Attributes

static char all_abego_ []
 
static char all_ss_ []
 

Detailed Description

represents a single pool used by quota selector

Constructor & Destructor Documentation

protocols::frag_picker::quota::ABEGO_SS_Pool::ABEGO_SS_Pool ( core::Size  total_size,
std::string  pool_name,
utility::vector1< std::pair< core::Size, core::Size > >  ss_abego_types,
utility::vector1< core::Size which_components,
utility::vector1< core::Real weights,
core::Real  fraction,
core::Size  n_scores,
core::Size  buffer_factor = 5 
)

Creates a pool of a given size and name.

Parameters
size- total number of fragments from all the pools at a given position
name- name assigned to this pool. This in general may be any string that later allows one control pool's behavior from a flag file
abego_ss_pairs- what types of secondary structure and ABEGO this pool is accepting
score_components_id- which scores will be used to sort this pool
weights- weights for the scores that in general may be different than these used for fragment picking
fraction- fraction of this pool in the entire population
total_size- how many fragments will be selected (in total in all pools)
name- name assigned to this pool. This in general may be any string that later allows one control pool's behavior from a flag file
ss_type- what is the type of secondary structur this pool is accepting
fraction- fraction of the total number of fragments that goes into this pool

References buffer_factor_, components_, ss_abego_types_, storage_, this_size_, total_size(), total_size_, protocols::frag_picker::quota::trABEGO_SS_Pool(), and weights_.

protocols::frag_picker::quota::ABEGO_SS_Pool::~ABEGO_SS_Pool ( )
overridedefault

Member Function Documentation

bool protocols::frag_picker::quota::ABEGO_SS_Pool::accepts ( char  ss_type,
char  abego_type 
)
inline

References ss_abego_types_.

bool protocols::frag_picker::quota::ABEGO_SS_Pool::add ( ScoredCandidate  candidate)
overridevirtual

Insert a fragment candidate to the container.

Implements protocols::frag_picker::CandidatesCollector.

References could_be_accepted(), and storage_.

void protocols::frag_picker::quota::ABEGO_SS_Pool::clear ( )
inlineoverridevirtual

removes all candidates from the container

Implements protocols::frag_picker::quota::QuotaPool.

References storage_.

bool protocols::frag_picker::quota::ABEGO_SS_Pool::could_be_accepted ( ScoredCandidate  candidate) const
overridevirtual
core::Size protocols::frag_picker::quota::ABEGO_SS_Pool::count_candidates ( core::Size  ) const
inlineoverridevirtual

Check how many candidates have been already collected for a given position.

This is a very special case - collector will be used only for a given position. Thus it returns the total number of inserted candidates, as count_candidates() does

Implements protocols::frag_picker::CandidatesCollector.

References current_size().

core::Size protocols::frag_picker::quota::ABEGO_SS_Pool::count_candidates ( ) const
inlineoverridevirtual

Check how many candidates have been already collected for all positions.

Implements protocols::frag_picker::quota::QuotaPool.

References current_size().

core::Size protocols::frag_picker::quota::ABEGO_SS_Pool::current_size ( ) const
inlineoverridevirtual

Says how many fragments are currently in this pool.

Implements protocols::frag_picker::quota::QuotaPool.

References storage_.

Referenced by count_candidates(), print_report(), and size_left().

ScoredCandidatesVector1& protocols::frag_picker::quota::ABEGO_SS_Pool::get_candidates ( core::Size  )
inlineoverridevirtual

Returns all the candidate in this pool.

Implements protocols::frag_picker::CandidatesCollector.

References storage_.

void protocols::frag_picker::quota::ABEGO_SS_Pool::insert ( core::Size  ,
CandidatesCollectorOP  collector 
)
inlineoverridevirtual

Inserts candidates from another Collector for a give position in the query Candidates may or may not get inserted depending on the candidate.

Implements protocols::frag_picker::CandidatesCollector.

References core::pack::dunbrack::c, and storage_.

void protocols::frag_picker::quota::ABEGO_SS_Pool::print_report ( std::ostream &  out,
scores::FragmentScoreManagerOP   
) const
overridevirtual
void protocols::frag_picker::quota::ABEGO_SS_Pool::push ( ScoredCandidate  candidate)
inlineoverridevirtual

Push a fragment candidate into the container.

Implements protocols::frag_picker::quota::QuotaPool.

References storage_.

core::Size protocols::frag_picker::quota::ABEGO_SS_Pool::query_length ( ) const
inlineoverridevirtual

Check the size of query sequence that this object knows.

This is a very special case - collector will be used only for a given position and it does NOT know the tolal size. Thus it returns always 0

Implements protocols::frag_picker::CandidatesCollector.

core::Real protocols::frag_picker::quota::ABEGO_SS_Pool::quota_score ( ScoredCandidate  candidate) const
inlineoverridevirtual

provides the score for a candidate that was used to sort a quota pool

This base class returns the most recent total score for a fragment

Reimplemented from protocols::frag_picker::quota::QuotaPool.

References components_, and weights_.

void protocols::frag_picker::quota::ABEGO_SS_Pool::resize ( core::Size  new_size)
inline

References buffer_factor_, and storage_.

void protocols::frag_picker::quota::ABEGO_SS_Pool::set_fraction ( core::Real  new_fraction)
inlineoverridevirtual

Sets the fraction of this quota pool in the entire population of fragments.

Reimplemented from protocols::frag_picker::quota::QuotaPool.

References buffer_factor_, protocols::frag_picker::quota::QuotaPool::set_fraction(), storage_, this_size_, and total_size_.

core::Size protocols::frag_picker::quota::ABEGO_SS_Pool::size_left ( ) const
inlineoverridevirtual

Says how many fragments can still be inserted into this pool.

Implements protocols::frag_picker::quota::QuotaPool.

References current_size(), and total_size().

core::Size protocols::frag_picker::quota::ABEGO_SS_Pool::total_size ( ) const
inlineoverridevirtual

Says how many fragments (in total) may fit into this pool.

Implements protocols::frag_picker::quota::QuotaPool.

References storage_.

Referenced by ABEGO_SS_Pool(), and size_left().

Member Data Documentation

char protocols::frag_picker::quota::ABEGO_SS_Pool::all_abego_[]
staticprivate
char protocols::frag_picker::quota::ABEGO_SS_Pool::all_ss_[]
staticprivate
core::Size protocols::frag_picker::quota::ABEGO_SS_Pool::buffer_factor_
private

Referenced by ABEGO_SS_Pool(), resize(), and set_fraction().

utility::vector1<core::Size> protocols::frag_picker::quota::ABEGO_SS_Pool::components_
private

Referenced by ABEGO_SS_Pool(), and quota_score().

ABEGO_SS_MapOP protocols::frag_picker::quota::ABEGO_SS_Pool::ss_abego_types_
private
BoundedQuotaContainerOP protocols::frag_picker::quota::ABEGO_SS_Pool::storage_
private
core::Size protocols::frag_picker::quota::ABEGO_SS_Pool::this_size_
private

Referenced by ABEGO_SS_Pool(), and set_fraction().

core::Size protocols::frag_picker::quota::ABEGO_SS_Pool::total_size_
private

Referenced by ABEGO_SS_Pool(), and set_fraction().

utility::vector1<core::Real> protocols::frag_picker::quota::ABEGO_SS_Pool::weights_
private

Referenced by ABEGO_SS_Pool(), and quota_score().


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