Skip to content

Commit 1d4960f

Browse files
author
root
committed
2 parents 3fc4957 + 6badb9b commit 1d4960f

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

dpgen/generator/lib/abacus_scf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import re
44

55
import numpy as np
6-
76
from dpdata.abacus.stru import get_frame_from_stru, make_unlabeled_stru
87

98
from dpgen.auto_test.lib import vasp

tests/auto_test/test_abacus.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,10 +246,22 @@ def compare_dict(dict1, dict2):
246246
)
247247
else:
248248
self.assertTrue(dict1[key] == dict2[key])
249-
compare_keys = ["atom_numbs", "atom_names", "atom_types", "cells", "coords",
250-
'energies', 'forces', 'virials', 'stress']
251-
compare_dict({k:ret["data"][k] for k in compare_keys},
252-
{k: ret_ref.data[k] for k in compare_keys})
249+
250+
compare_keys = [
251+
"atom_numbs",
252+
"atom_names",
253+
"atom_types",
254+
"cells",
255+
"coords",
256+
"energies",
257+
"forces",
258+
"virials",
259+
"stress",
260+
]
261+
compare_dict(
262+
{k: ret["data"][k] for k in compare_keys},
263+
{k: ret_ref.data[k] for k in compare_keys},
264+
)
253265

254266

255267
class TestABACUSDeepKS(unittest.TestCase):

0 commit comments

Comments
 (0)