Which MLFF force/stress corresponds to each ionic step?

Question on input files/tags, interpreting output, etc.

Please check whether the answer to your question is given in the VASP online manual or has been discussed in this forum previously!

Moderators: Global Moderator, Moderator

Post Reply
Message
Author
jeremiah
Newbie
Newbie
Posts: 7
Joined: Wed Oct 26, 2022 10:07 pm

Which MLFF force/stress corresponds to each ionic step?

#1 Post by jeremiah » Wed Jan 04, 2023 5:29 pm

Hello,

I want to get the external pressure estimate from the MLFF at each step to compare to the calculated values. If I search my OUTCAR for "Ionic step", "ML FORCE on cell", and " FORCE on cell" I get a pattern like this:

--- Ionic step 1---
ML FORCE on cell
FORCE on cell
ML FORCE on cell
--- Ionic step 2 ---
FORCE on cell
ML FORCE on cell
--- Ionic step 3 ---
FORCE on cell
ML FORCE on cell
...
--- Ionic step N ---
ML FORCE on cell

My question is which "ML FORCE on cell" corresponds to which ionic step. I am stopping and restarting the calculation with STOPCAR, so it is a bit confusing. The ML FORCE block always appears twice after a restart, but whether or not it appears at the end varies. I do not see it when VASP finishes normally (after NSW is completed). But, if I stop early with STOPCAR, it is sometimes there and sometimes not there.

Thank you,
Jeremiah

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

Re: Which MLFF force/stress corresponds to each ionic step?

#2 Post by andreas.singraber » Wed Jan 11, 2023 10:53 am

Hello Jeremiah,

thank you for your post, there is indeed a problem in the output order when machine learning is used. We have already identified the problem and the next VASP version will contain a fix to make the output correct. To make things clear for VASP 6.3.2 (and earlier) please have a look at this "timeline" of a short MD trajectory (NSW = 10):

Code: Select all

Ionic step:      1      2      3      4      5      6      7      8      9       10
            X(1)---X(2)---X(3)---X(4)---X(5)---X(6)---X(7)---X(8)---X(9)---X(10)----
           POSCAR                                                         CONTCAR

The first line denotes the ionic step, corresponding to the label "Ionic step ..." given in the OUTCAR file. X(t) denotes the structure (lattice, ionic positions) in the XDATCAR file, where t is the number following "Direct configuration=". Hence, X(1) and X(10) are identical to the structure in POSCAR and CONTCAR, respectively. Ionic step 1 means computing the forces acting on ions at X(1) allowing us to propagate the system to X(2).

Unfortunately, the order of output is incorrect for the "ML" blocks in the OUTCAR file, in VASP 6.3.2 you will find something like this:

Code: Select all

--------------------------------------- Ionic step        1  ---------------------------
  ML FORCE on cell : prediction for POSCAR = X(1)
  FORCE on cell    : ab-initio  for X(1) --> MD step --> X(2)
  ML FORCE on cell : prediction for X(2)
--------------------------------------- Ionic step        2  ---------------------------
  FORCE on cell    : ab-initio  for X(2) --> MD step --> X(3)
  ML FORCE on cell : prediction for X(3)
--------------------------------------- Ionic step        3  ---------------------------
  FORCE on cell    : ab-initio  for X(3) --> MD step --> X(4)
  ML FORCE on cell : prediction for X(4)
--------------------------------------- Ionic step        4  ---------------------------
  FORCE on cell    : ab-initio  for X(4) --> MD step --> X(5)
  ML FORCE on cell : prediction for X(5)
--------------------------------------- Ionic step        5  ---------------------------
  FORCE on cell    : ab-initio  for X(5) --> MD step --> X(6)
  ML FORCE on cell : prediction for X(6)
--------------------------------------- Ionic step        6  ---------------------------
  FORCE on cell    : ab-initio  for X(6) --> MD step --> X(7)
  ML FORCE on cell : prediction for X(7)
--------------------------------------- Ionic step        7  ---------------------------
  FORCE on cell    : ab-initio  for X(7) --> MD step --> X(8)
  ML FORCE on cell : prediction for X(8) --> MD step --> X(9)
--------------------------------------- Ionic step        8  ---------------------------
  ML FORCE on cell : prediction for X(9) --> MD step --> X(10)
--------------------------------------- Ionic step        9  ---------------------------
  ML FORCE on cell : prediction for X(10)
--------------------------------------- Ionic step       10  ---------------------------
"FORCE on cell" belongs to output from ab-initio, "ML FORCE on cell" to the corresponding block for the machine learning prediction. I annotated which actual structures the blocks belong to. As you can see the ML blocks are written out too early, the output should be after the next "Ionic step" line. Only in the initial step the first ML block is in the correct position.

I hope that clears things up, sorry for the inconvenience!

Regarding the mixed result with a given STOPCAR file, I have to further investigate, I could not yet reproduce the problem, please stay tuned...

Best,
Andreas Singraber

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

Re: Which MLFF force/stress corresponds to each ionic step?

#3 Post by andreas.singraber » Wed Jan 11, 2023 1:23 pm

Hello again!

Unfortunately, I was not able to reproduce the behavior you described with a STOPCAR file (neither with LSTOP nor LABORT), where sometimes an ML block is written and sometimes not. In my case always an additional ML block is written out, which actually is incorrect because it is showing a prediction for the positions one step after the last positions which will be written to the XDATCAR file. We will fix this also in the upcoming release.

If you have example files that show different behavior, i.e., sometimes last ML block written, sometimes not, please upload it, so I can have a closer look. Thank you!

Best,
Andreas Singraber

Post Reply