Page 1 of 1
Combining metadynamics with MLFF training
Posted: Thu Sep 29, 2022 5:47 pm
by mike_pols
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
Re: Combining metadynamics with MLFF training
Posted: Sat Apr 01, 2023 11:53 am
by ferenc_karsai
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.
Re: Combining metadynamics with MLFF training
Posted: Wed May 10, 2023 8:16 am
by mike_pols
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
Re: Combining metadynamics with MLFF training
Posted: Thu May 11, 2023 8:08 am
by ferenc_karsai
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.