example input file for lammps using VASP ML_FF

Queries about input and output files, running specific calculations, etc.


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
suojiang_zhang1
Jr. Member
Jr. Member
Posts: 52
Joined: Tue Nov 19, 2019 4:15 am

example input file for lammps using VASP ML_FF

#1 Post by suojiang_zhang1 » Sat Feb 08, 2025 10:07 am

Dear:
I have finished a MLFF train using vasp6.5, and got a ML_FF file.
After that, I want to run a MD simulation in a larger size system using lammps.
I can refer to the site https://www.vasp.at/wiki/index.php/Runn ... _in_LAMMPS, but I can not run the LAMMPS.
Could you please provide an completed exmple input of lammps to run the MD simulation.

Yours


andreas.singraber
Global Moderator
Global Moderator
Posts: 265
Joined: Mon Apr 26, 2021 7:40 am

Re: example input file for lammps using VASP ML_FF

#2 Post by andreas.singraber » Mon Feb 10, 2025 4:01 pm

Hello!

We are currently preparing a complete example for the Wiki page (including structure file and input script), please stay tuned...

However, if you are already familiar with LAMMPS there is really not much more specific about the VASP force fields to know. You just need to prepare your input structure in the LAMMPS data format (we are working on a POSCAR converter in py4vasp), have your ML_FF file ready and write a LAMMPS input script which describes the setup for your MD simulation. There is no need to provide the usual VASP files (INCAR, KPOINTS, POTCAR, POSCAR), only the ML_FF file.

Except for the pair_style/pair_coeff vasp description all information about how to set up an MD run in LAMMPS can be found on their great documentation page.

All the best,
Andreas Singraber


suojiang_zhang1
Jr. Member
Jr. Member
Posts: 52
Joined: Tue Nov 19, 2019 4:15 am

Re: example input file for lammps using VASP ML_FF

#3 Post by suojiang_zhang1 » Tue Feb 11, 2025 11:16 am

Thank you for your response.
Now I made input file for lammps. but I got errors when I ran.
"The given force field file is too new 0.2.4), this vaspml distribution only supportsfiles up to version 0.2.3."

I check out the ML_LOGFILE, it look like:
ML_LOGFILE 0.2.3
* MEMORY INFORMATION ***********************************************************************************************************************

Estimated memory consumption for ML force field generation (MB):

Persistent allocations for force field : 2663.6
|
|-- CMAT for basis : 827.7
|-- SINV for basis : 162.9
|-- FMAT for basis : 507.9
|-- DESC for basis : 291.9

I don't know how to deal with it.


andreas.singraber
Global Moderator
Global Moderator
Posts: 265
Joined: Mon Apr 26, 2021 7:40 am

Re: example input file for lammps using VASP ML_FF

#4 Post by andreas.singraber » Tue Feb 11, 2025 2:05 pm

Hello!

Thank you for your feedback! I could reproduce the issue and there is unfortunately still a bug which prevents to run ML_FFs generated with VASP 6.5.0 to work. ML_FFs generated with VASP 6.4.3. and earlier should work fine.

I am sorry for this problem.. in order to allow you to continue I have three options for you:

  1. Use a force field generated with VASP 6.4.3.

  2. Wait for a fix in VASP 6.5.1 which will probably be released next week (that is the current status, I cannot promise that).

  3. Apply a minor patch yourself and recompile the code. Basically, we circumvent the broken version check by just increasing the maximum allowed ML_FF version in

    /path/to/vasp/src/vaspml/src/libvaspml/IoHandlerML_FF.hpp, line 169:

    Replace

    Code: Select all

        const SemanticVersion versionMax = SemanticVersion(0, 2, 3);
    

    with

    Code: Select all

        const SemanticVersion versionMax = SemanticVersion(0, 2, 4);
    

I hope this solves this issue for you... please let us know if you try option (3) and report your findings! Thank you!

All the best,
Andreas Singraber


suojiang_zhang1
Jr. Member
Jr. Member
Posts: 52
Joined: Tue Nov 19, 2019 4:15 am

Re: example input file for lammps using VASP ML_FF

#5 Post by suojiang_zhang1 » Thu Feb 13, 2025 6:32 am

Thank you for your kind response.
Now I can run the MD simulation by LAMMPS using the force field produced by vasp6.4.3.
I modify the code of vasp650 and recompiled it, but when I compiled lammps I met some errors and I failed.

In addition, I want to know if such procedure can be used to train solid-liquid interfaces in some electro-chemical systems.
Or train the reaction ocur on surfaces? if it can, please give me some suggestions.
yours,


andreas.singraber
Global Moderator
Global Moderator
Posts: 265
Joined: Mon Apr 26, 2021 7:40 am

Re: example input file for lammps using VASP ML_FF

#6 Post by andreas.singraber » Fri Feb 14, 2025 3:32 pm

Hello!

Great, glad I could help! Yes, in principle the machine-learned force field method can be applied to interfaces (e.g. liquid-solid) or surfaces. However, please understand that I cannot give you a complete walk-through of all options here. We have a couple of detailed Wiki pages about the general workflow and peculiarities of certain systems, maybe you can extract important hints for the system you intend to work on there:

Basics: https://www.vasp.at/wiki/index.php/Mach ... ns:_Basics
Best practices: https://www.vasp.at/wiki/index.php/Best ... rce_fields

Maybe also our tutorials help you get a better overview of what is possible:

https://www.vasp.at/tutorials/latest/md/
https://www.vasp.at/tutorials/latest/mlff/
https://www.vasp.at/tutorials/latest/transition_states/

If problems or further questions arise, please create a new topic with a detailed description and the necessary input and output files. Thank you!

All the best,
Andreas Singraber


Post Reply