Skip to content

[feature request] dpdata Fails to Convert QE AIMD Output to npy Files #901

@zzzruru

Description

@zzzruru

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:

Error log:
Traceback (most recent call last):
File "/opt/ohpc/home/zzr/TeO/00.data/trans.py", line 15, in
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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions