Notebook Visualization — mdpath.src.notebook_vis

This module contains the NotebookVisualization class which visualizes the structure and calculated paths in a Jupyter notebook using NGLView.

Classes

NotebookVisualization

class mdpath.src.notebook_vis.NotebookVisualization(pdb_path: str, json_path: str)[source]

Bases: object

Visualization of the structure and calculated paths in a Jupyter notebook using NGLView.

Attributes:

pdb_path (str): Path to the PDB file for visualization.

view (nv.NGLWidget): NGL view object for visualizing the PDB file.

json_path (str): Path to the JSON file containing precomputed cluster properties for visualization.

precomputed_data (dict): Dictionary containing precomputed cluster properties for visualization.

generate_cluster_ngl_script() None[source]

Generates NGL script and edits view for visualizing precomputed cluster pathways as cones between residues.

Returns:

None: Only edits the view object.

load_ngl_view()[source]

Loads the NGL view object for visualizing the PDB file.

Returns:

nv.NGLWidget: NGL view object of the PDB file.

load_precomputed_data() dict[source]

Loads precomputed cluster properties from a JSON file.

Returns:

dict: Dictionary containing precomputed cluster properties for visualization