aiidalab_chemshell.common package¶
Submodules¶
aiidalab_chemshell.common.chemshell module¶
Module containing common settings for configuring ChemShell.
- class aiidalab_chemshell.common.chemshell.BasisSetOptions(*values)¶
Bases:
EnumPre-defined basis set levels for simplified ChemShell inputs.
- BALANCED = 1¶
- FAST = 0¶
- QUALITY = 2¶
- property label: str¶
Convert enum value to a string representation for ChemShell input.
- class aiidalab_chemshell.common.chemshell.WorkflowOptions(*values)¶
Bases:
EnumEnum defining the available ChemShell based AiiDA workflows.
- ATOMIC_ENERGIES = 2¶
- GEOMETRY = 0¶
- NEB = 3¶
- SINGLE_POINT = 1¶
- property label: str¶
Convert enum value into a more human readable string.
- property tab_label: str¶
Create a tab title for the given enum option.
aiidalab_chemshell.common.node_viewers module¶
Defines a custom AiiDA node visualiser.
- class aiidalab_chemshell.common.node_viewers.CustomAiidaNodeViewWidget(*args: t.Any, **kwargs: t.Any)¶
Bases:
VBoxCustom viewer based on a specific AiiDA node type.
An extension of the aiida_widgets_base.viewers.AiidaNodeViewWidget enabling more customisability when registering viewers with nodes returned from ChemShell jobs. The main outline is taken from the base aiidalab_widgets_base viewer with an extended viewer() method which allows handling of node types which the base viewer has no registered visualisation widgets.
- node¶
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
Subclasses can declare default classes by overriding the klass attribute
- class aiidalab_chemshell.common.node_viewers.VibrationalModesViewWidget(*args: t.Any, **kwargs: t.Any)¶
Bases:
VBoxCustom widget to display vibrational modes produced from ChemShell.
aiidalab_chemshell.common.structure_uploader module¶
Widget for selecting an input structure from various sources.
- class aiidalab_chemshell.common.structure_uploader.StructureSelectionWidget(*args: t.Any, **kwargs: t.Any)¶
Bases:
VBox,HasTraitsWidget for selecting an input structre from various sources.
- disable(val: bool = True) None¶
Disable the widget and all children.
- structure_data¶
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
Subclasses can declare default classes by overriding the klass attribute
- structure_file¶
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
Subclasses can declare default classes by overriding the klass attribute
- trajectory_data¶
A trait whose value must be an instance of a specified class.
The value can also be an instance of a subclass of the specified class.
Subclasses can declare default classes by overriding the klass attribute
aiidalab_chemshell.common.theme module¶
Central visual theme for the AiiDAlab ChemShell application.
This module provides a single stylesheet, injected once at the application root, that gives the app a consistent modern look. It is built on CSS custom properties (design tokens) so the whole app can be retuned from one place, and so that dark mode is a matter of overriding a handful of variables.
Usage¶
Add APP_ROOT_CLASS to the top-level application container and include the
widget returned by chemshell_theme() once among its children:
view = ipw.VBox(children=[chemshell_theme(), header, body, footer])
view.add_class(APP_ROOT_CLASS)
All rules are scoped under .{APP_ROOT_CLASS} so the theme does not leak into
other AiiDAlab apps sharing the same page. The design tokens live on :root
(they are inert until referenced by a scoped rule).
- aiidalab_chemshell.common.theme.APPBAR_CLASS = 'chemshell-appbar'¶
CSS class applied to the header “app bar” (logo, subtitle and quick-access buttons). See
chemshell_appbar().
- aiidalab_chemshell.common.theme.APP_ROOT_CLASS = 'chemshell-app'¶
CSS class applied to the top-level application container. All theme rules are scoped under this class.
- aiidalab_chemshell.common.theme.chemshell_appbar(children)¶
Return a header “app bar”
VBoxwrapping the given children.The returned box carries
APPBAR_CLASSand is styled as a muted surface band. Intended to hold the logo, subtitle and quick-access buttons at the top of a page.- Parameters:
children (list of ipywidgets.Widget) – Widgets to place inside the app bar (e.g. logo, subtitle, nav buttons).
- Returns:
The styled app-bar container.
- Return type:
ipywidgets.VBox
- aiidalab_chemshell.common.theme.chemshell_theme()¶
Return an
HTMLwidget carrying the application theme stylesheet.Include the returned widget once among the children of the top-level application container, and apply
APP_ROOT_CLASSto that container. The<style>block is global to the page, so a single instance suffices.- Returns:
A hidden widget holding the stylesheet.
- Return type:
ipywidgets.HTML
aiidalab_chemshell.common.utils module¶
Small common widgets used accross the application.
- aiidalab_chemshell.common.utils.CHEMSHELL_BUTTON_CLASS = 'chemshell-sleek-btn'¶
CSS class applied to buttons that should use the sleek/modern styling.
- class aiidalab_chemshell.common.utils.LoadingWidget(*args: t.Any, **kwargs: t.Any)¶
Bases:
HBoxWidget for displaying a loading spinner.
- aiidalab_chemshell.common.utils.add_button_style_class(*buttons)¶
Apply the sleek styling class to one or more buttons.
Note that the accompanying stylesheet from
sleek_button_style()must also be present in the rendered layout for the styling to take effect.- Parameters:
*buttons (ipywidgets.Button) – Buttons to receive the
CHEMSHELL_BUTTON_CLASSCSS class.
- aiidalab_chemshell.common.utils.chemshell_button_style()¶
Return an
HTMLwidget carrying the sleek button stylesheet.Include the returned widget once in a layout that contains buttons styled via
sleek_buttons(). The<style>block is global to the page, so a single instance is enough even if it appears multiple times.- Returns:
A zero-height widget holding the stylesheet.
- Return type:
ipywidgets.HTML
Module contents¶
Package for general common components.