sign convention of electric field in VASP?
Hello,
I am trying to figure out the direction of the effective electric field I have in a heterostructure with a potential energy jump across the interface (to be concrete, the electrostatic energy as plotted from the LOCPOT shows a decrease in potential energy as we go from the bottom to the top of the slab moving in the +z direction.
Based on this previous post https://ww.vasp.at/forum/viewtopic.php? ... e24cf62cd9 My understanding is that the test charge convention in VASP for defining an electric field is opposite to the normal convention, i.e. in VASP the test charge is negative. So this means electrons will move along the direction of the electric field.
However, based on this post, my understanding was also that the potential energy difference is still defined as E=-dU/dz. So if I apply an electric field using EFIELD of +.01 eV/ang. the potential energy gradient will still be negative along the +z direction (so it's the potential energy change that an electron would experience in the case of VASP). And this is exactly what the user in the previous post seemed to show, i.e. graphene has a negative potential gradient when he/she applied a positive EFIELD.
However, when I try this as a sanity check, i.e. apply a positive EFIELD=+0.02 eV/angstrom for a symmetric slab with no dipole moment of its own, the potential energy jump along +z is positive, and vice versa for a negative FIELD. This would seem to imply that VASP is defining the potential energy as E=+dU/dz, which contradicts the results of the previous user, and seems like a really odd choice as this would imply that the potential energy and electric field are defined with opposite charge conventions.
So based on this I would take away that the effective electric field in VASP which would produce the decease in potential energy in my heterostructure would be negative, such that the "conventional" direction of the electric field would be positive. Is this right?! And if so, how is that reconciled with the previous user's plots of a positive EfIELD in VASP giving a negative potential gradient? Was the convention changed again since that post?
Thank you very much in advance.