ShortestPath

ShortestPaths are stored in the paths dictionary of the emap object. The keys are the path IDs.

>>> print(my_emap.paths['1a'])
>>> 1a: ['FAD510(A)-2', 'W356(A)'] 9.48
class pyemap.ShortestPath(path, edges, length)[source]

Data structure used to store shortest paths.

Contains functions for comparison and string representation, both for the user output and in NGL viewer selection language for the purpose of visualization. Sorting for ShortestPath objects is done based on the length attribute.

path

List of residue names that make up the shortest path

Type:

list of str

edges

List of edge weights that make up the shortest path

Type:

list of float

path_id

List of residues that make up the shortest path

Type:

list of str

length

Total distance from source to target

Type:

float

selection_strs

NGL selection strings for visualization

Type:

list of str

color_list

Colors of residues in visualization

Type:

list of str

labeled_atoms

Atom names which are labeled in NGL visualization

Type:

list of str

label_texts

Labels of residues in NGL visualization

Type:

list of str

set_id(path_id)[source]

Setter for path_id

set_visualization(selection_strs, color_list, labeled_atoms, label_texts)[source]

Saves information needed for NGL visualization.