API Documentation for visualization

class Visualizer(md, cloud_path, ligname, special)

Visualizes the OpenMMDL Analysis output of the trajectories with annotated interaction clouds and water molecule interactions.

The class provides tools to render 3D molecular scenes using NGLview, including trajectory visualization, ligand highlighting, interacting water molecules, and various interaction cloud types (e.g., hydrogen bonds, hydrophobic regions, etc.).

Parameters:

cloud_path (str) – Path to the location where the JSON file containing interaction cloud coordinates is.

Variables:
  • md (mda.Universe) – The loaded trajectory and topology data used for visualization.

  • cloud (dict) – Dictionary parsed from the JSON file representing interaction clouds (e.g., hydrophobic, donor, etc.).

  • ligname (str) – Ligand selection string used in NGLview for highlighting.

  • special (str) – Additional selection string for visual emphasis (can be None).

_load_cloud(cloud_path)

Loads interaction clouds from a JSON file.

Parameters:

cloud_path (str) – Path to the JSON file containing the interaction clouds.

Returns:

Dictionary representing different types of interaction clouds and their properties.

Return type:

dict

visualize(receptor_type='protein or nucleic', height='1000px', width='1000px')

Generates visualization of the trajectory with the interacting waters and interaction clouds.

Parameters:
  • receptor_type (str) – Type of receptor. Defaults to ‘protein or nucleic’.

  • height (str) – Height of the visualization. Defaults to ‘1000px’.

  • width (str) – Width of the visualization. Defaults to ‘1000px’.

Returns:

Returns an nglview.widget object containing the visualization

Return type:

nglview.NGLWidget

run_visualization()

Runs the visualization notebook in the current directory. The visualization notebook is copied from the package directory to the current directory and automaticaly started.

Returns:

None

Return type:

None