Rosetta  2021.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
protocols::mean_field::ResHashMap Class Reference

#include <ResHashMap.hh>

Inheritance diagram for protocols::mean_field::ResHashMap:
Inheritance graph
[legend]

Public Types

typedef core::SSize RotamerIndex
 
typedef boost::unordered_map
< core::conformation::ResidueCOP,
RotamerIndex, ResHasher,
ResPred
ResHash
 

Public Member Functions

 ResHashMap ()
 Default constructor. More...
 
 ~ResHashMap () override
 Destructor. More...
 
void show (std::ostream &output=std::cout) const
 Generate string representation of ResHashMap for debugging purposes. More...
 
RotamerIndex attempt_insert (core::conformation::ResidueCOP res)
 Attempts to insert a residue res with a RotamerIndex ind into the hash map if it is not already there. More...
 
RotamerIndex get_rot_ind (core::conformation::ResidueCOP res) const
 Attempts to get the rotamer index of a residue res. More...
 
RotamerIndex last_ind_assigned () const
 returns the last rotamer index that was assigned by the ResHashMap More...
 

Private Member Functions

 ResHashMap (ResHashMap const &object_to_copy)
 
ResHashMapoperator= (ResHashMap const &object_to_copy)
 

Private Attributes

ResHash hash_
 
RotamerIndex last_ind_assigned_
 

Friends

std::ostream & operator<< (std::ostream &output, ResHashMap const &object_to_output)
 Insertion operator (overloaded so that ResHashMap can be "printed" in PyRosetta). More...
 

Detailed Description

class ResHashMap holds a hashmap of rotamers

Remarks

Member Typedef Documentation

Constructor & Destructor Documentation

protocols::mean_field::ResHashMap::ResHashMap ( )

Default constructor.

protocols::mean_field::ResHashMap::~ResHashMap ( )
overridedefault

Destructor.

protocols::mean_field::ResHashMap::ResHashMap ( ResHashMap const &  object_to_copy)
private

Member Function Documentation

protocols::mean_field::ResHashMap::RotamerIndex protocols::mean_field::ResHashMap::attempt_insert ( core::conformation::ResidueCOP  res)

Attempts to insert a residue res with a RotamerIndex ind into the hash map if it is not already there.

Checks if residue res is in hash map, if it is returns its RotamerIndex

If it is not in the hash map, inserts the residue res with a RotamerIndex of ind and returns ind

References get_rot_ind(), hash_, and last_ind_assigned_.

Referenced by protocols::mean_field::FlexBBMeanField::renumber_rotamers().

protocols::mean_field::ResHashMap::RotamerIndex protocols::mean_field::ResHashMap::get_rot_ind ( core::conformation::ResidueCOP  res) const

Attempts to get the rotamer index of a residue res.

if res is already in the hash map, returns its rotamer index

otherwise, returns -1

References hash_.

Referenced by attempt_insert().

RotamerIndex protocols::mean_field::ResHashMap::last_ind_assigned ( ) const
inline

returns the last rotamer index that was assigned by the ResHashMap

References last_ind_assigned_.

Referenced by protocols::mean_field::FlexBBMeanField::renumber_rotamers().

ResHashMap& protocols::mean_field::ResHashMap::operator= ( ResHashMap const &  object_to_copy)
private
void protocols::mean_field::ResHashMap::show ( std::ostream &  output = std::cout) const

Generate string representation of ResHashMap for debugging purposes.

References hash_.

Referenced by protocols::mean_field::operator<<().

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  output,
ResHashMap const &  object_to_output 
)
friend

Insertion operator (overloaded so that ResHashMap can be "printed" in PyRosetta).

Member Data Documentation

ResHash protocols::mean_field::ResHashMap::hash_
private

Referenced by attempt_insert(), get_rot_ind(), and show().

RotamerIndex protocols::mean_field::ResHashMap::last_ind_assigned_
private

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