Graphical User Interface

The GUI module provides graphical interface components for HBAT.

Main Window

Main GUI window for HBAT application.

This module provides the main tkinter interface for the HBAT application, allowing users to load PDB files, configure analysis parameters, and view results.

class hbat.gui.main_window.MainWindow[source]

Bases: object

Main application window for HBAT.

This class provides the primary GUI interface for HBAT, including file loading, parameter configuration, analysis execution, and results visualization.

Parameters:

None – This class takes no parameters during initialization

__init__() None[source]

Initialize the main window.

Sets up the complete GUI interface including menus, toolbar, main content area, and status bar.

Returns:

None

Return type:

None

run() None[source]

Start the GUI application.

Enters the main GUI event loop to begin accepting user interactions. This method blocks until the application is closed.

Returns:

None

Return type:

None

Parameter Panel

Parameter configuration panel for HBAT analysis.

This module provides the GUI components for configuring analysis parameters such as distance cutoffs, angle thresholds, and analysis modes.

class hbat.gui.parameter_panel.ParameterPanel(parent)[source]

Bases: object

Panel for configuring analysis parameters.

This class provides a GUI interface for setting all analysis parameters including distance cutoffs, angle thresholds, and analysis modes. Supports parameter presets and real-time validation.

Parameters:

parent (tkinter widget) – Parent widget to contain this panel

__init__(parent) None[source]

Initialize the parameter panel.

Creates the complete parameter configuration interface with organized sections for different interaction types.

Parameters:

parent (tkinter widget) – Parent widget (typically a notebook or frame)

Returns:

None

Return type:

None

get_parameters() AnalysisParameters[source]

Get current parameter values as AnalysisParameters object.

Retrieves all current parameter settings from the GUI controls and packages them into an AnalysisParameters object.

Returns:

Current analysis parameters

Return type:

AnalysisParameters

set_parameters(params: AnalysisParameters) None[source]

Set parameter values from AnalysisParameters object.

Updates all GUI controls to reflect the values in the provided AnalysisParameters object.

Parameters:

params (AnalysisParameters) – Analysis parameters to set

Returns:

None

Return type:

None

reset_to_defaults() None[source]

Public method to reset parameters to defaults.

Resets all parameter controls to their default values as defined in the application constants.

Returns:

None

Return type:

None

Results Panel

Results display panel for HBAT analysis.

This module provides GUI components for displaying analysis results including hydrogen bonds, halogen bonds, and π interactions.

class hbat.gui.results_panel.ResultsPanel(parent)[source]

Bases: object

Panel for displaying analysis results.

This class provides a tabbed interface for viewing different types of molecular interaction results including summaries, detailed lists, and statistical analysis.

Parameters:

parent (tkinter widget) – Parent widget to contain this panel

__init__(parent) None[source]

Initialize the results panel.

Creates a complete results display interface with multiple tabs for different views of analysis results.

Parameters:

parent (tkinter widget) – Parent widget

Returns:

None

Return type:

None

update_results(analyzer: HBondAnalyzer) None[source]

Update the results panel with new analysis results.

Refreshes all result displays with data from the provided analyzer instance.

Parameters:

analyzer (HBondAnalyzer) – HBondAnalyzer instance with results

Returns:

None

Return type:

None

clear_results() None[source]

Clear all results from the panel.

Removes all displayed results and resets the panel to its initial empty state.

Returns:

None

Return type:

None

Chain Visualization

Chain visualization window for HBAT cooperative hydrogen bond analysis.

This module provides a dedicated window for visualizing cooperative hydrogen bond chains using NetworkX and matplotlib with ellipse-shaped nodes.

class hbat.gui.chain_visualization.ChainVisualizationWindow(parent, chain, chain_id)[source]

Bases: object

Window for visualizing cooperative hydrogen bond chains.

This class creates a dedicated visualization window for displaying cooperative interaction chains using NetworkX graphs and matplotlib.

Parameters:
  • parent (tkinter widget) – Parent widget

  • chain (CooperativityChain) – CooperativityChain object to visualize

  • chain_id (str) – String identifier for the chain

__init__(parent, chain, chain_id) None[source]

Initialize the chain visualization window.

Sets up the visualization window with NetworkX graph rendering capabilities for displaying cooperative interaction chains.

Parameters:
  • parent (tkinter widget) – Parent widget

  • chain (CooperativityChain) – CooperativityChain object to visualize

  • chain_id (str) – String identifier for the chain

Returns:

None

Return type:

None