Commit suboptimal calculate_derivates_energy implementation

Signed-off-by: Axel Davy <axel.davy@ens.fr>