deepmodeling / deepmodeling/DeePTB

[Code scan] ABACUS HDF5 reader never loads k-points/eigenvalues due to misspelled key

Open
#351 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
122
Forks
36
PR merge metrics
No merged PRs in 30d

Description

This issue is part of a Codex global repository scan.

Problem:
The ABACUS HDF5 reader checks for `"kpionts"` but then reads `"kpoints"`. Normal HDF5 files containing `"kpoints"` and `"eigenvalues"` therefore skip band data loading silently.

Code reference:
https://github.com/deepmodeling/deeptb/blob/86c60c73996f0dd961c3138f2e88424382cb734e/dptb/data/dataset/_abacus_dataset.py#L40-L42

Impact:
ABACUS lazy/in-memory datasets can drop k-point and eigenvalue labels even when they are present, which can break or silently degrade band/eigenvalue training and evaluation.

Suggested fix:
Change the key check to `"kpoints" in data`, and consider adding a regression test that creates a minimal HDF5 file with `kpoints` and `eigenvalues`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.