Add function to calculate delta E

let's try to calculate delta E