Page 1 of 1

ML_FF for a liquid-solid interface

Posted: Thu Sep 22, 2022 6:06 am
by suojiang_zhang1
Dear developer:
I am exploring a liquid-solid interface, the solid is mxene and liquid is ionic liquids, the system is more complex than the aqueous solution.
I saw some information about training the interface, "when the system has a surface of a crystal and a molecule binding on that surface. First, train the bulk crystal, then the surface, next the isolated molecule, and finally the entire system".
In practice, I do not know to operate the INCAR, and for the entire system, how to emerge the ioslated the ML_AB files?
It is thankful if anyone can provide an example.

Re: ML_FF for a liquid-solid interface

Posted: Fri Sep 23, 2022 1:15 pm
by ferenc_karsai
You don't need to merge anything manually.
You train the first phase (POSCAR) with ML_ISTART=0, then copy the ML_ABN to ML_AB and train the next phase (it can be even a POSCAR with totally different elements) using this ML_AB file together with ML_ISTART=1. You repeat this for the rest of the phases. So ML_AB grows from phase to phase.

Re: ML_FF for a liquid-solid interface

Posted: Mon Sep 26, 2022 8:51 am
by suojiang_zhang1
thank you.
A question for solid training is about the fixed atoms in POSCAR by "selective dynamics".
Usually for optimizaion, some atoms are fixed to save the computational time. However for the ML_FF, I do not know it needs to fix the atoms.
if fixed, is force very large? or the energy is not equilibriumed?
if not fixed, can I use the ML_FF to run my MD simulation with fixed atoms??

Re: ML_FF for a liquid-solid interface

Posted: Mon Sep 26, 2022 9:01 am
by ferenc_karsai
The code works using machine for fixed atomic positions.
I would not learn with fixed atoms (only maybe for very special cases).

Re: ML_FF for a liquid-solid interface

Posted: Mon Sep 26, 2022 10:13 am
by suojiang_zhang1
thank for your prompt reply, however, I don't understand your suggestions.
My understanding is the fixed atom will not be learned, so do not think about them.
but if I use the ML_FF for a larger system that is extended in XY directions, the fixed atoms also should be extended?

Re: ML_FF for a liquid-solid interface

Posted: Mon Sep 26, 2022 10:34 am
by ferenc_karsai
The selective dynamics only decides whether certain ions are allowed to relax or not.
You can fix atoms and still learn (for example if you want to fix atoms on a surface), but in most cases it is a bad idea.

For production runs:
The ML_FF file contains the force field for given elements. So it can be used with any sized cell containing that type of atoms. For selective dynamics you have to anyway select the atoms that are not allowed to move. For that atoms the ionic update is skipped and the force field is applied to the remaining atoms.

Re: ML_FF for a liquid-solid interface

Posted: Tue Oct 04, 2022 1:42 pm
by suojiang_zhang1
Dear developer,
According to your suggestions for liquid-solid surface, I firstly trained a liquid ML_FF and by grep STATUS ML_LOGFILE to ensure the FF is accurate for the liquid, then I copy the ML_ABN to ML_AB in solid training. After a few of ps learning, the ML_FF is accurate by grep ERR ML_LOGFILE and grep STATUS ML_LOGFILE.
Using the ML_FF, I ran a test by POSCAR that include the liquid-solid surface, but I found that a bond of molecule of the liquid was
broken, I do not know what is the question?

Re: ML_FF for a liquid-solid interface

Posted: Fri Oct 07, 2022 12:53 pm
by suojiang_zhang1
In addition, the liquid phase is the NPT training, and the solid phase is the NVT training, I do not know if it is feasible to train a good ML_FF of the solid-liquid interface.

Re: ML_FF for a liquid-solid interface

Posted: Thu Oct 13, 2022 1:22 pm
by ferenc_karsai
I hope you learned at higher temperature (~30%) than your target temperature. Both for solid and liquid.
You should also run the solid in an NpT ensemble.

Have you followed all guidelines of the best practices?
wiki/index.php/Best_practices_for_machi ... rce_fields


When running the force-field in ML_ISTART=2 on the interface, then you can monitor the Bayesian error estimation on each structure (grep "BEEF" ML_LOGFILE). If the error goes up it's a clear indication that the force field is extrapolating.
If that's the case and you followed the above suggestions than probably there is no way around learning an interface. But then I would start to learn with the tiniest version of the interface, check how good the force field is on the big interface with ML_ISTART=2. Then if it still not good repeat this step with an increased interface until it is ok.