Skip to content

Commit

Permalink
fix(abacus): fix bug to read the data when relax job not set cal_stress
Browse files Browse the repository at this point in the history
  • Loading branch information
pxlxingliang committed Oct 10, 2023
1 parent 8c653ba commit 0158a48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dpdata/abacus/relax.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def get_coords_from_log(loglines, natoms):
coords *= bohr2ang

virial = np.zeros([len(cells), 3, 3])
for i in range(len(cells)):
for i in range(len(stress)):
volume = np.linalg.det(cells[i, :, :].reshape([3, 3]))
virial[i] = stress[i] * kbar2evperang3 * volume

Expand Down

0 comments on commit 0158a48

Please sign in to comment.