aiidalab_widgets_base.utils package#
Submodules#
aiidalab_widgets_base.utils.exceptions module#
aiidalab_widgets_base.utils.loaders module#
Module contents#
Some utility functions used acrross the repository.
- class aiidalab_widgets_base.utils.MessageLevel(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
Enum
- ERROR = 'danger'#
- INFO = 'info'#
- SUCCESS = 'success'#
- WARNING = 'warning'#
- class aiidalab_widgets_base.utils.PinholeCamera(matrix)[source]#
Bases:
object
- property inverse_matrix#
- class aiidalab_widgets_base.utils.StatusHTML(**kwargs: Any)[source]#
Bases:
_StatusWidgetMixin
,HTML
Show temporary HTML messages for example for status updates.
- new_line = '<br>'#
- aiidalab_widgets_base.utils.ase2spglib(ase_structure: Atoms) tuple[Any, Any, Any] [source]#
Convert ase Atoms instance to spglib cell in the format defined at https://spglib.github.io/spglib/python-spglib.html#crystal-structure-cell
- aiidalab_widgets_base.utils.get_ase_from_file(fname, file_format=None)[source]#
Get ASE structure object.
- aiidalab_widgets_base.utils.get_formula(data_node)[source]#
A wrapper for getting a molecular formula out of the AiiDA Data node
- aiidalab_widgets_base.utils.list_to_string_range(lst, shift=1)[source]#
Converts a list like [0, 2, 3, 4] into a string like ‘1 3..5’.
Shift used when e.g. for a user interface numbering starts from 1 not from 0
- aiidalab_widgets_base.utils.predefine_settings(obj, **kwargs)[source]#
Specify some pre-defined settings.
- aiidalab_widgets_base.utils.string_range_to_list(strng, shift=-1)[source]#
Converts a string like ‘1 3..5’ into a list like [0, 2, 3, 4].
Shift used when e.g. for a user interface numbering starts from 1 not from 0