Recently, it has been seen in many article, dealing with ab-initio calculation, that energy of formation for a compound AxBy is expressed as below -
DelE (in eV) = E(AxBy) - xE(A) - yE(B)
Where, E(AxBy) is the energy of formation of the compound and E(A) and E(B) is energy of A and B in their respective stable state. At the outset it looks perfect, but problem starts if someone use a supercell (SC) with AnxBny where n is the multiplicity of the unit cell in the SC. In such cases the energy calculated from the above equation will be multiplied by n!!
Since, the energy/mol must be a constant value for a given compound and to compare energy of formation among different compounds the above equation should be modified as -
DelE (per mol) = c/(nx+ny) [E(AnxBny) - nxE(A) -nyE(B)]
where, c is the conversion factor from eV/atom to kJ/mol