This issue is part of a Codex global repository scan.
Problem:
to_pardiso_json() writes predicted_overlaps.h5 only when sr is not None, which is expected for orthogonal models. The Julia loader returns an empty overlap dict when the file is absent, but HR2HK() unconditionally indexes S_R[R] for every Hamiltonian lattice shift.
Code references:
https://github.com/deepmodeling/deeptb/blob/86c60c73996f0dd961c3138f2e88424382cb734e/dptb/postprocess/unified/system.py#L832-L839
https://github.com/deepmodeling/deeptb/blob/86c60c73996f0dd961c3138f2e88424382cb734e/dptb/postprocess/pardiso/io/io.jl#L172-L176
https://github.com/deepmodeling/deeptb/blob/86c60c73996f0dd961c3138f2e88424382cb734e/dptb/postprocess/pardiso/utils/hamiltonian.jl#L66-L70
Impact:
Orthogonal Pardiso runs can fail with a missing-key error instead of using an identity overlap matrix.
Suggested fix:
Teach the Julia backend to synthesize identity overlap blocks when no overlap file is present, or have the Python exporter always write an explicit identity overlap for orthogonal models.
This issue is part of a Codex global repository scan.
Problem:
to_pardiso_json()writespredicted_overlaps.h5only whensr is not None, which is expected for orthogonal models. The Julia loader returns an empty overlap dict when the file is absent, butHR2HK()unconditionally indexesS_R[R]for every Hamiltonian lattice shift.Code references:
https://github.com/deepmodeling/deeptb/blob/86c60c73996f0dd961c3138f2e88424382cb734e/dptb/postprocess/unified/system.py#L832-L839
https://github.com/deepmodeling/deeptb/blob/86c60c73996f0dd961c3138f2e88424382cb734e/dptb/postprocess/pardiso/io/io.jl#L172-L176
https://github.com/deepmodeling/deeptb/blob/86c60c73996f0dd961c3138f2e88424382cb734e/dptb/postprocess/pardiso/utils/hamiltonian.jl#L66-L70
Impact:
Orthogonal Pardiso runs can fail with a missing-key error instead of using an identity overlap matrix.
Suggested fix:
Teach the Julia backend to synthesize identity overlap blocks when no overlap file is present, or have the Python exporter always write an explicit identity overlap for orthogonal models.