added function to computet the background energy correction
write out E_BG and the the G=0 component of the total local potential