Excess energy and deformation along free edges of graphene nanoribbons