Rosetta  2021.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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

protocols::mean_field::FlexBBMeanField::FlexBBMeanField ( core::Size const  option,
core::pose::PoseOPs poses,
utility::vector1< core::pack::task::PackerTaskOP tasks,
core::scoring::ScoreFunctionOP  scfxn 
)
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 
)
protocols::mean_field::FlexBBMeanField::~FlexBBMeanField ( )
overridedefault

Destructor.

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

no default constructor, uncopyable

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

Member Function Documentation

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().

utility::vector1< jagged_array < core::Real > > const& protocols::mean_field::FlexBBMeanField::bb_boltz_probs_per_aa ( )
inline
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, bb_boltz_probs_, bb_boltz_probs_per_aa_, bb_boltz_weights_, energy_matrices_, core::chemical::num_canonical_aas, rot(), rot_matrices_, and protocols::mean_field::MeanField::temperature().

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

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 bb_boltz_weights_, energy_matrices_, exp_energy_matrix_, exp_rot_matrix_, nrot_per_pos_, rot(), and rot_matrices_.

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 protocols::mean_field::jagged_array< T, A >::assign(), bb_boltz_probs_, bb_boltz_probs_per_aa_, bb_boltz_weights_, protocols::mean_field::MeanField::delete_pose(), energy_matrices_, nrot_per_pos_, core::chemical::num_canonical_aas, protocols::mean_field::MeanField::num_packed(), protocols::mean_field::MeanField::num_poses(), and rot_matrices_.

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

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().

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

returns the expected (averaged) EnergyMatrix (exp_energy_matrix_)

References exp_energy_matrix_.

FlexBBMeanField& protocols::mean_field::FlexBBMeanField::operator= ( FlexBBMeanField const &  object_to_copy)
private
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::mean_field::MeanField::build_rot_matrix_for_pose(), calc_bb_boltz_probs(), protocols::mean_field::MeanField::converge(), delete_pose(), protocols::mean_field::MeanField::energies_matrix(), energy_matrices_, protocols::pack_daemon::error_message, protocols::mean_field::MeanField::num_poses(), rot_matrices_, protocols::mean_field::MeanField::rot_matrix(), and protocols::mean_field::TR().

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

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(), nrot_per_pos_, rot(), and 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().

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.

References exp_rot_matrix_.

Referenced by show(), and protocols::mean_field::FlexBBDesignMeanField::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_

References rot_matrix().

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

Friends And Related Function Documentation

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

jagged_array< core::Real > protocols::mean_field::FlexBBMeanField::bb_boltz_probs_
protected
utility::vector1< jagged_array < core::Real > > protocols::mean_field::FlexBBMeanField::bb_boltz_probs_per_aa_
protected
jagged_array< core::Real > protocols::mean_field::FlexBBMeanField::bb_boltz_weights_
private
utility::vector1< jagged_array < core::Real > > protocols::mean_field::FlexBBMeanField::energy_matrices_
private
jagged_array< core::Real > protocols::mean_field::FlexBBMeanField::exp_energy_matrix_
private
RotMatrixOP protocols::mean_field::FlexBBMeanField::exp_rot_matrix_
private
utility::vector1< core::Size > protocols::mean_field::FlexBBMeanField::nrot_per_pos_
private
utility::vector1< RotMatrix > protocols::mean_field::FlexBBMeanField::rot_matrices_
private

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