Structure, energy, and structural transformations of graphene grain boundaries from atomistic simulations