MLFF: Bayesian error spikes, RMSE jumps and Volume oscillation

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


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
Fermi1976
Newbie
Newbie
Posts: 6
Joined: Fri Aug 25, 2017 11:33 am
License Nr.: 5-2268

MLFF: Bayesian error spikes, RMSE jumps and Volume oscillation

#1 Post by Fermi1976 » Sun Feb 09, 2025 3:50 am

Dear VASP Forum,

I am performing ML-FF for graphite. The unit cell lattice constants were optimized using the
Van der Waals functional (optimized lattice constants are a = 2.46 Å, c = 6.66 Å) and then used
to construct a 4×4×2 supercell (128 atoms) for MD training. I am attaching the
Bayesian error, RMSE and Volume figures as a function of MD steps. The average
lattice constants are also attached.

Here are my observations and questions: I appreciate your insights and feedback:
1- There are spikes in the Bayesian error (See Bayesian error fig). How can these spikes be minimized?
2- The RMSE starts low but then exhibits step-like jumps around 10,000 and 20,000 MD steps (see the RMSE fig).
What could be causing this?
3- The volume fluctuates throughout the 30,000 MD steps (see the Volume fig). How can this fluctuation
be minimized?
4- The average c-lattice constant (for T= 300K) shows expansion, with a final value of c = 7.3555 Å
compared to the initial c = 6.66 Å.

============INCAR=============================================
SYSTEM = Gra_128
ISYM = 0 ! no symmetry imposed

! ab initio
PREC = Accurate

IVDW = 12
#VDW_S6 = 1.000
#VDW_S8 = 0.7875
#VDW_A1 = 0.4289
#VDW_A2 = 4.4407

ISMEAR = -1 ! Fermi smearing
SIGMA = 0.0258 ! smearing in eV

ENCUT = 600
EDIFF = 1e-6

LWAVE = F
LCHARG = F

LREAL = F

! MD
IBRION = 0 ! MD (treat ionic degrees of freedom)
NSW = 30000 ! no of ionic steps
POTIM = 1.5 !MD time step in fs

MDALGO = 3 ! Langevin thermostat
LANGEVIN_GAMMA = 1 ! friction,
LANGEVIN_GAMMA_L = 10 ! lattice friction,
PMASS = 20 !lattice mass, do we need to change
TEBEG = 300 ! temperature

ISIF = 3 ! update positions, cell shape and volume

! machine learning
ML_LMLFF = T
ML_MODE = train ! ML_START=0
ML_WTSIF = 2

NCORE = 4
KPAR = 2

RANDOM_SEED = 688344966 0 0
===================================================
Thank you in advance,

Bets Regards,
Iyad

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

alexey.tal
Global Moderator
Global Moderator
Posts: 391
Joined: Mon Sep 13, 2021 12:45 pm

Re: MLFF: Bayesian error spikes, RMSE jumps and Volume oscillation

#2 Post by alexey.tal » Mon Feb 10, 2025 3:52 pm

Dear Iyad,

Thank you for your question.
It is hard to tell what the problem is without seeing all the input and output file. Please see the forum guidelines.

1- There are spikes in the Bayesian error (See Bayesian error fig). How can these spikes be minimized?

In principle, the spikes mean that the new structures are being discovered and need to be learned, so you don't want to minimize these too much.

2- The RMSE starts low but then exhibits step-like jumps around 10,000 and 20,000 MD steps (see the RMSE fig).
What could be causing this?

These steps should be inspected visually to understand if these structures are still reasonable. These steps could be caused by perfectly reasonable configurations, but also could be a sign of a transition to a different phase.

3- The volume fluctuates throughout the 30,000 MD steps (see the Volume fig). How can this fluctuation
be minimized?

In NpT ensemble the volume should naturally fluctuate. However, in your calculation, with the spike at around step 17000 the volume seems to change too drastically. So you should also inspect this structures visually.

4- The average c-lattice constant (for T= 300K) shows expansion, with a final value of c = 7.3555 Å compared to the initial c = 6.66 Å.

This expansion looks quite large. Also, the volume does not seem to change so much in your plot.

Here are some things you could try to:

  • smaller time-step POTIM=1.0
  • as described in the wiki, it is recommended to learn the potential over a range of temperatures, so you should set TEBEG=100 and TEEND=350, if your production temperature is 300K. Your overall errors seem to be quite low, which could be a sign that you are not sampling enough due to constant temperature training.
  • considering that graphite is metallic you should use ISMEAR=1 or ISMEAR=2
  • set LANGEVIN_GAMMA = 10
  • try a different vDW functional (for example IVDW=10)

Best wishes,
Alexey


Fermi1976
Newbie
Newbie
Posts: 6
Joined: Fri Aug 25, 2017 11:33 am
License Nr.: 5-2268

Re: MLFF: Bayesian error spikes, RMSE jumps and Volume oscillation

#3 Post by Fermi1976 » Thu Feb 27, 2025 4:01 am

Hi Alexy,
Thank you for your feedback and recommendations. I am coming back with some issues for graphite MLFF training, and I appreciate your help:

I have tried different IVDW, but it did not help.

I used
POTIM=1.0
TEBEG=100 and TEEND=350,
ISMEAR=1, and
LANGEVIN_GAMMA = 10

The Bayesian error starts large and fluctuating significantly up ~13000 MD steps, after that it becomes much smaller and stable.
The Voulme of the supercell keeps increasing exponentially with MD steps.

I attached the input and output files as well as the figures of the Bayesian error and Volume as a function of the MD steps figures.

I appreciate any hint helping to understand this behavior.

Thank you
Iyad

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

Post Reply