Hello all,

I am trying to learn the calculation of dielectric constant via the DFPT tutorial. After replacing the AlAs used in part 5 of the tutorial with SiC, I was able to complete the calculations and get very accurate results.

After that, I tried to scale up and calculate the effect of Al-Si antisite in SiC. I used a 2×2×2 cubic SiC supercell as a base and was able to complete the trial calculation when replacing two of the Si atoms with Al atoms. However, if only one is replaced, the calculation stopped at dataset 2, and the following error occurs:

```
--- !ERROR
src_file: m_occ.F90
src_line: 1692
mpi_rank: 7
message: |
In a non-metallic case (occopt<3), for a RF calculation,
if the eigenvalues are degenerate, the occupation numbers must also be degenerate.
However, the following pair of states gave :
k -state, band number 127, occ= 2.000000E+00eigenvalue= 2.630046E-01,
kq-state, band number 128, occ= 1.000000E+00, eigenvalue= 2.630046E-01.
Action: change occopt, consistently, in GS and RF calculations.
...
```

The input and output files are as below:

kpt-2x2x2.abi (5.9 KB)

kpt-2x2x2.abo (75.5 KB)

I tried to fix it with `cellcharge 1`

, or `occopt 0`

and manually set `occ`

and `wtk`

, so that the band with the original occupation number of 1 (kq-state, band number 128) becomes 0, but the error remains.

I searched the old ABINIT forum and found several threads with similar problems, some replies said to switch to a different XC, but neither LDA nor PBE-GGA worked for me. So I would like to ask, how to correctly calculate the response in this kind of situation (1 electron less than normal)?