Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application Crashed: Summary Report fails for 2D and 1D structures #1053

Closed
AndresOrtegaGuerrero opened this issue Jan 4, 2025 · 3 comments · Fixed by #1055
Closed

Application Crashed: Summary Report fails for 2D and 1D structures #1053

AndresOrtegaGuerrero opened this issue Jan 4, 2025 · 3 comments · Fixed by #1055
Assignees
Labels
automated-report bug Something isn't working

Comments

@AndresOrtegaGuerrero
Copy link
Member

AndresOrtegaGuerrero commented Jan 4, 2025

Automated report

This issue was created with the app's automated bug reporting feature.
Attached to this issue is the full traceback as well as an environment
fingerprint that contains information about the operating system as well as all
installed libraries.

Additional comments (optional):

_Example: I submitted a PDOS calculation with a 2D structure, and the app crashed due to the Summary

Attachments

Traceback
~/.local/lib/python3.9/site-packages/traitlets/traitlets.py in _notify_observers(self, event)
   1562                 c = getattr(self, c.name)
   1563 
-> 1564             c(event)
   1565 
   1566     def _add_notifiers(self, handler, name, type):

~/apps/quantum-espresso/src/aiidalab_qe/app/result/components/summary/summary.py in _on_process_change(self, _)
     16     def _on_process_change(self, _):
     17         if not self.has_settings_report:
---> 18             self._render_summary()
     19 
     20     def _on_monitor_counter_change(self, _):

~/apps/quantum-espresso/src/aiidalab_qe/app/result/components/summary/summary.py in _render_summary(self)
     32 
     33         settings_summary = ipw.HTML(
---> 34             value=self._model.generate_report_html(),
     35         )
     36         settings_summary.add_class("summary-panel")

~/apps/quantum-espresso/src/aiidalab_qe/app/result/components/summary/model.py in generate_report_html(self)
     81         )
     82         style = files(styles).joinpath("style.css").read_text()
---> 83         parameters = self._generate_report_parameters()
     84         report = {key: value for key, value in parameters.items() if value is not None}
     85 

~/apps/quantum-espresso/src/aiidalab_qe/app/result/components/summary/model.py in _generate_report_parameters(self)
    182             "num_atoms": len(initial_structure.sites),
    183             "space_group": "{} ({})".format(
--> 184                 *initial_structure.get_pymatgen().get_space_group_info()
    185             ),
    186             "cell_lengths": "{:.3f} {:.3f} {:.3f}".format(

AttributeError: 'Molecule' object has no attribute 'get_space_group_info'
Environment fingerprint
eNptV8uS47YO_ZUuZxup9LDd7d7lzu7WnapJOo9FKuWiKNhmmyLZJGW3JjX_HhCgbHXmLgWCIHAAHEB_ry7gg7Jm9Vz_uHJaxIP1
w-r575Xw8qQiyDh6WD3_udquOxVXP65Wf6HeFE_W7G9XV225K-sWT--iH-qHl89fHl5EfPjJ-Yfm8aFaP9ftc717-O3XTw9N1axX
39CUkGdxhEBPSgkhqE5D4abjACaieFWVVblG00KpXhQOH7ZuQnld1kt5gLG3JN6U1U38NgoTxwGC82g6na_Lx8X5RXXeBnm3WN-O
rsIYBX5X4UlTNotLt5Piav35oO01kE5719GiK0Abcr8um6V4OIhCBklXqqYt66pqF-f7N0gna5SXlVgvb74hLi4jUv_r4LtAljf3
V9UfIYZ9JwLMrgryCk9FiODJ7CMnUZigmlMcNJna8VtmYiOkmLPN1tqyaVgnmFr6ycU5DySM0VOsbcbwP6IDTU7UfK3DEnDWx1BG
4Q9KA91m5Q7EGNVh1MGObk3pw1vJ886e4URm1mXypRsHd6E4GNW62aH0k5An-GRN9FZzMlp6UyZ5tFYHstkQXBI8vqXYRKoTEh6O
FwpyTQ7Jk_A9obDJLiZJgFgYbByh1VfyAV_JhzAoc-C0JNxIaLX1YhAkWpdbEploR5-zx7hIi_Fgb6DoMRe1nKTOucrg9SpErToS
teVTkpjA_UngbFnLSoRRczvVjyQDDanFnIgnwoDjg0Eovb9gIL2I1nOeWH9MvackecgopmRpK88cMD91wEjuwG4YhsPINII3KxKc
6pp94VdPG4o8pY2_x0GYg1dgek2QVHcxIkymGUvVYwzqMJGjm7LdkswIsvaYPoZEL3wJu4J8VEOqN4StGCAKDDSpb8sntogxWnNQ
RzLJDys3WRfRVA_kdjNLo4dZ0rAkt1oB7xG9h37BK6_CC2lLqUUIifFuRTUfIHR4jXypljcO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2pXTpxcqIpUHYkXed9CXPL83t-_iCl1I3Rpn4kvRxcmhr3vaQ-buW2fuiF9zrxL1JG3cMHACYsqjunVW
KjEkEsxvy2vptmzS7d8Frk_TYqxelI8jDh3qvQZ94w3zCiLsF38N6NeOxF3vFVZpgdsc1riffyDT2QmA6XvN7MnX9w7Rt72S96nG
QV7xx87m_w2u3_dBh7R1i0w2Seurov8mvJRe-fbtH277RSg=

By submitting this issue I confirm that I am aware that this information can
potentially be used to determine what kind of calculation was performed at the
time of error.

When working with an aiida StructrureData , the get_pymatgen() will fail for structures with pbc != (True,True,True)
Test with aiida AiiDA v2.5.1

@AndresOrtegaGuerrero AndresOrtegaGuerrero added bug Something isn't working automated-report labels Jan 4, 2025
@AndresOrtegaGuerrero
Copy link
Member Author

A solution for this, is to use the code from aiidalab-widgets-base https://github.com/aiidalab/aiidalab-widgets-base/blob/7a93035d6a25990628d0c5477984fa4c044be8e2/aiidalab_widgets_base/viewers.py#L699

Using the ase structure and the spglib library

@AndresOrtegaGuerrero
Copy link
Member Author

AndresOrtegaGuerrero commented Jan 4, 2025

Similarly, there should be a test for molecules (they might fail too) to determine what to report for the space group. For molecules, it might be more appropriate to report the point group. However, since this might not be straightforward, we could omit the space group information for molecules, as done in AiiDAlab-widgets-base.

@AndresOrtegaGuerrero AndresOrtegaGuerrero changed the title Summary Report 2D and 1D structures Summary Report fails for 2D and 1D structures Jan 4, 2025
@AndresOrtegaGuerrero AndresOrtegaGuerrero changed the title Summary Report fails for 2D and 1D structures Application Crashed: Summary Report fails for 2D and 1D structures Jan 5, 2025
@edan-bainglass
Copy link
Member

@AndresOrtegaGuerrero see how I'm handling it in #1055. Would this not work? What do you mean by "might not be straightforward"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automated-report bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants