script to calculate the energy over the reaction coordinate