Rosetta 3.4
Classes | Public Member Functions
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]

List of all members.

Classes

struct  by_index
 A functor for sort()

Public Member Functions

 LoopHashMap (core::Size loop_size=10)
 Constructor - must give loop_size.
void add_leap (const LeapIndex &leap_index, numeric::geometry::hashing::Real6 &transform)
 Add a leap/loop to the HashMap.
void add_leap (const LeapIndex &leap_index, boost::uint64_t key)
 Add a leap/loop to the HashMap with a key, skipping hashing.
void add_legacyleap (const LegacyLeapIndex &legacyleap_index)
 Add an legacy leap/loop to the HashMap.
const LeapIndexget_peptide (core::Size index)
 Obtain an index to a given peptide saved.
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.
void lookup_withkey (boost::uint64_t key, std::vector< core::Size > &result)
 Return a vector of loops with equal keys given a key.
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.
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.
void lookup (core::Size index, std::vector< core::Size > &result)
 Append to a bucket of vectors in the appropriate bin, lookup by bin index.
void bbdb_range (std::pair< BackboneIndexMap::iterator, BackboneIndexMap::iterator > &range)
 Returns begin() and end() of backbone_index_map_.
const 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.
core::Size get_loop_size () const
 Query the loopsize of this LoopHashMap.
void read_legacydb (std::string filename)
 Reads legacy binary dbs.
void write_db (std::string filename)
 Basic IO functionality - allows reading and writing text states to/from disk.
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.
void read_db (std::string filename)
void mem_foot_print ()
 Return the memory usage of this class.
void sort ()
 Sorts the loopdb_ by leap_index.index.

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.


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::iterator, BackboneIndexMap::iterator > &  range)

Returns begin() and end() of backbone_index_map_.

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::lookup ( numeric::geometry::hashing::Real6  transform,
std::vector< core::Size > &  result 
)

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

References core::scoring::pair.

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

References make_table_of_pilot_apps::begin, and 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.

References core::scoring::pair.

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

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

Return the memory usage of this class.

References protocols::moves::TR().

core::Size protocols::loophash::LoopHashMap::n_loops ( ) const [inline]
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.

References core::scoring::pair.

Referenced by protocols::loophash::LoopHashSampler::build_structures(), and protocols::loophash::LoopHashSampler::close_gaps().

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.

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

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

References read_db().

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, core::scoring::hbonds::t(), and protocols::moves::TR().

Referenced by read_db().

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

Reads legacy binary dbs.

References protocols::moves::TR().

const 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.

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

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

Sorts the loopdb_ by leap_index.index.

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

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


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines