dpdata icon indicating copy to clipboard operation
dpdata copied to clipboard

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

Open zzzruru opened this issue 3 months ago • 4 comments

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

zzzruru avatar Sep 22 '25 09:09 zzzruru

qe/pw/scf parser raises AttributeError: 'numpy.ndarray' object has no attribute 'append' on QE MD trajectory

The format for MD trajectory is qe/cp/traj.

njzjz avatar Sep 23 '25 01:09 njzjz

qe/pw/scf parser raises AttributeError: 'numpy.ndarray' object has no attribute 'append' on QE MD trajectoryqe/pw/scf 解析器引发 AttributeError: 'numpy.ndarray' object has no attribute 'append' on QE MD 轨迹

The format for MD trajectory is qe/cp/traj.MD 轨迹的格式是 qe/cp/traj

Hello, Professor. My qe.out file starts with: Program PWSCF v.7.4 starts on 22Aug2025 at 11:48:2 When using qe/cp/traj, no pos files are generated. Are there any alternative solutions?

zzzruru avatar Sep 23 '25 08:09 zzzruru

qe/pw/scf parser raises AttributeError: 'numpy.ndarray' object has no attribute 'append' on QE MD trajectoryqe/pw/scf 解析器引发 AttributeError: 'numpy.ndarray' object has no attribute 'append' on QE MD 轨迹

The format for MD trajectory is qe/cp/traj.MD 轨迹的格式是 qe/cp/traj

Hello, Professor. My qe.out file starts with: Program PWSCF v.7.4 starts on 22Aug2025 at 11:48:2 When using qe/cp/traj, no pos files are generated. Are there any alternative solutions?

The molecular dynamics simulation was performed using pw.x rather than cp.x .

zzzruru avatar Sep 23 '25 08:09 zzzruru

qe/pw/scf was design for the single point calculation, not for molecular dynamics. Perhaps this is a feature request.

njzjz avatar Sep 23 '25 10:09 njzjz