Skip to content

Error: The factorization could not be completed because the input is not positive-definite #227

@dongsh0320

Description

@dongsh0320

Describe the bug

Hi, developers.
Thank you very much for your previous responses and help to the questions I raised. I’m opening a new issue here because I feel this question is unrelated to the previous ones, which will make it easier for others to refer to and review later.
After training using E3 model, when I tried to plot the band, I met the following error.

............
  File "/dptb/lib/python3.10/site-packages/dptb/postprocess/elec_struc_cal.py", line 159, in get_eigs
    data = self.eigv(data)
  File "/dptb/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1190, in _call_impl
    return forward_call(*input, **kwargs)
  File "/dptb/lib/python3.10/site-packages/dptb/nn/energy.py", line 75, in forward
    chklowt = torch.linalg.cholesky(data[self.s_out_field])
torch._C._LinAlgError: linalg.cholesky: (Batch element 0): The factorization could not be completed because the input 
is not positive-definite (the leading minor of order 246 is not positive-definite).

Expected behavior

Could you help me check what the issue might be? The dataset was obtained from ABACUS and then parsing with dftio.

To Reproduce

dptb run band.json -i ./output/checkpoint/nnenv.best.pth -o ./ -stu ./STRU.vasp
Sorry, I am unable to upload the file directly due to its large size. The Google Drive link below contains the files that might be necessary to reproduce the issue.
https://drive.google.com/file/d/1AS3l2kiOhXFJy74Ep8DzbnxpYG50CIty/view?usp=sharing

Environment

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions