move energy derivatives to EnergyFunctions.cpp