first principles thermodynamics study of the spinel mgal 2