MLFF training error

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


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
maruf_mridha
Newbie
Newbie
Posts: 4
Joined: Mon May 22, 2023 9:44 pm

MLFF training error

#1 Post by maruf_mridha » Fri Oct 10, 2025 11:55 pm

Hi,
I am confused regarding the training error (ERR) in MLFF. After training the first structure the error stays below 0.07 eV/angstrom; BEEF and CTIFOR also looks fine. I analyzed the hyperparameters ML_RCUT1&2, and found 8 and 4, respectively, worked best. Then copied ML_ABN to ML_AB and started training the second structure (same composition in different phase). When the training finished the error is around 0.12 eV/angstrom (0.10 eV/A within first 1000 steps, then slowly increased). I think it is logical to get higher error for the second structure because MLFF is predicting based on the first structure. But my question is 0.12 eV/A considered okay or it is high? If it is considered high, how can I minimize the error every time I restarted training?

If you can please have a look in my INCAR if it is okay or any changes are required.
ENCUT = 500
PREC = Normal
LWAVE = .FALSE.
LCHARG = .FALSE.
LREAL = Auto

Electronic Relaxation
ISMEAR = 0
SIGMA = 0.05
NELM = 90
NELMIN = 6
EDIFF = 1E-06
ALGO = Normal

Ionic Relaxation
NSW = 20000
IBRION = 0
ISIF = 2
EDIFFG = -0.01
ISYM = 0
NCORE = 14
KPAR = 4
SYMPREC = 1E-04
POTIM = 1.0
TEBEG = 200
TEEND = 500
POMASS = 12.011 14.0
SMASS = 1.0
MDALGO = 2
NWRITE = 0
ML_LMLFF = .TRUE.
ML_MODE = TRAIN
ML_WTSIF = 1E-10
ML_CTIFOR = 0.002
ML_SCLC_CTIFOR = 0.3
IVDW = 11
IDIPOL = 3
LDIPOL = .TRUE.
ML_RCUT1 = 8
ML_RCUT2 = 4

Please let me know if you need anything else. Thanks.


martin.schlipf
Global Moderator
Global Moderator
Posts: 639
Joined: Fri Nov 08, 2019 7:18 am

Re: MLFF training error

#2 Post by martin.schlipf » Sat Oct 11, 2025 7:34 am

vaspwiki wrote:

Typically, the fitting errors should be less than 1 meV/atom for the energies and 30-100 meV/angstrom for the forces at temperatures between 300-1000 K. Errors slightly above these values may be acceptable, but these calculations should be thoroughly checked for accuracy.

https://vasp.at/wiki/Best_practices_for ... rce_fields
I think the errors are a little bit on the larger side. If you can afford to, I would try to improve the force field with a few more structures. Otherwise you need to proceed with caution and run some consistency checks by taking snapshots and comparing them to ab initio data.

For the second part of your question. Whether the forces should be larger on the second structure it depends on the similarity between the two structures. If they are very similar say two snapshots of two MD trajectories you would not expect a large increase. The more different the structures are the more different the forces will be. Generally you should train your force field in all environments that you may encounter in your production run.

If you want to test the force field more systematically, the aforementioned wiki article has a section on the error analysis of a force field.

Martin Schlipf
VASP developer


Post Reply