Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#901 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
data

Research direction

Read dpdata/qe/scf.py, especially get_coords, and then the call from dpdata/plugins/qe.py shown in the traceback. Reproduce the reported QE MD trajectory failure with a suitable scf.out file or a reduced case. Done means qe/pw/scf conversion no longer raises the reported AttributeError and produces DeepMD/npy output.

Written by the indexing model from the issue text.

Description

feature request qe
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

Dominant language
Python
Stars
254
Forks
158
Avg merge
8d 3h
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from deepmodeling/dpdata

All issues in deepmodeling/dpdata

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.