## Fix rmmdiis

# Description

Several fixes concerning RMMDIIS:

- Bug: The interface to Lapack was not correct: in the DIIS part, the matrix A and B (mm(1) and mm(2) in the code) where destroyed in output of the Lapack call. However, these matrices were reused for the next iteration. This was preventing using EigensolverMaxIter > 3.
- Numerical instability: The main reason for the instability of RMMDIIS was the exit of the Lapack with info > iter. This was not affected by solving the bug and was a problem on its own. In the case of info (error code) > iter, lapack tells us that the matrix B is not definite positive, whereas it is assumed to be for the symmetric solver used. After investigating the numbers, I realized that the matrix is only made of ones, plus some very small numbers (typically 1e-12 to 1e-5). I therefore replaced this matrix by a matrix of ones, and ones+epsilon on the diagonal (this was all minors are positive and the matrix is definite positive) in the case of Lapack failure.

The RMMDIIS code is now documented.

The eigenvalues are also recomputed before the DIIS, as done in the Kresse and Furthmueller paper.

# News snippet

Fixes to the RMDIIS eigensolver.

# 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.