Combining metadynamics with MLFF training

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


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
mike_pols
Newbie
Newbie
Posts: 2
Joined: Fri Jun 18, 2021 10:15 am

Combining metadynamics with MLFF training

#1 Post by mike_pols » Thu Sep 29, 2022 5:47 pm

Hi,

Is it possible to train a MLFF in VASP with metadynamics enabled? This would allow one to push the overall system across transition states and thus during training capture barriers of rare events that do not occur spontaneously. However, I don't know if the energy that the MLFF model is trained against are the DFT energies/forces/stresses or those with the underlying metadynamics on top of them, causing the training to be biased by the metadynamics. Could this be clarified?

Thanks in advance!

Mike

ferenc_karsai
Global Moderator
Global Moderator
Posts: 460
Joined: Mon Nov 04, 2019 12:44 pm

Re: Combining metadynamics with MLFF training

#2 Post by ferenc_karsai » Sat Apr 01, 2023 11:53 am

Sorry for the late answer, but unfortunately your post has been overlooked in very busy times.

I hope you are still interested in the anser:

So I've checked the code and if metadynamics are on the energies, forces and stress are the unbiased ones, so it is a valid option to use metadynamics in the training.
You should be still very careful with this method, since metadynamics can very rapidly push you into regions of the unexplored space that are far from your target applications. These would unneccessarily increase the broader applicibality of your force field but at the cost of lowering your accuracy for your target problem.

mike_pols
Newbie
Newbie
Posts: 2
Joined: Fri Jun 18, 2021 10:15 am

Re: Combining metadynamics with MLFF training

#3 Post by mike_pols » Wed May 10, 2023 8:16 am

Thanks that clarifies things indeed.

In the meantime I have another question: with the introduction of VASP6.4.0 the MLFFs now have the option to be refit with faster descriptors (ML_LFAST-tag). When I do this for some MLFFs I have trained, I do see a substantial increase of efficiency, indeed as reported between 10x - 100x (with a very small increase in model accuracy). However, if I look into the documentation of what is actually done to get a model with these fast descriptors, the only explanation I could find on what is making it faster is: 'It should be noted that in the fast version no Bayesian error estimation is available.' (see: wiki/index.php/ML_LFAST).

Is there any reference that goes into more details of what actually makes these fast descriptors so much faster to evaluate?

Thanks in advance!
Mike

ferenc_karsai
Global Moderator
Global Moderator
Posts: 460
Joined: Mon Nov 04, 2019 12:44 pm

Re: Combining metadynamics with MLFF training

#4 Post by ferenc_karsai » Thu May 11, 2023 8:08 am

At the moment there is no documentation how the equations are solved to make it faster.

We are planning to make a paper or at least an arxiv article that deals with the equations. At that point we will bring the equations also online on the wiki.


The new way of solving the equations is the main factor for the increased efficiency, but there are also a lot of optimizations on the coding side like e.g. using more dgemms for blocking, removing unnecessary indices, changing order of loops, rewriting loops to better fit into cache, etc.
I don't think we can document the these things for the users without fully documenting the code.

ML_LFAST is a tag that is used if someone does not want to use ML_MODE. But we strongly advise to control the calculations only via ML_MODE.
We try to make the code as easy to use so the user only has to set ML_MODE=REFIT to obtain a "fast" ML_FF file.

Post Reply