A first-principles study of the Hume-Rothery electron compounds