From 67b3756e06c35a522948d35f2d16d2f0d1d363af Mon Sep 17 00:00:00 2001 From: Edan Bainglass Date: Mon, 6 Jan 2025 14:02:17 +0000 Subject: [PATCH] Do not rely on incompatible AiiDA structure method --- src/aiidalab_qe/app/result/components/summary/model.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/aiidalab_qe/app/result/components/summary/model.py b/src/aiidalab_qe/app/result/components/summary/model.py index 49983ac9f..ef7438109 100644 --- a/src/aiidalab_qe/app/result/components/summary/model.py +++ b/src/aiidalab_qe/app/result/components/summary/model.py @@ -285,12 +285,11 @@ def _generate_report_parameters(self): return report - def _get_symmetry_group_info(self, structure): + def _get_symmetry_group_info(self, structure: orm.StructureData) -> dict: from pymatgen.symmetry.analyzer import PointGroupAnalyzer, SpacegroupAnalyzer - pymatgen_structure = structure.get_pymatgen() if any(structure.pbc): - analyzer = SpacegroupAnalyzer(structure=pymatgen_structure) + analyzer = SpacegroupAnalyzer(structure=structure.get_pymatgen_structure()) symbol = analyzer.get_space_group_symbol() number = analyzer.get_space_group_number() return { @@ -301,7 +300,7 @@ def _get_symmetry_group_info(self, structure): else: from pymatgen.symmetry.analyzer import PointGroupAnalyzer - analyzer = PointGroupAnalyzer(mol=pymatgen_structure) + analyzer = PointGroupAnalyzer(mol=structure.get_pymatgen_molecule()) return {"point_group": analyzer.get_pointgroup()} @staticmethod