diff --git a/src/aiidalab_qe/app/result/components/viewer/structure/structure.py b/src/aiidalab_qe/app/result/components/viewer/structure/structure.py index 0011ef49c..3ddd7f55e 100644 --- a/src/aiidalab_qe/app/result/components/viewer/structure/structure.py +++ b/src/aiidalab_qe/app/result/components/viewer/structure/structure.py @@ -1,6 +1,7 @@ import ipywidgets as ipw from aiidalab_qe.common.panel import ResultsPanel +from aiidalab_qe.common.time import format_time, relative_time from aiidalab_qe.common.widgets import TableWidget from aiidalab_widgets_base.viewers import StructureDataViewer @@ -26,11 +27,16 @@ def _render(self): """) self.atom_coordinates_table = TableWidget() self._generate_table(structure.get_ase()) + + structure_info = self._get_structure_info(structure) + self.results_container.children = [ + structure_info, self.widget, self.table_description, self.atom_coordinates_table, ] + self.atom_coordinates_table.observe(self._change_selection, "selected_rows") # Listen for changes in self.widget.displayed_selection and update the table self.widget.observe(self._update_table_selection, "displayed_selection") @@ -42,6 +48,19 @@ def _render(self): ngl._set_size("100%", "300px") ngl.control.zoom(0.0) + def _get_structure_info(self, structure): + return ipw.HTML( + f""" +