Skip to content

Commit

Permalink
Do not rely on incompatible AiiDA structure method
Browse files Browse the repository at this point in the history
  • Loading branch information
edan-bainglass committed Jan 6, 2025
1 parent 419f515 commit 67b3756
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/aiidalab_qe/app/result/components/summary/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down

0 comments on commit 67b3756

Please sign in to comment.