atlas.core.gui.widgets package
Reusable Qt widgets for the ATLAS GUI.
Submodules
atlas.core.gui.widgets.aiida_suggestions module
Fetch AiiDA entity lists for schema-form dropdown suggestions.
- atlas.core.gui.widgets.aiida_suggestions.fetch_aiida_suggestions() dict[str, list[str]]
Return cached suggestions, or fetch synchronously if cache is stale.
- atlas.core.gui.widgets.aiida_suggestions.fetch_aiida_suggestions_async(callback: Callable[[dict[str, list[str]]], None]) None
Populate suggestions via callback, without blocking the UI.
If the cache is warm the callback fires immediately (synchronously). Otherwise a background thread is started; the callback fires on the main thread when the query completes.
- atlas.core.gui.widgets.aiida_suggestions.invalidate_aiida_suggestions_cache() None
Reset the cache so the next call re-queries AiiDA.
atlas.core.gui.widgets.al_monitor_panel module
atlas.core.gui.widgets.al_outputs_panel module
atlas.core.gui.widgets.boundary_panel module
atlas.core.gui.widgets.collapsible_log_panel module
Foldable log panel with a toggle bar, unread badge, and smooth animation.
- class atlas.core.gui.widgets.collapsible_log_panel.CollapsibleLogPanel(*args: Any, **kwargs: Any)
Bases:
QWidgetLog panel that collapses to a toggle bar with an unread-line badge.
Signals
- toggledSignal(bool)
Emitted on expand/collapse with the new
expandedstate.
- append(text: str) None
Append text to the log viewer.
- clear() None
Clear the log viewer and reset the unread count.
- eventFilter(obj, event) bool
- set_theme(fg_color: str) None
Refresh the chevron icon for the current theme foreground colour.
- toggle() None
Toggle the expanded/collapsed state with animation.
- toggled
alias of
bool
- unread_count_changed
alias of
int
- viewer() PySide6.QtWidgets.QTextEdit
Return the internal
QTextEdit.
atlas.core.gui.widgets.config_panel module
Reusable TOML configuration editor for one schema section.
ConfigPanel wraps one or more SchemaForm instances, a description
viewer, a live TomlEditor, and the standard Load / Save / Validate
buttons. It is locked to a single top-level schema section (e.g.
database_generation) and is the building block of every workflow
page’s “Config” tab.
When sub_section_tabs is provided, the single long form is split into multiple inner tabs, each rendering only the specified sub-keys of the schema section. Data collection and population transparently span all tabs so the resulting TOML is identical to the single-form case.
- class atlas.core.gui.widgets.config_panel.ConfigPanel(*args: Any, **kwargs: Any)
Bases:
QWidgetEditor for one section of the ATLAS configuration schema.
- Parameters:
schema_data – The full parsed
config_schema.yamldictionary.section_key – Which top-level schema section this panel edits.
sub_section_tabs – Optional list of
(tab_label, [sub_key, …])tuples. When given, the single form is replaced by an innerQTabWidgetwhere each tab renders only the listed sub-keys.application_font – Font passed to the embedded schema form.
configurations. (Supports drag-and-drop of .toml files to import)
- add_action_button(button: PySide6.QtWidgets.QPushButton) None
- collect_data() dict
- current_toml() str
- dragEnterEvent(event) None
- dropEvent(event) None
- focus_field(field_key: str) bool
Switch to the tab containing field_key and scroll/focus it.
field_key is a dotted schema path component (e.g.
code_stringorqueue.code_string). Returns True if the field was found.
- load_data(data: dict) None
- load_toml_from_dialog() None
- parsed_config() tuple[dict | None, str | None]
- populate_suggestions(suggestions: dict[str, list[str]]) None
Forward AiiDA suggestions to every sub-form’s editable combos.
- refresh_toml_preview() None
- save_to_file(filepath: str | None = None) bool
- save_to_project(label: str | None = None) bool
- property section_key: str
- set_app_theme(theme_name: str) None
- set_suggestions_loading() None
Show a loading placeholder on every sub-form’s suggestion combos.
- set_theme(theme_name: str) None
- set_workflow_steps(steps: list[WorkflowStep], num_phases: int = 1, total_estimate: int | None = None) None
Populate the workflow diagram and make it the default view.
- validate_current() None
- validated
alias of
bool
- workflow_step_clicked
alias of
str
atlas.core.gui.widgets.db_manage_panel module
Database management panel, delete and export the initial database.
atlas.core.gui.widgets.dft_outputs_panel module
atlas.core.gui.widgets.dict_widgets module
Custom widgets for dict-type schema fields (kspacing, INCAR).
atlas.core.gui.widgets.error_analysis_panel module
atlas.core.gui.widgets.latent_space_gallery module
Latent space gallery, browse saved plots from AL iterations.
Scans the project directory for latent space plot images generated during active learning and displays them in a navigable gallery.
atlas.core.gui.widgets.periodic_table_widget module
Periodic table element picker with pill display.
- class atlas.core.gui.widgets.periodic_table_widget.ElementPickerField(*args: Any, **kwargs: Any)
Bases:
QWidgetCombines an element pill bar with a periodic table picker button.
Drop-in replacement for a QLineEdit that edits a comma-separated element list. Emits
elements_changedwhenever the selection changes.- elements() list[str]
- elements_changed
alias of
list
- setText(text: str) None
- set_elements(elements: list[str]) None
- text() str
atlas.core.gui.widgets.phase_card_panel module
Card-based phase editor for the Phase Diagram config section.
Instead of rendering each phase as a nested inline form, phases are displayed as compact summary cards in a flow grid. Adding or editing a phase opens a dialog with all the fields.
atlas.core.gui.widgets.preflight_panel module
Pre-flight check panel for workflow pages.
Shows a compact list of readiness checks (AiiDA profile, required config fields, etc.) that update live as the user edits the configuration. Each check is a single row with a pass/fail/skipped icon and a description.
- class atlas.core.gui.widgets.preflight_panel.Check(label: str, description: str, run: Callable[[], str | None], requires_aiida: bool = False, field_key: str = '')
Bases:
objectA single pre-flight check.
- description: str
- field_key: str = ''
- label: str
- requires_aiida: bool = False
- run: Callable[[], str | None]
- class atlas.core.gui.widgets.preflight_panel.PreflightPanel(*args: Any, **kwargs: Any)
Bases:
QFrameCollapsible pre-flight checklist.
- Parameters:
title – Header text (e.g. “Pre-flight checks”).
checks – List of
Checkobjects. Eachruncallable returnsNoneon success or an error string on failure. Checks withrequires_aiida=Trueare skipped (shown greyed) when the first check (AiiDA profile) fails.
- failing_summary() str | None
Return a human-readable summary of failing checks, or None.
- property has_errors: bool
- run_checks() list[str]
Execute all checks and update the UI. Returns error strings.
atlas.core.gui.widgets.schema_form module
Schema-driven Qt form widget for the ATLAS GUI.
SchemaForm reads ATLAS’ config_schema.yaml and builds a hierarchy of QFormLayout-based widgets for one selected top-level section (database_generation, active_learning, …). It owns the section selector, the scrollable form area, and the per-field schema metadata used by the coordinator to populate the description and TOML highlight panels.
Signals
- schema_loaded(sections)
Emitted after load_schema parses a YAML file successfully.
- section_changed(section_key)
Emitted when the user (or code) switches the active top-level section.
- data_changed()
Emitted whenever any field’s value changes, including dynamic add/remove.
- field_focused(description, value_type, schema_path, schema_key,
mandatory, default_value)
Emitted when a form widget gains focus; consumers can update a description panel or highlight the corresponding TOML line.
- class atlas.core.gui.widgets.schema_form.SchemaForm(*args: Any, **kwargs: Any)
Bases:
QWidgetSchema-driven form builder for one TOML configuration section.
- add_dynamic_item(key, name=None, data=None)
- available_sections() list[str]
- clear() None
- collect_data() dict
Walk the form and return a nested dict of current values.
- current_section() str | None
- eventFilter(source, event)
- field_focused
alias of
str
- iter_leaf_widgets() Iterator[PySide6.QtWidgets.QWidget]
Yield every leaf input widget in the active section, in form order.
- load_schema(filepath) bool
Parse the YAML schema at
filepath. Returns True on success.
- populate_from_data(data: dict) None
- populate_suggestions(suggestions: dict[str, list[str]]) None
Fill editable combo boxes tagged with a
suggestionskey.suggestions maps suggestion-key names (e.g.
"aiida_codes") to a list of strings. EveryQComboBoxwhosesuggestions_keyproperty matches a key gets its items replaced while preserving the current user text.
- schema_loaded
alias of
list
- section_changed
alias of
str
- set_current_section(key: str, sub_keys: list[str] | None = None) None
Build the form for
key.If sub_keys is given, only those top-level children of the section are rendered, useful for splitting a large section across multiple tabs.
Emits
section_changedanddata_changed.
- set_schema(schema_data: dict) None
Set the schema dict directly (e.g. when sharing across pages).
- set_suggestions_loading() None
Show a ‘Loading…’ placeholder on suggestion combo boxes.
atlas.core.gui.widgets.setup_wizard module
GUI setup wizard, mirrors atl_init_setup in a QWizard.
- class atlas.core.gui.widgets.setup_wizard.SetupStatusPanel(*args: Any, **kwargs: Any)
Bases:
QGroupBoxCompact panel showing current ATLAS setup status with a re-run button.
- refresh() None
- class atlas.core.gui.widgets.setup_wizard.SetupWizard(*args: Any, **kwargs: Any)
Bases:
QWizardATLAS setup wizard, GUI equivalent of
atl_init_setup.
- atlas.core.gui.widgets.setup_wizard.check_setup_problems() list[str]
Return a list of human-readable setup issues (empty = all OK).
- atlas.core.gui.widgets.setup_wizard.needs_first_run_wizard() bool
Return True if ATLAS has never been set up (no secrets.json).
atlas.core.gui.widgets.side_panel module
Blender-style switchable panel with a vertical icon strip.
SidePanel presents a narrow column of icon buttons on the left edge
and a QStackedWidget on the right. Clicking a button switches the
visible content pane. Each pane is registered via add_view().
- class atlas.core.gui.widgets.side_panel.SidePanel(*args: Any, **kwargs: Any)
Bases:
QWidgetSwitchable panel with vertical icon-button strip.
- add_view(icon_name: str, tooltip: str, widget: PySide6.QtWidgets.QWidget, *, visible: bool = True) int
Register a content pane and return its index.
- current_view() int
- hide_view(index: int) None
- set_current_view(index: int) None
- set_theme(theme_name: str) None
- showEvent(event) None
- show_view(index: int) None
- view_changed
alias of
int
atlas.core.gui.widgets.structure_viewer module
atlas.core.gui.widgets.structures_panel module
atlas.core.gui.widgets.toml_editor module
TOML preview editor and syntax highlighter for the ATLAS GUI.
TomlHighlighter colours TOML text using one of several palettes. TomlEditor wraps a QTextEdit with the highlighter, theme switching, and a schema-path-aware line highlight helper.
- class atlas.core.gui.widgets.toml_editor.TomlEditor(*args: Any, **kwargs: Any)
Bases:
QWidgetEditable TOML preview with syntax highlighting and path-based line highlight.
Signals
- user_edited
Emitted when the user (not programmatic code) modifies the text.
- clear_highlight()
- highlight_path(path)
Highlight the line whose dotted key matches
path.pathis a sequence of section/key segments (as stored in the YAML schema). Missing entries are silently ignored.
- plain_text()
- set_text(text)
Set the editor contents without emitting user_edited.
- set_theme(theme_name)
Switch the syntax highlighting theme.
- class atlas.core.gui.widgets.toml_editor.TomlHighlighter(*args: Any, **kwargs: Any)
Bases:
QSyntaxHighlighterSyntax highlighter for TOML with multiple colour themes.
- THEMES = {'Catppuccin Latte': {'background': None, 'comment': '#9ca0b0', 'keyword': '#8839ef', 'number': '#e64553', 'section': '#40a02b', 'string': '#d20f39'}, 'Default': {'background': None, 'comment': '#808080', 'keyword': '#0033cc', 'number': '#c500c5', 'section': '#107c10', 'string': '#A31515'}, 'Gruvbox Light': {'background': None, 'comment': '#928374', 'keyword': '#427b58', 'number': '#8f3f71', 'section': '#79740e', 'string': '#9d0006'}, 'Solarized Light': {'background': '#fdf6e3', 'comment': '#93a1a1', 'keyword': '#d33682', 'number': '#cb4b16', 'section': '#859900', 'string': '#dc322f'}}
- highlightBlock(text)
Apply syntax highlighting to the given block of text.
atlas.core.gui.widgets.training_report_panel module
atlas.core.gui.widgets.validation_dialog module
Validation error dialog with clickable field links.
- class atlas.core.gui.widgets.validation_dialog.ValidationDialog(*args: Any, **kwargs: Any)
Bases:
QDialogDialog to display validation errors with clickable links to fields.
atlas.core.gui.widgets.workflow_view module
Interactive workflow diagram for ATLAS pipeline visualisation.
WorkflowView renders a top-down flowchart of pipeline steps. Each
step box shows its name, an optional structure-count estimate, and is
coloured by category. Clicking a step emits the step_clicked signal so
the host can navigate to the relevant configuration fields.
- class atlas.core.gui.widgets.workflow_view.WorkflowStep(name: str, description: str = '', estimated_count: int | None = None, is_active: bool = True, config_key: str = '', category: str = 'generation', is_filter: bool = False, group: str = '')
Bases:
objectOne step in the pipeline diagram.
- category: str = 'generation'
- config_key: str = ''
- description: str = ''
- estimated_count: int | None = None
- group: str = ''
- is_active: bool = True
- is_filter: bool = False
- name: str
- class atlas.core.gui.widgets.workflow_view.WorkflowView(*args: Any, **kwargs: Any)
Bases:
QWidgetScrollable workflow diagram.
Wraps
_WorkflowCanvasinside aQScrollAreaand exposes a convenience API for setting step data and receiving click signals.- set_steps(steps: Sequence[WorkflowStep], num_phases: int = 1, total_estimate: int | None = None) None
- set_theme(theme_name: str) None
- step_clicked
alias of
str
Module contents
Reusable Qt widgets for the ATLAS GUI.