Rosetta  2021.16
 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::sewing::hashing::Hasher Class Reference

A geometric hashing class used by the SEWING protocol. More...

#include <Hasher.hh>

Inheritance diagram for protocols::sewing::hashing::Hasher:
Inheritance graph
[legend]

Public Member Functions

 Hasher ()
 
 ~Hasher () override
 
 Hasher (HasherSettings &hasher_settings, SegmentVectorCOP segment_vector)
 
 Hasher (HasherSettings &hasher_settings, SegmentVectorCOP segment_vector, std::map< core::Size, data_storage::SmartSegmentOP > pdb_segments)
 
 Hasher (Hasher const &src)
 
HasherOP clone () const
 
bool can_hash (data_storage::SmartSegmentCOP seg1, data_storage::SmartSegmentCOP seg2)
 
void initialize_from_options ()
 
std::pair< utility::vector1
< std::pair< core::Size,
core::Size > >::const_iterator,
utility::vector1< std::pair
< core::Size, core::Size >
>::const_iterator > 
iterate_over_basis_pairs (data_storage::SmartSegmentCOP segment_1, data_storage::SmartSegmentCOP segment_2)
 returns pair of iterators to beginning and end of all_basis_pairs between the given SewSegments More...
 
SegmentVectorCOP segment_vector () const
 
void segment_vector (SegmentVectorCOP segment_vector)
 
HasherSettings hasher_settings () const
 
void hasher_settings (HasherSettings const &hasher_settings)
 
std::map< core::Size,
data_storage::SmartSegmentOP > & 
pdb_segments ()
 
std::map< core::Size,
data_storage::SmartSegmentOP
const_pdb_segments () const
 
void pdb_segments (std::map< core::Size, data_storage::SmartSegmentOP > &)
 
void transform_segments (data_storage::Basis current_basis, bool first)
 iterates through neighbors of n_terminal segments transforms xyz coordninates into basis_residue coordinate frame. More...
 
void hash_segments (data_storage::SmartSegmentOP const transformed_segment, data_storage::Basis const &basis_residue)
 adds segments to the hash_map, excluding the basis residue from being scored. More...
 
HashKey generate_key (core::conformation::Atom const &atom) const
 creates key for HashMap More...
 
std::set< HashValuefind_aligned_atoms (core::conformation::Atom const &start_atom) const
 Given a ModelIterator to a particular atom, returns a set of HashValues that correspond to it. More...
 
data_storage::SmartSegmentOP initialize_hashmap (data_storage::BasisPair const &basis_pair)
 Returns a transformed segments that will be scored against the model currently in the HashMap. More...
 
bool score_basis_pair (data_storage::BasisPair const &basis_pair)
 returns whether the basis pair meets edge requirements for max_clash and min_hash_score More...
 
core::Size get_hash_map_size () const
 
data_storage::SmartSegmentCOP get_seg1 () const
 
data_storage::SmartSegmentCOP get_seg2 () const
 

Private Member Functions

void allocate_segments ()
 iterates through all neighbors of the n_term segment and copies them into preallocated vector via the data_storage::SmartSegment become() method. More...
 

Private Attributes

HasherSettings hasher_settings_
 
utility::vector1< std::pair
< core::Size, core::Size > > 
all_basis_pairs_
 
SegmentVectorCOP segment_vector_
 
HashMap hash_map_
 
data_storage::SmartSegmentOP seg1_
 
data_storage::SmartSegmentOP seg2_
 
utility::vector1
< data_storage::SmartSegmentOP
seg1_substructure_
 
utility::vector1
< data_storage::SmartSegmentOP
seg2_substructure_
 
std::map< core::Size,
data_storage::SmartSegmentOP
pdb_segments_
 

Detailed Description

A geometric hashing class used by the SEWING protocol.

Constructor & Destructor Documentation

protocols::sewing::hashing::Hasher::Hasher ( )
protocols::sewing::hashing::Hasher::~Hasher ( )
override
protocols::sewing::hashing::Hasher::Hasher ( HasherSettings hasher_settings,
SegmentVectorCOP  segment_vector 
)
protocols::sewing::hashing::Hasher::Hasher ( HasherSettings hasher_settings,
SegmentVectorCOP  segment_vector,
std::map< core::Size, data_storage::SmartSegmentOP pdb_segments 
)
protocols::sewing::hashing::Hasher::Hasher ( Hasher const &  src)

Member Function Documentation

void protocols::sewing::hashing::Hasher::allocate_segments ( )
private

iterates through all neighbors of the n_term segment and copies them into preallocated vector via the data_storage::SmartSegment become() method.

initializes preallocated segments and respective neighbor vectors

References seg1_, seg1_substructure_, seg2_, and seg2_substructure_.

Referenced by Hasher().

bool protocols::sewing::hashing::Hasher::can_hash ( data_storage::SmartSegmentCOP  seg1,
data_storage::SmartSegmentCOP  seg2 
)
HasherOP protocols::sewing::hashing::Hasher::clone ( ) const
std::map< core::Size, data_storage::SmartSegmentOP > protocols::sewing::hashing::Hasher::const_pdb_segments ( ) const

References pdb_segments_.

Referenced by Hasher().

std::set< HashValue > protocols::sewing::hashing::Hasher::find_aligned_atoms ( core::conformation::Atom const &  start_atom) const

Given a ModelIterator to a particular atom, returns a set of HashValues that correspond to it.

References protocols::sewing::hashing::HasherSettings::boxes_per_dimension, generate_key(), hash_map_, and hasher_settings_.

Referenced by score_basis_pair().

HashKey protocols::sewing::hashing::Hasher::generate_key ( core::conformation::Atom const &  atom) const

creates key for HashMap

Method to generate a HashKey for a SewAtom based on its coordinates. Essentially, this discretizes the coordinates into 0.25 Angstrom bins.

References protocols::noesy_assign::round(), and core::conformation::Atom::xyz().

Referenced by find_aligned_atoms(), and hash_segments().

core::Size protocols::sewing::hashing::Hasher::get_hash_map_size ( ) const

References hash_map_.

data_storage::SmartSegmentCOP protocols::sewing::hashing::Hasher::get_seg1 ( ) const

References seg1_.

data_storage::SmartSegmentCOP protocols::sewing::hashing::Hasher::get_seg2 ( ) const

References seg2_.

void protocols::sewing::hashing::Hasher::hash_segments ( data_storage::SmartSegmentOP const  transformed_n_term_segment,
data_storage::Basis const &  basis_residue 
)

adds segments to the hash_map, excluding the basis residue from being scored.

For each of the transformed features, insert the appropriate key-value pair into the hash table. The key is the 3D-voxel (or bin) corresponding to the basis set. The value is the residues number for the residue that generated basis set that the transformed atom coordinates are in frame of

References protocols::sewing::hashing::HashValue::atomno, protocols::sewing::hashing::HashValue::basis_resnum, protocols::sewing::hashing::HashValue::basis_segment_id, generate_key(), hash_map_, protocols::sewing::data_storage::Basis::resnum(), protocols::sewing::hashing::HashValue::resnum, protocols::sewing::data_storage::Basis::segment_id(), protocols::sewing::hashing::HashValue::segment_id, segment_vector_, and protocols::TR().

Referenced by initialize_hashmap().

HasherSettings protocols::sewing::hashing::Hasher::hasher_settings ( ) const

References hasher_settings_.

Referenced by Hasher(), and hasher_settings().

void protocols::sewing::hashing::Hasher::hasher_settings ( HasherSettings const &  hasher_settings)
void protocols::sewing::hashing::Hasher::initialize_from_options ( )

References hasher_settings_.

data_storage::SmartSegmentOP protocols::sewing::hashing::Hasher::initialize_hashmap ( data_storage::BasisPair const &  basis_pair)

Returns a transformed segments that will be scored against the model currently in the HashMap.

References hash_map_, hash_segments(), seg1_substructure_, seg2_substructure_, protocols::TR(), and transform_segments().

Referenced by score_basis_pair().

std::pair< utility::vector1< std::pair< core::Size, core::Size > >::const_iterator, utility::vector1< std::pair< core::Size, core::Size > >::const_iterator > protocols::sewing::hashing::Hasher::iterate_over_basis_pairs ( data_storage::SmartSegmentCOP  segment_1,
data_storage::SmartSegmentCOP  segment_2 
)

returns pair of iterators to beginning and end of all_basis_pairs between the given SewSegments

what this function does

References all_basis_pairs_, can_hash(), hasher_settings_, protocols::mean_field::min(), protocols::sewing::hashing::HasherSettings::min_hash_score, core::id::to_string(), and protocols::TR().

std::map< core::Size, data_storage::SmartSegmentOP > & protocols::sewing::hashing::Hasher::pdb_segments ( )

References pdb_segments_.

Referenced by Hasher().

void protocols::sewing::hashing::Hasher::pdb_segments ( std::map< core::Size, data_storage::SmartSegmentOP > &  pdbsegs)

References pdb_segments_.

bool protocols::sewing::hashing::Hasher::score_basis_pair ( data_storage::BasisPair const &  basis_pair)
SegmentVectorCOP protocols::sewing::hashing::Hasher::segment_vector ( ) const

References segment_vector_.

Referenced by Hasher().

void protocols::sewing::hashing::Hasher::segment_vector ( SegmentVectorCOP  segment_vector)

References segment_vector_.

void protocols::sewing::hashing::Hasher::transform_segments ( data_storage::Basis  current_basis,
bool  first 
)

iterates through neighbors of n_terminal segments transforms xyz coordninates into basis_residue coordinate frame.

Construct HomogenousTransform using the 3 points in the BasisSet. Use this HomogenousTransform to transform all features into the local coordinate frame

References protocols::sewing::data_storage::SmartSegment::become(), protocols::sewing::data_storage::SmartSegment::get_n_most_segment(), protocols::sewing::data_storage::SmartSegment::link_to(), pdb_segments_, protocols::sewing::data_storage::Basis::resnum(), seg1_, seg1_substructure_, seg2_, seg2_substructure_, protocols::sewing::data_storage::Basis::segment_id(), segment_vector_, protocols::TR(), and protocols::kinmatch::xyz().

Referenced by initialize_hashmap().

Member Data Documentation

utility::vector1< std::pair< core::Size, core::Size > > protocols::sewing::hashing::Hasher::all_basis_pairs_
private

Referenced by Hasher(), and iterate_over_basis_pairs().

HashMap protocols::sewing::hashing::Hasher::hash_map_
private
HasherSettings protocols::sewing::hashing::Hasher::hasher_settings_
private
std::map< core::Size, data_storage::SmartSegmentOP > protocols::sewing::hashing::Hasher::pdb_segments_
private
data_storage::SmartSegmentOP protocols::sewing::hashing::Hasher::seg1_
private
utility::vector1< data_storage::SmartSegmentOP > protocols::sewing::hashing::Hasher::seg1_substructure_
private
data_storage::SmartSegmentOP protocols::sewing::hashing::Hasher::seg2_
private
utility::vector1< data_storage::SmartSegmentOP > protocols::sewing::hashing::Hasher::seg2_substructure_
private
SegmentVectorCOP protocols::sewing::hashing::Hasher::segment_vector_
private

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