Rosetta
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
protocols::mean_field::FlexBBMeanField Class Reference

#include <FlexBBMeanField.hh>

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

Public Member Functions

 FlexBBMeanField (core::Size const option, core::pose::PoseOPs &poses, utility::vector1< core::pack::task::PackerTaskOP > tasks, core::scoring::ScoreFunctionOP scfxn)
 
 FlexBBMeanField (core::Size const option, core::pose::PoseOPs &poses, utility::vector1< core::pack::task::PackerTaskOP > tasks, core::scoring::ScoreFunctionOP scfxn, core::Real lambda_mem, core::Real tolerance, core::Real temp, core::Real threshold)
 
 ~FlexBBMeanField () override
 Destructor. More...
 
void show (std::ostream &output=std::cout) const
 Generate string representation of FlexBBMeanField for debugging purposes. More...
 
void process () override
 overrides process() method in MeanField to add convergence step for each pose and averaging step for all rot_matrices_ More...
 
void delete_pose (core::Size pose_ind) override
 deletes a pose from the list of poses More...
 
RotMatrixCOP rot_matrix () const override
 returns the expected (averaged) RotMatrix (exp_rot_matrix_) More...
 
jagged_array< core::Realenergy_matrix () const
 returns the expected (averaged) EnergyMatrix (exp_energy_matrix_) More...
 
void renumber_rotamers ()
 renumbers rotamers with a backbone-independent rotamer numbering scheme More...
 
virtual void calc_bb_boltz_probs ()
 calculate Boltzmann weights of each backbone More...
 
void calc_exp_value_rot_matrix ()
 calculate expected (averaged) RotMatrix More...
 
jagged_array< core::Real > & bb_boltz_probs ()
 used by derived classes for write-access to bb_boltz_probs_ More...
 
utility::vector1< jagged_array< core::Real > > const & bb_boltz_probs_per_aa ()
 
utility::vector1< RotMatrix > const & rot_matrices () const
 returns const references to the utility vector of rot_matrices representing each pose in the backbone ensemble More...
 
utility::vector1< jagged_array< core::Real > > const & energy_matrices () const
 returns const references to the utility vector of energy_matrices representing each pose in the backbone ensemble More...
 
- Public Member Functions inherited from protocols::mean_field::MeanField
 MeanField (core::Size const option, core::pose::PoseOPs &poses, utility::vector1< core::pack::task::PackerTaskOP > const &tasks, core::scoring::ScoreFunctionOP scfxn)
 
 MeanField (core::Size const option, core::pose::PoseOPs &poses, utility::vector1< core::pack::task::PackerTaskOP > const &tasks, core::scoring::ScoreFunctionOP scfxn, core::Real lambda_mem, core::Real tolerance, core::Real temp, core::Real threshold)
 
 ~MeanField () override
 Destructor. More...
 
void show (std::ostream &output=std::cout) const
 Generate string representation of MeanField for debugging purposes. More...
 
void converge ()
 tries to converge to a final RotMatrix More...
 
void build_rot_matrix_for_pose (core::Size pose_ind)
 build a RotMatrix for a specific pose in poses_ More...
 
RotMatrixCOP alt_rot_matrix () const
 returns const pointer to alternate RotMatrix More...
 
jagged_array< core::Real > const & energies_matrix () const
 returns const reference to energies_matrix More...
 
core::Real lambda_memory () const
 get lambda memory, used in convergence process More...
 
core::Real tolerance () const
 get tolerance, used to determine if converged More...
 
core::Real temperature () const
 get temperature (kT) More...
 
core::Real threshold () const
 get threshold More...
 
core::Real init_option () const
 get init option (used to initialize RotMatrix) More...
 
core::Size num_poses () const
 get number of poses More...
 
core::Size num_packed () const
 get number of residues that are packable More...
 

Protected Attributes

jagged_array< core::Realbb_boltz_probs_
 
utility::vector1< jagged_array< core::Real > > bb_boltz_probs_per_aa_
 

Private Member Functions

 FlexBBMeanField ()
 no default constructor, uncopyable More...
 
 FlexBBMeanField (FlexBBMeanField const &object_to_copy)
 
FlexBBMeanFieldoperator= (FlexBBMeanField const &object_to_copy)
 

Private Attributes

utility::vector1< RotMatrixrot_matrices_
 
RotMatrixOP exp_rot_matrix_
 
utility::vector1< jagged_array< core::Real > > energy_matrices_
 
jagged_array< core::Realexp_energy_matrix_
 
jagged_array< core::Realbb_boltz_weights_
 
utility::vector1< core::Sizenrot_per_pos_
 

Friends

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

Detailed Description

calculator which conducts mean-field algorithm on several, non-designable poses to create a single, averaged RotMatrix

Constructor & Destructor Documentation

◆ FlexBBMeanField() [1/4]

protocols::mean_field::FlexBBMeanField::FlexBBMeanField ( core::Size const  option,
core::pose::PoseOPs poses,
utility::vector1< core::pack::task::PackerTaskOP tasks,
core::scoring::ScoreFunctionOP  scfxn 
)

◆ FlexBBMeanField() [2/4]

protocols::mean_field::FlexBBMeanField::FlexBBMeanField ( core::Size const  option,
core::pose::PoseOPs poses,
utility::vector1< core::pack::task::PackerTaskOP tasks,
core::scoring::ScoreFunctionOP  scfxn,
core::Real  lambda_mem,
core::Real  tolerance,
core::Real  temp,
core::Real  threshold 
)

◆ ~FlexBBMeanField()

protocols::mean_field::FlexBBMeanField::~FlexBBMeanField ( )
overridedefault

Destructor.

◆ FlexBBMeanField() [3/4]

protocols::mean_field::FlexBBMeanField::FlexBBMeanField ( )
private

no default constructor, uncopyable

◆ FlexBBMeanField() [4/4]

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

Member Function Documentation

◆ bb_boltz_probs()

jagged_array< core::Real >& protocols::mean_field::FlexBBMeanField::bb_boltz_probs ( )
inline

used by derived classes for write-access to bb_boltz_probs_

Remarks
would prefer for the method to be protected, but disallowed by Rosetta Coding Conventions

References bb_boltz_probs_.

Referenced by protocols::mean_field::FlexBBDesignMeanField::calc_bb_boltz_probs(), and protocols::mean_field::FlexBBDesignMeanField::calc_exp_value_aa_matrix().

◆ bb_boltz_probs_per_aa()

utility::vector1< jagged_array < core::Real > > const& protocols::mean_field::FlexBBMeanField::bb_boltz_probs_per_aa ( )
inline

◆ calc_bb_boltz_probs()

void protocols::mean_field::FlexBBMeanField::calc_bb_boltz_probs ( )
virtual

calculate Boltzmann weights of each backbone

calculates Boltzmann probabilities of each position in each backbone, relative to the other backbones for that position

uses the sum of energies across all rotamers for each position at a backbone as the E(i) in P(i) = -e^(E(i)/kT)

Remarks
bb_boltz_weights_ = -e^(E(i)/kT)
bb_boltz_probs_ = -e^(E(i)/kT) / Z where Z is the sum of -e^(E(i)/kT) for that position at each backbone

Reimplemented in protocols::mean_field::FlexBBDesignMeanField.

References protocols::cluster::calibur::aa, core::chemical::num_canonical_aas, and rot().

Referenced by protocols::mean_field::FlexBBDesignMeanField::calc_bb_boltz_probs().

◆ calc_exp_value_rot_matrix()

void protocols::mean_field::FlexBBMeanField::calc_exp_value_rot_matrix ( )

calculate expected (averaged) RotMatrix

calculate "expected value" or averaged RotMatrix

weight each position-backbone-rot probability by the Boltzmann probability of that backbone occurring for that position

and then sum them up across all backbones for that position

References rot().

◆ delete_pose()

void protocols::mean_field::FlexBBMeanField::delete_pose ( core::Size  pose_ind)
overridevirtual

deletes a pose from the list of poses

overrides MeanField::delete_pose to resize appropriate data members

used to delete a pose which does not reach convergence

Remarks
meant to be called before rot_matrices_ and energy_matrices_ have been fully assigned
and before any bb_boltz_weights or nrot_per_pos have been assigned at all

Reimplemented from protocols::mean_field::MeanField.

References core::chemical::num_canonical_aas.

Referenced by protocols::mean_field::FlexBBDesignMeanField::delete_pose().

◆ energy_matrices()

utility::vector1< jagged_array < core::Real > > const& protocols::mean_field::FlexBBMeanField::energy_matrices ( ) const
inline

returns const references to the utility vector of energy_matrices representing each pose in the backbone ensemble

References energy_matrices_.

Referenced by protocols::mean_field::FlexBBDesignMeanField::process().

◆ energy_matrix()

jagged_array< core::Real > protocols::mean_field::FlexBBMeanField::energy_matrix ( ) const
inline

returns the expected (averaged) EnergyMatrix (exp_energy_matrix_)

References exp_energy_matrix_.

◆ operator=()

FlexBBMeanField& protocols::mean_field::FlexBBMeanField::operator= ( FlexBBMeanField const &  object_to_copy)
private

◆ process()

void protocols::mean_field::FlexBBMeanField::process ( )
overridevirtual

overrides process() method in MeanField to add convergence step for each pose and averaging step for all rot_matrices_

for each pose, tries to build a RotMatrix, converge, and save values of RotMatrix and energy_matrix

to rot_matrices and energy_matrices, then renumbers the rotamers, calculates the Backbone Boltzmann Probabilities

and calculates the averaged RotMatrix

Remarks
if there are errors in building a RotMatrix or if the pose did not converge, that pose is deleted

Reimplemented from protocols::mean_field::MeanField.

References protocols::pack_daemon::error_message, and TR().

Referenced by protocols::mean_field::FlexBBDesignMeanField::process().

◆ renumber_rotamers()

void protocols::mean_field::FlexBBMeanField::renumber_rotamers ( )

renumbers rotamers with a backbone-independent rotamer numbering scheme

renumbers the rotamers using a ResHashMap

inserts rotamers into the ResHashMap using a hash function that rounds chi angles down to nearest 10 degrees

before attempting an insert, check if a rotamer has already been inserted and if so, what its rotamer index is

References protocols::mean_field::ResHashMap::attempt_insert(), protocols::mean_field::ResHashMap::last_ind_assigned(), and rot().

◆ rot_matrices()

utility::vector1< RotMatrix > const& protocols::mean_field::FlexBBMeanField::rot_matrices ( ) const
inline

returns const references to the utility vector of rot_matrices representing each pose in the backbone ensemble

References rot_matrices_.

Referenced by protocols::mean_field::FlexBBDesignMeanField::calc_bb_boltz_probs(), and protocols::mean_field::FlexBBDesignMeanField::process().

◆ rot_matrix()

RotMatrixCOP protocols::mean_field::FlexBBMeanField::rot_matrix ( ) const
overridevirtual

returns the expected (averaged) RotMatrix (exp_rot_matrix_)

overrides MeanField::rot_matrix to return the averaged RotMatrix

Reimplemented from protocols::mean_field::MeanField.

Referenced by protocols::mean_field::FlexBBDesignMeanField::show().

◆ show()

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

Generate string representation of FlexBBMeanField for debugging purposes.

prints out the exp_rot_matrix_

Friends And Related Function Documentation

◆ operator<<

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

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

Member Data Documentation

◆ bb_boltz_probs_

jagged_array< core::Real > protocols::mean_field::FlexBBMeanField::bb_boltz_probs_
protected

Referenced by bb_boltz_probs().

◆ bb_boltz_probs_per_aa_

utility::vector1< jagged_array < core::Real > > protocols::mean_field::FlexBBMeanField::bb_boltz_probs_per_aa_
protected

◆ bb_boltz_weights_

jagged_array< core::Real > protocols::mean_field::FlexBBMeanField::bb_boltz_weights_
private

◆ energy_matrices_

utility::vector1< jagged_array < core::Real > > protocols::mean_field::FlexBBMeanField::energy_matrices_
private

Referenced by energy_matrices().

◆ exp_energy_matrix_

jagged_array< core::Real > protocols::mean_field::FlexBBMeanField::exp_energy_matrix_
private

Referenced by energy_matrix().

◆ exp_rot_matrix_

RotMatrixOP protocols::mean_field::FlexBBMeanField::exp_rot_matrix_
private

◆ nrot_per_pos_

utility::vector1< core::Size > protocols::mean_field::FlexBBMeanField::nrot_per_pos_
private

◆ rot_matrices_

utility::vector1< RotMatrix > protocols::mean_field::FlexBBMeanField::rot_matrices_
private

Referenced by rot_matrices().


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