Problem with meam

dear developers
My LAMMPS version is Windows 29Aug2024
I have an error message for when using meam pair_style that was not occuring with Lammps version 29Sep2021

The code extract is:

mass 1 63.546
 mass 2 28.0855
 mass 3  4.0026

 group CuS   type 1
 group SiS   type 2
 group He    type 3

 pair_style hybrid meam lj/cut 4.0 table linear 4000
 pair_coeff * *  meam library.meam AlS SiS MgS CuS FeS AlSiMgCuFe.meam CuS SiS NULL # Cu-Cu Si-Si Cu-Si
 pair_coeff  1 3 table   tableHeCu.txt  moliere            # Cu-He
 pair_coeff  2 3 table   tableHeSi.txt  moliere            # Si-He
 pair_coeff  3 3 lj/cut 0.000881   2.56                    # He-He

and the error message is:

 pair_style hybrid meam lj/cut 4.0 table linear 4000
 pair_coeff * *  meam library.meam AlS SiS MgS CuS FeS AlSiMgCuFe.meam CuS SiS NULL # Cu-Cu Si-Si Cu-Si
Reading MEAM library file library.meam with DATE: 2012-06-29
ERROR on proc 0: Did not find all elements in MEAM library file, missing: AlS (src/MEAM/pair_meam.cpp:488)
Last command:  pair_coeff * *  meam library.meam AlS SiS MgS CuS FeS AlSiMgCuFe.meam CuS SiS NULL # Cu-Cu Si-Si Cu-Si

I tried

pair_coeff  * * meam library.meam SiS CuS  AlSiMgCuFe.meam CuS SiS 

pair_coeff  * * meam library.meam AlS SiS MgS CuS FeS  AlSiMgCuFe.meam CuS SiS

without success. But I think it can not works since there are 3 three type of atoms and the 3rd one is not included in meam. So We should use NULL instead.

May be something has changed in writing the pair_coeff for this meam file parameters ?

Have you an idea of what the problem is ?

Best regards
Pascal

If anything, LAMMPS is now checking more carefully for correct and consistent input.

Sorry, but that logic is wrong. You must not use a MEAM library file that is not consistent with the MEAM user file and that is clearly the case here. The library.meam file bundled with LAMMPS does contain settings for all those requested “elements”, so the question is: where did your file come from?

$ grep -A2 -E '(AlS|SiS|MgS|CuS|FeS)' library.meam 
'AlS'        'fcc'   12.     13           26.9815
4.64        2.04    3.00    6.0          1.50  4.05    3.353    1.07
1.0         +4.50           -2.30        8.01          1.0    -5
'SiS'        'dia'   4.      14           28.086
4.87        4.4     5.5     5.5          5.5   5.431   4.63    1.
1.0         2.05            4.47         -1.80         2.2    -5
'MgS'       'hcp'   12.      12           24.305
5.52        4.0    3.0     0.2          1.2  3.194 1.51     0.80
1.0         10.04           9.49         -4.3          0.63   -5
'CuS'        'fcc'   12.     29           63.54
5.11        3.634   2.20    6            2.20  3.62    3.54    1.07
1.0         4.91            2.49         2.95          1.10   -5
'FeS'        'bcc'   8       26           55.847
5.0270      3.500   2       1.00         1     2.851   4.28    0.5550
1          -1.6             12.5          -1.40        1.0    -5

Definitely not. That will break the processing logic of the pair_coeff command for MEAM.

The cleanest solution is to use a proper library.meam file.

But since the missing element is not used in the type to element mapping, a hackish solution would be to substitute it with a different element. Since that element is not used, it will not matter that the parameters would be for a “wrong” element.

A better solution would be to edit the MEAM user file, to only contain entries for the elements you use. That means, you would use:
pair_coeff * * meam library.meam SiS CuS SiCu.meam CuS SiS NULL
Where the SiCu.meam file is edited from AlSiMgCuFe.meam as follows:

  • all entries referencing elements 1, 3, or 5 are removed
  • in the remaining entries element 2 is replaced with element 1, and element 4 with element 2

Thank you very much Axel.
Yes I use the library.meam file from LAMMPS potential folder where CuS and SiS are present for use with AlSiMgCuFe.meam file.
This is the reason I was surprised by the comment about didn’t find all ements: AlS…
I will follow your advice for editing a SiCu.meam file, in the way you suggest. ANd I will inform you about what happens…
Thanks a lot again.
Pascal

Please check the file for those entries. They are right at the top. They must be there or else you have a corrupted file. Here are the first lines of library.meam:

# DATE: 2012-06-29 UNITS: metal CONTRIBUTOR: Greg Wagner, [email protected] CITATION: Baskes, Phys Rev B, 46, 2727-2742 (1992)
# meam data from vax files fcc,bcc,dia    11/4/92
# elt        lat     z       ielement     atwt
# alpha      b0      b1      b2           b3    alat    esub    asub
# t0         t1              t2           t3            rozero  ibar

'AlS'        'fcc'   12.     13           26.9815
4.64        2.04    3.00    6.0          1.50  4.05    3.353    1.07
1.0         +4.50           -2.30        8.01          1.0    -5
'SiS'        'dia'   4.      14           28.086
4.87        4.4     5.5     5.5          5.5   5.431   4.63    1.
1.0         2.05            4.47         -1.80         2.2    -5
'MgS'       'hcp'   12.      12           24.305
5.52        4.0    3.0     0.2          1.2  3.194 1.51     0.80
1.0         10.04           9.49         -4.3          0.63   -5
'CuS'        'fcc'   12.     29           63.54
5.11        3.634   2.20    6            2.20  3.62    3.54    1.07
1.0         4.91            2.49         2.95          1.10   -5
'FeS'        'bcc'   8       26           55.847
5.0270      3.500   2       1.00         1     2.851   4.28    0.5550
1          -1.6             12.5          -1.40        1.0    -5

Dear Axel
Indeed, the file is corrupted in the first line of the library.memam file. A “Ti” string starts the line.
It reads

Ti# DATE: 2012-06-29 UNITS: metal CONTRIBUTOR: Greg Wagner, [email protected] CITATION: Baskes, Phys Rev B, 46, 2727-2742 (1992)

instead of 

# DATE: 2012-06-29 UNITS: metal CONTRIBUTOR: Greg Wagner, [email protected] CITATION: Baskes, Phys Rev B, 46, 2727-2742 (1992)

I did not see this previously. And removing this Ti string, it works.
Thanks a lot again.
Best
Pascal

What was that Shakespeare quote again: There are more things in heaven and earth…?

1 Like