Dipole correction using LDIPOL

Queries about input and output files, running specific calculations, etc.


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
IBRAHIM
Jr. Member
Jr. Member
Posts: 99
Joined: Mon Jan 30, 2017 6:00 pm
License Nr.: 5-2551

Dipole correction using LDIPOL

#1 Post by IBRAHIM » Mon May 11, 2026 11:37 am

Dear VASP admin,

When using LDIPOL for molecules or slabs in VASP, does the molecule or slab need to be placed at a specific position inside the simulation cell?

We are confused by the following statement in the VASP wiki https://www.vasp.at/wiki/Electrostatic_corrections: "Note that the system has plenty of vacuum on either side. This empty space is important for the potential corrections needed for the LDIPOL tag."

Many thanks in advance,
Ibrahim


martin.schlipf
Global Moderator
Global Moderator
Posts: 648
Joined: Fri Nov 08, 2019 7:18 am

Re: Dipole correction using LDIPOL

#2 Post by martin.schlipf » Mon May 11, 2026 3:35 pm

VASP has a built-in mechanism to determine the position where the center of the cell is. We recommend that you set it with the tag DIPOL manually if you want to be more precise. Otherwise you need to make sure that VASP got it correct

Martin Schlipf
VASP developer


IBRAHIM
Jr. Member
Jr. Member
Posts: 99
Joined: Mon Jan 30, 2017 6:00 pm
License Nr.: 5-2551

Re: Dipole correction using LDIPOL

#3 Post by IBRAHIM » Tue May 12, 2026 7:16 am

Thanks for your reply.

- That means that for LDIPOL tag, there is no specific position inside the simulation cell, and we should instead take care of the cell center defined by the DIPOL tag, right?

- How can we make sure that VASP interpreted it correctly when the default value is used? When we checked the XML files, we found <v name="DIPOL"> -100.00000000 -100.00000000 -100.00000000 </v>. Also, the SCF procedure was stable and the calculations converged.

Many thanks in advance,
Ibrahim


martin.schlipf
Global Moderator
Global Moderator
Posts: 648
Joined: Fri Nov 08, 2019 7:18 am

Re: Dipole correction using LDIPOL

#4 Post by martin.schlipf » Tue May 12, 2026 10:41 am

If you do not set the DIPOL flag, VASP will report something like this

Code: Select all

 DIPCOR: dipole corrections for dipol
 direction  3 min pos    58,

in the OUTCAR file. The position (here 58) tells you where VASP put the dipole. If you do set DIPOL, VASP will use it to compute position from that. The position is given as a grid coordinate.

Martin Schlipf
VASP developer


IBRAHIM
Jr. Member
Jr. Member
Posts: 99
Joined: Mon Jan 30, 2017 6:00 pm
License Nr.: 5-2551

Re: Dipole correction using LDIPOL

#5 Post by IBRAHIM » Tue May 12, 2026 11:30 am

Thanks again for your reply.

In fact, we tested one of our systems with and without DIPOL and with the cluster is centered and when it is shifted away from the center.

We observed the following:

- When the cluster is centered and DIPOL is set to (0.5, 0.5, 0.5), the calculation converges.

- When the cluster is centered and DIPOL is not specified in the INCAR file, the calculation does not converge.

- When the cluster is shifted away from the center and DIPOL is not specified in the INCAR file, the calculation converges.

So, if the calculation converges, does this mean that VASP has correctly interpreted the DIPOL tag and that the dipole correction has been correctly applied?

Many thanks in advance,
Ibrahim

You do not have the required permissions to view the files attached to this post.
Last edited by IBRAHIM on Tue May 12, 2026 12:13 pm, edited 1 time in total.

martin.schlipf
Global Moderator
Global Moderator
Posts: 648
Joined: Fri Nov 08, 2019 7:18 am

Re: Dipole correction using LDIPOL

#6 Post by martin.schlipf » Wed May 13, 2026 6:33 am

If you set DIPOL in the INCAR file, VASP knowns where the center of the cluster is and will always use the correct position. Otherwise it will guess where it is by looking at the density. If can make a mistake and that then leads to the calculation not converging. Think of it this way: You should typically tell VASP where the center of the cell is, but if you forget, VASP will try to converge the calculation anyway using reasonable defaults.

You can see that in the output that you produced by looking at the line that I had suggested echo $file; grep 'direction.*min pos' $file | tail -n 5. If you set DIPOL in the INCAR file, VASP does not need to guess where the center is and always uses the same position. In the case that does not converge, VASP guesses very different positions in every iteration. In contrast, when VASP finds the correct position like in the last case, the calculation converges.

Code: Select all

DIPOL-position-centered/OUTCAR
 direction  1 min pos     1, direction  2 min pos     1, direction  3 min pos     1,
 direction  1 min pos     1, direction  2 min pos     1, direction  3 min pos     1,
 direction  1 min pos     1, direction  2 min pos     1, direction  3 min pos     1,
 direction  1 min pos     1, direction  2 min pos     1, direction  3 min pos     1,
 direction  1 min pos     1, direction  2 min pos     1, direction  3 min pos     1,

No-DIPOL-position-centered/OUTCAR
 direction  1 min pos   120, direction  2 min pos   193, direction  3 min pos    98,
 direction  1 min pos   183, direction  2 min pos   224, direction  3 min pos   243,
 direction  1 min pos   256, direction  2 min pos   130, direction  3 min pos    67,
 direction  1 min pos   168, direction  2 min pos    86, direction  3 min pos    45,
 direction  1 min pos   159, direction  2 min pos    82, direction  3 min pos    42,

No-DIPOL-position-shifted/OUTCAR
 direction  1 min pos    97, direction  2 min pos    86, direction  3 min pos    94,
 direction  1 min pos    96, direction  2 min pos    86, direction  3 min pos    93,
 direction  1 min pos    95, direction  2 min pos    86, direction  3 min pos    92,
 direction  1 min pos    94, direction  2 min pos    87, direction  3 min pos    92,
 direction  1 min pos    93, direction  2 min pos    87, direction  3 min pos    92,

Martin Schlipf
VASP developer


Post Reply