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

#include <RotMatrix.hh>

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

Public Member Functions

 RotMatrix ()
 default constructor, can be useful More...
 
 RotMatrix (core::Size const option, core::pack::rotamer_set::RotamerSetsOP rs)
 Standard constructor. More...
 
 RotMatrix (RotMatrix const &object_to_copy)
 Copy constructor. More...
 
RotMatrixoperator= (RotMatrix const &object_to_copy)
 Assignment operator. More...
 
 ~RotMatrix () override
 Destructor. More...
 
void show (std::ostream &output=std::cout) const
 Generate string representation of RotMatrix for debugging purposes. More...
 
utility::vector1< core::Size >
const & 
curr_rot () const
 returns a vector of the current rotamers at each position More...
 
void curr_rot (utility::vector1< core::Size > cr)
 sets the curr_rot vector More...
 
utility::vector1< bool > const & is_designed () const
 returns a vector of bools designating whether each position allows design or not More...
 
void is_designed (utility::vector1< bool > id)
 sets a vector of bools designating whether each position allows design or not More...
 
bool is_designed (core::Size pos) const
 returns a bool designating whether a specified position allows design More...
 
core::Size n_designed () const
 returns the number of positions that allow design More...
 
utility::vector1< RotProbcurr_rot_prob () const
 returns a vector of RotProbs corresponding to the current rotamer at each position More...
 
void build_rot_matrix (core::Size const option, core::pack::rotamer_set::RotamerSetsOP rs)
 calls init so as to reinitialize the RotMatrix with the given params More...
 
- Public Member Functions inherited from protocols::mean_field::jagged_array< RotProb >
 jagged_array (allocator_type const &alloc=allocator_type())
 Default constructor. More...
 
 jagged_array (jagged_array< RotProb > const &v)
 Copy constructor. More...
 
 jagged_array (utility::vector1< utility::vector1< RotProb, A > > const &v)
 Assignable copy constructor. More...
 
 jagged_array (size_type const num)
 Size constructor constructs an empty jagged_array of size num. More...
 
 jagged_array (size_type const num, utility::vector1< RotProb > const &vals)
 Size and vals constructor constructs a jagged_array of size num filled with copies of vals. More...
 
 jagged_array (utility::vector1< size_type > const &dims)
 Uniform value constructor. More...
 
 jagged_array (utility::vector1< size_type > const &dims, utility::vector1< RotProb > const &vals)
 Constructor that reserves size based on vector of size types, fills vectors with vals. More...
 
 jagged_array (InputIterator const beg, InputIterator const ending, allocator_type const &alloc=allocator_type())
 Iterator range constructor. More...
 
 ~jagged_array () override
 Destructor. More...
 
jagged_arrayoperator= (jagged_array< RotProb > const &v)
 Copy assignment. More...
 
jagged_arrayoperator= (utility::vector1< utility::vector1< RotProb, A > > const &v)
 Assignable copy assignment. More...
 
void assign (utility::vector1< size_type > const &dims)
 clears jagged_array and reserves size based on vector of size types More...
 
void assign (utility::vector1< size_type > const &dims, utility::vector1< RotProb > const &vals)
 clears jagged_array and reserves size based on vector of size types, fills vectors with vals More...
 
int index (RotProbconst &t) const
 Find the index of an element. If not found then return 0;. More...
 
bool has_value (RotProbconst &t) const
 Checks if element is present and returns bool depending whether present. More...
 
void show (std::ostream &output=std::cout) const
 shows a string representation of the jagged_array More...
 
void apply_func_to_all (typename func_T2< T_2 >::two_param_func func, T_2 operand)
 applies param *func to all values in the jagged_array (1-param func) More...
 
void apply_func_to_each_col (typename func_T2< T_2 >::two_param_func func, utility::vector1< T_2 > operands)
 applies param *func to all values in the jagged_array (2-param func) using column_dependent operand More...
 
void apply_func_to_each_elem (typename func_T2< T_2 >::two_param_func func, jagged_array< T_2 > operands)
 applies param *func to all values in the jagged_array (2-param func) using 2D-index dependent operand (i.e. matrix arithmetic) More...
 
void apply_func_to_each_elem (typename func_T2< T_2 >::three_param_func func, jagged_array< RotProb > operands, T_2 third_oper)
 applies param *func to all values in the jagged_array (3-param func) using 2D-index dependent operand and a third, general operand More...
 
utility::vector1< RotProbget_totals_columns () const
 returns vector1 of totals of columns of jagged_array More...
 
RotProb get_total () const
 returns total of all elements in jagged array More...
 
Size size_col (Size col) const
 returns size of specified column More...
 
Size max_size_col () const
 returns the maximum size of any columns More...
 
bool equal_size (jagged_array< RotProb > const &other) const
 checks if a second jagged_array is of equal size for all columns More...
 
bool equal_size (jagged_array< T_2 > const &other) const
 checks if a second jagged_array (of different type) is of equal size for all columns More...
 

Private Member Functions

void copy_data (RotMatrix &object_to_copy_to, RotMatrix const &object_to_copy_from)
 Copy all data members from <object_to_copy_from> to <object_to_copy_to>. More...
 
void init (core::Size const option, core::pack::rotamer_set::RotamerSetsOP rs)
 private method called by constructors to initialize the RotMatrix More...
 

Private Attributes

utility::vector1< core::Sizecurr_rot_
 
utility::vector1< boolis_designed_
 

Friends

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

Additional Inherited Members

- Public Types inherited from protocols::mean_field::jagged_array< RotProb >
typedef super::value_type value_type
 
typedef super::reference reference
 
typedef super::const_reference const_reference
 
typedef super::pointer pointer
 
typedef super::const_pointer const_pointer
 
typedef super::iterator iterator
 
typedef super::const_iterator const_iterator
 
typedef super::reverse_iterator reverse_iterator
 
typedef
super::const_reverse_iterator 
const_reverse_iterator
 
typedef super::size_type size_type
 
typedef super::difference_type difference_type
 
typedef super::allocator_type allocator_type
 
typedef super::index_type index_type
 
typedef super::ssize_type ssize_type
 
typedef super::Value Value
 
typedef super::Reference Reference
 
typedef super::ConstReference ConstReference
 
typedef super::Pointer Pointer
 
typedef super::ConstPointer ConstPointer
 
typedef super::Iterator Iterator
 
typedef super::ConstIterator ConstIterator
 
typedef super::ReverseIterator ReverseIterator
 
typedef super::ConstReverseIterator ConstReverseIterator
 
typedef super::Size Size
 
typedef super::Difference Difference
 
typedef super::Allocator Allocator
 
typedef super::Index Index
 
typedef super::SSize SSize
 

Detailed Description

derived from a jagged_array of RotProbs

Remarks
used in MeanField family of classes

Constructor & Destructor Documentation

protocols::mean_field::RotMatrix::RotMatrix ( )

default constructor, can be useful

References curr_rot().

protocols::mean_field::RotMatrix::RotMatrix ( core::Size const  option,
core::pack::rotamer_set::RotamerSetsOP  rs 
)

Standard constructor.

standard constructor calls private member function

Parameters
[in]option- determines which numbers to initialize RotMatrix with
[in]rs- RotamerSetsOP used to gather the rest of the information used to build the RotMatrix

References init().

protocols::mean_field::RotMatrix::RotMatrix ( RotMatrix const &  object_to_copy)

Copy constructor.

Copy constructor calls private member function

References copy_data().

protocols::mean_field::RotMatrix::~RotMatrix ( )
overridedefault

Destructor.

Member Function Documentation

void protocols::mean_field::RotMatrix::build_rot_matrix ( core::Size const  option,
core::pack::rotamer_set::RotamerSetsOP  rs 
)

calls init so as to reinitialize the RotMatrix with the given params

References init().

void protocols::mean_field::RotMatrix::copy_data ( RotMatrix object_to_copy_to,
RotMatrix const &  object_to_copy_from 
)
private

Copy all data members from <object_to_copy_from> to <object_to_copy_to>.

References curr_rot_, and is_designed_.

Referenced by operator=(), and RotMatrix().

utility::vector1< core::Size > const& protocols::mean_field::RotMatrix::curr_rot ( ) const
inline

returns a vector of the current rotamers at each position

References curr_rot_.

Referenced by protocols::mean_field::AAMatrix::init(), and RotMatrix().

void protocols::mean_field::RotMatrix::curr_rot ( utility::vector1< core::Size cr)
inline

sets the curr_rot vector

References curr_rot_.

utility::vector1< RotProb > protocols::mean_field::RotMatrix::curr_rot_prob ( ) const

returns a vector of RotProbs corresponding to the current rotamer at each position

returns vector with probabilities of the current rotamers based on curr_rot_ vector

References curr_rot_.

Referenced by show().

void protocols::mean_field::RotMatrix::init ( core::Size const  option,
core::pack::rotamer_set::RotamerSetsOP  rs 
)
private

private method called by constructors to initialize the RotMatrix

private method used to initialize RotMatrix as jagged_array of RotProbs

called by constructors and build_rot_matrix

also builds curr_rot_ and is_designed_ vectors

Parameters
[in]option- determines which numbers to initialize RotMatrix with
[in]rs- RotamerSetsOP used to gather the rest of the information used to build the RotMatrix

References protocols::cluster::calibur::aa, curr_rot_, is_designed_, and rot().

Referenced by build_rot_matrix(), and RotMatrix().

utility::vector1< bool > const& protocols::mean_field::RotMatrix::is_designed ( ) const
inline

returns a vector of bools designating whether each position allows design or not

References is_designed_.

Referenced by protocols::mean_field::AAMatrix::init().

void protocols::mean_field::RotMatrix::is_designed ( utility::vector1< bool id)
inline

sets a vector of bools designating whether each position allows design or not

References is_designed_.

bool protocols::mean_field::RotMatrix::is_designed ( core::Size  pos) const
inline

returns a bool designating whether a specified position allows design

Parameters
[in]pos- position to be examined within the RotMatrix
Remarks
RotMatrix numbering may or may not match pose numbering

References is_designed_.

Size protocols::mean_field::RotMatrix::n_designed ( ) const

returns the number of positions that allow design

counts the number of positions for which design is on

References is_designed_.

Referenced by protocols::mean_field::AAMatrix::init().

RotMatrix & protocols::mean_field::RotMatrix::operator= ( RotMatrix const &  object_to_copy)

Assignment operator.

Assignment operator calls private member function

References copy_data().

void protocols::mean_field::RotMatrix::show ( std::ostream &  output = std::cout) const

Generate string representation of RotMatrix for debugging purposes.

prints representation of RotMatrix using show() function of RotProbs

in the outputted table, each column represents the probabilities of rotamers at that position

if current rotamers are set, outputs a vector of current rotamers and their probability

References curr_rot_prob(), and protocols::mean_field::jagged_array< T, A >::show().

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

Friends And Related Function Documentation

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

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

Member Data Documentation

utility::vector1< core::Size > protocols::mean_field::RotMatrix::curr_rot_
private
utility::vector1< bool > protocols::mean_field::RotMatrix::is_designed_
private

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