[feature request] dpdata Fails to Convert QE AIMD Output to npy Files
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
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
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from deepmodeling/dpdata
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
deepmodeling/dpdata#1004 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 76/100
deepmodeling/dpdata#1061 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
deepmodeling/dpdata#1058 ·
-
enhancement vasp
Difficulty 4/5 3-5 days Newbie friendliness 38/100
deepmodeling/dpdata#642 ·
-
enhancement lammps
Difficulty 4/5 3-5 days Newbie friendliness 25/100
deepmodeling/dpdata#609 · 1 comment ·
All issues in deepmodeling/dpdata
Similar issues
-
Improve Task Cache Windows Registry events to carry the task subkey's last written time and key pathOpen
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
log2timeline/plaso#5299 · 1 comment ·
Maintainers usually reply within 2 days
-
deployment release-lag
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
nolte/kamerplanter#2047 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
ClanGenOfficial/clangen#6216 · 1 comment ·
Maintainers usually reply within 1 day
-
API bug connectors
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
pyinfra-dev/pyinfra#1986 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
521xueweihan/HelloGitHub#3847 ·