drift in forces

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


Moderators: Global Moderator, Moderator

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

drift in forces

#1 Post by IBRAHIM » Thu Mar 23, 2023 1:24 am

Dear All,

I would like to understand the effect of the total drift of forces "Energy cut off and FFT mesh - Vaspwiki"
As explained "the drift should definitely not exceed the magnitude of the forces, in general it should be smaller than the size of the forces you are interested in (usually 0.1 eV/Ang)."

Also it is mentioned "If there is a considerable drift in the forces, increase the FFT mesh."

Usually I use EDIFFG about -0.02 to -0.01 eV/Ang with PREC=A and Encut =1.3*Enmax, if the total drift is not below the EDIFFG , what does "a considerable drift" mean? How big is it or which value can be ignored?

Thanks

henrique_miranda
Global Moderator
Global Moderator
Posts: 506
Joined: Mon Nov 04, 2019 12:41 pm
Contact:

Re: drift in forces

#2 Post by henrique_miranda » Thu Mar 23, 2023 1:15 pm

I think you are referring to this page:
https://www.vasp.at/wiki/index.php/Ener ... d_FFT_mesh

I would like to call your attention to:
The drift should definitely not exceed the magnitude of the forces, in general, it should be smaller than the size of the forces you are interested in (usually 0.1 eV/Å).
Considerable drift means a drift that is in the same order of magnitude as your forces.

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

Re: drift in forces

#3 Post by IBRAHIM » Tue Mar 28, 2023 9:14 am

Thanks for your reply.

1- should the drift be less than EDIFFG at each ionic step or just less than forces on atoms at each ionic step? what happened if there is some fixed atoms using selective dynamics?

2- I noticed strange fluctuations in the total drift with the change of ALGO. Sometimes I also play around the electronic convergence EDIFF, LREAL to reduce the drift.

However, in all cases the FFT mesh is provided high enough using PREC=Accurate and the basis set with Encut =1.3*Enmax. But in the above link it is explained that the drift is related to the FFT mesh.

Could you please clarify more about that issue and its related effects?

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

henrique_miranda
Global Moderator
Global Moderator
Posts: 506
Joined: Mon Nov 04, 2019 12:41 pm
Contact:

Re: drift in forces

#4 Post by henrique_miranda » Tue Mar 28, 2023 9:36 am

1- The drift is an indicator of the error in the forces after each electronic minimization calculation. EDIFFG is the criteria to stop ionic minimization. If you have a large error in the forces after the electronic minimization then it will be unlikely that you can reach the criteria to stop the ionic minimization. If you are doing selective dynamics then only the forces in the unfrozen atoms are checked for convergence. The drift might be computed for all the forces (you can easily check on your runs).

2- EDIFF will certainly play a role in the accuracy of the forces: you need accurate wavefunctions to compute the forces. Using the real space projection scheme will also add some noise to the forces but this is often very very small. The dependency with ALGO seems to have to do with the fact that for ALGO=All the Harris correction to the forces (https://www.vasp.at/wiki/index.php/LCORR) is turned off by default.

I can give you a little bit more insight on this later point if you could share the INCAR, POSCAR and KPOINTS files.

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

Re: drift in forces

#5 Post by IBRAHIM » Sun Apr 16, 2023 12:27 am

Thanks for your reply.

1-In the wiki page wiki: wiki/index.php/Energy_cut_off_and_FFT_mesh

It is not clear, if to check the criteria for the drift at the end of calculation (last ionic step) or at each ionic step?

2-It is confusing because the calculated total energy (of course a few change only between real A and false if included) and relaxed structure are almost same and the convergence is reached for forces, the difference is that the total drift is higher than the forces on atoms in some directions, at only the last ionic step and sometimes also with other ionic steps. Moreover, in some cases ALGO=All gives a higher drift than the forces but ALGO=Normal is OK. Also, such issues show dependency on the VASP version 5-6. So, I mentioned it as a fluctuation. What can be done in such cases, could it be a numerical issue?

Thanks

henrique_miranda
Global Moderator
Global Moderator
Posts: 506
Joined: Mon Nov 04, 2019 12:41 pm
Contact:

Re: drift in forces

#6 Post by henrique_miranda » Mon Apr 17, 2023 11:15 am

1 - You can check this criterion every time the forces are computed. Whether you check at the end of the electronic minimization or at the end of the ionic minimization is up to you. Of course, I think it makes more sense to check as soon as possible so you can adapt your input parameters if necessary. You don't need to run a full ionic minimization to find that you have some drift in the forces.

2 - The Harris correction to the forces (wiki/index.php/LCORR) is calculated from the difference between the input and output density in each electronic minimization step. This quantity is not available when ALGO=All so LCORR is set to false. That is the reason why you have a different drift in the forces when using ALGO=All or Normal.
As for differences between vasp5 and 6: could you share the OUTCAR files from the two runs?

Post Reply