Simulation of electronic and optical properties of graphene