Grain boundaries in NiO. I. Relative energies of 〈001〉 tilt boundaries