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

SymmetrizedStructure.to(json) raises TypeError #3018

Open
janosh opened this issue May 28, 2023 · 0 comments
Open

SymmetrizedStructure.to(json) raises TypeError #3018

janosh opened this issue May 28, 2023 · 0 comments
Labels
analysis Concerning pymatgen.analysis bug

Comments

@janosh
Copy link
Member

janosh commented May 28, 2023

from pymatgen.analysis.structure_analyzer import SpacegroupAnalyzer
from pymatgen.core import Lattice, Structure

structure = Structure(
    lattice=Lattice.cubic(3),
    species=("Fe", "Fe"),
    coords=((0, 0, 0), (0.5, 0.5, 0.5)),
)
symmetrized_structure = SpacegroupAnalyzer(structure).get_symmetrized_structure()
symmetrized_structure.to("dummy.json")

raises

TypeError: Object of type SymmOp is not JSON serializable
@janosh janosh added bug analysis Concerning pymatgen.analysis labels May 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analysis Concerning pymatgen.analysis bug
Projects
None yet
Development

No branches or pull requests

1 participant