Rosetta  2020.37
 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::loophash::LoopHashMap Class Reference

the loop hash map stores LeapIndexes and a hashmap to access those LeapIndexes quickly by their 6D coordinates. More...

#include <LoopHashMap.hh>

Public Member Functions

 LoopHashMap (core::Size loop_size=10)
 Constructor - must give loop_size. More...
 
 LoopHashMap (LoopHashMap const &other)
 
LoopHashMapoperator= (LoopHashMap const &other)
 
void add_leap (const LeapIndex &leap_index, numeric::geometry::hashing::Real6 &transform)
 Add a leap/loop to the HashMap. More...
 
void add_leap (const LeapIndex &leap_index, boost::uint64_t key)
 Add a leap/loop to the HashMap with a key, skipping hashing. More...
 
void add_legacyleap (const LegacyLeapIndex &legacyleap_index)
 Add an legacy leap/loop to the HashMap. More...
 
LeapIndex const & get_peptide (core::Size index) const
 Obtain an index to a given peptide saved. More...
 
core::Size n_loops () const
 
void radial_lookup_withkey (boost::uint64_t key, core::Size radius, std::vector< core::Size > &result) const
 Return a vector of loops with equal keys given a key. More...
 
void lookup_withkey (boost::uint64_t key, std::vector< core::Size > &result) const
 Return a vector of loops with equal keys given a key. More...
 
void lookup (numeric::geometry::hashing::Real6 transform, std::vector< core::Size > &result) const
 Append to a bucket of vectors in the appropriate bin, lookup by transform. More...
 
void radial_lookup (core::Size radius, numeric::geometry::hashing::Real6 transform, std::vector< core::Size > &result) const
 Append to a bucket of vectors in the appropriate bin, radial lookup by transform. More...
 
core::Size radial_count (core::Size radius, numeric::geometry::hashing::Real6 center) const
 count hits in the appropriate bin, radial lookup by transform More...
 
void lookup (core::Size index, std::vector< core::Size > &result) const
 Append to a bucket of vectors in the appropriate bin, lookup by bin index Using core::Size instead of boost::uinst64_t. More...
 
void bbdb_range (std::pair< BackboneIndexMap::const_iterator, BackboneIndexMap::const_iterator > &range) const
 Returns begin() and end() of backbone_index_map_. More...
 
boost::uint64_t return_key (core::Size bb_index) const
 Returns a hashmap key given a member of a bucket Don't think boost implements this, have to manually look it up. More...
 
core::Size get_loop_size () const
 Query the loopsize of this LoopHashMap. More...
 
void read_legacydb (std::string filename)
 Reads legacy binary dbs. More...
 
void write_db (std::string filename) const
 Basic IO functionality - allows reading and writing text states to/from disk. More...
 
void read_db (std::string filename, std::pair< core::Size, core::Size > loopdb_range, std::map< core::Size, bool > &homolog_index)
 Basic IO functionality - allows reading and writing text states to/from disk. More...
 
void read_db (std::string filename)
 
void mem_foot_print () const
 Return the memory usage of this class. More...
 
void sort ()
 Sorts the loopdb_ by leap_index.index. More...
 

Private Member Functions

void setup (core::Size loop_size)
 Setup this class give a loop_size. More...
 
void hash_index (numeric::geometry::hashing::Real6 transform, core::Size data)
 Add a given piece of data to the hash. More...
 

Private Attributes

numeric::geometry::hashing::SixDCoordinateBinnerOP hash_
 A class that will take a 6D rigid body transform and turn it into a serial hashbin number for hashing. THis is the actual hash so to speak. More...
 
BackboneIndexMap backbone_index_map_
 The actual Boost-based hashmap. More...
 
std::vector< LeapIndexloopdb_
 List of LeapIndexes. More...
 
core::Size loop_size_
 The length of the the loops in number of residues. More...
 

Detailed Description

the loop hash map stores LeapIndexes and a hashmap to access those LeapIndexes quickly by their 6D coordinates.

Constructor & Destructor Documentation

protocols::loophash::LoopHashMap::LoopHashMap ( core::Size  loop_size = 10)

Constructor - must give loop_size.

protocols::loophash::LoopHashMap::LoopHashMap ( LoopHashMap const &  other)
default

Member Function Documentation

void protocols::loophash::LoopHashMap::add_leap ( const LeapIndex leap_index,
numeric::geometry::hashing::Real6 &  transform 
)
void protocols::loophash::LoopHashMap::add_leap ( const LeapIndex leap_index,
boost::uint64_t  key 
)

Add a leap/loop to the HashMap with a key, skipping hashing.

void protocols::loophash::LoopHashMap::add_legacyleap ( const LegacyLeapIndex legacyleap_index)
void protocols::loophash::LoopHashMap::bbdb_range ( std::pair< BackboneIndexMap::const_iterator, BackboneIndexMap::const_iterator > &  range) const

Returns begin() and end() of backbone_index_map_.

Referenced by protocols::loophash::LoopHashLibrary::merge().

core::Size protocols::loophash::LoopHashMap::get_loop_size ( ) const
inline
LeapIndex const& protocols::loophash::LoopHashMap::get_peptide ( core::Size  index) const
inline
void protocols::loophash::LoopHashMap::hash_index ( numeric::geometry::hashing::Real6  transform,
core::Size  data 
)
private

Add a given piece of data to the hash.

void protocols::loophash::LoopHashMap::lookup ( numeric::geometry::hashing::Real6  transform,
std::vector< core::Size > &  result 
) const

Append to a bucket of vectors in the appropriate bin, lookup by transform.

References protocols::sic_dock::range(), and protocols::moves::TR().

Referenced by protocols::loophash::LoopHashLibrary::apply_random(), and protocols::loophash::LoopHashLibrary::get_all().

void protocols::loophash::LoopHashMap::lookup ( core::Size  index,
std::vector< core::Size > &  result 
) const

Append to a bucket of vectors in the appropriate bin, lookup by bin index Using core::Size instead of boost::uinst64_t.

References core::sequence::end.

void protocols::loophash::LoopHashMap::lookup_withkey ( boost::uint64_t  key,
std::vector< core::Size > &  result 
) const

Return a vector of loops with equal keys given a key.

References core::scoring::pair, and protocols::sic_dock::range().

Referenced by protocols::loophash::LoopHashLibrary::test_loop_sample().

void protocols::loophash::LoopHashMap::mem_foot_print ( ) const

Return the memory usage of this class.

References protocols::moves::TR().

core::Size protocols::loophash::LoopHashMap::n_loops ( ) const
inline

References loopdb_.

LoopHashMap & protocols::loophash::LoopHashMap::operator= ( LoopHashMap const &  other)
Size protocols::loophash::LoopHashMap::radial_count ( core::Size  radius,
numeric::geometry::hashing::Real6  center 
) const

count hits in the appropriate bin, radial lookup by transform

Referenced by protocols::abinitio::FragmentSampler::check_loops().

void protocols::loophash::LoopHashMap::radial_lookup ( core::Size  radius,
numeric::geometry::hashing::Real6  transform,
std::vector< core::Size > &  result 
) const

Append to a bucket of vectors in the appropriate bin, radial lookup by transform.

References protocols::sic_dock::range().

Referenced by protocols::loophash::LoopHashSampler::build_structures().

void protocols::loophash::LoopHashMap::radial_lookup_withkey ( boost::uint64_t  key,
core::Size  radius,
std::vector< core::Size > &  result 
) const

Return a vector of loops with equal keys given a key.

References core::conformation::membrane::center.

Referenced by protocols::loophash::LoopHashLibrary::merge().

void protocols::loophash::LoopHashMap::read_db ( std::string  filename,
std::pair< core::Size, core::Size loopdb_range,
std::map< core::Size, bool > &  homolog_index 
)

Basic IO functionality - allows reading and writing text states to/from disk.

References protocols::loophash::LeapIndex::index, protocols::loophash::LeapIndex::key, protocols::loophash::LeapIndex::offset, protocols::hybridization::t, and protocols::moves::TR().

Referenced by read_db().

void protocols::loophash::LoopHashMap::read_db ( std::string  filename)
inline
void protocols::loophash::LoopHashMap::read_legacydb ( std::string  filename)

Reads legacy binary dbs.

References protocols::moves::TR().

boost::uint64_t protocols::loophash::LoopHashMap::return_key ( core::Size  bb_index) const

Returns a hashmap key given a member of a bucket Don't think boost implements this, have to manually look it up.

References protocols::loophash::LeapIndex::key.

void protocols::loophash::LoopHashMap::setup ( core::Size  loop_size)
private

Setup this class give a loop_size.

References protocols::loophash::HASH_POSITION_GRID_BASE, and protocols::moves::TR().

void protocols::loophash::LoopHashMap::sort ( )

Sorts the loopdb_ by leap_index.index.

References core::pose::motif::a(), protocols::match::upstream::b, and protocols::loophash::LeapIndex::index.

void protocols::loophash::LoopHashMap::write_db ( std::string  filename) const

Basic IO functionality - allows reading and writing text states to/from disk.

Member Data Documentation

BackboneIndexMap protocols::loophash::LoopHashMap::backbone_index_map_
private

The actual Boost-based hashmap.

Referenced by operator=().

numeric::geometry::hashing::SixDCoordinateBinnerOP protocols::loophash::LoopHashMap::hash_
private

A class that will take a 6D rigid body transform and turn it into a serial hashbin number for hashing. THis is the actual hash so to speak.

Referenced by operator=().

core::Size protocols::loophash::LoopHashMap::loop_size_
private

The length of the the loops in number of residues.

Referenced by get_loop_size(), and operator=().

std::vector< LeapIndex > protocols::loophash::LoopHashMap::loopdb_
private

List of LeapIndexes.

Referenced by get_peptide(), n_loops(), and operator=().


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