A molecular orbital theory of hydrocarbons: II. Ethane, ethylene and acetylene