Ab initio calculations of the electronic structure of helical polymers