Excited state relaxation using ISMEAR=-2

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


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
kousika_a
Newbie
Newbie
Posts: 9
Joined: Fri Aug 09, 2024 8:52 am

Excited state relaxation using ISMEAR=-2

#1 Post by kousika_a » Thu Jun 25, 2026 7:50 am

Hi,

I am trying to excited state relaxation for my hexagonal boron nitride nanoribbons (armchair nanoribbons) using VASP 6.2.0 in GPUs. I am getting the following error after 2 ionic relaxations: | LAPACK: Routine ZPOTRF failed! INFO:39900 KPOINT:1 SPIN:1 .

I am attaching my input files and output files for your reference. Any inputs on how to get convergence would be helpful.

Thanks
Kousika

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

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

Re: Excited state relaxation using ISMEAR=-2

#2 Post by michael_wolloch » Fri Jun 26, 2026 3:17 pm

Dear Kousika,

I tried to run your system on CPU first, and it did not give me any trouble (I stopped after 3 Ionic steps). However, I currently only have access to H100 Nvidia GPUs in a cluster with CUDA 13 and NVHPC 25.9, and I struggled to compile 6.2 with this brand new toolchain. I will get back to you after the weekend when I have tried this on GPUs with more information.

Thanks for your patience,

Michael


kousika_a
Newbie
Newbie
Posts: 9
Joined: Fri Aug 09, 2024 8:52 am

Re: Excited state relaxation using ISMEAR=-2

#3 Post by kousika_a » Mon Jun 29, 2026 7:57 am

Hi Michael,

Thank you for your response. In some other cases (other defects), the delta SCF ends after 15-20 iterations. So, I want to understand whether this is because of the VASP version issue or GPU issue? Since in this article (https://arxiv.org/html/2505.04748v1#bib.bib9), they have mentioned that they could get convergence only with VASP 5.4.4 pathched version. Also, with CPUs, how many cores did you use to run the calculations?

Thank you
Kousika


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

Re: Excited state relaxation using ISMEAR=-2

#4 Post by michael_wolloch » Mon Jun 29, 2026 2:22 pm

Dear Kousika,

I have now tested your calculation using 6.2.0 and 2 GP100 GPUs (2 MPI ranks, 4 OpenMP threads) and could reproduce the error. However, my electronic system diverged before the LAPACK error occurred:

Code: Select all

CGA:  41    -0.112191488175E+04   -0.20661E-03   -0.19880E-03   400   0.392E-03 0.417E-04
CGA:  42    -0.112191502897E+04   -0.14721E-03   -0.14664E-03   400   0.462E-03 0.248E-04
CGA:  43    -0.112191500416E+04    0.24810E-04   -0.43515E-04   400   0.133E-02 0.276E-03
CGA:  44    -0.112191148631E+04    0.35178E-02   -0.21638E-04   400   0.526E-01 0.323E-02
CGA:  45    -0.112164858998E+04    0.26290E+00   -0.46295E-03   400   0.556E+01 0.273E+00
CGA:  46    -0.110299988488E+04    0.18649E+02   -0.12809E+00   400   0.287E+03 0.179E+02
CGA:  47    -0.100999629315E+04    0.93004E+02   -0.12321E+02   400   0.158E+04 0.320E+03
CGA:  48    -0.992294547525E+03    0.17702E+02   -0.12394E+03   400   0.129E+04 0.217E+03
CGA:  49    -0.904910510777E+03    0.87384E+02   -0.98481E+02   400   0.242E+04 0.428E+02
CGA:  50    -0.708645219421E+03    0.19627E+03   -0.15064E+03   400   0.498E+04-0.988E+03

Interestingly, when I reduce the plane-wave energy cutoff ENCUT from 600 to 500 eV, the calculation runs fine (I stopped it after 8 ionic steps). Note that 500 eV should be more than enough, since your highest ENMAX in the POTCAR is 400 eV, and you are not relaxing the cell.

I also tried to run with the original cutoff, but reduced the step width for the ionic relaxation via POTIM=0.3. In that case, the calculation also finished 10 steps without issues, with the last two only taking 10 and 11 SCF steps, respectively.

My initial CPU calculation was running on 128 cores.

We get reports that VASP 6 does not converge systems that used to converge with VASP 5 from time to time. Usually this cannot be confirmed, or VASP 5 converges to an unstable local minimum.

I think your calculation is a bit unstable, but I don't think that has anything to do with GPUs or the version of VASP used. Rather, the relaxation can push the electronic system a bit out of whack.

That this is reproducible, but clearly depends at least in part on Nr. of ranks, ENCUT, and POTIM, tells me that this is a very unstable system.

I would suggest making a few more tests to ensure more stability. You could also try to use selective dynamics to fix some ions in the nanoribbon to speed up convergence.

Let me know if there is something more you need help with, or if you have further questions.

Cheers, Michael


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

Re: Excited state relaxation using ISMEAR=-2

#5 Post by michael_wolloch » Tue Jun 30, 2026 12:17 pm

Dear Kousika,

I have made one additional test with the current release version 6.6.0.
Since 6.2.0, there have been quite a few changes to the code paths dealing with excited states.

I am happy to report that for 6.6.0, your calculation runs fine with the settings you initially posted. I only changed NSW to 10 to avoid a very long calculation. The OUTCAR of my run is attached.

Please consider upgrading your VASP licence to have a lot more stability and a lot more features, of course.

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

kousika_a
Newbie
Newbie
Posts: 9
Joined: Fri Aug 09, 2024 8:52 am

Re: Excited state relaxation using ISMEAR=-2

#6 Post by kousika_a » Thu Jul 02, 2026 5:24 am

Dear Michael,

Thank you for testing the system with various settings (ENCUT, POTIM). The system is now converging faster with ENCUT= 500 eV and POTIM = 0.3. But when I try to introduce charges on defects (+1 electron using NELECT) I am again facing convergence problems. Getting the same error after few ionic iterations and the SCF is also diverging. So, as you have mentioned my system is becoming unstable with the addition of charges.

You have mentioned that "I would suggest making a few more tests to ensure more stability. You could also try to use selective dynamics to fix some ions in the nanoribbon to speed up convergence."

What kind of tests would you advice to achieve convergence, especially SCF convergence? I will also try selective dynamics in the mean time.

It is good to know VASP 6.6 could get better convergence for this system. We will try to upgrade to the latest version of VASP as suggested.

Thanks
Kousika


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

Re: Excited state relaxation using ISMEAR=-2

#7 Post by michael_wolloch » Thu Jul 02, 2026 9:07 am

Dear Kousika,

Unfortunately, adding a net charge to the system complicates things quite a bit.

Charged calculations are often very difficult to converge. In principle, you should add electrostatic corrections to them, as stated in the wiki article on NELECT. However, for charged slabs or a nanowire, these are not implemented.
Be aware that the energy of your charged nanowire cannot be converged with respect to supercell size, and that even relative energies should be scrutinized extra carefully.

You might try to add dipole corrections (setting LDIPOL, IDIPOL, and DIPOL) to your system in the x-direction, however, for the non-charged case. I did not mention this earlier, because I was focused a bit too much on the electronic convergence problem, and dipole corrections usually make that worse. Your system does show a sizable dipole moment in the x-direction as per a quick calculation with:

Code: Select all

ISTART=1
ICHARG=1
LDIPOL=T
IDIPOL=1
DIPOL= 0.25 0.50 0.10

In your run, you should use the center of mass for DIPOL, instead of my quick estimate.

Code: Select all

 DIPCOR: dipole corrections for dipol
 direction  1 min pos   271,
 dipolmoment          -0.300677      0.000000      0.000000 electrons x Angstroem

Note that I started from a preconverged WAVECAR and CHGCAR from the initial positions you provided, which I computed without dipole corrections. Then the calculation with the dipole corrections converged in just 5 SCF steps.

I also suggest that you initialize your magnetic moments via the MAGMOM tag; that can also help with convergence.

Otherwise, since you are limited to ALGO=All, Damped and VeryFast, due to the excited state, the optimization options are a bit slim. Indeed, the upgrade to VASP 6.6 would probably yield the best results.

Cheers, Michael


kousika_a
Newbie
Newbie
Posts: 9
Joined: Fri Aug 09, 2024 8:52 am

Re: Excited state relaxation using ISMEAR=-2

#8 Post by kousika_a » Tue Jul 07, 2026 5:09 am

Dear Michael,

Thanks for the suggestions. I will try them out, especially the dipole corrections.

I have one more question. For another defect (VNNB_0 charge state), I have observed that the excited state calculations converge for one spin channel (spin-down) and not converging for another spin-channel (spin-up). I have attached the files for your reference along with the PBE band structure for this defect. For me, it looks like when the defect state (especially the excited state) is far away from the bulk band edges, convergence is achieved. Whereas, when the excited defect state is near the band edge (CBM), the convergence is a problem. Is it because of the orbital reordering issue when too many bands are close by?

Also, can I circumvent this convergence problem if I exclude the atoms that correspond to CBM using selective dynamics? Is this a reasonable approach?

Thanks
Kousika

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

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

Re: Excited state relaxation using ISMEAR=-2

#9 Post by michael_wolloch » Thu Jul 16, 2026 3:37 pm

Dear Kousika,

Sorry for the long silence. I was on holiday, and then it took some time to try some approaches.
I can confirm that the spin-up excitation is very hard to converge, both the electronic system and the ionic positions. However, I managed to converge the structure with the spin-up excitation using VASP 6.6.0, with the improved ALGO=ALL and ISEARCH=1. Note that I did an initial static calculation without dipole corrections and started the relaxation from that WAVECAR.

Even for that, I had to struggle a bit. First, I changed a couple of INCAR flags:

Code: Select all

EDIFF=1E-6
NELM=120
LDIPOL=.True.
IDIPOL=1

The dipole tags, we already discussed. I tightened EDIFF, because the forces will be more accurate, and you are less likely to run into problematic ionic configurations. NELM is needed especially for the first step, which will not converge in the (default) 60 steps. This is a very bad start, and you should not continue with a calculation where the first ionic movement is based on wrong force data.

Even then, I ran into problems after 3 ionic steps were completed, and I encountered a bug. However, restarting from the CONTCAR fixed the issue, and the simulation ran for another 150 steps before I stopped it. I should probably have limited this to around 90 steps, at which point the energy changes were consistently below 1E-4. Additionally, you might want to allow for WAVECAR writing, since it will speed up the next step when you restart from WAVECAR. Of course you can also let this run. It will eventually converge, but your force criterion is tight, and POTIM=0.1 will take many steps.

I stopped here, but if you have a WAVECAR, it would be prudent to restart from it, and switch to a different ionic structure optimizer:

Code: Select all

IBRION=1
POTIM=0.5
ISIF=3
LATTICE_CONSTRAINTS=.FALSE. .TRUE. .FALSE.

This should allow for a quicker descent into the probably shallow minimum and allow the excitation to change the cell size in the direction along the nanowire (which is probably not needed. You could keep ISIF=2 and not set LATTICE_CONSTRAINTS).

Let me know how you fare with this in 6.2.

For your other questions:

For me, it looks like when the defect state (especially the excited state) is far away from the bulk band edges, convergence is achieved. Whereas, when the excited defect state is near the band edge (CBM), the convergence is a problem. Is it because of the orbital reordering issue when too many bands are close by?

I think the problem is more likely that you force a much higher excitation in the spin-up state (bit more than 3eV instead of 1.75 or so). So the system is forced to be in a more unstable state.

Also, can I circumvent this convergence problem if I exclude the atoms that correspond to CBM using selective dynamics? Is this a reasonable approach?

I don't think that you will fix the issues with convergence that way. And it is not trivial to figure out the ions that contribute to the CBM I guess.
However, fixing some parts of the nanowire, especially far from your defect, may improve ionic convergence once the electronic system is stable and forces are correct.

Cheers, and again my apologies for the delay,
Michael


Post Reply