Fixes the calculation of the Fermi energy for metalic systems:
Fixes the calculation of the Fermi energy for metallic systems:
- fixes the identification of the degenerate subspace at the Fermi energy.
- fixes the corresponding occupation
- fixes the charge distribution
The LCAO was wrongly occupying randomized states instead of using the one of the LCAO, because the eigenvalues were wrongly initialized to zero. This affects only the LCAO_states option.
Bugfix for LCAO states and Fermi energy calculation in case of degenerated states at the Fermi energy.
- I have checked that my code follows the Octopus coding standards
- I have added tests for all the new features added in this request.