Molecular dynamics study of energetics of graphene flakes