Page 1 of 1
MLFF stress inconsistent between single-point and MD evaluation of the same atomic configuration
Posted: Sat Jul 25, 2026 9:46 pm
by Netanela
Hi everyone,
I recently trained an MLFF model using VASP version 6.4.1, but switched to version 6.5.1 with the same ML_FF file for production runs (mainly to utilize the ML_ESTBLOCK tag).
Using the same ML_FF file, I compute the stress tensor ("in kB" line) in two ways for the same atomic configurations of a liquid slab:
(1) single point evaluation of an extracted frame from NVT run XDATCAR
(2) the stress written during that NVT run itself
With version 6.4.1 these agree closely. However, under version 6.5.1 (same MLFF, same frames extracted) they diverge per frame by some offset (not constant). This offset later translates into a +20 mN/m difference in the surface tension of this system, between single-point and MD runs in version 6.5.1. As stated before - version 6.4.1 does not produce such offset, both ways are consistent.
The stress from the single point calculation with version 6.5.1 DO agree with the ones from version 6.4.1. So the issue is specific to MD-run vs. single point stress within version 6.5.1.
So, I have two questions:
(1) Could this be related to the neighbor list? I couldn't find any INCAR tag that could force the neighbor list to get updated every MD step, so is there any way around it?
(2) Could this be related to the MLFF being trained with version 6.4.1?
(3) Is there some kind of compatibility step or re-validation I should do when moving an ML_FF trained in an older version to a newer one?
(4) Is it safer to just stick with 6.4.1 for production as well, since that's what the model was trained with?
Any insight would be very helpful.
Thanks in advance!
Netanela
Re: MLFF stress inconsistent between single-point and MD evaluation of the same atomic configuration
Posted: Mon Jul 27, 2026 7:53 am
by jonathan_lahnsteiner2
Dear Netanela,
It is hard to tell what is going wrong in your case. In principle you should be able to use ML_FF from VASP 6.4.1 with the newer VASP 6.5.1. To verify what is going wrong in your case we would need some input and output files.
So if possible please upload the INCAR,POSCAR files for your static calculation. Please also upload the OUTCAR file and the INCAR file of the molecular dynamics run. If possible please also supply us the corresponding ML_FF files.
In principle it could be possible that there was some bug fix from version 6.4.1 to version 6.5.1 which are 2 years apart. In principle it is always advisable to stick to the latest VASP version because we are permanently trying to improve the code. The current accessible version would be 6.6.1.
All the Best Jonathan
Re: MLFF stress inconsistent between single-point and MD evaluation of the same atomic configuration
Posted: Mon Jul 27, 2026 9:40 am
by Netanela
Dear Jonathan,
I attached all the requested files in the following link - since the files are too large.
I also tested version 6.6.1 - which seem to produce the same inconsistency as version 6.5.1 does.
The MD was a 50ps (50,000 step) run, from which I isolated the last configuration from the XDATCAR, and tested whether the static calculations produce the same "in kB" line as the MD simulation does.
MD run was done with version 6.4.1, static calculations - were done with all three versions: 6.4.1, 6.5.1, 6.6.1
I attached the information obtained for this one configuration - but this discrepancy is consistent for every MD step.
Another important point - there are inconsistencies within versions 6.5.1 and 6.6.1 themselves, which are even larger than the one observed between static calculations with the three versions:
Running MD with vasp 6.4.1, and then static calculation with vasp 6.4.1 --> would produce identical "in kB" lines for corresponding configurations.
Running MD with vasp 6.5.1, and then static calculation vasp 6.5.1 --> would produce different "in kB" lines for corresponding configurations.
The same thing that happens with vasp 6.5.1 --> happens with vasp 6.6.1.
Thank you very much!
Netanela
Re: MLFF stress inconsistent between single-point and MD evaluation of the same atomic configuration
Posted: Mon Jul 27, 2026 12:52 pm
by jonathan_lahnsteiner2
Dear Netanela,
I did some careful tests on the test system you supplied. I was running an MD with VASP 6.4.1 and VASP 6.6.1 then did static calculations with VASP 6.4.1, 6.5.1 and 6.6.1. I recognized there are already discrepancies in the computed energies. So when running MD with VASP 6.4.1 and picking some random structure from the trajectory I obtain the following discrepancy:
Code: Select all
6.4.1 1 F= -.75097134E+03 E0= -.75097134E+03
6.5.1 1 F= -.75099815E+03 E0= -.75099815E+03
6.6.1 1 F= -.75099815E+03 E0= -.75099815E+03
6.4.1 MD F= -.75097130E+03 E0= -.75097130E+03
As you can see VASP 6.5.1 and 6.6.1 match perfectly. The same is true for the pressure values. The small discrepancy between 6.4.1 and 6.4.1 MD is because of round of errors since the POSCAR contains only a smaller number of digits per position than the full double real presentation stored during MD.
Next I was running a MD with VASP 6.6.1 where I obtained the following table:
Code: Select all
6.4.1 1 F= -.74842717E+03 E0= -.74842717E+03
6.5.1 1 F= -.74844001E+03 E0= -.74844001E+03
6.6.1 1 F= -.74844001E+03 E0= -.74844001E+03
6.6.1 MD F= -.74844004E+03 E0= -.74844004E+03
Again versions 6.5.1 and 6.6.1 match perfectly and so do the stresses. So I recommend you to update to the latest VASP 6.6.1 version. As I mentioned already we are permanently updating and improving the code. You can find a long list on this page https://vasp.at/wiki/index.php/Changelog where we report bug fixes and improvements which were done. As you can see this is quite a extensive list of things which were fixed since VASP 6.4.1 release. So please switch to the latest version and rely on the results which you obtain from the new VASP 6.6.1 version.
All the Best Jonathan
Re: MLFF stress inconsistent between single-point and MD evaluation of the same atomic configuration
Posted: Mon Jul 27, 2026 1:33 pm
by Netanela
Dear Jonathan,
Thank you so much for your thorough input!
Although, I am still confused regarding these two points you mentioned.
When I run an MD simulation with vasp 6.4.1 or with vasp 6.6.1, then run static calculation for the last configuration with the three methods - I obtain the following:
Code: Select all
MD run under 6.4.1 Pxx Pyy Pzz Pxy Pyz Pzx
MD, 6.4.1 in kB -3.81418 -3.71350 -2.22158 -0.26111 0.39553 -0.66192
Static, 6.4.1 in kB -3.81417 -3.71350 -2.22158 -0.26111 0.39553 -0.66192 <- agrees to 1e-5 (acceptable, numerical noise)
Static, 6.5.1 in kB -3.84224 -3.75989 -2.23102 -0.26059 0.39586 -0.66023 <- differs from 6.4.1
Static, 6.6.1 in kB -3.84224 -3.75989 -2.23102 -0.26059 0.39586 -0.66023 <- differs from 6.4.1, but agrees with 6.5.1
Code: Select all
MD, vasp 6.4.1 : F= -.75077912E+03 E0= -.75077912E+03
Static, vasp 6.4.1 : F= -.75077912E+03 E0= -.75077912E+03
Static, vasp 6.5.1 : F= -.75080626E+03 E0= -.75080626E+03
Static, vasp 6.6.1 : F= -.75080626E+03 E0= -.75080626E+03
Code: Select all
MD run under 6.6.1 Pxx Pyy Pzz Pxy Pyz Pzx
MD, 6.6.1 in kB -4.50432 -3.63031 -1.91484 0.52530 0.21416 -0.27711
Static, 6.4.1 in kB -4.29714 -3.46213 -1.86288 0.51544 0.21064 -0.26810 <- does not agree with 6.6.1 static or MD
Static, 6.5.1 in kB -4.33876 -3.49227 -1.87529 0.51182 0.21245 -0.26801 <- agrees with 6.6.1 static, but not MD
Static, 6.6.1 in kB -4.33876 -3.49227 -1.87529 0.51182 0.21245 -0.26801 <- still differs from its own MD
Code: Select all
MD, vasp 6.6.1 : F= -.75101453E+03 E0= -.75101453E+03
Static, vasp 6.4.1 : F= -.75081464E+03 E0= -.75081464E+03
Static, vasp 6.5.1 : F= -.75082704E+03 E0= -.75082704E+03
Static, vasp 6.6.1 : F= -.75082704E+03 E0= -.75082704E+03
For some reason I do not manage to reproduce the same consistency that you obtain, and I'm not sure what could cause this, of if I'm doing something wrong here...
Re: MLFF stress inconsistent between single-point and MD evaluation of the same atomic configuration
Posted: Mon Jul 27, 2026 1:50 pm
by jonathan_lahnsteiner2
Dear Netanela,
Can you please upload the data where you were running the MD with VASP 6.6.1. Please upload the OUTCAR for the VASP 6.6.1 MD and the results you obtained for the static calculations. Otherwise I can't say what is going wrong.
All the Best Jonathan
Re: MLFF stress inconsistent between single-point and MD evaluation of the same atomic configuration
Posted: Mon Jul 27, 2026 6:01 pm
by Netanela
Dear Jonathan,
Of course - here they are.
They include input and output files of the MD runs with versions 6.4.1 and 6.6.1, as well as static calculations on the last frame of each MD simulation.
I ran fresh simulations to make sure all the inputs were consistent, and indeed I see the same difference from before.
BTW, I am starting to suspect this is a compilation issue... Would that make any sense?
Thanks again,
Netanela
Re: MLFF stress inconsistent between single-point and MD evaluation of the same atomic configuration
Posted: Tue Jul 28, 2026 5:14 pm
by jonathan_lahnsteiner2
Dear Netanela,
I checked the updated folder_02 on google drive. Somehow it seems something went wrong because files are missing. Both folders SET_B_MD_6.6.1 SET_A_MD_6.4.1 have the MD folder complete. But some of the SP* folders are lacking files. Could you please update all SP* folders to contain INCAR, POSCAR, OSZICAR and OUTCAR file. Otherwise I will not be able to verify if our results differ.
All the Best Jonathan