Skip to content

Commit 3be3cf9

Browse files
authored
Merge pull request #93 from amcadmus/master
fix the bug when the energy has shape ()
2 parents dfdd9bd + 6946f7f commit 3be3cf9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dpdata/deepmd/comp.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ def to_system_data(folder,
3333
nframes = np.reshape(cells, [-1,3,3]).shape[0]
3434
all_cells.append(np.reshape(cells, [nframes,3,3]))
3535
all_coords.append(np.reshape(coords, [nframes,-1,3]))
36+
if eners is not None:
37+
eners = np.reshape(eners, [nframes])
3638
if labels:
3739
if eners is not None and len(eners) > 0:
3840
all_eners.append(np.reshape(eners, [nframes]))

0 commit comments

Comments
 (0)