deepmodeling/dpdata

[BUG]When I use a script to convert OUTCAR to npy format, I encounter the following error:

BraunSakai opened this issue · 2 comments

dp.zip

Traceback (most recent call last):
File "/work/wq/zcx/dtwistNiN2/0/dp/cov-outcar2dp.py", line 4, in
dsys.to('deepmd/npy', 'deepmd_data', set_size = dsys.get_nframes())
File "/home/wqt/anaconda2/envs/deepmd/lib/python3.9/site-packages/dpdata/system.py", line 136, in to
return self.to_fmt_obj(load_format(fmt), *args, **kwargs)
File "/home/wqt/anaconda2/envs/deepmd/lib/python3.9/site-packages/dpdata/system.py", line 903, in to_fmt_obj
return fmtobj.to_labeled_system(self.data, *args, **kwargs)
File "/home/wqt/anaconda2/envs/deepmd/lib/python3.9/site-packages/dpdata/format.py", line 77, in to_labeled_system
return self.to_system(data, *args, **kwargs)
File "/home/wqt/anaconda2/envs/deepmd/lib/python3.9/site-packages/dpdata/plugins/deepmd.py", line 52, in to_system
dpdata.deepmd.comp.dump(
File "/home/wqt/anaconda2/envs/deepmd/lib/python3.9/site-packages/dpdata/deepmd/comp.py", line 85, in dump
coords = np.reshape(data['coords'], [nframes, -1]).astype(comp_prec)
File "<array_function internals>", line 5, in reshape
File "/home/wqt/anaconda2/envs/deepmd/lib/python3.9/site-packages/numpy/core/fromnumeric.py", line 298, in reshape
return _wrapfunc(a, 'reshape', newshape, order=order)
File "/home/wqt/anaconda2/envs/deepmd/lib/python3.9/site-packages/numpy/core/fromnumeric.py", line 57, in _wrapfunc
return bound(*args, **kwds)
ValueError: cannot reshape array of size 0 into shape (0,newaxis)
dp.zip

Your OUTCAR is not converged. Please check it.