Skip to content

Commit

Permalink
pre-commit auto-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Feb 22, 2024
1 parent ee8da2f commit 9d43e87
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pymatgen/io/ase.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@


if ase_loaded:

class MSONAtoms(Atoms, MSONable):
"""A custom subclass of ASE Atoms that is MSONable, including `.as_dict()` and `.from_dict()` methods."""

Expand All @@ -59,6 +60,7 @@ def from_dict(d: dict[str, Any]) -> MSONAtoms:
# See ASE issue #1387.
return MSONAtoms(decode(d["atoms_json"]))
else:

class MSONAtoms(MSONable):
def __init__(self, *args, **kwargs):
raise PackageNotFoundError("AseAtomsAdaptor requires the ASE package. Use `pip install ase`")
Expand Down

0 comments on commit 9d43e87

Please sign in to comment.