Skip to content

Commit

Permalink
remove the calculator as it may not be JSON serializable
Browse files Browse the repository at this point in the history
  • Loading branch information
superstar54 committed Dec 14, 2024
1 parent 273ac12 commit 16a3751
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/aiida_pythonjob/data/atoms.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ def __init__(self, value=None, **kwargs):

@classmethod
def atoms2dict(cls, atoms):
"""Convert ASE Atoms to a dictionary."""
# we remove the calculator as it may not be JSON serializable
atoms.calc = None
data = atoms2dict(atoms)
data.pop("unique_id")
keys = list(data.keys())
Expand Down

0 comments on commit 16a3751

Please sign in to comment.