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

#include <OTFFlexbbInteractionGraph.hh>

Inheritance diagram for protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph:
Inheritance graph
[legend]

Public Types

typedef FlexbbInteractionGraph parent
 
typedef core::Real Real
 
typedef core::pose::PoseOP PoseOP
 
typedef core::pose::PoseCOP PoseCOP
 
typedef core::pose::Pose Pose
 
typedef
core::scoring::ScoreFunctionOP 
ScoreFunctionOP
 
typedef
core::scoring::ScoreFunctionCOP 
ScoreFunctionCOP
 
typedef
core::scoring::ScoreFunction 
ScoreFunction
 
- Public Types inherited from protocols::flexpack::interaction_graph::FlexbbInteractionGraph
enum  Subsitution { SC_ONLY, BOTH_SC_AND_BB }
 
typedef
core::pack::interaction_graph::InteractionGraphBase 
parent
 
typedef core::PackerEnergy PackerEnergy
 
typedef
core::pack::interaction_graph::EdgeBase 
EdgeBase
 

Public Member Functions

 OTFFlexbbInteractionGraph (int num_nodes)
 GRAPH. More...
 
 ~OTFFlexbbInteractionGraph () override
 
void initialize (core::pack_basic::RotamerSetsBase const &) override
 
void set_ProCorrection_values_for_edge (int node1, int node2, int node_not_necessarily_proline, int state, int other_bb, PackerEnergy bb_nonprobb_E, PackerEnergy bb_probb_E, PackerEnergy sc_nonprobb_E, PackerEnergy sc_probb_E)
 
void set_GlyCorrection_values_for_edge (int node1, int node2, int node_not_necessarily_glycine, int state, int other_bb, PackerEnergy bb_nonglybb_E, PackerEnergy bb_glybb_E, PackerEnergy sc_nonglybb_E, PackerEnergy sc_glybb_E)
 
unsigned int count_dynamic_memory () const override
 
virtual void set_pose (Pose const &pose)
 Pose must be set before any edges are added to the graph. More...
 
virtual void set_scorefxn (ScoreFunction const &sfxn)
 Score function must be set before any edges are added to the graph. More...
 
PoseCOP get_pose () const
 Edges request the pose and the score function at the time of their creation. More...
 
ScoreFunctionCOP get_scorefxn () const
 
void note_long_range_interactions_exist_for_edge (int node1, int node2)
 Informs the edge connecting nodes 1 and 2 that they require long range interactions. Note – the edge must already exist. More...
 
void debug_note_considered_substitution (core::conformation::Residue const &alt_rotamer, int index)
 
void debug_note_projected_deltaE_of_considered_substitution (PackerEnergy deltaE, PackerEnergy node_alt_total, bool require_match=true)
 
void debug_note_accepted_substitution ()
 
void debug_note_rejected_substitution ()
 
- Public Member Functions inherited from protocols::flexpack::interaction_graph::FlexbbInteractionGraph
 ~FlexbbInteractionGraph () override
 GRAPH. More...
 
 FlexbbInteractionGraph (int num_nodes)
 
int get_num_aa_types () const
 
utility::vector1< core::Size >
const & 
flexseg_members (int flexseg) const
 
int get_flexseg_for_bb (int bb) const
 
int get_flexseg_bb_offset (int flexseg_id) const
 
bool nodes_from_same_flexseg (int node1, int node2) const
 
int get_num_states_per_backbone_for_node (int node, int bb) const
 
int get_bb_for_state (int node, int state) const
 
virtual void consider_backbone_move (int bb_id, core::PackerEnergy &delta_energy, core::PackerEnergy &prev_flexseg_energy, bool &valid_motion, int &num_nodes_changing_state)=0
 
virtual void consider_bbmove_w_state_substitution (int node_ind, int new_state, core::PackerEnergy &delta_energy, core::PackerEnergy &prev_energy_for_flexseg, bool &valid_motion, int &num_nodes_changing_state)=0
 
virtual PackerEnergy commit_considered_backbone_move (ObjexxFCL::FArray1_int &rotamer_on_node)=0
 
void get_accessible_states (Subsitution move_mode, utility::vector1< core::Size > &rotlist) const
 
void get_backbone_list (utility::vector1< core::Size > &bblist) const
 
bool get_backbone_currently_assigned (int bbid) const
 Is the backbone conformation (in the global enumertion of backbone conformations) already assigned to the network? False if any residue on the flexible segment that this bbid corresponds to is assigned state 0. More...
 
bool get_enforce_bb_contiguity () const
 FlexbbNodes will ask: am I allowed to have a state that breaks the backbone? There are brief periods when the backbone is "broken" as the graph assigns new states to nodes on the same flexible segment. More...
 
void increment_count_nodes_in_flexseg ()
 Owner keeps a count of the number of nodes undergoing a simultaneous rotamer substitution as the backbone moves. More...
 
- Public Member Functions inherited from core::pack::interaction_graph::InteractionGraphBase
 ~InteractionGraphBase () override
 destructor More...
 
 InteractionGraphBase (int num_nodes)
 main constructor More...
 
int get_num_nodes () const override
 Get the number of nodes in the graph. More...
 
void set_num_states_for_node (int node, int num_states)
 sets the number of states for a node of a particular index NEW REQUIREMENT: Nodes must have their num-states set in ascending order by node index; that is, node 1 must go first, node 2 next, and so on. More...
 
int get_num_states_for_node (int node) const override
 returns the number of states for a particular node More...
 
int get_num_total_states () const override
 Get the total number of states. More...
 
virtual core::PackerEnergy get_one_body_energy_for_node_state (int node, int state)=0
 
void add_edge (int node1, int node2)
 creates a new edge between nodes index1 and index2. Nodes do not have to be listed in order More...
 
bool get_edge_exists (int node1, int node2) const
 returns true if an edge between node1 and node2 exists More...
 
void drop_all_edges_for_node (int node)
 deletes all edges adjacent to the node specified More...
 
void print_vertices () const
 calls print() on each of the nodes in the graph More...
 
virtual void print () const
 
void output_connectivity (std::ostream &os) const
 writes out a list of all the edges in the graph More...
 
void output_dimacs (std::ostream &os) const
 writes out a connectivity description of the graph in the famous dimacs format. (where the first column "DIMACS:" should be sed'ed out) More...
 
void set_onebody_energies_multithreaded (core::Size const node_index, core::pack::rotamer_set::RotamerSetCOP rotset, core::pose::Pose const &pose, core::scoring::ScoreFunction const &sfxn, task::PackerTask const &task, utility::graph::GraphCOP packer_neighbor_graph, basic::thread_manager::RosettaThreadAssignmentInfo const &thread_assignments)
 Compute and store the onebody energy for all rotamers at a position. Safe for a multithreaded context. More...
 
void prepare_graph_for_simulated_annealing () override
 iterate across edges and nodes and allow them to prepare for simulated annealing More...
 
void blanket_assign_state_0 () override=0
 State initialization. More...
 
core::PackerEnergy set_state_for_node (int node_ind, int new_state) override=0
 Explicit state modification for a node. More...
 
core::PackerEnergy set_network_state (ObjexxFCL::FArray1_int &node_states) override=0
 Explicit state modification for the network. More...
 
void consider_substitution (int node_ind, int new_state, core::PackerEnergy &delta_energy, core::PackerEnergy &prev_energy_for_node) override=0
 Consider switching node "node_ind" to state "new_state". More...
 
core::PackerEnergy commit_considered_substitution () override=0
 Accept a considered substitution (i.e. make the substitution permanent; commit it). More...
 
core::PackerEnergy get_energy_current_state_assignment () override=0
 Get the energy resulting from the current set of state assignments. More...
 
void set_edge_weight (int node1, int node2, Real edge_weight)
 
Real get_edge_weight (int node1, int node2) const
 
virtual int get_edge_memory_usage () const =0
 
virtual void print_current_state_assignment () const =0
 
void set_errorfull_deltaE_threshold (core::PackerEnergy deltaE) override=0
 Set an error threshold. More...
 
bool any_vertex_state_unassigned () const override
 Returns true if any node in the graph is in state 0, the unassigned state. More...
 
void add_to_one_body_energies (ObjexxFCL::FArray1< core::PackerEnergy > &one_body_energies)
 takes one FArray of energies – one energy for each state for each node More...
 
void update_one_body_energies (ObjexxFCL::FArray1< core::PackerEnergy > &old_energy1b, ObjexxFCL::FArray1< core::PackerEnergy > &new_energy1b)
 decrements the one body energies by the values held in old_energy1b, increments the one body energies by the values held in new_energy1b, and copies new_energy1b into old_energy1b. More...
 
void zero_one_body_energies_for_node (int node)
 
void add_to_nodes_one_body_energy (int node_ind, utility::vector1< core::PackerEnergy > const &one_body_energies)
 
void add_to_nodes_one_body_energy (int node_ind, ObjexxFCL::FArray1< core::PackerEnergy > const &one_body_energies)
 
void add_to_nodes_one_body_energy (int node_ind, int state_id, core::PackerEnergy const one_body_energy)
 interface to PrecomputedPairEnergiesNode::add_to_nodes_one_body_energy More...
 
void set_number_of_energy_sum_vertex_groups (int num_groups)
 a user may define subsets of the vertex set for which they would like to know the internal energy sum. For instance in a graph with 6 vertices, {a,b,c,d,e,f} a user may be interested in the sum of the one- and two-body energies for vertices {a,b,c}. The graph will return sum of the one body energies for vertices a b and c and also any two-body energies for the edges in the subgraph induced by a,b, and c. (In this case, edges {a,b}, {a,c} and {b,c} if these edges are part of the graph. The edge {a,d} will not be counted if it is part of the graph.) More...
 
void set_vertex_member_of_group (int vertex, int group)
 a user may define subsets of the vertex set for which they would like to know the internal energy sum. For instance in a graph with 6 vertices, {a,b,c,d,e,f} a user may be interested in the sum of the one- and two-body energies for vertices {a,b,c}. The graph will return sum of the one body energies for vertices a b and c and also any two-body energies for the edges in the subgraph induced by a,b, and c. (In this case, edges {a,b}, {a,c} and {b,c} if these edges are part of the graph. The edge {a,d} will not be counted if it is part of the graph.) More...
 
void print_vertex_groups ()
 
virtual core::PackerEnergy get_energy_sum_for_vertex_group (int group_id)=0
 
int count_connected_components_and_initialize_vertex_groups ()
 makes a depth first traversal of the graph, counting the number of connected components, and initializes the vertex group memberships to reflect the connected components. Returns the number of connected components in the graph. More...
 
void note_vertex_reached (int node_index)
 marks a vertex as belonging to the connected component currently being traversed in the depth first traversal. More...
 
bool vertex_already_reached (int node_index)
 used by class NodeBase during the depth-first traversal to determine the number of connected components in the graph. returns true if the dft has already reached the node. More...
 
bool get_vertex_member_of_energy_sum_group (int node_index, int group_id)
 
virtual unsigned int getTotalMemoryUsage () const
 
void reset_edge_list_iterator_for_node (int node_index) const
 set the Graph's (single) edge list iterator to the beginning of the edge list for a particular node More...
 
void increment_edge_list_iterator () const
 increment the (single) edge list iterator to the next element More...
 
bool edge_list_iterator_at_end () const
 test: have we arrived at the edge list end? More...
 
EdgeBase const & get_edge () const
 return a const reference to an edge pointed at by the list iterator More...
 
virtual void declare_all_edge_energies_final ()
 Iterates over all edges and calls declare_energies_final() on all of them. Takes O(N) time, where N is the number of edges. More...
 
EdgeBase const * find_edge (int node1, int node2, bool const use_threadsafe_lookup=false) const
 Find an edge and return a const pointer to it. More...
 
EdgeBasefind_edge (int node1, int node2, bool const use_threadsafe_lookup=false)
 Find an edge and return a nonconst pointer to it. More...
 
virtual NodeBasecreate_new_node (int node_index, int num_states)=0
 
virtual EdgeBasecreate_new_edge (int index1, int index2)=0
 
NodeBaseget_node (int index) const
 
int get_num_edges () const
 
std::list< EdgeBase * >::iterator get_edge_list_begin ()
 
std::list< EdgeBase * >::iterator get_edge_list_end ()
 
std::list< EdgeBase * >
::const_iterator 
get_edge_list_begin () const
 
std::list< EdgeBase * >
::const_iterator 
get_edge_list_end () const
 
- Public Member Functions inherited from core::pack::interaction_graph::AnnealableGraphBase
 AnnealableGraphBase ()
 Constructor. More...
 
 AnnealableGraphBase (AnnealableGraphBase const &src)
 Copy constructor. More...
 
 ~AnnealableGraphBase () override
 Destructor. More...
 
virtual void clean_up_after_packing (core::pose::Pose &pose)
 Provide the opportunity for an AnnealableGraph to clean up cached data in the pose or inside itself after packing. More...
 

Protected Member Functions

OTFFlexbbNode const * get_otfflexbb_node (int index) const
 Downcasts. More...
 
OTFFlexbbNodeget_otfflexbb_node (int index)
 
OTFFlexbbEdge const * find_otfflexbb_edge (int node1, int node2) const
 
OTFFlexbbEdgefind_otfflexbb_edge (int node1, int node2)
 
OTFFlexbbEdge const * cast_otfflexbb_edge (EdgeBase const *edge) const
 
OTFFlexbbEdgecast_otfflexbb_edge (EdgeBase *edge)
 
- Protected Member Functions inherited from protocols::flexpack::interaction_graph::FlexbbInteractionGraph
FlexbbNode const * get_flexbb_node (int index) const
 Downcasts. More...
 
FlexbbNodeget_flexbb_node (int index)
 
FlexbbEdge const * find_flexbb_edge (int node1, int node2) const
 
FlexbbEdgefind_flexbb_edge (int node1, int node2)
 
FlexbbEdge const * cast_flexbb_edge (EdgeBase const *edge) const
 
FlexbbEdgecast_flexbb_edge (EdgeBase *edge)
 
void set_enforce_bb_contiguity (bool)
 
void note_bbjump_substitution ()
 
void note_fixedbb_substitution ()
 
bool last_considered_substitution_kept_backbone_fixed () const
 
bool last_considered_substitution_moved_the_backbone () const
 
bool last_considered_backbone_sub_unresolved () const
 
bool last_considered_substitution_unresolved () const
 
void note_last_considered_substitution_resolved ()
 
void reset_node_in_moving_flexseg_count ()
 
int get_num_nodes_changing_state () const
 
PackerEnergy total_energy_current_state_assignment () const
 
PackerEnergy total_energy_alternate_state_assignment () const
 
int node_considering_alt_state () const
 Only allowed to ask for the node considering an alternate state during a fixed-backbone substitution. More...
 
int flexseg_considering_alt_bb () const
 Only allowed to ask for the flexible segment considering an alternate backbone conformation during a backbone-moving substitution. More...
 
bool last_considered_backbone_sub_valid () const
 
int flexseg_for_moltenres (int moltenres) const
 
void set_total_energy_current_state_assignment (PackerEnergy setting)
 
void set_total_energy_alternate_state_assignment (PackerEnergy setting)
 
void set_node_considering_alt_state (int setting)
 Track the last node at which a fixed-backbone substitution took place. More...
 
void set_flexseg_considering_alt_bb (int setting)
 Track the last flexible segment at which a moving-backbone substitution took place. More...
 
void set_last_considered_backbone_sub_valid (bool setting)
 
virtual void update_internal_energy_totals ()
 
- Protected Member Functions inherited from core::pack::interaction_graph::InteractionGraphBase
void clean_up_edges_marked_for_deletion ()
 Remove those edges that have marked themselves for deletion. More...
 
virtual unsigned int count_static_memory () const =0
 
void drop_edge (std::list< EdgeBase * >::iterator edge)
 removes edge from edge list at iterator iter More...
 
int get_node_state_offset (int index) const
 
bool mine (EdgeBase const *edge) const
 

Private Attributes

PoseOP pose_
 
ScoreFunctionOP sfxn_
 
OtherContextScoreFunctionOP oc_sfxn_
 
PoseOP current_pose_
 For debugging purposes. More...
 
Real current_pose_energy_
 
PoseOP alternate_pose_
 
Real alternate_pose_energy_
 
utility::vector1< core::Sizechanging_seqpos_
 
utility::vector1
< core::conformation::ResidueOP
alt_rots_
 
utility::vector1< int > alt_rot_inds_
 
utility::vector1< core::Sizeresid_2_moltenres_
 
utility::vector1< core::Sizemoltenres_2_resid_
 

Member Typedef Documentation

Constructor & Destructor Documentation

protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::OTFFlexbbInteractionGraph ( int  num_nodes)

GRAPH.

protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::~OTFFlexbbInteractionGraph ( )
overridedefault

Member Function Documentation

OTFFlexbbEdge const* protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::cast_otfflexbb_edge ( EdgeBase const *  edge) const
inlineprotected
OTFFlexbbEdge* protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::cast_otfflexbb_edge ( EdgeBase edge)
inlineprotected
unsigned int protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::count_dynamic_memory ( ) const
overridevirtual
void protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::debug_note_accepted_substitution ( )
void protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::debug_note_considered_substitution ( core::conformation::Residue const &  alt_rotamer,
int  index 
)
void protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::debug_note_projected_deltaE_of_considered_substitution ( PackerEnergy  deltaE,
PackerEnergy  node_alt_total,
bool  require_match = true 
)
void protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::debug_note_rejected_substitution ( )
OTFFlexbbEdge const* protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::find_otfflexbb_edge ( int  node1,
int  node2 
) const
inlineprotected
OTFFlexbbEdge* protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::find_otfflexbb_edge ( int  node1,
int  node2 
)
inlineprotected
OTFFlexbbNode const* protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::get_otfflexbb_node ( int  index) const
inlineprotected
OTFFlexbbNode* protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::get_otfflexbb_node ( int  index)
inlineprotected
OTFFlexbbInteractionGraph::PoseCOP protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::get_pose ( ) const

Edges request the pose and the score function at the time of their creation.

References pose_.

OTFFlexbbInteractionGraph::ScoreFunctionCOP protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::get_scorefxn ( ) const

References sfxn_.

void protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::initialize ( core::pack_basic::RotamerSetsBase const &  rot_sets)
overridevirtual
void protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::note_long_range_interactions_exist_for_edge ( int  node1,
int  node2 
)

Informs the edge connecting nodes 1 and 2 that they require long range interactions. Note – the edge must already exist.

References find_otfflexbb_edge(), and protocols::flexpack::interaction_graph::OTFFlexbbEdge::note_long_range_interactions_exist().

Referenced by protocols::flexpack::rotamer_set::FlexbbRotamerSets::compute_one_body_energies_for_otf_ig().

void protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::set_GlyCorrection_values_for_edge ( int  node1,
int  node2,
int  node_not_necessarily_glycine,
int  state,
int  other_bb,
PackerEnergy  bb_nonglybb_E,
PackerEnergy  bb_glybb_E,
PackerEnergy  sc_nonglybb_E,
PackerEnergy  sc_glybb_E 
)
void protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::set_pose ( Pose const &  pose)
virtual
void protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::set_ProCorrection_values_for_edge ( int  node1,
int  node2,
int  node_not_necessarily_proline,
int  state,
int  other_bb,
PackerEnergy  bb_nonprobb_E,
PackerEnergy  bb_probb_E,
PackerEnergy  sc_nonprobb_E,
PackerEnergy  sc_probb_E 
)
void protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::set_scorefxn ( ScoreFunction const &  sfxn)
virtual

Member Data Documentation

utility::vector1< int > protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::alt_rot_inds_
private
utility::vector1< core::conformation::ResidueOP > protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::alt_rots_
private
PoseOP protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::alternate_pose_
private
Real protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::alternate_pose_energy_
private
utility::vector1< core::Size > protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::changing_seqpos_
private
PoseOP protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::current_pose_
private

For debugging purposes.

Referenced by debug_note_projected_deltaE_of_considered_substitution(), and set_pose().

Real protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::current_pose_energy_
private
utility::vector1< core::Size > protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::moltenres_2_resid_
private

Referenced by initialize(), and set_pose().

OtherContextScoreFunctionOP protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::oc_sfxn_
private
PoseOP protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::pose_
private

Referenced by get_pose(), set_pose(), and set_scorefxn().

utility::vector1< core::Size > protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::resid_2_moltenres_
private
ScoreFunctionOP protocols::flexpack::interaction_graph::OTFFlexbbInteractionGraph::sfxn_
private

Referenced by get_scorefxn(), and set_scorefxn().


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