fix bug in simple pairwise potential Hessian calculation

energy was not initialized to zero
remove some cpp warnings