Ab initio calculations of grain boundaries in W, Mo, Fe and W25at%Re