From 9fad2fea79b39310fd9cee46aa17c7e8801cdbd5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 22 Nov 2023 01:35:26 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- models/mace/json_to_extxyz.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/models/mace/json_to_extxyz.py b/models/mace/json_to_extxyz.py index 3be497df..ad726f66 100644 --- a/models/mace/json_to_extxyz.py +++ b/models/mace/json_to_extxyz.py @@ -5,12 +5,11 @@ import numpy as np import wget -from tqdm.auto import tqdm - from ase import units from ase.io import read, write from pymatgen.core import Structure from pymatgen.io.ase import AseAtomsAdaptor +from tqdm.auto import tqdm __author__ = "Yuan Chiang" __date__ = "2023-08-10" @@ -18,7 +17,7 @@ mptrj_path = wget.download("https://figshare.com/ndownloader/files/41619375") # mptrj_path = "./MPtrj_2022.9_full.json" -with open(mptrj_path, "r") as f: +with open(mptrj_path) as f: json_data = json.load(f) pretty_json_string = json.dumps(json_data, indent=4, ensure_ascii=False) @@ -27,7 +26,7 @@ mptrj_extxyz_prefix = osp.join(os.curdir, "mptrj-gga-ggapu") os.makedirs(mptrj_extxyz_prefix, exist_ok=True) -with open(mptrj_pretty_path, "r") as f: +with open(mptrj_pretty_path) as f: json_data = json.load(f) combined = []