Open hoba87 opened 2 years ago
Please provide your file.
https://github.com/deepmodeling/dpdata/blob/master/dpdata/vasp/outcar.py#L10
There is no "TITLE" in this OUTCAR.out, so atoms are failed to be extracted...
data = dpdata.LabeledSystem("OUTCAR") Traceback (most recent call last): File "
", line 1, in File "/vol01/homes/hy38185/miniconda3/lib/python3.10/site-packages/dpdata/system.py", line 183, in init self.from_fmt( File "/vol01/homes/hy38185/miniconda3/lib/python3.10/site-packages/dpdata/system.py", line 220, in from_fmt return self.from_fmt_obj(load_format(fmt), file_name, kwargs) File "/vol01/homes/hy38185/miniconda3/lib/python3.10/site-packages/dpdata/system.py", line 1113, in from_fmt_obj data = fmtobj.from_labeled_system(file_name, kwargs) File "/vol01/homes/hy38185/miniconda3/lib/python3.10/site-packages/dpdata/plugins/vasp.py", line 94, in from_labeled_system data = uniq_atom_names(data) File "/vol01/homes/hy38185/miniconda3/lib/python3.10/site-packages/dpdata/utils.py", line 97, in uniq_atom_names data["atom_types"] = np.array([uidxmap[jj] for jj in tmp_type], dtype=int) File "/vol01/homes/hy38185/miniconda3/lib/python3.10/site-packages/dpdata/utils.py", line 97, in data["atom_types"] = np.array([uidxmap[jj] for jj in tmp_type], dtype=int) IndexError: list index out of range data = dpdata.LabeledSystem("OUTCAR") Traceback (most recent call last): File " ", line 1, in File "/vol01/homes/hy38185/miniconda3/lib/python3.10/site-packages/dpdata/system.py", line 183, in init self.from_fmt( File "/vol01/homes/hy38185/miniconda3/lib/python3.10/site-packages/dpdata/system.py", line 220, in from_fmt return self.from_fmt_obj(load_format(fmt), file_name, kwargs) File "/vol01/homes/hy38185/miniconda3/lib/python3.10/site-packages/dpdata/system.py", line 1113, in from_fmt_obj data = fmtobj.from_labeled_system(file_name, kwargs) File "/vol01/homes/hy38185/miniconda3/lib/python3.10/site-packages/dpdata/plugins/vasp.py", line 94, in from_labeled_system data = uniq_atom_names(data) File "/vol01/homes/hy38185/miniconda3/lib/python3.10/site-packages/dpdata/utils.py", line 97, in uniq_atom_names data["atom_types"] = np.array([uidxmap[jj] for jj in tmp_type], dtype=int) File "/vol01/homes/hy38185/miniconda3/lib/python3.10/site-packages/dpdata/utils.py", line 97, in data["atom_types"] = np.array([uidxmap[jj] for jj in tmp_type], dtype=int) IndexError: list index out of range
This is useful ! =(https://github.com/deepmodeling/dpdata/pull/361)
Summary
The generation of a LabeledSystem from an OUTCAR file is not working (anymore, since version 0.2.6).
Running on CentOS 8 with python 3.7.9.
Steps to Reproduce
dsys = dpdata.LabeledSystem('OUTCAR.out', fmt='vasp/outcar')
Command works until version 0.2.5, with >=0.2.6 getting an error, here evaluated for version 0.2.8: