![]() |
Rosetta
2021.16
|
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) | |
| LoopHashMap & | operator= (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< LeapIndex > | loopdb_ |
| List of LeapIndexes. More... | |
| core::Size | loop_size_ |
| The length of the the loops in number of residues. More... | |
the loop hash map stores LeapIndexes and a hashmap to access those LeapIndexes quickly by their 6D coordinates.
| protocols::loophash::LoopHashMap::LoopHashMap | ( | core::Size | loop_size = 10 | ) |
Constructor - must give loop_size.
|
default |
| void protocols::loophash::LoopHashMap::add_leap | ( | const LeapIndex & | leap_index, |
| numeric::geometry::hashing::Real6 & | transform | ||
| ) |
Add a leap/loop to the HashMap.
Referenced by protocols::loophash::LoopHashLibrary::extract_data_from_pose(), protocols::loophash::LoopHashLibrary::merge(), and protocols::loophash::LoopHashLibrary::test_loop_sample().
| 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 | ) |
Add an legacy leap/loop to the HashMap.
References protocols::loophash::LegacyLeapIndex::ba, protocols::loophash::LeapIndex::index, protocols::loophash::LeapIndex::offset, protocols::loophash::LegacyLeapIndex::rotx, protocols::loophash::LegacyLeapIndex::roty, protocols::loophash::LegacyLeapIndex::rotz, protocols::loophash::LegacyLeapIndex::vecx, protocols::loophash::LegacyLeapIndex::vecy, and protocols::loophash::LegacyLeapIndex::vecz.
| 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().
|
inline |
Query the loopsize of this LoopHashMap.
References loop_size_.
Referenced by protocols::loophash::LoopHashLibrary::apply_random(), protocols::loophash::LoopHashSampler::build_structures(), protocols::loophash::LoopHashLibrary::get_all(), and protocols::loophash::LoopHashLibrary::test_loop_sample().
|
inline |
Obtain an index to a given peptide saved.
References loopdb_.
Referenced by protocols::loophash::LoopHashLibrary::apply_random(), protocols::loophash::LoopHashSampler::build_structures(), protocols::loophash::LoopHashLibrary::get_all(), protocols::loophash::LoopHashLibrary::merge(), and protocols::loophash::LoopHashLibrary::test_loop_sample().
|
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().
|
inline |
References loopdb_.
| LoopHashMap & protocols::loophash::LoopHashMap::operator= | ( | LoopHashMap const & | other | ) |
References backbone_index_map_, hash_, loop_size_, and 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
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().
|
inline |
References protocols::sic_dock::range(), and read_db().
| 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.
|
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.
|
private |
The actual Boost-based hashmap.
Referenced by operator=().
|
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=().
|
private |
The length of the the loops in number of residues.
Referenced by get_loop_size(), and operator=().
|
private |
List of LeapIndexes.
Referenced by get_peptide(), n_loops(), and operator=().
1.8.7