"Hidden" stress criterion for relaxations of strained structures in VASP?

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


Moderators: Global Moderator, Moderator

Locked
Message
Author
sophie_weber1
Newbie
Newbie
Posts: 14
Joined: Mon Apr 28, 2025 2:27 pm

"Hidden" stress criterion for relaxations of strained structures in VASP?

#1 Post by sophie_weber1 » Mon Feb 02, 2026 5:14 pm

Hello,

At some point I was performing structural relaxations of a structure in VASP under uniaxial strain (using a modified executable where the lattice constant is fixed in one direction and both volume and atomic positions are allowed to relax). Without thinking much I just used a stopping criterion of forces (EFIFFG=-0.01), and the relaxation seemed reasonable and the output stated that the stopping criterion had been reached after a few ionic steps.

However, discussing it more carefully with colleagues, it doesn't make sense that forces would work as a stopping criterion when you are letting both the cell volume and atomic positions change, because in general forces are only defined with respect to changes of energy due to internal changes of position. Thus, with either strained or unstrained relaxations where you are allowing at least some of the lattice vectors to change lengths, it seems like there must also be a stress value (which would depend on lattice vector length) that also goes into the stopping criterion for relaxation. But I can't find any further information about this online.

Can you clarify if my understanding is correct, and if so, what the stress criterions are for a given force criterion that's set in the INCAR (or is there is somehow a way to explicitly set the stress stopping point in the INCAR? I couldn't find a way to do this).

Thanks in advance for the help!


andreas.singraber
Global Moderator
Global Moderator
Posts: 371
Joined: Mon Apr 26, 2021 7:40 am

Re: "Hidden" stress criterion for relaxations of strained structures in VASP?

#2 Post by andreas.singraber » Tue Feb 03, 2026 3:46 pm

Hello!

Interesting question, I actually also discussed this with my colleague Jonathan because we were both not sure how this is handled internally in VASP. But before diving into details let me mention the INCAR tag LATTICE_CONSTRAINTS which may help you to perform the special form of structure relaxation you mentioned without having to modify the VASP source code.

If I understood your argument correctly it boils down to this: there may be situations where the net forces acting on ions are arbitrarily close to zero while the lattice is not yet relaxed (stress is non-zero). A simple example would be the following: imagine a perfectly relaxed simple cubic lattice, i.e., a cubic box with a single atom inside (or even a supercell thereof). Here, the energy is at a minimum, all forces are zero and there is no stress, everything is relaxed. If I now scale one of the lattice vectors, then the situation changes in the way we seek to understand: the box is squeezed (or stretched) in one direction and hence the energy is out of the minimum and we expect a non-zero stress tensor. However, due to symmetry the total forces acting on the ions are still all zero!

Now, in the VASP Wiki we write that setting EDIFFG < 0 will check only for the norms of all force vectors. Hence, as you correctly pointed out, this criterion alone cannot suffice to properly relax the situation described above. We did a little research in the code and found that the Wiki is actually incomplete! VASP does handle the above situation by introducing another criterion that is in line with your expectation that there should be a "stress stopping criterion". Depending on your VASP version somewhere around line 4400 in main.F one can find two lines which deal with the stopping criterion:

Code: Select all

! This one is the force criterion:
           IF (SQRT(TIFOR(1,NI)**2+TIFOR(2,NI)**2+TIFOR(3,NI)**2) &
                &       >ABS(DYN%EDIFFG)) LSTOP2=.FALSE. 
! ... and a few lines below there is one for the stress components:
                 IF (ABS(D2SIF(J,I))/FACTSI/T_INFO%NIONS>ABS(DYN%EDIFFG)) LSTOP2=.FALSE.

While the first one captures the force magnitudes as expected, the second criterion is actually undocumented but active whenever ISIF > 2. It reuses the value of EDIFFG multiplied by a conversion factor (from force to stress units, incorporating the step size POTIM) to define the desired stress criterion. Hence, in the "EDIFFG < 0 mode" VASP will check the forces and the stress to determine whether the ionic loop should be stopped (if ISIF > 2).

Therefore, it is safe to assume that VASP will not incorrectly stop at an unrelaxed situation similar to the one described above. However, it is true that there is no separate INCAR tag which allows one to control the stress threshold. I can only speculate that the conversion factor has been set up in a robust way since it has not been changed in roughly 20 years now! Anyway, I will ask my colleagues if there is any further insight on this topic.

All the best,
Andreas Singraber


sophie_weber1
Newbie
Newbie
Posts: 14
Joined: Mon Apr 28, 2025 2:27 pm

Re: "Hidden" stress criterion for relaxations of strained structures in VASP?

#3 Post by sophie_weber1 » Wed Feb 04, 2026 3:22 pm

Hello,

Ok, thanks, this is already helpful!

Best,
Sophie


Locked