Skip to content

[Code scan] Julia Pardiso backend crashes for orthogonal exports without overlap file #364

Description

@njzjz

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions