Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 10, 2023
1 parent 3039c86 commit 21578eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dpdata/abacus/relax.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def get_coords_from_log(loglines, natoms):
# transfer bohrium to angstrom
cells *= bohr2ang
coords *= bohr2ang

if len(stress) > 0:
virial = np.zeros([len(cells), 3, 3])
for i in range(len(cells)):
Expand Down Expand Up @@ -206,7 +206,7 @@ def get_frame(fname):
data["coords"] = coords
data["energies"] = energy
data["forces"] = force
if virial != None:
if virial is not None:
data["virials"] = virial
data["stress"] = stress
data["orig"] = np.zeros(3)
Expand Down

0 comments on commit 21578eb

Please sign in to comment.