mdadash.backend.widgets.base

Base Class for Widgets and Widget Manager

Classes

WidgetBase()

This is the base class for all widgets.

WidgetManager()

This is the manager that manager all widgets.

class mdadash.backend.widgets.base.WidgetBase[source]

Bases: ABC

This is the base class for all widgets.

abstractmethod run(u)[source]

Run method that derived classes implement

class mdadash.backend.widgets.base.WidgetManager[source]

Bases: object

This is the manager that manager all widgets.

add_widget_instance(widget_name: str) str | None[source]

Add widget instance

Add a widget instance based on the widget name already registered with the manager.

Parameters:

widget_name (str) – Name of the widget class registered

Return type:

uuid of instance added or None

property classes

Dictionary of registered widget classes keyed by widget name

delete_widget_instance(uuid: str) str | None[source]

Remove widget instance

Remove widget instanced based on uuid returned during the instance creation using add_widget_instance()

Parameters:

uuid (str) – The uuid of the instance to be removed

Return type:

uuid of instance deleted or None

property instances

Dictionary of widget instances keyed by widget uuid

classmethod register_class(widget_class: WidgetBase) None[source]

Register widget class

Parameters:

widget_class – A widget class that is derived from WidgetBase

run_widgets(u: Universe) None[source]

Run widget instances

Parameters:

u (mda.Universe) – The universe object to use for analysis