-
Notifications
You must be signed in to change notification settings - Fork 158
Closed
Labels
Description
Summary
The generation of a MultiSystem from an vasprun.xml file is not working (version 0.2.15).
Steps to Reproduce
vasp_multi_systems = dpdata.MultiSystems.from_dir(dir_name="./", file_name='vasprun.xml', fmt="vasp/xml")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/y/app/miniconda3/envs/deepmd/lib/python3.10/site-packages/dpdata/system.py", line 1411, in from_dir
LabeledSystem(file_name=target_file, fmt=fmt, type_map=type_map)
File "/home/y/app/miniconda3/envs/deepmd/lib/python3.10/site-packages/dpdata/system.py", line 281, in __init__
self.from_fmt(
File "/home/y/app/miniconda3/envs/deepmd/lib/python3.10/site-packages/dpdata/system.py", line 318, in from_fmt
return self.from_fmt_obj(load_format(fmt), file_name, **kwargs)
File "/home/y/app/miniconda3/envs/deepmd/lib/python3.10/site-packages/dpdata/system.py", line 1162, in from_fmt_obj
data = fmtobj.from_labeled_system(file_name, **kwargs)
File "/home/y/app/miniconda3/envs/deepmd/lib/python3.10/site-packages/dpdata/plugins/vasp.py", line 128, in from_labeled_system
data = uniq_atom_names(data)
File "/home/y/app/miniconda3/envs/deepmd/lib/python3.10/site-packages/dpdata/utils.py", line 95, in uniq_atom_names
data["atom_types"] = np.array([uidxmap[jj] for jj in tmp_type], dtype=int)
File "/home/y/app/miniconda3/envs/deepmd/lib/python3.10/site-packages/dpdata/utils.py", line 95, in <listcomp>
data["atom_types"] = np.array([uidxmap[jj] for jj in tmp_type], dtype=int)
IndexError: list index out of rangeIt seems to be a problem of duplication of elements in POSCAR.
Zn Cu Zn Cu
8 8 24 12
This is not a problem when there are no duplicate elements in POSCAR, for example.
Zn Cu
8 8
Further Information, Files, and Links
Reactions are currently unavailable