Fix and improvement of the Slater potential
Description
Fix some problems with the Slater potential and improve the numerical stability for the case of singular matrices. This implies a local rotation to the frame for which the spin-density matrix is singular, and to solve the Sylvester equation in the local frame, and to set the last, undefined, component of the exchange potential to zero.
News snippet
Fix some problems with the Slater potential and improve the numerical stability for the case of singular matrices.
Checklist
-
I have checked that my code follows the Octopus coding standards -
I have added tests for all the new features added in this request.
Edited by Nicolas Tancogne-Dejean