deepmodeling / deepmodeling/dpdata

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

Open
#901 4 comments 0 reactions 0 assignees View on GitHub
feature request qe
Dominant language
Python
Stars
254
Forks
158
Avg merge
4d 1h
Merged PRs (30d)
2

Description

### 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_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.