Calculation of the Fermi energy and bulk modulus of metals