|
Rosetta 3.5
|
A simple graph class for calculating pairwise decomposable energies as sidechains are moving on a fixed backbone. This class is responsible for calculating energy changes, but is passive about how the sidechains are changing. There are two main ways to drive the graph: one where the graph ACTIVELY takes charge of updating pointers to the sidechains, where, each external change of one pointer triggers an update to the energies; and a second, where the graph is PASSIVE wrt the pointers, and they must be maintained by an external driver. More...
#include <SimpleInteractionGraph.hh>


Public Member Functions | |
| SimpleInteractionGraph () | |
| virtual | ~SimpleInteractionGraph () |
| void | set_scorefunction (scoring::ScoreFunction const &sfxn) |
| scoring::ScoreFunction const & | scorefunction () const |
| pose::Pose const & | pose () const |
| void | initialize (pose::Pose const &pose) |
| Initialization where the graph adds its own edges. More... | |
| void | set_pose_no_initialize (pose::Pose const &pose) |
| void | commit_change (Size node_id) |
| void | reject_change (Size node_id) |
| Real | consider_substitution (Size node_id, conformation::ResidueCOP new_state) |
| Real | total_energy () |
| virtual Size | count_static_memory () const |
| virtual Size | count_dynamic_memory () const |
| virtual void | delete_edge (graph::Edge *) |
| remove an edge from the graph. (NEW AS OF 12/9/07) Never call C++'s "delete" function on an edge pointer directly. Derived classes must implement this function. If they wish to use unordered_object_pools to manage their memory More... | |
| SimpleNode * | get_simple_node (Size ind) |
| SimpleNode const * | get_simple_node (Size ind) const |
Public Member Functions inherited from core::graph::Graph | |
| virtual | ~Graph () |
| virtual destructor. Derived classes must ensure they've destroyed all their nodes and edges through a call to "destroy_everything" before this function is arrived at More... | |
| Graph () | |
| ctor More... | |
| Graph (platform::Size num_nodes) | |
| num nodes ctor More... | |
| Graph (Graph const &source) | |
| copy ctor. Must not be called by derived class copy ctors. More... | |
| Graph & | operator= (Graph const &source) |
| assignment operator. source and this must have the same type. More... | |
| void | copy_connectivity (Graph const &source) |
| copy the edge connectivity from a source graph with a potentially unknown type. More... | |
| platform::Size | num_nodes () const |
| the number of nodes in the graph More... | |
| void | set_num_nodes (platform::Size num_nodes) |
| set the number of nodes in the graph – deletes any existing edges in the graph More... | |
| Edge * | add_edge (platform::Size node1, platform::Size node2) |
| add an edge between two vertices. Invokes "create_edge" from the derived class. Returns a pointer to the edge after its been added, allowing the calling function to immediately set data for this edge. More... | |
| Edge * | add_edge (Edge const *example_edge) |
| add an edge to this graph copying the data from an edge in another graph. Returns a pointer to the edge after its been added, allowing the calling function to immediately set data for this edge. More... | |
| bool | get_edge_exists (platform::Size node1, platform::Size node2) const |
| is an edge already present in the graph? O(V) worst case. O(1) iff all vertices have O(1) edges More... | |
| void | drop_all_edges () |
| delete all the edges present in the graph More... | |
| void | drop_all_edges_for_node (platform::Size node) |
| delete all the edges for a single vertex in the graph More... | |
| void | print_vertices () const |
| send summary information to the screen for all vertices in the graph More... | |
| void | output_connectivity (std::ostream &os) const |
| send an edge list to the stream os. More... | |
| void | output_dimacs (std::ostream &os) const |
| describe this graph in dimacs form to the stream os. More... | |
| ObjexxFCL::FArray2D_int | all_pairs_shortest_paths () const |
| O(V^3). Computes all pairs shortest paths using Warshall's algorithm and writes all the path distances to the two-dimensional table. More... | |
| Node const * | get_node (platform::Size index) const |
| Node * | get_node (platform::Size index) |
| platform::Size | num_edges () const |
| EdgeListConstIter | const_edge_list_begin () const |
| returns a const iterator to the beginning of the (unordered) edge list for the graph. this edge list contains all the edges in the graph, not simply those for a particular vertex More... | |
| EdgeListIter | edge_list_begin () |
| returns a non-const iterator to the beginning of the (unordered) edge list for the graph. this edge list contains all the edges in the graph, not simply those for a particular vertex More... | |
| EdgeListConstIter | const_edge_list_end () const |
| returns a const iterator to the end of the (unordered) edge list for the graph. this edge list contains all the edges in the graph, not simply those for a particular vertex More... | |
| EdgeListIter | edge_list_end () |
| returns a non-const iterator to the end of the (unordered) edge list for the graph. this edge list contains all the edges in the graph, not simply those for a particular vertex More... | |
| Edge * | find_edge (platform::Size node1, platform::Size node2) |
| returns a pointer to the edge connecting nodes node1 and node2, if that edge exists in the graph, o.w. returns 0. Focuses the graph on this edge for fast subsequent retrieval. More... | |
| Edge const * | find_edge (platform::Size node1, platform::Size node2) const |
| returns a const pointer to the edge connecting nodes node1 and node2, if that edge exists in the graph, o.w. returns 0. Focuses the graph on this edge for fast subsequent retrieval. More... | |
| Edge * | focused_edge () |
| returns a pointer to the focused edge More... | |
| Edge const * | focused_edge () const |
| returns a const-pointer to the focused edge More... | |
| platform::Size | getTotalMemoryUsage () const |
| returns a count of all the memory used by every vertex and edge in a graph by invoking the polymorphic count_static_memory and count_dynamic_memory of each (possibly derived) node and edge object as well as for the (possibly derived) graph class. More... | |
Protected Member Functions | |
| virtual graph::Node * | create_new_node (Size node_index) |
| factory method for node creation, defined by derived graph classes, called by the base class More... | |
| virtual graph::Edge * | create_new_edge (Size index1, platform::Size index2) |
| factory method for edge creation, defined by derived graph classes, called by the base class More... | |
Protected Member Functions inherited from core::graph::Graph | |
| void | drop_edge (EdgeListIter edge_iter) |
| remove an edge from the entire-graph edge list. Called only by class Edge during its destructor More... | |
| void | delete_everything () |
| deallocate all nodes and edges from the graph More... | |
| virtual Edge * | create_new_edge (Edge const *example_edge) |
| factory method for edge copy-construction. Derived class should downcast the example_edge pointer and may read that edge's data. More... | |
| boost::unordered_object_pool < EdgeListElement > & | edge_list_element_pool () |
| Used by class Node only, this is the pool from which edge lists are to allocate their edge lists elements from. More... | |
Private Attributes | |
| scoring::ScoreFunctionOP | sfxn_ |
| pose::PoseCOP | pose_ |
| Real | accumulated_ediff_ |
Additional Inherited Members | |
Public Types inherited from core::graph::Graph | |
| typedef utility::vector1< Node * > | NodeVector |
| typedef Node::EdgeListIter | EdgeListIter |
| typedef Node::EdgeListConstIter | EdgeListConstIter |
| typedef utility::pointer::ReferenceCount | parent |
A simple graph class for calculating pairwise decomposable energies as sidechains are moving on a fixed backbone. This class is responsible for calculating energy changes, but is passive about how the sidechains are changing. There are two main ways to drive the graph: one where the graph ACTIVELY takes charge of updating pointers to the sidechains, where, each external change of one pointer triggers an update to the energies; and a second, where the graph is PASSIVE wrt the pointers, and they must be maintained by an external driver.
Definition at line 259 of file SimpleInteractionGraph.hh.
| core::pack::interaction_graph::SimpleInteractionGraph::SimpleInteractionGraph | ( | ) |
Definition at line 525 of file SimpleInteractionGraph.cc.
|
virtual |
Definition at line 532 of file SimpleInteractionGraph.cc.
| void core::pack::interaction_graph::SimpleInteractionGraph::commit_change | ( | Size | node_id) |
Definition at line 595 of file SimpleInteractionGraph.cc.
References core::graph::Graph::get_node().
Referenced by core::pack::stochastic_pack().
| Real core::pack::interaction_graph::SimpleInteractionGraph::consider_substitution | ( | Size | node_id, |
| conformation::ResidueCOP | new_state | ||
| ) |
Note, this function returns (currE - altE) which represents the negative of the change in energy for the substition
Definition at line 609 of file SimpleInteractionGraph.cc.
References core::pack::interaction_graph::SimpleNode::current_one_body_energy(), core::graph::Node::edge_list_begin(), core::graph::Node::edge_list_end(), core::pack::interaction_graph::SimpleEdge::get_current_energy(), core::graph::Graph::get_node(), core::pack::interaction_graph::SimpleEdge::get_proposed_energy(), core::pack::interaction_graph::SimpleNode::proposed_one_body_energy(), and core::pack::interaction_graph::SimpleNode::set_alternate().
Referenced by core::pack::stochastic_pack().
|
inlinevirtual |
Reimplemented from core::graph::Graph.
Definition at line 294 of file SimpleInteractionGraph.hh.
|
inlinevirtual |
Reimplemented from core::graph::Graph.
Definition at line 293 of file SimpleInteractionGraph.hh.
|
protectedvirtual |
factory method for edge creation, defined by derived graph classes, called by the base class
factory method for edge creation Should be overriden in derived classes
Reimplemented from core::graph::Graph.
Definition at line 658 of file SimpleInteractionGraph.cc.
|
protectedvirtual |
factory method for node creation, defined by derived graph classes, called by the base class
factory method for node creation Should be overriden in derived classes
Reimplemented from core::graph::Graph.
Definition at line 654 of file SimpleInteractionGraph.cc.
|
virtual |
remove an edge from the graph. (NEW AS OF 12/9/07) Never call C++'s "delete" function on an edge pointer directly. Derived classes must implement this function. If they wish to use unordered_object_pools to manage their memory
Reimplemented from core::graph::Graph.
Definition at line 662 of file SimpleInteractionGraph.cc.
|
inline |
Definition at line 299 of file SimpleInteractionGraph.hh.
References core::graph::Graph::get_node().
Referenced by core::pack::compare_simple_inteaction_graph_alt_state_and_energy_graph().
|
inline |
Definition at line 304 of file SimpleInteractionGraph.hh.
References core::graph::Graph::get_node().
| void core::pack::interaction_graph::SimpleInteractionGraph::initialize | ( | pose::Pose const & | pose) |
Initialization where the graph adds its own edges.
Definition at line 541 of file SimpleInteractionGraph.cc.
References core::graph::Graph::add_edge(), core::pack::interaction_graph::SimpleEdge::compute_energy(), core::graph::Graph::find_edge(), core::graph::Graph::get_edge_exists(), core::graph::Graph::get_node(), core::graph::Graph::num_nodes(), pose_, core::pack::interaction_graph::SimpleNode::set_current(), core::graph::Graph::set_num_nodes(), set_pose_no_initialize(), sfxn_, core::pose::Pose::total_residue(), and core::pack::interaction_graph::TR().
|
inline |
Definition at line 274 of file SimpleInteractionGraph.hh.
References pose_.
Referenced by core::pack::interaction_graph::SimpleEdge::compute_energy(), core::pack::interaction_graph::SimpleEdge::get_bb_E(), core::pack::interaction_graph::SimpleNode::update_alternate_one_body_energy(), and core::pack::interaction_graph::SimpleNode::update_current_one_body_energy().
| void core::pack::interaction_graph::SimpleInteractionGraph::reject_change | ( | Size | node_id) |
Definition at line 602 of file SimpleInteractionGraph.cc.
References core::graph::Graph::get_node().
Referenced by core::pack::stochastic_pack().
|
inline |
Definition at line 269 of file SimpleInteractionGraph.hh.
References sfxn_.
Referenced by core::pack::interaction_graph::SimpleEdge::compute_energy(), core::pack::interaction_graph::SimpleEdge::get_bb_E(), core::pack::interaction_graph::SimpleNode::update_alternate_one_body_energy(), and core::pack::interaction_graph::SimpleNode::update_current_one_body_energy().
| void core::pack::interaction_graph::SimpleInteractionGraph::set_pose_no_initialize | ( | pose::Pose const & | pose) |
Definition at line 580 of file SimpleInteractionGraph.cc.
References core::graph::Graph::get_node(), core::graph::Graph::num_nodes(), pose_, core::pack::interaction_graph::SimpleNode::set_current(), core::graph::Graph::set_num_nodes(), and core::pose::Pose::total_residue().
Referenced by initialize(), and core::pack::stochastic_pack().
| void core::pack::interaction_graph::SimpleInteractionGraph::set_scorefunction | ( | scoring::ScoreFunction const & | sfxn) |
Definition at line 534 of file SimpleInteractionGraph.cc.
References sfxn_.
Referenced by core::pack::stochastic_pack().
| Real core::pack::interaction_graph::SimpleInteractionGraph::total_energy | ( | ) |
Definition at line 637 of file SimpleInteractionGraph.cc.
References core::graph::Graph::get_node(), core::pack::interaction_graph::SimpleNode::one_body_energy(), pose_, core::graph::Node::upper_edge_list_begin(), and core::graph::Node::upper_edge_list_end().
Referenced by core::pack::stochastic_pack().
|
private |
Definition at line 319 of file SimpleInteractionGraph.hh.
|
private |
Definition at line 318 of file SimpleInteractionGraph.hh.
Referenced by initialize(), pose(), set_pose_no_initialize(), and total_energy().
|
private |
Definition at line 317 of file SimpleInteractionGraph.hh.
Referenced by initialize(), scorefunction(), and set_scorefunction().
1.8.4