XC energy is not zero when dft_functional=hf and nspin=2
Describe the bug
The function v_xc returns non-zero etxc when dft_functional=hf and nspin=2.
The bug may lie in grad_corr:
https://github.com/deepmodeling/abacus-develop/blob/e5768eca2a2bac46b216822edd5ed3c51d084555/source/module_hamilt_general/module_xc/xc_functional_vxc.cpp#L173
etxc before this line is 0, but become non-zero after this line.
If I comment out the condition if(use_libxc) here to force the code run libxc-subroutine v_xc_libxc instead, the result will be right (E_xc is 0).
https://github.com/deepmodeling/abacus-develop/blob/e5768eca2a2bac46b216822edd5ed3c51d084555/source/module_hamilt_general/module_xc/xc_functional_vxc.cpp#L25
To Reproduce
run examples/scf/lcao_Si2 with:
nspin 2
dft_functional hf
After the run finished:
grep E_xc OUT.ABACUS/running_scf.log
Who have the ability to solve it? @maki49