# Recommendations to treat 4f electrons (valence) of Yb3+ in magnetic systems in VASP

I need help with: I would like to know what is the most common approach to treat valence 4f electrons of lanthanides (3+ charge) in VASP that circumvents the calculation problems shown below. (or more recommendations)

System: I am having trouble with SCF calculations of a system that contains $$\ce{2Yb^{3+}}$$ as dopants when including 4f electrons of Yb.

Setup: I am using the parameters below in the INCAR file:

NWRITE = 2
ISTART = 0
ICHARG = 2
LORBIT = 11
LPLANE = .FALSE.
NPAR = 4
PREC  = Accurate  (Precision level)
LREAL = AUTO  (Projection operators: automatic)
ALGO  = N         (Elect. algorithm: 38/48)
ENCUT = 500 eV

!GGA + U correction for Yb ion
LDAU = .TRUE.
LDAUTYPE = 2
LDAUL = -1 -1 -1 3
LDAUU = 0 0 0 7
EDIFF  = 1.0e-05
EDIFFG = -1.0e-01
NBLOCK = 1
IBRION = -1
NSW    = 0
ISYM   = 0
ISMEAR = 0
SIGMA  = 0.01
POTIM  = 0.90
LWAVE = .TRUE.
LCHARG = .TRUE.
!Magnetisation
ISPIN  = 2
LMAXMIX = 6 ! FM ORDER
MAGMOM = 27*0 24*0 81*0 1.0 1.0
NUPDOWN = 2

!Mixer
AMIX     = 0.2
BMIX     = 0.00001
AMIX_MAG = 0.8
BMIX_MAG = 0.00001


Also, I have varied several of them ENCUT, AMIX and BMIX as well as the U correction from 3 to 7. Have also tried different electronic algorithms to no avail.

This is a 3x3x3 supercell so I am testing runs only on the Gamma point and also with automatic Gamma 2 2 2 grid. I have tried HSE0 functional as well and the same problem persists.

Errors: Using ALGO=N I can get this error:

Error EDDDAV: Call to ZHEGV failed. Returncode =   7 1   8
and some other trials the energies keep decreasing indefinitely to really big negative numbers:
free energy    TOTEN  =      -131.40843111 eV
free energy    TOTEN  =      -120.45157042 eV
free energy    TOTEN  =      -103.28925863 eV
free energy    TOTEN  =    -12481.39444222 eV
free energy    TOTEN  = -67096650.34128196 eV
free energy    TOTEN  = ****************** eV
free energy    TOTEN  = ****************** eV


Workarounds?: I have found papers where a "\Delta SCF" approach is used to move one 4f electron to 5d orbital and reach desired orbital occupancy ($$\ce{Yb^{3+}}$$) but to know which band's occupation one needs to modify, a previously converged solution (probably without spin polarization: ISPIN=1) is needed which is not possible in my case due to charge unbalance.

Other resources: Similar issues have been found in other systems with lanthanides and specifically with $$\ce{Yb^{3+}}$$: See post here. and also here.

Note: When turning off spin polarization and using Yb_3 (valence : 5p6 6s2 5d1) PAW pseudopotential with frozen f electrons the calculations converge just fine.

• +1 Welcome to our new community and thank you for contributing your question here! We hope to see much more of you in the future !!! I made some edits to improve the formatting. Can you please look through them and continue to fix things (for example using ChemJax for the chemical formulas, and removing the </br> statements from your code, and using hyperlinks rather than raw URLs? Sep 25, 2021 at 20:41
• Thanks for the edits, I have fixed formatting things as you recommended. Sep 27, 2021 at 17:59
• Also following this link to see if someone can find a solution to this [VASP USER FORUM(vasp.at/forum/…) Oct 5, 2021 at 19:01
• I am also working on Yb3+ compound using VASP. There is an article published in 2010(sciencedirect.com/science/article/pii/S0966979510003730), and the authors also included 4f orbitals in Yb3+ in their calculation. The same authors used VASP and they seemed successfully converged the electron SCF part. Maybe you want to ask the authors regarding your Yb3+ issues? Best Regards, Peter Oct 26, 2021 at 6:42

There is a discussion on this limitation on VASP page. Maybe the approach of a frozen f valence PAW pseudopotential could help you. Although magnetic properties might not be as well represented. I'm quantum espresso user and when their PAW potentials show problems (not so rare) I go to a norm-conserving solution like pseudodojo library, if you can do this in VASP i think it may help. Also about the charge treatment, in QuantumESPRESSO in many cases I just implement a total charge on the supercell instead of specific atom as I think you're doing. If you have a dopant scf will usually bring charge localization towards the dopant in the end without need to explicitly set it in the atom, it may help convergence too.
• Thank you for this information @Rogério 1) For my system, I need those f electrons in the valence space so using frozen f valence PAW would defeat the purpose as you mention. 2) To your second point, I don't think it is easy to use pseudodojo pseudop in VASP (format of POTCAR is too different than the available formats at pseudodojo) 3) For the charge, I would also set the system charge instead of local charges in cases of need of charge compensation. I haven't found a solution to this yet, that is why I am not accepting your answer yet. But thank you for your insights. Oct 5, 2021 at 18:57