possible dipole moment bug in VASP 6 for non-orthogonal unit cells

Problems running VASP: crashes, internal errors, "wrong" results.

Moderators: Global Moderator, Moderator

Post Reply
Message
Author
seongjoojung
Newbie
Newbie
Posts: 5
Joined: Fri Apr 02, 2021 4:29 pm

possible dipole moment bug in VASP 6 for non-orthogonal unit cells

#1 Post by seongjoojung » Thu Nov 09, 2023 8:21 pm

Hi,

There may be a bug in calculation of the dipole moment for VASP 6. Relevant INCAR tags are LCALCPOL and DIPOL.

This occurs in systems with non-orthogonal unit cells. The 15-atom unit cell of perovskite KNbO3 is an example.

POSCAR:

Code: Select all

K1 Nb1 O3
   1.00000000000000
     5.6371441167140182    0.0000000000000000    0.0000000000000000
    -2.8185720584070091    4.8819100098683303    0.0000000000000000
     0.0000000000000000    0.0000000000000000    6.9040379844016515
   K    Nb   O
     3     3     9
Direct
  0.0000000000000000  0.0000000000000000  0.0000000000000000
  0.6666666666666667  0.3333333333333333  0.3333333333333333
  0.3333333333333333  0.6666666666666667  0.6666666666666667
  0.0000000000000000  0.0000000000000000  0.5000000000000000
  0.6666666666666667  0.3333333333333333  0.8333333333333333
  0.3333333333333333  0.6666666666666667  0.1666666666666667
  0.6666666666666667  0.8333333333333333  0.3333333333333333
  0.3333333333333333  0.1666666666666667  0.6666666666666667
  0.0000000000000000  0.5000000000000000  0.0000000000000000
  0.1666666666666667  0.8333333333333333  0.3333333333333333
  0.8333333333333333  0.1666666666666667  0.6666666666666667
  0.5000000000000000  0.5000000000000000  0.0000000000000000
  0.1666666666666667  0.3333333333333333  0.3333333333333333
  0.8333333333333333  0.6666666666666667  0.6666666666666667
  0.5000000000000000  0.0000000000000000  0.0000000000000000
The same INCAR, POTCAR and KPOINTS results in different outcomes of dipole moment.

VASP 6:

Code: Select all

            Ionic dipole moment: p[ion]=(   -39.46001   -68.34674   -93.20451 ) |e| Angst

 Total electronic dipole moment: p[elc]=(     0.00000    -0.00000     0.00000 ) |e| Angst
VASP 5:

Code: Select all

            Ionic dipole moment: p[ion]=(     0.00000     0.00000     0.00000 ) electrons Angst

 Total electronic dipole moment: p[elc]=(     0.00000    -0.00000     0.00000 ) electrons Angst
The dipole moments in x and z directions are good in both VASP 5 and 6, as they are integer multiples of the quantum dipole moment. However, the dipole moment to y direction in VASP 6 is not an integer or (integer + 0.5) multiple of quantum dipole moment. It converts to -0.05911 C/m2 in polarization. It is not large, but not ignorable considering how symmetrized the cell is. I've tried turning off symmetry, but the result was the same.

This also occurs in polarized, rhombohedral (R3m, #160) KNbO3.

POSCAR:

Code: Select all

K1 Nb1 O3
   1.00000000000000
     5.6564710636199358    0.0000000000000003    0.0000000000000000
    -2.8282355318099679    4.8986476368664480    0.0000000000000000
     0.0000000000000000    0.0000000000000000    6.9451403074990683
   K    Nb   O
     3     3     9
Direct
  0.0000000000000000  0.0000000000000000  0.0067429770991721
  0.6666666666666667  0.3333333333333333  0.3400763030991721
  0.3333333333333333  0.6666666666666667  0.6734096460991721
  0.3333333333333333  0.6666666666666667  0.1839420693822000
  0.0000000000000000  0.0000000000000000  0.5172754433822000
  0.6666666666666667  0.3333333333333333  0.8506087563822000
  0.1671572697387740  0.3343145191442170  0.3256605485062060
  0.1671572697387740  0.8328427302612260  0.3256605485062060
  0.6656854808557830  0.8328427302612260  0.3256605485062060
  0.3323521475224490  0.1661760635945600  0.6589938615062056
  0.8338239364054400  0.1661760635945600  0.6589938615062056
  0.8338239364054400  0.6676478524775510  0.6589938615062056
  0.5004906030721070  0.0009811858108840  0.9923271745062099
  0.9990188141891160  0.4995093969278930  0.9923271745062099
  0.5004906030721070  0.4995093969278930  0.9923271745062099
VASP 6:

Code: Select all

            Ionic dipole moment: p[ion]=(    -5.65647   -68.58107    34.31920 ) |e| Angst

 Total electronic dipole moment: p[elc]=(    -0.01564     0.00903     1.94332 ) |e| Angst
VASP 5:

Code: Select all

            Ionic dipole moment: p[ion]=(    -0.04995     0.02884   -34.31920 ) electrons Angst

 Total electronic dipole moment: p[elc]=(     0.01564    -0.00903    -1.94332 ) electrons Angst
As you can see, the -0.05780 C/m2 polarization remains in the y direction. The random error in polarization, as seen in the x and y direction polarization in VASP 5, is an order of magnitude smaller than this error (0.0029 and -0.0016 C/m2). I've attached the relevant inputs and outputs.

Also, not a bug but the change in the sign convention of the dipole moment hasn't been documented anywhere. The units changed from electrons (-1.602e-19 C) per angstrom to elementary charge (1.602e-19 C) per angstrom. The OUTCAR hints this but I think the documents also need to be updated.

Best,
Seongjoo
You do not have the required permissions to view the files attached to this post.

seongjoojung
Newbie
Newbie
Posts: 5
Joined: Fri Apr 02, 2021 4:29 pm

Re: possible dipole moment bug in VASP 6 for non-orthogonal unit cells

#2 Post by seongjoojung » Fri Nov 10, 2023 5:16 pm

The second component in ionic dipole moment in VASP 6 are integer multiples of Cartesian y component of the second lattice vector, which I think it shouldn't be the case? It may be relevant to the bug.

henrique_miranda
Global Moderator
Global Moderator
Posts: 414
Joined: Mon Nov 04, 2019 12:41 pm
Contact:

Re: possible dipole moment bug in VASP 6 for non-orthogonal unit cells

#3 Post by henrique_miranda » Mon Nov 13, 2023 3:13 pm

I had a look at the issue you are reporting but I am not sure this is a bug.

The first point is that in vasp 6.3.2, following feedback from the community, we changed the way the ionic contribution to the polarization is calculated.
This change was not reported in our list of known bugs but I added it now:
https://www.vasp.at/wiki/index.php/Known_issues
you can read about the change here:
https://www.vasp.at/forum/viewtopic.php?f=3&t=18141

The second point is that the polarization is reported in cartesian coordinates and not in fractional or direct coordinates.
You can see the conversion occurs in the following lines of code:

Code: Select all

IONIC_DIPOLE=0
DO I=1,3
   DO J=1,3
      IONIC_DIPOLE(J)=IONIC_DIPOLE(J)-DIPOLE_DIRECT(I)*LATT_CUR%A(J,I)
   ENDDO
ENDDO
If you write DIPOLE_DIRECT as well you get

For the first cell (R-3m, #166) KNbO3:
DIPOLE_DIRECT:
[14. 14. 13.5]
IONIC_DIPOLE:
[39.46000882 68.34674014 93.20451279]

For the second one (R3m, #160) KNbO3:
(R3m, #160) KNbO3
DIPOLE_DIRECT:
[ 7.99999963 14.00000037 -4.94147036]
IONIC_DIPOLE:
[ 5.65646796 68.58106871 -34.31920495]

Perhaps this clarifies your question related to why the reported polarization is not an integer multiple of the polarization quantum.

Post Reply