From 45c801879a93ddc858a0002660b9288b9533d5d0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 05:20:05 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- dpdata/plugins/ase.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dpdata/plugins/ase.py b/dpdata/plugins/ase.py index ce562c054..243022269 100644 --- a/dpdata/plugins/ase.py +++ b/dpdata/plugins/ase.py @@ -44,7 +44,9 @@ def from_system(self, atoms: "ase.Atoms", **kwargs) -> dict: data dict """ symbols = atoms.get_chemical_symbols() - atom_names = list(dict.fromkeys(symbols)) # use: list(set(symbols)) cannot maintain the order of items + atom_names = list( + dict.fromkeys(symbols) + ) # use: list(set(symbols)) cannot maintain the order of items atom_numbs = [symbols.count(symbol) for symbol in atom_names] atom_types = np.array([atom_names.index(symbol) for symbol in symbols]).astype( int