The electronic energy, Er, of any microstate Yr is the sum on the one and two-electron energies:

where Hii is the one-electron energy of M.O. yi, Jii is the two-electron Coulomb integral <yiyi|yjyj>, and Kii is the two-electron exchange integral <yiyj|yiyj>. In this section it is more convenient to express it in terms of molecular orbital occupancies:

Similarly, the orbital energies can be written

or, in terms of orbital occupancies
