Page 1 of 1

Error in MD annealing simulation with ML potential

Posted: Mon Sep 09, 2024 7:45 am
by renjie_chen1

Hi, I have got a learned potential of amorphous Pr-Fe. I then tried to do a prediction run with a large box (>17000 atoms). I first anealed the amorphous structure at 2000 K and then quenched it to 1200 K (I just copied CONTCAR to POSCAR and delete the velocity part before quenching). It runs well. But when I further annealed it at 1200 K there is a numerical error in the energy calculation:

POSCAR, INCAR and KPOINTS ok, starting setup
entering main loop
1 T= NaN E= NaN F= -.95135652E+05 E0= -.95135652E+05 EK= NaN SP= 0.00E+00 SK= 0.00E+00

Seems somewhere division by zero happens. I am not sure if it is a bug. Since it occurs at the first step, it is probably a problem of initialization. Could you give me some advise? I am not confident with the manual switch between annealing and quenching. btw, is there anyway to adapt the potential in other MD codes such as Lammps?

Thank you very much.


Re: Error in MD annealing simulation with ML potential

Posted: Mon Sep 09, 2024 7:50 am
by marie-therese.huebsch

Hi, the NaN looks strange. Could you share a minimal reproducible please?

Ad Lammps interface) Not yet but we are working on it.

Cheers,
Marie-Therese


Re: Error in MD annealing simulation with ML potential

Posted: Mon Sep 09, 2024 8:36 am
by renjie_chen1
marie-therese.huebsch wrote: Mon Sep 09, 2024 7:50 am

Hi, the NaN looks strange. Could you share a minimal reproducible please?

Ad Lammps interface) Not yet but we are working on it.

Cheers,
Marie-Therese

Hi, Marie-Therese,

Thank you for your reply. I just tried to skip the anealing and quenching from 2000K, but directly annealed the initial structure at 1200 K. I got the same error. The only difference between this run with the previous successful annealing run at 2000 K is that I set a very large NSW (see the attachment).


Re: Error in MD annealing simulation with ML potential

Posted: Mon Sep 09, 2024 8:51 am
by marie-therese.huebsch

Puh, yes NSW = 4000000 is very large! I'd recommend splitting the calculation into multiple MD runs, like in example 6 in part 2 of the MD tutorial. Does this solve the issue?


Re: Error in MD annealing simulation with ML potential

Posted: Mon Sep 09, 2024 8:55 am
by renjie_chen1

So, this is strange. I just set a smaller NSW and NBLOCK as well (one zero less in the numbers). It goes well.


Re: Error in MD annealing simulation with ML potential

Posted: Mon Sep 09, 2024 9:08 am
by marie-therese.huebsch

Ps: Please check out ML_OUTBLOCK instead of NBLOCK.


Re: Error in MD annealing simulation with ML potential

Posted: Mon Sep 09, 2024 10:19 am
by marie-therese.huebsch

Could you try again if the combination of ML_OUTBLOCK = 20000, NSW=4000000 and ML_MODE = run works? And could you share an ML_FF file to reproduce the issue? (Doesn't have to be your best MLFF)


Re: Error in MD annealing simulation with ML potential

Posted: Mon Sep 09, 2024 12:27 pm
by renjie_chen1
marie-therese.huebsch wrote: Mon Sep 09, 2024 10:19 am

Could you try again if the combination of ML_OUTBLOCK = 20000, NSW=4000000 and ML_MODE = run works? And could you share an ML_FF file to reproduce the issue? (Doesn't have to be your best MLFF)

I just tried to set ML_OUTBLOCK = 20000, NSW=4000000. The std stops at "entering main loop" and the task is terminated then, don't know why (no error information in OUTCAR as well). My smallest ML_FF is 80MB which severely exceeds the size limit of attachments here.


Re: Error in MD annealing simulation with ML potential

Posted: Mon Sep 09, 2024 12:53 pm
by marie-therese.huebsch

Thanks for trying! Could you please share the ML_AB file? We can refit the ML_FF. The ML_FF are indeed quite large.


Re: Error in MD annealing simulation with ML potential

Posted: Mon Sep 09, 2024 1:02 pm
by renjie_chen1
marie-therese.huebsch wrote: Mon Sep 09, 2024 12:53 pm

Thanks for trying! Could you please share the ML_AB file? We can refit the ML_FF. The ML_FF are indeed quite large.

Thanks. I have attached the ML_AB. Please do a try.


Re: Error in MD annealing simulation with ML potential

Posted: Tue Sep 10, 2024 12:00 pm
by marie-therese.huebsch

Thank you! We could reproduce the problem.

Basically, the following must be ensured: ML_OUTBLOCK * NSW < 231-1.
So for now the only solution is to set a smaller NSW and split the MD runs. We will address this issue in a future release and add it to the known issues.

Does this clarify things for you?


Re: Error in MD annealing simulation with ML potential

Posted: Tue Sep 10, 2024 12:16 pm
by marie-therese.huebsch

PS: Don't forget to set ISYM=0 for MD in general.


Re: Error in MD annealing simulation with ML potential

Posted: Tue Sep 10, 2024 1:59 pm
by renjie_chen1
marie-therese.huebsch wrote: Tue Sep 10, 2024 12:00 pm

Thank you! We could reproduce the problem.

Basically, the following must be ensured: ML_OUTBLOCK * NSW < 2^31-1.
So for now the only solution is to set a smaller NSW and split the MD runs. We will address this issue in a future release and add it to the known issues.

Does this clarify things for you?

Thank you and yes it is clear for me.