Page 1 of 1

How to apply Machine Learning Force Field to LAMMPS

Posted: Fri Oct 10, 2025 7:18 am
by qingyu_wang

Hello everyone,
I followed the method for compiling LAMMPS provided in this link and proceeded with it:https://vasp.at/wiki/Running_machine-le ... _in_LAMMPS

Subsequently, I submitted the job in LAMMPS using the trained Machine Learning Force Field (ML_FF, generated with VASP 6.5.0) as the input file; however, I encountered the following error(s).
===================================================================================
= BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
= RANK 0 PID 39878 RUNNING AT node100
= KILLED BY SIGNAL: 11 (Segmentation fault)
===================================================================================
And I have attached the INCAR files (for ML_FFN and ML_ABN) obtained from the last training run, and also provided the links to the data file and input (in) file required for LAMMPS execution.
https://1drv.ms/f/c/b8ec5e7d661b03f9/Ei ... Q?e=D17kwK

Thank you for your time and insights. Could you please advise on how I might improve the current process or resolve the aforementioned issue? Thank you for your assistance in advance.

Best wishes!


Re: How to apply Machine Learning Force Field to LAMMPS

Posted: Fri Oct 10, 2025 8:31 am
by martin.schlipf

Do you encounter this error for every system? Perhaps this particular problem requires too much memory. Did you try to reduce the problem size until the calculations run? This could help us figure out the exact source of your error.


Re: How to apply Machine Learning Force Field to LAMMPS

Posted: Fri Oct 10, 2025 8:55 am
by qingyu_wang

Thank you for your reply. I have only tried adjusting the total number of cores (e.g., 1 core, 8 cores, 16 cores, and 48 cores) when running the job, but none of these attempts worked. Regarding the input files, I have not attempted to modify the size of the data file; however, I have adjusted the total number of simulation steps, setting it to 20,000 steps (i.e., 10,000 fs). Unfortunately, the same error still occurs.
Best wishes!


Re: How to apply Machine Learning Force Field to LAMMPS

Posted: Fri Oct 10, 2025 10:48 am
by andreas.singraber

Hello!

I tried to run your setup myself and found that there are three issues:

  1. The first problem is simple to solve: you kept the file name of the force field ML_FFN but in the LAMMPS script you used ML_FF as the input in the pair_coeff line. Please update one of them to make them match.
  2. Your ML_FFN file does not support the fast-prediction mode, if you run

    Code: Select all

    head -n 1 ML_FFN
    
    you can see this comment:

    Code: Select all

    "ML_LFAST" : false
    
    which indicates that after finishing training data collection you did not run ML_MODE = refit to obtain a force field which supports the fast-prediction mode (see "Step 4" in our Wiki here). However, only the fast-prediction mode is supported when running LAMMPS with a VASP force field. Hence, please run the refit mode with VASP and your collected training data (ML_ABN file). You will get another ML_FFN file which should contain

    Code: Select all

    "ML_LFAST" : true
    
    in the file header. Please note that the refit mode may take a while for processing your large data set, it took around 1hour 20min on my 48-core machine.
  3. Unfortunately, even when you follow the two steps above there will still be an issue left... the VASPml library in VASP 6.5.0 has an annoying (and to be honest embarrassing) bug which prevents LAMMPS from running the force field you just created. When you start LAMMPS it will return an error and complain that "The given force field file is too new...". There are three workarounds to get it to run:
    • Perform the refit step with VASP 6.4.3 instead of 6.5.0 (creates an ML_FFN file with an older version number)

    • Upgrade VASP/VASPml to 6.5.1 (bug is fixed there, also recompile LAMMPS!)

    • Patch your VASP 6.5.0 source code as described here and here and recompile VASPml and LAMMPS.

    I am very sorry for the inconvenience of having to mess with the VASP installation, let us know if you have difficulty with this step!

In my case I was finally able to run your simulation after fixing these three issues, I hope that this will work for you too!

All the best,
Andreas Singraber