Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | 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>

Collaboration diagram for protocols::loophash::LoopHashMap:
Collaboration graph
[legend]

Classes

struct  by_index
 A functor for sort() More...
 

Public Member Functions

 LoopHashMap (core::Size loop_size=10)
 Constructor - must give loop_size. More...
 
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...
 
const LeapIndexget_peptide (core::Size index)
 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)
 Return a vector of loops with equal keys given a key. More...
 
void lookup_withkey (boost::uint64_t key, std::vector< core::Size > &result)
 Return a vector of loops with equal keys given a key. More...
 
void lookup (numeric::geometry::hashing::Real6 transform, std::vector< core::Size > &result)
 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)
 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)
 Append to a bucket of vectors in the appropriate bin, lookup by bin index. More...
 
void bbdb_range (std::pair< BackboneIndexMap::iterator, BackboneIndexMap::iterator > &range)
 Returns begin() and end() of backbone_index_map_. More...
 
boost::uint64_t return_key (core::Size bb_index)
 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)
 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 ()
 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 LeadIndexes. 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.

Definition at line 89 of file LoopHashMap.hh.

Constructor & Destructor Documentation

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

Constructor - must give loop_size.

Definition at line 361 of file LoopHashMap.cc.

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.

Definition at line 444 of file LoopHashMap.cc.

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

Returns begin() and end() of backbone_index_map_.

Definition at line 488 of file LoopHashMap.cc.

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

core::Size protocols::loophash::LoopHashMap::get_loop_size ( ) const
inline
const LeapIndex& protocols::loophash::LoopHashMap::get_peptide ( core::Size  index)
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.

Definition at line 473 of file LoopHashMap.cc.

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

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

Definition at line 495 of file LoopHashMap.cc.

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

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 
)

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

Using core::Size instead of boost::uinst64_t

Definition at line 554 of file LoopHashMap.cc.

References core::sequence::end.

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

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

Definition at line 588 of file LoopHashMap.cc.

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

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

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

Return the memory usage of this class.

Definition at line 366 of file LoopHashMap.cc.

References protocols::moves::TR().

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

Definition at line 117 of file LoopHashMap.hh.

References loopdb_.

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

Definition at line 541 of file LoopHashMap.cc.

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

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

Definition at line 521 of file LoopHashMap.cc.

References core::scoring::pair, and 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 
)

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

Definition at line 580 of file LoopHashMap.cc.

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.

Definition at line 631 of file LoopHashMap.cc.

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

Referenced by read_db().

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

Definition at line 162 of file LoopHashMap.hh.

References protocols::sic_dock::range(), and read_db().

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

Reads legacy binary dbs.

Definition at line 599 of file LoopHashMap.cc.

References protocols::moves::TR().

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

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

Definition at line 573 of file LoopHashMap.cc.

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

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

Setup this class give a loop_size.

Definition at line 376 of file LoopHashMap.cc.

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

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

Sorts the loopdb_ by leap_index.index.

Definition at line 371 of file LoopHashMap.cc.

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

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

Definition at line 621 of file LoopHashMap.cc.

Member Data Documentation

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

The actual Boost-based hashmap.

Definition at line 181 of file LoopHashMap.hh.

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.

Definition at line 178 of file LoopHashMap.hh.

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

The length of the the loops in number of residues.

Definition at line 187 of file LoopHashMap.hh.

Referenced by get_loop_size().

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

List of LeadIndexes.

Definition at line 184 of file LoopHashMap.hh.

Referenced by get_peptide(), and n_loops().


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