ITADN

[BUG] dpdata Fails to Convert QE Output to npy Files

#901Openzzzruru 创建于 2025-09-22
bug
Z
zzzrurucommented
### Bug summary I'm new to DeepMD and trying to convert a QE scf.out file into the DeepMD/npy format, but dpdata keeps failing. qe/pw/scf parser raises AttributeError: 'numpy.ndarray' object has no attribute 'append' on QE MD trajectory ### dpdata Version 0.2.24 ### Input Files, Running Commands, Error Log, etc. Input files: <!-- Failed to upload "qe_scf.zip" --> Error log: Traceback (most recent call last): File "/opt/ohpc/home/zzr/TeO/00.data/trans.py", line 15, in <module> system = dpdata.LabeledSystem(qe_out_file, fmt='qe/pw/scf') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/ohpc/home/zzr/.local/lib/python3.12/site-packages/dpdata/system.py", line 197, in __init__ self.from_fmt( File "/opt/ohpc/home/zzr/.local/lib/python3.12/site-packages/dpdata/system.py", line 234, in from_fmt return self.from_fmt_obj(load_format(fmt), file_name, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/ohpc/home/zzr/.local/lib/python3.12/site-packages/dpdata/system.py", line 1224, in from_fmt_obj data = fmtobj.from_labeled_system(file_name, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/ohpc/home/zzr/.local/lib/python3.12/site-packages/dpdata/plugins/qe.py", line 52, in from_labeled_system ) = dpdata.qe.scf.get_frame(file_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/ohpc/home/zzr/.local/lib/python3.12/site-packages/dpdata/qe/scf.py", line 173, in get_frame atom_names, natoms, types, coords = get_coords(inlines, cell) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/ohpc/home/zzr/.local/lib/python3.12/site-packages/dpdata/qe/scf.py", line 104, in get_coords coord.append([float(jj) for jj in ii.split()[1:4]]) ^^^^^^^^^^^^ AttributeError: 'numpy.ndarray' object has no attribute 'append' ### Steps to Reproduce Due to the large size of my input file, I am unable to upload it here. Are there any alternative methods for sharing it? ### Further Information, Files, and Links _No response_
3 条评论