Thanks!
Maybe there is a misunderstanding on my expression. I want to calculate the voltage drop along Z axis, especially, not only for average of XY plane, but for a part of XY plane(where the atoms stay). as when a big lattice constant in XY plane may disturb the calculation when the voltage is used on the electrodes. is that right?