If you use diagonalisation and smearing it is the location of the chemical potential to get the correct number of electrons.<div><br></div><div>For OT / no smearing it is just given as the HOMO energy. At zero temperature it is not really defined in that case (anywhere between HOMO and LUMO would give same result).<br><br></div><div class="gmail_quote"><div dir="auto" class="gmail_attr">On Sunday, February 21, 2021 at 9:39:44 AM UTC msha...@gmail.com wrote:<br/></div><blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div>Hello everyone,</div><div><br></div><div>I see in CP2K that the Fermi energy level is set to HOMO energy. I was wondering if this is correct or not. How exactly CP2K compute the Fermi energy level?</div><div><br></div><div>Thanks in advance.<br></div></blockquote></div>