mdonatello.mdonatello.MoleculeVisualizer

class mdonatello.mdonatello.MoleculeVisualizer(ag: AtomGroup, show_atom_indices: bool = False, width: int = -1, height: int = -1)[source]

A class for small molecule 2D visualization in jupyter notebook

Parameters:

agMDAnalysis.core.groups.AtomGroup

An AtomGroup object representing the molecules that need to be visualized.

show_atom_indicesbool, optional

Whether to display atom indices of the molecule. Default is False.

widthint, optional

The width of the image in pixels. Default is -1.

heightint, optional

The height of the image in pixels. Default is -1.

__init__(ag: AtomGroup, show_atom_indices: bool = False, width: int = -1, height: int = -1)[source]

Initializes the MoleculeVisualizer with an AtomGroup and visualization options.

Methods

__init__(ag[, show_atom_indices, width, height])

Initializes the MoleculeVisualizer with an AtomGroup and visualization options.

initialize_output()

Initializes the output display and arranges the widgets in the interface.

initialize_widgets()

Initializes the interactive widgets for molecule visualization.

link_widget_callbacks()

Links the interactive widgets to the update_display method to reflect changes.

save_selected_molecule(_)

Saves the currently selected molecule as a PNG file.

update_display([_])

Updates the molecule display based on the current selections.