Skip to content

Commit

Permalink
Merge pull request #248 from pyiron/sd2
Browse files Browse the repository at this point in the history
Use dataclass interface to spglib symmetry
pmrv authored Aug 28, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents fcb4ade + eadcf10 commit c489507
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions structuretoolkit/analyse/symmetry.py
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@
# Distributed under the terms of "New BSD License", see the LICENSE file.

import ast
import dataclasses
import string
from functools import cached_property
from typing import Optional
@@ -348,6 +349,8 @@ def info(self):
)
if info is None:
raise SymmetryError(spglib.spglib.spglib_error.message)
if dataclasses.is_dataclass(info):
info = dataclasses.asdict(info)
return info

@property

0 comments on commit c489507

Please sign in to comment.