corrected: potential energy calc, check boundary condition (periodic was the only working)