visualization#
network_visualization.visualization#
- konnektor.visualization.visualization.draw_ligand_network(network: LigandNetwork, title: str = '', ax: Axes = None, node_size: int = 2050, edge_width: int = 3, fontsize: int = 18) Figure#
visualize a LigandNetwork as matplotlib plot, indicating the graph topology.
- Parameters:
network (LigandNetwork) – The network to be visualized
title (str, optional) – plot title
ax (plt.Axes, optional) – don’t build new figure, if axes given, but add img to axes
node_size (int, optional) – size of the node visualization. (default 2050)
edge_width (int, optional) – width of drawn edges. (default 3)
fontsize (int, optional) – fontsize of labels. (default 18)
- Returns:
return the matplotlib figure
- Return type:
plt.Figure
- konnektor.visualization.visualization.get_node_connectivities(cg: Graph) list[int]#
The connectivity of each node
network_visualization.widget#
- konnektor.visualization.widget.draw_network_widget(network: LigandNetwork, layout: str = 'cose', show_molecules: bool = True, represent_molecules_twoD: bool = False, show_mappings: bool = False) CytoscapeWidget#
For use in a jupyter noterbook, visualise a LigandNetwork
- Parameters:
network (gufe.LigandNetwork) – the network to visualise
layout (str, optional) – how to initially layout the nodes, can be one of X/Y/Z defaults to ‘cose’
show_molecule (bool, optional) – if to show molecule images on the representation, default True
represent_molecules_twoD (bool, optional) – show the molecules in the nodes as 2D representations.
show_mappings (bool, optional) – if to show mapping images on the representation, default False
- konnektor.visualization.widget.get_node_connectivities(cg: LigandNetwork) list[int]#
The connectivity of each node
- konnektor.visualization.widget.map2svg(mapping: AtomMapping) str#
- konnektor.visualization.widget.mol2svg(mol: Mol, represent_molecules_twoD: bool = False) str#