divergence

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


Moderators: Global Moderator, Moderator

Locked
Message
Author
kateryna_foyevtsova
Newbie
Newbie
Posts: 2
Joined: Fri Mar 07, 2025 5:43 pm

divergence

#1 Post by kateryna_foyevtsova » Mon Oct 20, 2025 7:16 pm

Dear vasp developers,

Could you please help me figure out why my calculation on a magnetic FeSe slab keeps diverging? I attach the input and some output files. POSCAR contains a structure which resulted from several successful ionic steps but now would not itself converge.

Thank you,
Kateryna

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

michael_wolloch
Global Moderator
Global Moderator
Posts: 209
Joined: Tue Oct 17, 2023 10:17 am

Re: divergence

#2 Post by michael_wolloch » Tue Oct 21, 2025 11:58 am

Dear Kareryna,

I was able to converge your system relatively easily in 66 electronic steps after cleaning up your INCAR file a bit. It is generally not advisable to use a long INCAR file with a lot of commented-out tags, since this can easily lead to mistakes.

I used the current release version, 6.5.1, and ran on 64 cores of an AMD machine with a GNU toolchain.

Since you did not provide a WAVECAR or CHGCAR file to start from, I started from scratch, which might have helped if the chargedensity had become a mess in the previous relaxation steps.

Here is my INCAR file:

Code: Select all

 SYSTEM = FeSe_double_1x1

 NSW    = 0
 NELM   = 200
 NELMDL = -10
 EDIFF  = 1E-6
 PREC   = Accurate
 ENCUT  = 320 
 LREAL= Auto
 ISMEAR = 0 
 SIGMA  = 0.1
#Magnetism:
 ISPIN  = 2
 MAGMOM = 5.0 5.0 -5.0 -5.0 5.0 5.0 -5.0 -5.0 -5.0 -5.0 5.0 5.0 -5.0 -5.0 5.0 5.0 -5.0 -5.0 5.0 5.0 -5.0 -5.0 5.0 5.0 5.0 5.0 -5.0 -5.0 5.0 5.0 -5.0 -5.0 5.0 5.0 -5.0 -5.0 5.0 5.0 -5.0 -5.0 -5.0 -5.0 5.0 5.0 -5.0 -5.0 5.0 5.0 -5.0 -5.0 5.0 5.0 -5.0 -5.0 5.0 5.0 5.0 5.0 -5.0 -5.0 5.0 5.0 -5.0 -5.0 63*0.0
# van der Waals
 IVDW = 1
 LMAXMIX = 4
# DOS related values:
 EMIN   =  -2.50
 EMAX   =   20.00 
 NEDOS = 1501
 LORBIT = 11

 KPAR = 2
 NCORE = 4

Here are some comments on my specific changes:

  • NELM: Slab systems, especially magnetic ones, are very hard to converge. I bumped the number up a bit, just to be safe.

  • ICHARG: I removed this, since I had no CHGCAR to start from.

  • LREAL: For large cells (as you have) LREAL=Auto is more efficient. If you need to compare energies with LREAL=.False. calculations, you need to change this back!

  • ISMEAR: Methfessel-Paxton smearing can be problematic for non-metallic systems. It is safer to switch to Gaussian smearing if you are not sure if you have a metal or not. In my calculation, I got a very small gap of 70 meV.

  • SIGMA: A larger smearing width usually aids in convergence. 0.1 eV is very reasonable for Gaussian smearing. To compare energies between different calculations, you need to match the smearing type and the smearing width.

  • MAGMOM: It is better to significantly increase the size of the initial magnetic moments compared to the size of what you expect they will end up with. +- 3.0 would have probably been enough.

  • LMAXMIX: If you don't have f-electrons 4 is enough. But it is generally a very good idea to set LMAXMIX, and 6 does not hurt.

  • IMIX, and other mixing tags: Changing the mixing can help in some cases, but I would usually start from the defaults. It is easier to make things worse than to improve them.

  • KPAR and NCORE: I strongly urge you to set parallelization flags that fit your system and your machine. It will make the calculations run much faster. Read the wiki page on parallelization for more information.

Some general advice for converging slab calculations:

  • Try a non-magnetic calculation first, and then restart from the WAVECAR file with ISPIN=2 and MAGMOM set correctly.

  • ALGO=All (especially with ISEARCH=1) usually is much more robust than ALGO=Normal and should be tried if convergence troubles are found. It has been improved in the 6.5.1 release of VASP to be even more robust.

  • When encountering problems with electronic convergence after several ionic steps have been completed with ALGO=Normal or ALGO=Fast, it can help to decrease POTIM and/or set MAXMIX to a positive value, so the charge density mixer is not reset after each ionic step.

I think that your calculation probably diverged because of the chosen Methfessel-Paxton smearing and the small smearing width. Please try to reduce your INCAR complexity and switch to my settings (optimize parallelization so it fits your machine), and let me know if it works for you with the 6.4.0 version, but I don't think that there have been considerable changes to 6.5.1 for the blocked Davidson algorithm (ALGO=Normal). I attached my OUTCAR file, so you can compare your calculation results to mine.

Cheers, Michael

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

kateryna_foyevtsova
Newbie
Newbie
Posts: 2
Joined: Fri Mar 07, 2025 5:43 pm

Re: divergence

#3 Post by kateryna_foyevtsova » Wed Oct 22, 2025 1:19 pm

Dear Michael,

Thank you very much for your help. The new INCAR fixed the divergence issue and I was able to complete the structural relaxation.

Best,
Kateryna


Locked