Rosetta Protocols  2014.35
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
protocols::flexpack::interaction_graph::FlexbbNode Class Reference

#include <FlexbbInteractionGraph.hh>

Public Types

typedef
core::pack::interaction_graph::NodeBase 
parent
 
typedef core::PackerEnergy PackerEnergy
 
typedef core::Size Size
 

Public Member Functions

 FlexbbNode (FlexbbInteractionGraph *owner, int node_id, int num_states)
 
virtual ~FlexbbNode ()
 
virtual void print () const
 
void set_num_distinct_backbones (int nbbconfs)
 
int get_num_distinct_backbones () const
 
void set_num_states_per_backbone (utility::vector1< int > const &)
 
int get_bb_for_state (int state) const
 
int get_num_states_for_bb (int bbconf) const
 
int get_state_offset_for_bb (int bbconf) const
 
void get_states_on_curr_bb (utility::vector1< Size > &state_list, int offset) const
 
void get_all_states (utility::vector1< Size > &rotlist, int offset) const
 
void set_closest_states_on_other_bbs (ObjexxFCL::FArray2D_int const &)
 
void set_amino_acid_types (utility::vector1< int > const &)
 
ObjexxFCL::FArray1A_int getNumStatesPerAAPerBB (int aa)
 
virtual void add_to_one_body_energies (ObjexxFCL::FArray1< PackerEnergy > &energies)
 
virtual void add_to_one_body_energy (int state, PackerEnergy energy)
 
virtual void update_one_body_energy (int state, PackerEnergy energy)
 
virtual void zero_one_body_energies ()
 
virtual bool state_unassigned () const
 
PackerEnergy get_one_body_energy (int state) const
 
virtual void prepare_for_simulated_annealing ()
 
int get_current_state () const
 
int get_backbone_for_current_state () const
 
void write_current_state_to_state_array (ObjexxFCL::FArray1_int &nodes_states)
 
bool inform_edges_of_alt_state_before_bbjump ()
 Preliminatry bookkeeping for the node the Graph contacted about a backbone move. This node is the "root" of the DFS traversal. More...
 
bool state_has_same_backbone_as_current (int state) const
 Did the alterenate state assigned during a flexbb move actually preserve the currently assigned bb? More...
 
int get_num_states_for_aa_type_for_bb (int aa_type, int bb) const
 
void print_internal_energies ()
 
void update_internal_energy_sums ()
 
virtual unsigned int count_dynamic_memory () const
 
int num_aa_types () const
 Read access to private data to both derived classes and the world. More...
 
int num_bbconfs () const
 
utility::vector1< int > const & num_states_for_bb ()
 
utility::vector1< int > const & state_offsets_for_bb ()
 
ObjexxFCL::FArray2D_int const & num_states_for_aa_for_bb ()
 
ObjexxFCL::FArray2D_int const & state_offsets_for_aa_for_bb ()
 
ObjexxFCL::FArray2D_int const & closest_state_on_alt_bb () const
 
FlexbbSparseMatrixIndex const & state_info (int state) const
 
utility::vector1< PackerEnergy >
const & 
one_body_energies () const
 
int current_state () const
 
FlexbbSparseMatrixIndex const & current_state_info () const
 
int curr_bb () const
 
PackerEnergy curr_state_one_body_energy () const
 
PackerEnergy curr_state_total_energy () const
 
utility::vector1< PackerEnergy >
const & 
curr_state_two_body_energies ()
 
int alternate_state () const
 
FlexbbSparseMatrixIndex const & alternate_state_info () const
 
int alt_bb () const
 
PackerEnergy alternate_state_one_body_energy () const
 
PackerEnergy alternate_state_total_energy () const
 
utility::vector1< PackerEnergy >
const & 
alternate_state_two_body_energies () const
 
PackerEnergy alternate_state_two_body_energies (int ind) const
 
utility::vector1< bool > const & edge_connects_flexsegmate () const
 
bool count_energy_to_node_in_my_fragtotalE (int edge_index) const
 Convention for acumulating energies between flexsegmates during a backbone move: The smaller-indexed node counts the interaction, the larger-indexed node does not. More...
 
bool alternate_state_is_being_considered () const
 

Protected Member Functions

FlexbbEdge const * get_incident_flexbb_edge (int index) const
 
FlexbbEdgeget_incident_flexbb_edge (int index)
 
FlexbbNode const * get_adjacent_flexbb_node (int index) const
 
FlexbbNodeget_adjacent_flexbb_node (int index)
 
FlexbbInteractionGraph const * get_flexbbig_owner () const
 
FlexbbInteractionGraphget_flexbbig_owner ()
 
void update_internal_vectors ()
 
void inform_edges_considered_fixedbb_substition_uncommitted ()
 
void set_considering_alternate_state ()
 Limited write acces to private data. More...
 
void set_current_state (int setting)
 
void set_curr_state_one_body_energy (PackerEnergy setting)
 
void set_curr_state_total_energy (PackerEnergy setting)
 
void inc_curr_state_total_energy (PackerEnergy setting)
 
void set_curr_state_two_body_energies (Size index, PackerEnergy setting)
 
void set_alternate_state (int setting)
 
void set_alternate_state_one_body_energy (PackerEnergy setting)
 
void set_alternate_state_total_energy (PackerEnergy setting)
 
void inc_alternate_state_total_energy (PackerEnergy setting)
 
void set_alternate_state_two_body_energies (Size index, PackerEnergy setting)
 
void reset_all_rotamer_substitution_bookkeeping_data ()
 
void partial_state_assignment (int new_state)
 
void inform_incident_edges_about_partial_state_assignment ()
 
void copy_alternate_to_current ()
 bookkeeping for DFS traversal. Derived classes should consult this at the beginning of node "get_energies" traversals. Calling this function for a node effectively declares that the code which follows will project the delta energy: after the first time this functio is called, it will return true. Must be proceeded by a call to prepare_for_bb_jump(). Depricated. bool energies_already_projected() const; More...
 
void have_edges_copy_alternate_to_current ()
 Have all incident edges copy their data from "alternate_*" to "current_*". More...
 
void have_edges_copy_alternate_to_current_following_flexbb_accept ()
 Have a subset of the incident edges copy their data from "alternate_*" to "current_*" where this subset includes all edges to non-flexsegmates as well as all all upper edges to flexsegmates. Threadsafe if it can be fruitfully parallelized. More...
 

Private Member Functions

 FlexbbNode ()
 
 FlexbbNode (FlexbbNode const &)
 

Private Attributes

int num_aa_types_
 
int num_bb_
 
utility::vector1< intnum_states_for_bb_
 
utility::vector1< intstate_offsets_for_bb_
 
ObjexxFCL::FArray2D_int num_states_for_aa_for_bb_
 
ObjexxFCL::FArray2D_int state_offsets_for_aa_for_bb_
 
ObjexxFCL::FArray2D_int closest_state_on_alt_bb_
 
utility::vector0
< FlexbbSparseMatrixIndex
state_info_
 vector0 so that assigning state 0 does not index out-of-bounds. More...
 
utility::vector1< PackerEnergyone_body_energies_
 
int current_state_
 
FlexbbSparseMatrixIndex current_state_info_
 
PackerEnergy curr_state_one_body_energy_
 
PackerEnergy curr_state_total_energy_
 
utility::vector1< PackerEnergycurr_state_two_body_energies_
 
int alternate_state_
 
FlexbbSparseMatrixIndex alternate_state_info_
 
PackerEnergy alternate_state_one_body_energy_
 
PackerEnergy alternate_state_total_energy_
 
utility::vector1< PackerEnergyalternate_state_two_body_energies_
 
utility::vector1< booledge_connects_flexsegmate_
 
bool alternate_state_is_being_considered_
 

Member Typedef Documentation

Constructor & Destructor Documentation

protocols::flexpack::interaction_graph::FlexbbNode::FlexbbNode ( FlexbbInteractionGraph owner,
int  node_id,
int  num_states 
)

References state_info_.

protocols::flexpack::interaction_graph::FlexbbNode::~FlexbbNode ( )
virtual
protocols::flexpack::interaction_graph::FlexbbNode::FlexbbNode ( )
private
protocols::flexpack::interaction_graph::FlexbbNode::FlexbbNode ( FlexbbNode const &  )
private

Member Function Documentation

void protocols::flexpack::interaction_graph::FlexbbNode::add_to_one_body_energies ( ObjexxFCL::FArray1< PackerEnergy > &  energies)
virtual

References one_body_energies_.

void protocols::flexpack::interaction_graph::FlexbbNode::add_to_one_body_energy ( int  state,
PackerEnergy  energy 
)
virtual

References one_body_energies_.

int protocols::flexpack::interaction_graph::FlexbbNode::alt_bb ( ) const
inline
int protocols::flexpack::interaction_graph::FlexbbNode::alternate_state ( ) const
inline
FlexbbSparseMatrixIndex const& protocols::flexpack::interaction_graph::FlexbbNode::alternate_state_info ( ) const
inline
bool protocols::flexpack::interaction_graph::FlexbbNode::alternate_state_is_being_considered ( ) const
inline
PackerEnergy protocols::flexpack::interaction_graph::FlexbbNode::alternate_state_one_body_energy ( ) const
inline
PackerEnergy protocols::flexpack::interaction_graph::FlexbbNode::alternate_state_total_energy ( ) const
inline
utility::vector1< PackerEnergy > const& protocols::flexpack::interaction_graph::FlexbbNode::alternate_state_two_body_energies ( ) const
inline
PackerEnergy protocols::flexpack::interaction_graph::FlexbbNode::alternate_state_two_body_energies ( int  ind) const
inline
ObjexxFCL::FArray2D_int const& protocols::flexpack::interaction_graph::FlexbbNode::closest_state_on_alt_bb ( ) const
inline
void protocols::flexpack::interaction_graph::FlexbbNode::copy_alternate_to_current ( )
protected

bookkeeping for DFS traversal. Derived classes should consult this at the beginning of node "get_energies" traversals. Calling this function for a node effectively declares that the code which follows will project the delta energy: after the first time this functio is called, it will return true. Must be proceeded by a call to prepare_for_bb_jump(). Depricated. bool energies_already_projected() const;

Copy over the energy data local to this node from "alternate_*" to "current_*"

References alternate_state_, alternate_state_info_, alternate_state_is_being_considered_, alternate_state_one_body_energy_, alternate_state_total_energy_, alternate_state_two_body_energies_, curr_state_one_body_energy_, curr_state_total_energy_, curr_state_two_body_energies_, current_state_, and current_state_info_.

Referenced by protocols::flexpack::interaction_graph::MinimalistFlexbbNode::commit_alt_bb_substitution(), protocols::flexpack::interaction_graph::MinimalistFlexbbNode::commit_considered_substitution(), and protocols::flexpack::interaction_graph::MinimalistFlexbbNode::complete_partial_state_assignment().

unsigned int protocols::flexpack::interaction_graph::FlexbbNode::count_dynamic_memory ( ) const
virtual
bool protocols::flexpack::interaction_graph::FlexbbNode::count_energy_to_node_in_my_fragtotalE ( int  edge_index) const
inline

Convention for acumulating energies between flexsegmates during a backbone move: The smaller-indexed node counts the interaction, the larger-indexed node does not.

int protocols::flexpack::interaction_graph::FlexbbNode::curr_bb ( ) const
inline
PackerEnergy protocols::flexpack::interaction_graph::FlexbbNode::curr_state_one_body_energy ( ) const
inline
PackerEnergy protocols::flexpack::interaction_graph::FlexbbNode::curr_state_total_energy ( ) const
inline
utility::vector1< PackerEnergy > const& protocols::flexpack::interaction_graph::FlexbbNode::curr_state_two_body_energies ( )
inline
int protocols::flexpack::interaction_graph::FlexbbNode::current_state ( ) const
inline
FlexbbSparseMatrixIndex const& protocols::flexpack::interaction_graph::FlexbbNode::current_state_info ( ) const
inline

References current_state_info_.

utility::vector1< bool > const& protocols::flexpack::interaction_graph::FlexbbNode::edge_connects_flexsegmate ( ) const
inline
FlexbbNode const * protocols::flexpack::interaction_graph::FlexbbNode::get_adjacent_flexbb_node ( int  index) const
inlineprotected
FlexbbNode * protocols::flexpack::interaction_graph::FlexbbNode::get_adjacent_flexbb_node ( int  index)
inlineprotected
void protocols::flexpack::interaction_graph::FlexbbNode::get_all_states ( utility::vector1< Size > &  rotlist,
int  offset 
) const
int protocols::flexpack::interaction_graph::FlexbbNode::get_backbone_for_current_state ( ) const
int protocols::flexpack::interaction_graph::FlexbbNode::get_bb_for_state ( int  state) const
inline
int protocols::flexpack::interaction_graph::FlexbbNode::get_current_state ( ) const
FlexbbInteractionGraph const * protocols::flexpack::interaction_graph::FlexbbNode::get_flexbbig_owner ( ) const
inlineprotected
FlexbbInteractionGraph * protocols::flexpack::interaction_graph::FlexbbNode::get_flexbbig_owner ( )
inlineprotected
FlexbbEdge const * protocols::flexpack::interaction_graph::FlexbbNode::get_incident_flexbb_edge ( int  index) const
inlineprotected
FlexbbEdge * protocols::flexpack::interaction_graph::FlexbbNode::get_incident_flexbb_edge ( int  index)
inlineprotected
int protocols::flexpack::interaction_graph::FlexbbNode::get_num_distinct_backbones ( ) const
inline
int protocols::flexpack::interaction_graph::FlexbbNode::get_num_states_for_aa_type_for_bb ( int  aa_type,
int  bb 
) const

In a bbmove, did the backbone actually move? Should be called only by the node who was initially contacted

References num_states_for_aa_for_bb_.

int protocols::flexpack::interaction_graph::FlexbbNode::get_num_states_for_bb ( int  bbconf) const
FlexbbNode::PackerEnergy protocols::flexpack::interaction_graph::FlexbbNode::get_one_body_energy ( int  state) const
int protocols::flexpack::interaction_graph::FlexbbNode::get_state_offset_for_bb ( int  bbconf) const

References state_offsets_for_bb_.

void protocols::flexpack::interaction_graph::FlexbbNode::get_states_on_curr_bb ( utility::vector1< Size > &  state_list,
int  offset 
) const
FArray1A_int protocols::flexpack::interaction_graph::FlexbbNode::getNumStatesPerAAPerBB ( int  aa)
void protocols::flexpack::interaction_graph::FlexbbNode::have_edges_copy_alternate_to_current ( )
protected
void protocols::flexpack::interaction_graph::FlexbbNode::have_edges_copy_alternate_to_current_following_flexbb_accept ( )
protected

Have a subset of the incident edges copy their data from "alternate_*" to "current_*" where this subset includes all edges to non-flexsegmates as well as all all upper edges to flexsegmates. Threadsafe if it can be fruitfully parallelized.

References edge_connects_flexsegmate(), get_incident_flexbb_edge(), and protocols::flexpack::interaction_graph::FlexbbEdge::note_state_substitution_accepted().

Referenced by protocols::flexpack::interaction_graph::MinimalistFlexbbNode::commit_alt_bb_substitution().

void protocols::flexpack::interaction_graph::FlexbbNode::inc_alternate_state_total_energy ( PackerEnergy  setting)
inlineprotected
void protocols::flexpack::interaction_graph::FlexbbNode::inc_curr_state_total_energy ( PackerEnergy  setting)
inlineprotected
void protocols::flexpack::interaction_graph::FlexbbNode::inform_edges_considered_fixedbb_substition_uncommitted ( )
protected
bool protocols::flexpack::interaction_graph::FlexbbNode::inform_edges_of_alt_state_before_bbjump ( )

Preliminatry bookkeeping for the node the Graph contacted about a backbone move. This node is the "root" of the DFS traversal.

Preliminary bookkeeping for DFS-backbone-motion inducing state substitution initiated by a separate node. Returns false if the current state is unassigned.

Edges must be informed of the alternate state for both of their nodes; this should happen before any edge is asked for an alternate-state energy.

References alternate_state_, alternate_state_info_, alternate_state_is_being_considered_, current_state_, get_flexbbig_owner(), get_incident_flexbb_edge(), protocols::flexpack::interaction_graph::FlexbbInteractionGraph::increment_count_nodes_in_flexseg(), and protocols::flexpack::interaction_graph::FlexbbEdge::set_alt_state().

Referenced by protocols::flexpack::interaction_graph::MinimalistFlexbbNode::prepare_for_altbb_move_to_state().

void protocols::flexpack::interaction_graph::FlexbbNode::inform_incident_edges_about_partial_state_assignment ( )
protected
int protocols::flexpack::interaction_graph::FlexbbNode::num_aa_types ( ) const
inline

Read access to private data to both derived classes and the world.

References num_aa_types_.

Referenced by protocols::flexpack::interaction_graph::OTFFlexbbNode::declare_all_rotamers_initialized().

int protocols::flexpack::interaction_graph::FlexbbNode::num_bbconfs ( ) const
inline

References num_bb_.

ObjexxFCL::FArray2D_int const& protocols::flexpack::interaction_graph::FlexbbNode::num_states_for_aa_for_bb ( )
inline
utility::vector1< int > const& protocols::flexpack::interaction_graph::FlexbbNode::num_states_for_bb ( )
inline
utility::vector1< PackerEnergy > const& protocols::flexpack::interaction_graph::FlexbbNode::one_body_energies ( ) const
inline
void protocols::flexpack::interaction_graph::FlexbbNode::partial_state_assignment ( int  new_state)
protected
void protocols::flexpack::interaction_graph::FlexbbNode::prepare_for_simulated_annealing ( )
virtual
void protocols::flexpack::interaction_graph::FlexbbNode::print ( ) const
virtual
void protocols::flexpack::interaction_graph::FlexbbNode::print_internal_energies ( )
void protocols::flexpack::interaction_graph::FlexbbNode::reset_all_rotamer_substitution_bookkeeping_data ( )
protected
void protocols::flexpack::interaction_graph::FlexbbNode::set_alternate_state ( int  setting)
inlineprotected
void protocols::flexpack::interaction_graph::FlexbbNode::set_alternate_state_one_body_energy ( PackerEnergy  setting)
inlineprotected
void protocols::flexpack::interaction_graph::FlexbbNode::set_alternate_state_total_energy ( PackerEnergy  setting)
inlineprotected
void protocols::flexpack::interaction_graph::FlexbbNode::set_alternate_state_two_body_energies ( Size  index,
PackerEnergy  setting 
)
inlineprotected
void protocols::flexpack::interaction_graph::FlexbbNode::set_amino_acid_types ( utility::vector1< int > const &  aatypes)
void protocols::flexpack::interaction_graph::FlexbbNode::set_closest_states_on_other_bbs ( ObjexxFCL::FArray2D_int const &  closest_state_on_alt_bb)
void protocols::flexpack::interaction_graph::FlexbbNode::set_considering_alternate_state ( )
inlineprotected
void protocols::flexpack::interaction_graph::FlexbbNode::set_curr_state_one_body_energy ( PackerEnergy  setting)
inlineprotected
void protocols::flexpack::interaction_graph::FlexbbNode::set_curr_state_total_energy ( PackerEnergy  setting)
inlineprotected
void protocols::flexpack::interaction_graph::FlexbbNode::set_curr_state_two_body_energies ( Size  index,
PackerEnergy  setting 
)
inlineprotected
void protocols::flexpack::interaction_graph::FlexbbNode::set_current_state ( int  setting)
inlineprotected
void protocols::flexpack::interaction_graph::FlexbbNode::set_num_distinct_backbones ( int  nbbconfs)
void protocols::flexpack::interaction_graph::FlexbbNode::set_num_states_per_backbone ( utility::vector1< int > const &  num_states_for_bb)

precondition: num_bb_ must have been previously set and must be equal to the number of backbones implicitly identified in num_states_for_bb by its size.

References num_bb_, num_states_for_bb(), num_states_for_bb_, state_info_, and state_offsets_for_bb_.

Referenced by protocols::flexpack::interaction_graph::FlexbbInteractionGraph::initialize(), and protocols::flexpack::interaction_graph::FlexbbInteractionGraph::set_num_states_per_backbone_for_node().

bool protocols::flexpack::interaction_graph::FlexbbNode::state_has_same_backbone_as_current ( int  state) const
inline

Did the alterenate state assigned during a flexbb move actually preserve the currently assigned bb?

References current_state_info_, protocols::flexpack::interaction_graph::FlexbbSparseMatrixIndex::get_bb(), and state_info_.

FlexbbSparseMatrixIndex const& protocols::flexpack::interaction_graph::FlexbbNode::state_info ( int  state) const
inline
ObjexxFCL::FArray2D_int const& protocols::flexpack::interaction_graph::FlexbbNode::state_offsets_for_aa_for_bb ( )
inline
utility::vector1< int > const& protocols::flexpack::interaction_graph::FlexbbNode::state_offsets_for_bb ( )
inline
bool protocols::flexpack::interaction_graph::FlexbbNode::state_unassigned ( ) const
virtual

References current_state_.

void protocols::flexpack::interaction_graph::FlexbbNode::update_internal_energy_sums ( )

Numerical noise creeps in to the total_energy as energies are added and subtracted due to neighbors accepting rotamer substitutions.

References curr_state_one_body_energy_, curr_state_total_energy_, and curr_state_two_body_energies_.

Referenced by protocols::flexpack::interaction_graph::FlexbbInteractionGraph::update_internal_energy_totals().

void protocols::flexpack::interaction_graph::FlexbbNode::update_internal_vectors ( )
protected
void protocols::flexpack::interaction_graph::FlexbbNode::update_one_body_energy ( int  state,
PackerEnergy  energy 
)
virtual

Setter. This function is not called anywhere and should be removed...

References one_body_energies_.

void protocols::flexpack::interaction_graph::FlexbbNode::write_current_state_to_state_array ( ObjexxFCL::FArray1_int &  nodes_states)

References current_state_.

void protocols::flexpack::interaction_graph::FlexbbNode::zero_one_body_energies ( )
virtual

References one_body_energies_.

Member Data Documentation

int protocols::flexpack::interaction_graph::FlexbbNode::alternate_state_
private
FlexbbSparseMatrixIndex protocols::flexpack::interaction_graph::FlexbbNode::alternate_state_info_
private
bool protocols::flexpack::interaction_graph::FlexbbNode::alternate_state_is_being_considered_
private
PackerEnergy protocols::flexpack::interaction_graph::FlexbbNode::alternate_state_one_body_energy_
private
PackerEnergy protocols::flexpack::interaction_graph::FlexbbNode::alternate_state_total_energy_
private
utility::vector1< PackerEnergy > protocols::flexpack::interaction_graph::FlexbbNode::alternate_state_two_body_energies_
private
ObjexxFCL::FArray2D_int protocols::flexpack::interaction_graph::FlexbbNode::closest_state_on_alt_bb_
private
PackerEnergy protocols::flexpack::interaction_graph::FlexbbNode::curr_state_one_body_energy_
private
PackerEnergy protocols::flexpack::interaction_graph::FlexbbNode::curr_state_total_energy_
private
utility::vector1< PackerEnergy > protocols::flexpack::interaction_graph::FlexbbNode::curr_state_two_body_energies_
private
int protocols::flexpack::interaction_graph::FlexbbNode::current_state_
private
FlexbbSparseMatrixIndex protocols::flexpack::interaction_graph::FlexbbNode::current_state_info_
private
utility::vector1< bool > protocols::flexpack::interaction_graph::FlexbbNode::edge_connects_flexsegmate_
private
int protocols::flexpack::interaction_graph::FlexbbNode::num_aa_types_
private
int protocols::flexpack::interaction_graph::FlexbbNode::num_bb_
private
ObjexxFCL::FArray2D_int protocols::flexpack::interaction_graph::FlexbbNode::num_states_for_aa_for_bb_
private
utility::vector1< int > protocols::flexpack::interaction_graph::FlexbbNode::num_states_for_bb_
private
utility::vector1< PackerEnergy > protocols::flexpack::interaction_graph::FlexbbNode::one_body_energies_
private
utility::vector0< FlexbbSparseMatrixIndex > protocols::flexpack::interaction_graph::FlexbbNode::state_info_
private
ObjexxFCL::FArray2D_int protocols::flexpack::interaction_graph::FlexbbNode::state_offsets_for_aa_for_bb_
private
utility::vector1< int > protocols::flexpack::interaction_graph::FlexbbNode::state_offsets_for_bb_
private

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