Page 1 of 1

Convention of electric field direction in VASP

Posted: Thu Jan 19, 2023 7:13 am
by nicholascheng
Dear all,

Sorry to bring up a topic that has mentioned several times in the forum - but I have not been able to find a satisfactory conclusion so far.

It is known that EFIELD corresponds to the magnitude of the electric force field, F = qE where q is a test charge and E is the electric field, see for instance forum/viewtopic.php?f=3&t=17653&p=18816 ... ial#p18816

I am confused about the direction of the electric field in VASP. By definition E = -\grad V where V is the electric potential. So, if LOCPOT (plotted without V_xc) gives the sawtooth potential to have a positive gradient along the positive z direction, I expect to get a electric field pointing in the negative z direction.

For example, if I compute the LOCPOT of graphene with EFIELD = +1.0 eV/Ang, plotting the planar averaged electrostatic potential from LOCPOT
forum-locpot.jpg

gives me a negative gradient along the positive z direction, which I think corresponds to an electric field of 1.0 V/Ang pointing in the positive z direction. I would then expect an accumulation (depletion) of electron density below (above) the graphene layer. However, if I compare with the case without electric field (EFIELD = 0) by plotting the charge density difference \rho_diff = \rho_field - \rho_nofield
forum-chgdiff.jpg
I see the reverse behavior where the electron density is accumulated (depleted) above (below) the graphene layer, which suggests to me that the electric field is actually pointing in the negative z direction, to be consistent with fundamental principles that electrons travel in opposite direction of the electric field.

Wondering if I am missing something here. Appreciate also clarification the sign of the test charge q in F = qE. Thank you so much for your attention!

Please see attached zip folder for the inputs I used for this calculation.

Best,
Nicholas

Department of Physics
National University of Singapore

Re: Convention of electric field direction in VASP

Posted: Thu Jan 19, 2023 9:28 am
by martin.schlipf
I believe the test charge in VASP is negative. Hence, we minimize the potential energy by moving charge from below the graphene (higher potential) to above the film (lower potential). This is done because we are mostly concerned with electrons. I will double check that this statement is correct and get back to you next week.

Re: Convention of electric field direction in VASP

Posted: Fri Jan 20, 2023 2:06 am
by nicholascheng
Thank you so much!

Re: Convention of electric field direction in VASP

Posted: Mon Jan 23, 2023 1:50 pm
by martin.schlipf
I modified the wiki to state that the electric field is opposite the common definition.