DeePTB icon indicating copy to clipboard operation
DeePTB copied to clipboard

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

Open dongsh0320 opened this issue 11 months ago • 1 comments

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

dongsh0320 avatar Mar 03 '25 13:03 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

Hi, a brief guess would be that the basis used to construct the overlap matrix is near degenerated. This will require that the overlap fitting be extremely accurate. I will check on the cases shortly.

floatingCatty avatar Mar 07 '25 03:03 floatingCatty