pyemap.shortest_paths.dijkstras_shortest_paths
- pyemap.shortest_paths.dijkstras_shortest_paths(G, start, targets)[source]
Returns shortest path from source to each surface exposed residue.
Performs Dijkstra’s algorithm from the source to each surface exposed residue, finding the shortest path. The ShortestPath objects are organized into branches based on the first surface exposed residue reached during the course of the pathway.
- Parameters:
G (
networkx.Graph) – Undirected, weighted residue graphstart (str) – Source node
targets (list of str) – List of surface exposed residues
- Returns:
branches – A list of Branch objects representing the groups of pathways found
- Return type:
list of
Branch- Raises:
RuntimeError: – No shortest paths to surface found