SrTiO3(001) thin films on MgO(001): a theoretical study