Direct band gap opening in graphene by BN doping: Ab initio calculations