Electronic structure of nanomaterials