Non-converged SCF loops and MLFFs (continued)

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


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
MCV_IFPEN
Newbie
Newbie
Posts: 6
Joined: Wed Oct 24, 2018 8:32 am

Non-converged SCF loops and MLFFs (continued)

#1 Post by MCV_IFPEN » Tue Sep 15, 2026 8:52 am

Hi,

My post is a continuation of this topic . As the topic was locked, I had to create a new one to ask further about this issue.

Has the situation regarding non-converged SCF loops and MLFFs evolved since that post 3 years ago? Does VASP continue to store non-converged SCF structures in ML_ABN files during Active Learning?

I have an ongoing active learning simulation and I have been monitoring closely the number of converged and non converged SCF loops in it, as well as the number of structures appeded to the ML_ABN file. When I do the math, it seems to me that structures from non-converged are not stored. Is it the case now?

Thank you.
MCV

P.S.: I'm using vasp.6.5.0


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

Re: Non-converged SCF loops and MLFFs (continued)

#2 Post by andreas.singraber » Tue Sep 15, 2026 1:16 pm

Hello!

Thanks for bringing this up again because the information previously communicated in the topic you referenced seems to be incorrect. I have to disagree with the statements of my colleague: VASP does and always did check the convergence of the ab initio calculation. Only if it is converged the energies, forces and stress are added to the reference data (in the ML_ABN file) which is used for refining the force field. This safety measure has been implemented since the first release of ML force fields in VASP 6.3.0. On the source code level this can be seen when following the LABORT variable being passed down into subroutines of ml_ff_abinitio.F. The comments and the if-conditions we can find there clearly indicate that the reference data collection is "protected" against picking up non-converged data. I quickly tested this with a simple system and setting NELM to a low value, triggering multiple non-converged steps within a short trajectory with this screen message:

Code: Select all

 -----------------------------------------------------------------------------
|                                                                             |
|           W    W    AA    RRRRR   N    N  II  N    N   GGGG   !!!           |
|           W    W   A  A   R    R  NN   N  II  NN   N  G    G  !!!           |
|           W    W  A    A  R    R  N N  N  II  N N  N  G       !!!           |
|           W WW W  AAAAAA  RRRRR   N  N N  II  N  N N  G  GGG   !            |
|           WW  WW  A    A  R   R   N   NN  II  N   NN  G    G                |
|           W    W  A    A  R    R  N    N  II  N    N   GGGG   !!!           |
|                                                                             |
|     The electronic self-consistency was not achieved in the given           |
|     number of steps (NELM). The forces and other quantities evaluated       |
|     might not be reliable so examine the results carefully. If you find     |
|     spurious results, we suggest increasing NELM, if you were close to      |
|     convergence or switching to a different ALGO or adjusting the           |
|     density mixing parameters otherwise.                                    |
|                                                                             |
 -----------------------------------------------------------------------------

As expected, in the affected ionic steps the "faulty" data is not used for training and does not make it into the ML_ABN file.

What remains to be added in an upcoming VASP release is an easy-to-parse message in the ML_LOGFILE, signalling each non-converged ionic step. We have this on our ToDo list and I just updated the Wiki about the current behavior.

I am sorry for the inconvenience and the incorrect information you received previously about this issue. I hope it is at least reassuring that this "feature" has been implemented from the start.

All the best,
Andreas Singraber


MCV_IFPEN
Newbie
Newbie
Posts: 6
Joined: Wed Oct 24, 2018 8:32 am

Re: Non-converged SCF loops and MLFFs (continued)

#3 Post by MCV_IFPEN » Tue Sep 15, 2026 2:21 pm

Dear Andreas,

Thank you for the quick reply. Don't worry, I understand this kind of things happens when you have to maintaint such a complicate software with so many people. ;-)

It would be helpful as well if you also write a small comment on this in the VASP wiki articles about Machine Learning.

Best,
Manuel Corral


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

Re: Non-converged SCF loops and MLFFs (continued)

#4 Post by andreas.singraber » Tue Sep 15, 2026 2:33 pm

Dear Manuel,

yes, sure, I put a little "Mind" box in the "Best practices" section here: https://vasp.at/wiki/Best_practices_for ... tion_setup

Also, I took the opportunity to add a little feature for the ML_LOGFILE: in future releases of VASP you can search for occurrences via

Code: Select all

grep MSG ML_LOGFILE

which should give you something like this:

Code: Select all

# MSG ######################################################################################################################################
# MSG This line shows text messages regarding noticeable events in the current step.
# MSG 
# MSG nstep ..... MD time step or input structure counter
# MSG mtype ..... Message type, one of the following:
# MSG             - "info"    : General information, not necessarily requiring any user action.
# MSG             - "warning" : Notes about unexpected events, please check log file carefully.
# MSG message ... Actual message.
# MSG ######################################################################################################################################
# MSG               nstep     mtype                                                                                                  message
# MSG                   2         3                                                                                                        4
# MSG ######################################################################################################################################
MSG                     1   warning Non-converged ab initio calculation detected, data is not added to training set.
MSG                    17   warning Non-converged ab initio calculation detected, data is not added to training set.

Should be much simpler to search the OUTCAR file :-).

All the best,
Andreas


Post Reply