Page 1 of 1

calculate solid-liquid interface by ML_FF

Posted: Mon May 30, 2022 9:42 am
by suojiang_zhang1
Hi,
I am going to calculate a solid-liquid interface by ML_FF,and the solid is fixed.
there are the questions about this:
1. I will train the FF separatedly, if so, how to combine the two ML_FF files to one FF file, I saw the ML_FF file is binary and can not read it directly.
2. for the solid, how to get the FF? because the solid is only relaxed, not run AIMD. can I get the ML_FF by relaxation?

Re: calculate solid-liquid interface by ML_FF

Posted: Mon May 30, 2022 10:55 am
by martin.schlipf
Please do not merge the force field, but the training data stored in the ML_AB file.

It is possible to run AIMD on a solid. The atoms will vibrate according to the phonons in the system.

Re: calculate solid-liquid interface by ML_FF

Posted: Mon May 30, 2022 11:57 am
by suojiang_zhang1
Thank you for your prompt reply
Yes, I can open the ML_AB.
you mean that I can merge two ML_AB files to one file to further MD simulation.
is there a script to merge two ML_AB?

Re: calculate solid-liquid interface by ML_FF

Posted: Mon May 30, 2022 12:39 pm
by ferenc_karsai
There is no script to merge the ML_AB files so in principle one has to combine manually.
But just simple merging of the ML_AB is mostly not optimal, since the ML_AB file needs to have the correct information on the local reference configurations. The local reference configurations are chosen on the fly. Of course if you have a lot of data in terms of a previously learned liquid much less new local reference configurations are chosen than if you learned that structure separately.
So by merging you would have some possibly redundant configurations that can be sparsified out by our sparsification routine, but the sparsification is on the basis of structural similarities, while the on the fly algorithm selects due to the forces.

If possible I would always advice to do consecutive learnings. In your case if you have an ML_AB file for the liquid then do a continuation training on the solid (ML_ISTART=1).

Re: calculate solid-liquid interface by ML_FF

Posted: Mon May 30, 2022 1:02 pm
by suojiang_zhang1
Hi, Ferenc
Thank for your advices.
Sorry, by now I could not completely understand your advices.
In my consecutive learnings, I firstly got a ML_AB of liquid, then I reconstruct one POSCAR that include solid and the interface of liquid-solid, I will a new ML_AB file, but this is not different to construct POSCAR at starting, I think so do is very time-consumption.

Re: calculate solid-liquid interface by ML_FF

Posted: Mon May 30, 2022 1:08 pm
by ferenc_karsai
After you learned the liquid you should construct a POSCAR of the pure solid and do a continuation of learning on that (ML_ISTART=1). Many times the learning on pure liquid and solid is enough to have a decent force field for the interface. You need to run an AIMD with on the fly for each phase of learning. We never tried on-the-fly for relaxations and cannot give any guarantee that this works.
After that check your force field on running a pure MLFF run (ML_ISTART=2) on the interface. Monitor the following "grep BEEF ML_LOGFILE". If your Bayesian error estimation on the forces go up you are most probably extrapolating and need to learn on the interface too.

Re: calculate solid-liquid interface by ML_FF

Posted: Mon May 30, 2022 1:49 pm
by suojiang_zhang1
Hi, Ferenc
thank you.
If I set ML_ISTART=1 to continue train a ML_FF of pure solid, will I copy the ML_ABN to ML_AB?
But the ML_AB is pure liquid and does not include the local reference configurations of my pure solid
In addtion, at interface the a and b of solid lattice should be same a and b of liquid box in XY directions.

Re: calculate solid-liquid interface by ML_FF

Posted: Mon May 30, 2022 3:04 pm
by ferenc_karsai
Yes copy the ML_ABN file from the liquid calculation to ML_AB of the solid ML_ISTART=1 calculation.

The local reference configurations of the liquid contain most likely almost all the information for the solid, so you should expect that you would learn lesser local reference configurations than for the solid from scratch.
The local reference configurations are just environments (constellation of neighboring atoms) of a given central atom. Since a liquid doesn't have any far ordering it will undergo many different local environments for each atom most likely containing also many of the solids.