Rosetta  2020.46
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel Class Reference

#include <HierarchicalLevel.hh>

Inheritance diagram for protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel:
Inheritance graph
[legend]

Public Member Functions

 HierarchicalLevel (core::Size nlevels, std::string const &filename)
 
 HierarchicalLevel (core::Size nlevels)
 
 HierarchicalLevel (core::Size level, core::Size max_levels)
 
std::string & filename ()
 
void fill_top_level (Pool_RMSD_OP &top_level_pool)
 
void get_addresses_at_level (utility::vector1< Address > &)
 
void debug_print_hierarchy ()
 
void debug_print_size_per_level ()
 
void print_addresses_at_level ()
 
HierarchicalLevelOP next_level ()
 
core::Size size ()
 
core::Size level_size (core::Size level)
 
core::Size pool_size (Address &address, core::Size level)
 
core::Size top_level_pool_size ()
 
Addressaddress (core::Size index)
 
void radius (core::Real radius)
 
core::Real radius ()
 
core::Real level_radius (core::Size level)
 
core::Size level ()
 
core::Size nlevels ()
 
void max_cache_size (core::Size max_size)
 
core::Size max_cache_size ()
 
bool has_next_level ()
 
void clear ()
 
void add_new (core::pose::Pose const &pose, std::string &tag, Address &address, bool write_to_file, core::Size new_level)
 
void add_new (core::io::silent::SilentStruct &, std::string &tag, Address &address, bool write_to_file, core::Size new_level)
 
bool add_new (FArray2D_double &, std::string &tag, Address &address)
 
bool add_new (FArray2D_double &, std::string &tag, Address &address, bool resolve_remaining_levels)
 
void add_to_top_level (FArray2D_double &, std::string &tag)
 
bool equal_addresses (Address &address1, Address &address2)
 
core::Size evaluate (core::pose::Pose const &pose, std::string &best_decoy, utility::vector1< core::Real > &best_rmsd, Address &address)
 
core::Size evaluate (core::io::silent::SilentStruct const &, std::string &best_decoy, utility::vector1< core::Real > &best_rmsd, Address &address)
 
core::Size evaluate (FArray2D_double &, std::string &best_decoy, utility::vector1< core::Real > &best_rmsd, Address &address)
 
core::Size evaluate (FArray2D_double &, std::string &best_decoy, utility::vector1< core::Real > &best_rmsd, Address &address, bool reset_all_levels, bool load_if_missing)
 
std::string lib_full_path (Address &address)
 
bool address_exists_in_cache (Address &addr)
 
bool level_find (Address &address, core::Size const &level, std::list< PoolData >::iterator &)
 
bool pool_exists (Address &address)
 
void round (core::Real &rmsd)
 
void test_round ()
 
void write_headers_to_hierarchy (core::io::silent::SilentStructOP &ss)
 
void debug_print_addresses ()
 
core::Size first_zero_pos (Address &address)
 
- Public Member Functions inherited from protocols::canonical_sampling::mc_convergence_checks::Pool_RMSD
 Pool_RMSD (std::string silent_file)
 
 Pool_RMSD ()
 
 ~Pool_RMSD () override
 
core::Size evaluate (core::pose::Pose const &, std::string &best_decoy, core::Real &best_rmsd) const
 return position in pool for the best_decoy More...
 
core::Size evaluate (core::io::silent::SilentStruct const &, std::string &best_decoy, core::Real &best_rmsd) const
 
virtual core::Size evaluate_and_add (core::pose::Pose const &pose, std::string &cluster_center, core::Real &best_rmsd, core::Real transition_threshold)
 
core::Size size () const
 
void add (core::io::silent::SilentStruct const &, std::string new_tag="keep_silent_tag")
 
void add (core::pose::Pose const &, std::string new_tag)
 
virtual void finalize ()
 
void get (core::Size index, ObjexxFCL::FArray2D_double &result)
 
std::string & get_tag (core::Size index)
 
void pop_back ()
 
void clear ()
 
void set_reserve_size (int max_size)
 
core::Size evaluate_and_add (ObjexxFCL::FArray2D_double &coords, std::string &best_decoy, core::Real &best_rmsd, core::Real transition_threshold)
 
core::Size evaluate (ObjexxFCL::FArray2D_double &, std::string &best_decoy, core::Real &best_rmsd) const
 
core::Size evaluate (ObjexxFCL::FArray2D_double &, std::string &best_decoy, core::Real &best_rmsd, core::Size index) const
 
void add (ObjexxFCL::FArray2D_double const &, core::Size nres, std::string new_tag)
 
void set_excluded_residues (utility::vector1< core::Size > const &excluded_residues)
 

Private Member Functions

void sort_pool (Pool_RMSD_OP &pool_ptr)
 
core::Size find_address (Address &query, utility::vector1< Address > &addresses)
 
void string_to_address (std::string &, Address &)
 
void address_to_string (std::string &, Address &)
 
void sort_addresses (utility::vector1< Address > &addresses)
 
bool less_than (Address &addr1, Address &addr2)
 
void max_level_index (Address &)
 
void reset (Address &addr, utility::vector1< core::Real > &rms)
 
void print_address (Address &address)
 
core::Size num_matching_levels (Address &address1, Address &address2)
 
void add_elem_to_cache (FArray2D_double &coords, std::string &tag, Address &input_addr)
 
std::list< PoolData >::iterator find (Address &address)
 
PoolData load_pool (Address &address)
 

Private Attributes

std::list< PoolDatapool_cache_
 
core::Size max_cache_size_
 
core::Size const level_
 
core::Size const max_levels_
 
core::Real radius_
 
core::Size num_clusters_in_level_
 
std::string filename_
 
core::Size next_free_address_index_
 
HierarchicalLevelOP next_level_
 

Additional Inherited Members

- Protected Member Functions inherited from protocols::canonical_sampling::mc_convergence_checks::Pool_RMSD
core::Size natom () const
 
ObjexxFCL::FArray3D_double const & coords () const
 
std::string const & tag (core::Size index) const
 

Constructor & Destructor Documentation

protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::HierarchicalLevel ( core::Size  nlevels,
std::string const &  filename 
)
protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::HierarchicalLevel ( core::Size  nlevels)
protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::HierarchicalLevel ( core::Size  level,
core::Size  max_levels 
)

Member Function Documentation

void protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::add_elem_to_cache ( FArray2D_double coords,
std::string &  tag,
Address input_addr 
)
private
void protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::add_new ( core::pose::Pose const &  pose,
std::string &  tag,
Address address,
bool  write_to_file,
core::Size  new_level 
)

Referenced by add_new().

void protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::add_new ( core::io::silent::SilentStruct ,
std::string &  tag,
Address address,
bool  write_to_file,
core::Size  new_level 
)
bool protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::add_new ( FArray2D_double coord,
std::string &  tag,
Address address 
)

References add_new().

bool protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::add_new ( FArray2D_double coord,
std::string &  tag,
Address address,
bool  resolve_remaining_levels 
)
void protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::add_to_top_level ( FArray2D_double coords,
std::string &  tag 
)
utility::vector1< core::Size > & protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::address ( core::Size  index)

References pool_cache_.

Referenced by add_new().

bool protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::address_exists_in_cache ( Address addr)

References find(), has_next_level(), level_, next_level_, and pool_cache_.

Referenced by add_new().

void protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::address_to_string ( std::string &  newtag,
Address addr 
)
private
void protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::clear ( )

References pool_cache_.

void protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::debug_print_addresses ( )
void protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::debug_print_hierarchy ( )
void protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::debug_print_size_per_level ( )
bool protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::equal_addresses ( Address address1,
Address address2 
)

Referenced by find(), and find_address().

core::Size protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::evaluate ( core::pose::Pose const &  pose,
std::string &  best_decoy,
utility::vector1< core::Real > &  best_rmsd,
Address address 
)

Referenced by evaluate().

core::Size protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::evaluate ( core::io::silent::SilentStruct const &  ,
std::string &  best_decoy,
utility::vector1< core::Real > &  best_rmsd,
Address address 
)
core::Size protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::evaluate ( FArray2D_double coords,
std::string &  best_decoy,
utility::vector1< core::Real > &  best_rmsd,
Address address 
)

References evaluate().

core::Size protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::evaluate ( FArray2D_double coords,
std::string &  best_decoy,
utility::vector1< core::Real > &  best_rmsd,
Address address,
bool  reset_all_levels,
bool  load_if_missing 
)
std::string & protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::filename ( )

References filename_.

Referenced by pool_exists(), and write_headers_to_hierarchy().

void protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::fill_top_level ( Pool_RMSD_OP top_level_pool)
std::list< PoolData >::iterator protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::find ( Address address)
private
core::Size protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::find_address ( Address query,
utility::vector1< Address > &  addresses 
)
private

References equal_addresses().

Referenced by sort_pool().

core::Size protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::first_zero_pos ( Address address)

Referenced by level_find().

void protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::get_addresses_at_level ( utility::vector1< Address > &  addresses_at_level)

References pool_cache_.

bool protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::has_next_level ( )
bool protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::less_than ( Address addr1,
Address addr2 
)
private

Referenced by sort_addresses().

core::Size protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::level ( )

References level_.

bool protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::level_find ( Address address,
core::Size const &  level,
std::list< PoolData >::iterator &  itr 
)
core::Real protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::level_radius ( core::Size  level)
core::Size protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::level_size ( core::Size  level)
std::string protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::lib_full_path ( Address address)

core::Size evaluate( FArray2D_double&, std::string & best_decoy, core::Real & best_rmsd, Address & best_indices, utility::vector1< Address > & prev_address, utility::vector1< core::Size > & prev_indices ); std::list<PoolData> & get_cache(); //for debugging

References protocols::canonical_sampling::mc_convergence_checks::TR().

Referenced by evaluate(), load_pool(), max_level_index(), pool_exists(), and write_headers_to_hierarchy().

PoolData protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::load_pool ( Address address)
private
void protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::max_cache_size ( core::Size  max_size)
core::Size protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::max_cache_size ( )

References max_cache_size_.

void protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::max_level_index ( Address addr)
private
HierarchicalLevelOP protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::next_level ( )

References next_level_.

core::Size protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::nlevels ( )

References max_levels_.

core::Size protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::num_matching_levels ( Address address1,
Address address2 
)
private
bool protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::pool_exists ( Address address)

References filename(), and lib_full_path().

Referenced by add_new(), and level_find().

core::Size protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::pool_size ( Address address,
core::Size  level 
)
void protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::print_address ( Address address)
private
void protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::print_addresses_at_level ( )

References pool_cache_, and print_address().

void protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::radius ( core::Real  radius)

References radius(), and radius_.

core::Real protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::radius ( )

References radius_.

Referenced by radius().

void protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::reset ( Address addr,
utility::vector1< core::Real > &  rms 
)
private

this function not used core::Size HierarchicalLevel::next_free_address( Address & query_address, core::Size level ) { runtime_assert( level != 1 ); core::Size next_index = 0; if( level_ != level && has_next_level() ) { next_index = next_level_->next_free_address( query_address, level ); } else { runtime_assert( level_ == level ); if ( next_free_address_index_ > 0 ) { next_free_address_index_++; next_index = next_free_address_index_; } else { runtime_assert( first_zero_pos( query_address ) == level ); //this level is unresolved Address address = query_address; address[ level_ ] = pool_cache_.size() + 1; for( core::Size ii = level_ + 1; ii <= address.size(); ii++ ) { address[ ii ] = 0; //just to be safe } std::string test_file = lib_full_path( address ); while( utility::file::file_exists( test_file ) ) { address[ level_ ] = address[ level_ ] + 1; test_file = lib_full_path( address ); } next_free_address_index_ = address[ level_ ]; next_index = next_free_address_index_; } } return next_index; }

Referenced by evaluate().

void protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::round ( core::Real rmsd)
core::Size protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::size ( )

References pool_cache_.

Referenced by debug_print_hierarchy(), level_size(), and sort_pool().

void protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::sort_addresses ( utility::vector1< Address > &  addresses)
private

References less_than(), and protocols::ddg::min_index().

Referenced by sort_pool().

void protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::sort_pool ( Pool_RMSD_OP pool_ptr)
private
void protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::string_to_address ( std::string &  addr,
Address result_addr 
)
private

Referenced by sort_pool().

void protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::test_round ( )
core::Size protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::top_level_pool_size ( )
void protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::write_headers_to_hierarchy ( core::io::silent::SilentStructOP ss)

Member Data Documentation

std::string protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::filename_
private

Referenced by filename().

core::Size const protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::level_
private
core::Size protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::max_cache_size_
private
core::Size const protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::max_levels_
private
core::Size protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::next_free_address_index_
private

Referenced by max_level_index().

HierarchicalLevelOP protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::next_level_
private
core::Size protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::num_clusters_in_level_
private

Referenced by HierarchicalLevel().

std::list<PoolData> protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::pool_cache_
private
core::Real protocols::canonical_sampling::mc_convergence_checks::HierarchicalLevel::radius_
private

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