[Pw_forum] about electric field potential in pp.x

Andrea Dal Corso dalcorso at sissa.it
Wed Mar 30 17:26:42 CEST 2005


On Sat, 2005-03-26 at 13:58 +0800, xywu wrote:
> Dear all,
> 
>  I add a sawlike electric potential in SCF and want to get the electric 
> potential from pp.x.
> But when i use the pp.x with plot_num=12, the electric field potential 
> in output file is zero.

Thank you for noticing this. You are right, there is a bug with
plot_num=12. This will be fixed on the cvs version.

> 
> But if i get the electric potential from pp.x without adding electric 
> field in SCF, the error occurs as follows;
> 
>  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>      from punch_plot : error #        -1
>      e_field is not calculated
>  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>  
> what's the wrong with it.
> 
plot_num=12 is supposed to work only if tefield=.true. in the pw.x
calculation, otherwise pp.x will not plot any field and stops with an
error message.


> Please give me some advice.
> 
> ! plot_num    selects what is saved in filplot:
>   !                0=charge
>   !                1=total potential V_bare+V_H + V_xc
>   !                2=local ionic potential
>   !                3=local density of states at e_fermi
>   !                4=local density of electronic entropy
>   !                5=STM images
>   !                6=spin polarization (rho(up)-rho(down))
>   !                7=|psi|^2
>   !                8=electron localization function (ELF)
>   !                9=planar average of all |psi|^2
>   !               10=integrated local density of states (ILDOS) from
>   !                  emin to emax (emin, emax in eV)
>   !                  if emax is not specified, emax=E_fermi
>   !               11=the V_bare + V_H potential
>   !               12=the electric field potential
>   !               13=the noncolinear magnetization.
> 
> BTW, still another question about add_efield.
> 
> In the file add_efield.f90
> 
> " !--------------------------------------------------------------------------
>   subroutine add_efield(rho,vpoten,etotefield)
> !--------------------------------------------------------------------------
> !
> !   This routine adds an electric field to the local potential. The
> !   field is made artificially periodic by introducing a saw-tooth
> !   potential. The field is parallel to a reciprocal lattice vector bg, 
> !   according to the index edir.
> !
> !   if dipfield is false the electric field correction is added to the
> !   potential given as input (the bare local potential) only
> !   at the first call to this routine. In the following calls
> !   the routine exit.
> !
> !   if dipfield is true the dipole moment per unit surface is calculated
> !   and used to cancel the electric field due to periodic boundary
> !   conditions. This potential is added to the Hartree and xc potential
> !   in v_of_rho. NB: in this case the electric field contribution to the 
> !   band energy is subtracted by deband.
> "
> "  if (first) then
>      WRITE( stdout,*)
>      WRITE( stdout,'(5x,"Adding an external electric field")')
>      WRITE( stdout,'(5x,"Intensity [a.u.]: ",f15.8)') eamp
>   endif
>   if (dipfield) WRITE( stdout,'(5x,"Dipole field [a.u.]: ", f15.8)') dip
>   if (first) then
>      WRITE( stdout,'(5x,"Potential amplitude [Ry]: ", f15.8)') vamp
>      WRITE( stdout,'(5x,"Total length [points]: ", i5)') npoints
>      WRITE( stdout,'(5x,"Total length [bohr rad]: ", f15.8)') length
>      WRITE( stdout,'(5x,"Field is reversed between points: ",2i6)')nmax, nmax+ndesc
>   endif
> "
> 
> And in a typical output file of PW.x with efield:
> "
>      Adding an external electric field
>      Intensity [a.u.]:      0.01000000
>      Potential amplitude [Ry]:      0.24480000
>      Total length [points]:   200
>      Total length [bohr rad]:     61.20000000
>      Field is reversed between points:      1   161
> 
> "
> >From the output file and the code in add_efield.f90, the "first" in the code is TRUE and the "dipfield" is  FALSE, which means that the subroutine is only running only at the first call and the dipole correction in periodic boundary conditions is never used! Is it the truth?
> 
> 
Yes this is true. However, from your output, the region where the field
is reversed seems too large. This region is supposed to be a narrow
region within the vacuum. 


> ------------------------------------------------------------
> Best regards
> 
> Xiyong Wu(X.Y.Wu) 
> E_mail:xywu at imr.ac.cn
> 
> 
> 
> 
> 
> _______________________________________________
> Pw_forum mailing list
> Pw_forum at pwscf.org
> http://www.democritos.it/mailman/listinfo/pw_forum
-- 
Andrea Dal Corso                    Tel. 0039-040-3787428
SISSA, Via Beirut 2/4               Fax. 0039-040-3787528
34014 Trieste (Italy)               e-mail: dalcorso at sissa.it




More information about the Pw_forum mailing list