An ab initio study of filled skutterudites ROs4P12 (R = Sm, Eu and Gd)