An ab initio study of the electronic structure of diimide