An error occurred while using the MEAM potential

Hi folks,
I encountered the following error when I wanted to use a MEAM potential:
ERROR: Error in MEAM parameter file: keyword zbl has out of range element index (src/MEAM/pair_meam.cpp:569)
Last command: pair_coeff * * library.meam Mo Co Ni Fe Cr meam.meam Mo Co Ni Fe Cr

Has anyone seen such an error ?
I should note that the potential and library files were originally in a PDF rather than a text file, so I had to copy them into a notepad file before running the code. Could the issue be related to the copy-pasting process?

Thank you very much for your time and help.

Very likely. Can you provide the input and the potential files causing the issue?

Hi,
Thank you for replying,
I am a new user and cannot upload anything here so please fine the potentials in the “Supplementary information” section of this paper:
https://www.nature.com/articles/s41524-023-01010-x

and this is my input:

Define this alloy

------------Initialization ------------

units metal
dimension 3
boundary p p p
atom_style atomic
variable latparam equal 3.6

------------ Atom Definition ------------

lattice fcc ${latparam} orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
region box block 0 5 0 5 0 5
create_box 5 box

mass 1 89.9600 # Mo
mass 2 58.9330 # Co
mass 3 58.6900 # Ni
mass 4 55.8470 # Fe
mass 5 51.9600 # Cr

create_atoms 1 box
set type 1 type/fraction 2 0.11 743
set type 1 type/fraction 3 0.51 111
set type 1 type/fraction 4 0.15 145
set type 1 type/fraction 5 0.13 123

------------ Force Fields ---------------

pair_style meam
pair_coeff * * library.meam Mo Co Ni Fe Cr meam.meam Mo Co Ni Fe Cr

Did you copy the complete second file?

Did you notice the header:

B. 2NN MEAM parameter file; (1, 2, 3, 4, 5, 6, 7) = (Mo, Co, Ni, V, Fe, Al, Cr)

This means that the second file has entries for all 7 elements (selected by numerical index) and hence you must “extract” all 7 elements in the exact given order from the library. That is, your pair_coeff command would have to look like this:

pair_coeff * * library.meam Mo Co Ni V Fe Al Cr meam.meam Mo Co Ni Fe Cr

The first list of elements is for the parameter file and only the second list of elements maps elements to atom types. This is all explained in detail in the manual, BTW.

You are right it has 7 elements and initially I tried with 7 elements but I saw this error:

Too many elements extracted from MEAM library (current limit: 5). Please increase ‘maxelt’ in meam.h and recompile. (src/MEAM/pair_meam.cpp:253) The last command was: pair_coeff * * library.meam Mo Co Ni V Fe Al Cr pot.meam Mo Co Ni V Fe Al Cr.

Then I taught that if the limit is 5 so I should use 5 elements and I removed 2 of them and tried with 5 ! That was the reason I tried 5 elements.
anyway inthis error it said:
please increase maxelt and recompile !!

I did not understand it !

That means you are using an old version of LAMMPS. We changed this to 8 in late February 2024.

This is also explained in the pair style meam documentation:

The maximum number of elements that can be read from the MEAM library
file is determined at compile time. The default is 8. If you need
support for more elements, you have to change the the constant ‘MAXELT’
at the beginning of the file src/MEAM/meam.h and update/recompile
LAMMPS. There is no limit on the number of atoms types.

Great !!!
I updated the lammps and It worked !
Thak you so much !!

I also encountered the same problem, could you tell me how to solve it? Are you using the windows version of lammps?

The resolution is in the discussion: update to a more recent version of LAMMPS.

It is customary here for people with your kind of question to report which version of LAMMPS they are using and on what platform exactly they are running.