Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
core::pack::interaction_graph::ResidueArrayAnnealingEvaluator Class Reference

#include <ResidueArrayAnnealingEvaluator.hh>

Inheritance diagram for core::pack::interaction_graph::ResidueArrayAnnealingEvaluator:
Inheritance graph
[legend]

Public Member Functions

 ResidueArrayAnnealingEvaluator ()
 Constructor. More...
 
 ~ResidueArrayAnnealingEvaluator () override
 Destructor. More...
 
 ResidueArrayAnnealingEvaluator (ResidueArrayAnnealingEvaluator const &src)
 Copy constructor. More...
 
void initialize (core::scoring::ScoreFunction const &score_function, core::pose::Pose &pose, core::pack::rotamer_set::RotamerSets &rotamer_sets, utility::graph::GraphCOP)
 
int get_num_nodes () const override
 Get the number of nodes. More...
 
int get_num_states_for_node (int node) const override
 Get the number of states for a specific node. More...
 
int get_num_total_states () const override
 Get the total number of states for all nodes. More...
 
void prepare_graph_for_simulated_annealing () override
 Utility signal. More...
 
void blanket_assign_state_0 () override
 State initialization: set all nodes to state zero. More...
 
bool any_vertex_state_unassigned () const override
 Are there any nodes unassigned? More...
 
core::PackerEnergy set_state_for_node (int node_ind, int new_state) override
 Explicit state modification: set a particular node to a particular state. More...
 
core::PackerEnergy set_network_state (ObjexxFCL::FArray1_int &node_states) override
 Set states for all nodes across the network. More...
 
void consider_substitution (int node_ind, int new_state, core::PackerEnergy &delta_energy, core::PackerEnergy &prev_energy_for_node) override
 Consider setting a particular node to a particular state. More...
 
core::PackerEnergy commit_considered_substitution () override
 Set the node that we were considering to the state that we were considering (i.e. commit the change). More...
 
core::PackerEnergy get_energy_current_state_assignment () override
 Get the energy fo the current state. More...
 
void set_errorfull_deltaE_threshold (core::PackerEnergy deltaE) override
 Set error threshold. More...
 
virtual bool has_methods ()
 Do any energy methods have a nonzero weight? More...
 
void clean_up_after_packing (core::pose::Pose &pose) override
 Provide the opportunity for an AnnealableGraph to clean up cached data in the pose or inside itself after packing. More...
 
- Public Member Functions inherited from core::pack::interaction_graph::AnnealableGraphBase
 AnnealableGraphBase ()
 Constructor. More...
 
 AnnealableGraphBase (AnnealableGraphBase const &src)
 Copy constructor. More...
 
 ~AnnealableGraphBase () override
 Destructor. More...
 

Private Types

typedef std::pair
< core::PackerEnergy,
core::scoring::annealing::ResidueArrayAnnealableEnergyOP
WeightedMethodPair
 

Private Member Functions

core::Real calculate_weighted_energy (utility::vector1< core::conformation::ResidueCOP > const &resvect, utility::vector1< core::Size > const &current_rotamer_ids, int const substitution_position=0)
 Calculate the energy given the vector of residue owning pointers. More...
 
void initialize_symmetry_info (core::pose::Pose const &pose)
 Initialize symmetry information. More...
 
void set_consideration (int const node_ind, int const node_resid, int const new_state, utility::vector1< std::pair< int, core::conformation::ResidueCOP > > &unset_info)
 Sets the current consideration. More...
 
void unset_consideration (utility::vector1< std::pair< int, core::conformation::ResidueCOP > > const &unset_info)
 Clears the current consideration. More...
 
void clear_consideration ()
 Abandon the substitution that was being considered. More...
 

Private Attributes

std::list< WeightedMethodPairweighted_energy_methods_
 List of energy methods and their weights. More...
 
utility::vector1
< core::conformation::ResidueCOP
source_pose_residues_
 Const-owning pointers to the residues of the source pose. More...
 
utility::vector1
< core::conformation::ResidueCOP
current_residues_
 Const-owning pointers to the current residues. More...
 
utility::vector1< core::Sizecurrent_rotamer_ids_
 holds the current rotamers ids, should always be in sync with current_residues_ More...
 
core::PackerEnergy current_energy_
 Current energy. More...
 
int considered_node_
 The node being considered for alteration. More...
 
int considered_state_
 The state that we're considering changing this node TO. More...
 
core::PackerEnergy considered_energy_
 The energy that would result from the considered substitution. More...
 
utility::vector1
< core::pack::rotamer_set::RotamerSetCOP
per_node_rotamer_sets_
 The rotamer sets for each node (vector of const-owning pointers to RotamerSet objects. More...
 
bool is_symmetric_
 Is this a symmetric packing job? More...
 
bool has_mirror_symm_
 Is this a symmetric packing job with mirror symmetry? More...
 
core::Size num_indep_nodes_
 Number of independent nodes (not symmetry copies). More...
 
std::map< int,
utility::vector1< core::Size > > 
dependent_node_map_
 Map of dependent nodes. More...
 
std::map< int,
utility::vector1< core::Size > > 
dependent_residue_map_
 Map of dependent residues. More...
 

Member Typedef Documentation

Constructor & Destructor Documentation

core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::ResidueArrayAnnealingEvaluator ( )

Constructor.

References considered_energy_, and current_energy_.

core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::~ResidueArrayAnnealingEvaluator ( )
overridedefault

Destructor.

core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::ResidueArrayAnnealingEvaluator ( ResidueArrayAnnealingEvaluator const &  src)

Copy constructor.

References considered_energy_, and current_energy_.

Member Function Documentation

bool core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::any_vertex_state_unassigned ( ) const
overridevirtual
void core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::blanket_assign_state_0 ( )
overridevirtual
core::Real core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::calculate_weighted_energy ( utility::vector1< core::conformation::ResidueCOP > const &  resvect,
utility::vector1< core::Size > const &  current_rotamer_ids,
int const  substitution_position = 0 
)
private

Calculate the energy given the vector of residue owning pointers.

Parameters
[in]resvect1-vector of const-owning pointers to Residue objects representing current state
[in]vectorof rotamer state assignments per resid (same dimension as first parameter)

References weighted_energy_methods_.

Referenced by blanket_assign_state_0(), consider_substitution(), set_network_state(), and set_state_for_node().

void core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::clean_up_after_packing ( core::pose::Pose pose)
overridevirtual

Provide the opportunity for an AnnealableGraph to clean up cached data in the pose or inside itself after packing.

This version calls the clean_up_residuearrayannealableenergy_after_packing() function in the associated energy methods.

Author
Vikram K. Mulligan (vmull.nosp@m.ig@u.nosp@m.w.edu).

Reimplemented from core::pack::interaction_graph::AnnealableGraphBase.

References weighted_energy_methods_.

void core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::clear_consideration ( )
private

Abandon the substitution that was being considered.

References considered_energy_, considered_node_, considered_state_, and current_energy_.

Referenced by blanket_assign_state_0(), set_network_state(), and set_state_for_node().

core::PackerEnergy core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::commit_considered_substitution ( )
overridevirtual

Set the node that we were considering to the state that we were considering (i.e. commit the change).

Implements core::pack::interaction_graph::AnnealableGraphBase.

References considered_energy_, considered_node_, considered_state_, current_energy_, per_node_rotamer_sets_, set_consideration(), and weighted_energy_methods_.

void core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::consider_substitution ( int  node_ind,
int  new_state,
core::PackerEnergy delta_energy,
core::PackerEnergy prev_energy_for_node 
)
overridevirtual

Consider setting a particular node to a particular state.

Parameters
[in]node_indIndex of the node to be potentially modified.
[in]new_stateIndex of the state that we might set this node to.
[out]delta_energyThe change in energy that would result from the substitution, returned by this function.
[out]prev_energy_for_nodeThe previous energy for this node, prior to the substitution, returned by this function.

Implements core::pack::interaction_graph::AnnealableGraphBase.

References calculate_weighted_energy(), considered_energy_, considered_node_, considered_state_, current_energy_, current_residues_, current_rotamer_ids_, per_node_rotamer_sets_, set_consideration(), and unset_consideration().

core::PackerEnergy core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::get_energy_current_state_assignment ( )
overridevirtual

Get the energy fo the current state.

Implements core::pack::interaction_graph::AnnealableGraphBase.

References current_energy_.

int core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::get_num_nodes ( ) const
overridevirtual

Get the number of nodes.

This lies a little bit. It only returns the number of independent nodes.

Implements core::pack::interaction_graph::AnnealableGraphBase.

References num_indep_nodes_.

Referenced by any_vertex_state_unassigned(), and set_network_state().

int core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::get_num_states_for_node ( int  n) const
overridevirtual

Get the number of states for a specific node.

Parameters
[in]nodeIndex of the node.

Implements core::pack::interaction_graph::AnnealableGraphBase.

References per_node_rotamer_sets_.

int core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::get_num_total_states ( ) const
overridevirtual

Get the total number of states for all nodes.

This lies a little bit. It only returns the total number of states for the independent nodes.

Implements core::pack::interaction_graph::AnnealableGraphBase.

References num_indep_nodes_, and per_node_rotamer_sets_.

virtual bool core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::has_methods ( )
inlinevirtual

Do any energy methods have a nonzero weight?

References weighted_energy_methods_.

void core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::initialize ( core::scoring::ScoreFunction const &  score_function,
core::pose::Pose pose,
core::pack::rotamer_set::RotamerSets rotamer_sets,
utility::graph::GraphCOP   
)
void core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::initialize_symmetry_info ( core::pose::Pose const &  pose)
private
void core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::prepare_graph_for_simulated_annealing ( )
overridevirtual
void core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::set_consideration ( int const  node_ind,
int const  node_resid,
int const  new_state,
utility::vector1< std::pair< int, core::conformation::ResidueCOP > > &  unset_information 
)
private
void core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::set_errorfull_deltaE_threshold ( core::PackerEnergy  deltaE)
overridevirtual

Set error threshold.

Parameters
[in]deltaEError threshold value to set.

Implements core::pack::interaction_graph::AnnealableGraphBase.

core::PackerEnergy core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::set_network_state ( ObjexxFCL::FArray1_int &  node_states)
overridevirtual

Set states for all nodes across the network.

Parameters
[in]node_statesFortran-style 1-array of state indices for all nodes in the network.

Implements core::pack::interaction_graph::AnnealableGraphBase.

References calculate_weighted_energy(), clear_consideration(), current_energy_, current_residues_, current_rotamer_ids_, dependent_node_map_, dependent_residue_map_, get_num_nodes(), is_symmetric_, and per_node_rotamer_sets_.

core::PackerEnergy core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::set_state_for_node ( int  node_ind,
int  new_state 
)
overridevirtual

Explicit state modification: set a particular node to a particular state.

Parameters
[in]node_indIndex of the node to modify.
[in]new_stateIndex of the state that we're setting this node TO.

Implements core::pack::interaction_graph::AnnealableGraphBase.

References calculate_weighted_energy(), clear_consideration(), current_energy_, current_residues_, current_rotamer_ids_, dependent_node_map_, dependent_residue_map_, is_symmetric_, and per_node_rotamer_sets_.

void core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::unset_consideration ( utility::vector1< std::pair< int, core::conformation::ResidueCOP > > const &  unset_info)
private

Clears the current consideration.

Author
Vikram K. Mulligan (vmull.nosp@m.ig@u.nosp@m.w.edu)

References current_residues_.

Referenced by consider_substitution().

Member Data Documentation

core::PackerEnergy core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::considered_energy_
private

The energy that would result from the considered substitution.

Referenced by clear_consideration(), commit_considered_substitution(), consider_substitution(), and ResidueArrayAnnealingEvaluator().

int core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::considered_node_
private

The node being considered for alteration.

Referenced by clear_consideration(), commit_considered_substitution(), and consider_substitution().

int core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::considered_state_
private

The state that we're considering changing this node TO.

Referenced by clear_consideration(), commit_considered_substitution(), and consider_substitution().

core::PackerEnergy core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::current_energy_
private
utility::vector1< core::conformation::ResidueCOP > core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::current_residues_
private
utility::vector1< core::Size > core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::current_rotamer_ids_
private

holds the current rotamers ids, should always be in sync with current_residues_

Referenced by blanket_assign_state_0(), consider_substitution(), set_consideration(), set_network_state(), and set_state_for_node().

std::map< int, utility::vector1< core::Size > > core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::dependent_node_map_
private

Map of dependent nodes.

Maps controlling node index -> vector of dependent node indices.

Referenced by initialize_symmetry_info(), set_consideration(), set_network_state(), and set_state_for_node().

std::map< int, utility::vector1< core::Size > > core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::dependent_residue_map_
private

Map of dependent residues.

Maps controlling node index -> vector of dependent residue indices.

Referenced by initialize_symmetry_info(), set_consideration(), set_network_state(), and set_state_for_node().

bool core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::has_mirror_symm_
private

Is this a symmetric packing job with mirror symmetry?

Referenced by initialize_symmetry_info().

bool core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::is_symmetric_
private

Is this a symmetric packing job?

Referenced by initialize_symmetry_info(), set_consideration(), set_network_state(), and set_state_for_node().

core::Size core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::num_indep_nodes_
private

Number of independent nodes (not symmetry copies).

Referenced by get_num_nodes(), get_num_total_states(), initialize(), and initialize_symmetry_info().

utility::vector1< core::pack::rotamer_set::RotamerSetCOP > core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::per_node_rotamer_sets_
private
utility::vector1< core::conformation::ResidueCOP > core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::source_pose_residues_
private

Const-owning pointers to the residues of the source pose.

Referenced by any_vertex_state_unassigned(), blanket_assign_state_0(), and initialize().

std::list< WeightedMethodPair > core::pack::interaction_graph::ResidueArrayAnnealingEvaluator::weighted_energy_methods_
private

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