Simulating the superheating of nanomaterials due to latent heat release in surface reconstruction