[Pw_forum] dipole moment calculation

Giovanni Cantele Giovanni.Cantele at na.infn.it
Tue Mar 10 15:50:59 CET 2009


Aihua Zhang wrote:
> Dear Giovanni,
>
> Thank you for the reply! I have used lelfield option, and you used 
> telfield. The documentation for telfield (saw_tooth potential) in 
> input_pw.html seems different from README (modern theroy of 
> polarizaiton) in example30. What's the difference between these two 
> methods?
Dear Aihua, one answer is here:
http://www.democritos.it/pipermail/pw_forum/2008-July/009409.html


I tried to explore some features of the code in the past, and tried to 
make some test runs
on the H2O molecule.

There should be many possibilities, for polarization calculations, 
within QE.

One point is that you can make polarization calculation both without and 
in presence of
an external electric field. If you want just to test the spontaneous 
polarization, rather than
the electric-field induced polarization, you don't need to turn on any 
electric field.

Now, due to the fact that QE contains several executables (pw.x / cp.x) 
with several options
(add a saw-tooth electric potential, Berry phase calculation with or 
without electric field), one
(who, just as me, is not very familiar with those options and related 
issues) might get confused.

What I tried to do is (the convergence of all the reported results has 
*NOT* been checked):

i) pw.x calc. with tefield=.true.    (check the spelling, tefield not 
telfield)
this is what I reported in the previous e-mail, the result is here:
Computed dipoles :                                  
electron   0.00000   0.00000  -4.61164             
ion            0.00000   0.00000  -3.87896             
total         0.00000   0.00000   0.73268   
Please notice that in my input the electric field amplitude is zero.       

ii) pw.x with lberry=.true.
my result is here:
P =   0.7479015  (mod  20.0000000)  (e/Omega).bohr
In this case, I think, you don't need to turn on the lelfield=.true. 
option, because
the dipole moment is computed even if lelfield=.false.

iii) cp.x with tefield=.true.
In this case that variable assumes a different meaning wrt pw.x, because 
a homogeneous electric
field of amplitude efield is added, and the polarization computed using 
a Berry phase approach.
I tried to run example30 re-adapted to the water molecule and got
Elct. dipole 1   -1.572721  Ionic dipole 1    2.343260
the sum is 0.770539, which seems to agree with the pw.x result (with 
tefield=.true.) of 0.73268. I also tried to put the
molecule in the middle (instead of at the corner) of the unit cell, but 
results were unchanged
(Elct. dipole 1    2.838308  Ionic dipole 1   -2.067694, sum: 0.770614)
You are maybe right in the fact that the documentation for tefield 
(saw_tooth potential) in input_pw.html seems different from README 
(modern theory of polarization) in example30, because example30 uses 
cp.x whose documentation is in Doc/INPUT_CP.
If I well understand, using tefield=.true. within cp.x should be (at 
least regarding the theoretical framework) the same as
using lberry=.true. and lelfield=.true. within pw.x.




> You maybe should also pay attention to the units. I found at least in 
> the subroutine related to lelfield they use Rydberge atomic units, 
> that is, the unit for dipole is e/sqrt(2)*bohr_radius. In your 
> arithemetic, the Hartree atomic units is used.
Well, I think that Hartree au are assumed for the dipole moment, then 
they are properly converted to Ry atomic units when needed.
Just have a look to compute_dip.f90. The ionic dipole is computed as:
  DO na=1,nat
     DO ipol=1,3
        
dipol_ion(ipol)=dipol_ion(ipol)+zv(ityp(na))*(tau(ipol,na)+x0(ipol))*alat
     ENDDO
  ENDDO
so distances are in Bohr (tau, x0 in units of celldm(1)=alat, alat in 
bohr), charges in units of e (zv is tha valence of each pesudo-ion).
Same for electrons, because in that case the charge density is accounted 
for through  rrho(ir), which again is in units of e. Then
when computing the potential amplitude associated to the electric 
field/dipole moment (add_efield.f90) you get:
  !
  !    The electric field is assumed in a.u.( 1 a.u. of field changes the
  !    potential energy of an electron of 1 Hartree in a distance of 1 Bohr.
  !    The factor 2 converts potential energy to Ry.
  !    NB: dip is the dipole moment per unit area divided by length and
  !        multiplied by four pi
  !
  vamp=2.0d0*(eamp-dip)*length*REAL(npoints-ndesc,dp)&
       /REAL(npoints,dp)
where vamp is the potential amplitude, this time in Ry.

The only place in which it seems that Ry au are used instead, is pw.x 
with lberry=.true. and lelfield=.true., because
this uses the routines in c_phase_field.f90, where I see, for example:

!factor sqrt(2) is the electronic charge in Rydberg units
  pola_ion=0.d0
  DO na=1,nat
    pola_ion=pola_ion+zv(ityp(na))*tau(gdir,na)*alat*dsqrt(2.d0)
  END DO



I'm grateful to anyone more familiar with those parts of the code 
pointing out anything
(or everything!)  wrong in what I wrote here!!!


Giovanni




> Best regards
>
> Aihua
>
> On Mon, Mar 9, 2009 at 10:19 PM, Giovanni Cantele 
> <Giovanni.Cantele at na.infn.it <mailto:Giovanni.Cantele at na.infn.it>> wrote:
>
>     Aihua Zhang wrote:
>
>         Dear all,
>
>         I tried a test calculation of the dipole moment of water. The
>         water molecule is put into a 20 a.u. ^3 box. The relevant
>         setting are
>
>         lelfield = .true.
>         efield = 0.01
>
>         In the output file, it reports
>
>             Electronic Dipole per cell (a.u.)   -1.921145549061207
>             Ionic Dipole per cell (a.u.)    116.1997104738884
>
>         How is Electronic Dipole defined here? By looking into the
>         source code, Ionic Dipole is defined as in textbook. I also
>         notice that total energy difference with respect to
>         zero-electric-field system is approximately equal to
>         (Electronic Dipole + Ionic Dipole) * Efield. But Electronic
>         Dipole hardly resembles the experimental dipole of water,
>         which is about 1.85 D. Could anyone explain a bit about these
>         quantities? Thank you!!
>
>         Zhang
>
>
>     Hi,
>
>     I'm not very expert about this, however I tried to reproduce your
>     job. I got:
>        Computed dipoles :                                    electron
>       0.00000   0.00000  -4.61164              ion        0.00000  
>     0.00000  -3.87896              total      0.00000   0.00000  
>     0.73268               Dipole field [a.u.]:          0.0012
>
>     As far as I understand total dipole moment = 0.73268  a.u. =
>     0.73268 * 25.417463 / 10 Debye = 1.86 Debye.
>
>     I remember I found strange results in electric field calculations
>     some time ago, and the problem was where the
>     molecule is placed within the unit cell, but I'm not very sure
>     (that was a couple of years ago!).
>     The input I used is in attachment.
>
>     Giovanni
>
>
>     -- 
>
>
>
>     Dr. Giovanni Cantele
>     Coherentia CNR-INFM and Dipartimento di Scienze Fisiche
>     Universita' di Napoli "Federico II"
>     Complesso Universitario di Monte S. Angelo - Ed. 6
>     Via Cintia, I-80126, Napoli, Italy
>     Phone: +39 081 676910
>     Fax:   +39 081 676346
>     E-mail: giovanni.cantele at cnr.it <mailto:giovanni.cantele at cnr.it>
>           giovanni.cantele at na.infn.it <mailto:giovanni.cantele at na.infn.it>
>     Web: http://people.na.infn.it/~cantele
>     <http://people.na.infn.it/%7Ecantele>
>     Research Group: http://www.nanomat.unina.it
>
>
>      &CONTROL
>            calculation='scf'
>            title='H2Otest'
>            verbosity='high'
>            restart_mode='from_scratch'
>            nstep=100
>            iprint=1
>            tprnfor=.true.
>            outdir='./tmp/'
>            prefix='H2Otest'
>            disk_io='default'
>            pseudo_dir='/home/cantele/WORK/CODES/Quantum-ESPRESSO/pseudo'
>            tefield=.true.
>            dipfield=.true.
>      /
>      &SYSTEM
>            ibrav=1
>            celldm(1) = 20
>            nat=3
>            ntyp=2
>            ecutwfc=30.0
>            ecutrho=180.0
>            occupations='smearing'
>            degauss=0.01
>            edir=3
>            eamp=0.D0
>            eopreg=0.1
>            emaxpos=0.5
>     /
>      &ELECTRONS
>      /
>     ATOMIC_SPECIES
>            O    15.9994    O.pbe-rrkjus.UPF
>            H    1.00794    H.pbe-rrkjus.UPF
>     ATOMIC_POSITIONS { Angstrom }
>     O    0.0  0.0  0.0
>     H    0.77 0.0  0.62
>     H   -0.77 0.0  0.62
>     K_POINTS { gamma }
>
>     _______________________________________________
>     Pw_forum mailing list
>     Pw_forum at pwscf.org <mailto:Pw_forum at pwscf.org>
>     http://www.democritos.it/mailman/listinfo/pw_forum
>
>
>
>
> -- 
> ------------------------------------------------------------------
> Research Fellow,
> Dept. of Physics, National Univ. of Singapore
> 10 Kent Ridge Crescent, Singapore, 119260
> Tel: +65 6516 7844
> ------------------------------------------------------------------
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Pw_forum mailing list
> Pw_forum at pwscf.org
> http://www.democritos.it/mailman/listinfo/pw_forum
>   


-- 



Dr. Giovanni Cantele
Coherentia CNR-INFM and Dipartimento di Scienze Fisiche
Universita' di Napoli "Federico II"
Complesso Universitario di Monte S. Angelo - Ed. 6
Via Cintia, I-80126, Napoli, Italy
Phone: +39 081 676910
Fax:   +39 081 676346
E-mail: giovanni.cantele at cnr.it
        giovanni.cantele at na.infn.it
Web: http://people.na.infn.it/~cantele
Research Group: http://www.nanomat.unina.it




More information about the users mailing list