MEAM library error 3 meaning?

Hi! I’ve been trying to run a simple simulation to be able to generate a graph of potential energy vs volume of an unminimised cell. However, when I try to run it, LAMMPS returns the error “MEAM library error 3”!

I don’t understand what could trigger it as the exact same MEAM library in other simulations works fine, so I tried looking inside pair_meamc.cpp, but I don’t understand from it what’s the error 3 on the function meam_setup_param.

Any input would be appreciated! :slight_smile: Bellow is my simulation and the library files :

Input file :

Antoine Rincent, 2019

suffix omp
package omp 1

variable lattconst equal 3
variable repetition equal 20

variable testnum equal 1
variable foldernum equal 0
variable testname string Alpur_UvsV

log {testname}_{foldernum}_${testnum}.potentialtest

---------- Initialize Simulation ---------------------

clear
units metal
dimension 3
boundary p p p
atom_style atomic
atom_modify map array

---------- Create Atoms ---------------------

lattice fcc ${lattconst}

region box block 0 {repetition} 0 {repetition} 0 ${repetition} units lattice
create_box 2 box

lattice fcc ${lattconst} orient x 1 0 0 orient y 0 1 0 orient z 0 0 1 # un latice unit par direction
create_atoms 2 box

group solid region box

set group solid type/fraction 1 0.0 420

---------- Define Interatomic Potential ---------------------

pair_style meam/c
pair_coeff * * libraryNiAlCo.meam Al Ni NiAlCo.meam Al Ni
neighbor 2.0 bin
neigh_modify delay 0 every 1 check yes

delete_atoms overlap 0.35 all all

---------- Run Minimization ---------------------

thermo 1
thermo_style custom step temp vol pe press
thermo_modify flush yes norm no

fix 1 all nvt temp 0.1 0.1 0.1

variable iteration equal “step”
variable tempe equal “temp”
variable potential equal “pe”
variable pressure equal “press”
variable volume equal “vol”

fix 2 all print 1 "{iteration} {tempe} {volume} {potential} {pressure}" file {testname}_{foldernum}_{testnum}.results screen no title “step temp vol pe press”

run 1

définition de variables

variable natoms equal “count(all)”

affichage des variables définies

print “Number of atoms = ${natoms};”

print “All done!”

libraryNiAlCo.meam :

elt lat z ielement atwt

alpha b0 b1 b2 b3 alat esub asub

t0 t1 t2 t3 rozero ibar

‘Ni’ ‘fcc’ 12 1 58.690
5.0842175782 2.56 1.50 6.00 1.50 3.5213917703 4.45 0.94
1 3.10 1.80 4.36 1.00 3
‘Al’ ‘fcc’ 12 1 26.982
4.6855976824 3.20 2.60 6.00 2.60 4.0446507884 3.36 1.16
1 3.05 0.51 7.75 1.00 3
‘Co’ ‘hcp’ 12 1 58.933
5.2356147485 3.50 0.00 0.00 4.00 2.5000000000 4.41 0.90
1 3.00 5.00 -1.00 1.00 3

NiAlCo.meam :
rc = 4.5
delr = 0.1
augt1 = 0
erose_form = 2
ialloy = 2

zbl(1,1) = 0
nn2(1,1) = 1
attrac(1,1) = 0.05
repuls(1,1) = 0.05
Cmin(1,1,1) = 0.81
Cmax(1,1,1) = 2.8
Ec(1,1) = 4.45
re(1,1) = 2.49

zbl(2,2) = 0
nn2(2,2) = 1
attrac(2,2) = 0.05
repuls(2,2) = 0.05
Cmin(2,2,2) = 0.49
Cmax(2,2,2) = 2.8
Ec(2,2) = 3.36
re(2,2) = 2.86

zbl(3,3) = 0
nn2(3,3) = 1
attrac(3,3) = 0
repuls(3,3) = 0
Cmin(3,3,3) = 0.49
Cmax(3,3,3) = 2
Ec(3,3) = 4.41
re(3,3) = 2.5

rho0(1) = 1
rho0(2) = 1
rho0(3) = 1

zbl(1,2) = 0
nn2(1,2) = 1
Ec(1,2) = 4.5307
re(1,2) = 2.4916
alpha(1,2) = 4.82953834827973
attrac(1,2) = 0.05
repuls(1,2) = 0.05
Cmin(1,1,2) = 1.6
Cmin(2,2,1) = 0.49
Cmin(1,2,1) = 0.64
Cmin(1,2,2) = 0.64
Cmin(2,1,1) = 0.64
Cmin(2,1,2) = 0.64
Cmax(1,1,2) = 2.8
Cmax(2,2,1) = 2.8
Cmax(1,2,1) = 1.44
Cmax(1,2,2) = 2.8
Cmax(2,1,1) = 1.44
Cmax(2,1,2) = 2.8
lattce(1,2) = ‘b2’

zbl(1,3) = 0
nn2(1,3) = 1
Ec(1,3) = 4.31
re(1,3) = 2.43
alpha(1,3) = 5.19486200471772
attrac(1,3) = 0.025
repuls(1,3) = 0.025
Cmin(1,1,3) = 0.81
Cmin(3,3,1) = 0.49
Cmin(1,3,1) = 0.64
Cmin(1,3,3) = 0.64
Cmin(3,1,1) = 0.64
Cmin(3,1,3) = 0.64
Cmax(1,1,3) = 2.8
Cmax(3,3,1) = 2.8
Cmax(1,3,1) = 2.8
Cmax(1,3,3) = 2.8
Cmax(3,1,1) = 2.8
Cmax(3,1,3) = 2.8
lattce(1,3) = ‘b2’

zbl(2,3) = 0
nn2(2,3) = 1
Ec(2,3) = 4.45
re(2,3) = 2.476
alpha(2,3) = 4.88849071730002
attrac(2,3) = 0.025
repuls(2,3) = 0.025
Cmin(2,2,3) = 1.1
Cmin(3,3,2) = 0.49
Cmin(2,3,2) = 0.49
Cmin(2,3,3) = 0.49
Cmin(3,2,2) = 0.49
Cmin(3,2,3) = 0.49
Cmax(2,2,3) = 2.8
Cmax(3,3,2) = 2
Cmax(2,3,2) = 2.8
Cmax(2,3,3) = 1.44
Cmax(3,2,2) = 2.8
Cmax(3,2,3) = 1.44
lattce(2,3) = ‘b2’

Cmax(1,2,3) = 1.44
Cmax(1,3,2) = 2.38
Cmax(2,3,1) = 1.44
Cmin(1,2,3) = 0.56
Cmin(1,3,2) = 0.97
Cmin(2,3,1) = 0.56

Thanks a lot and have a nice day! :slight_smile:
Antoine.

Hi! I’ve been trying to run a simple simulation to be able to generate a graph of potential energy vs volume of an unminimised cell. However, when I try to run it, LAMMPS returns the error “MEAM library error 3”!

I don’t understand what could trigger it as the exact same MEAM library in other simulations works fine, so I tried looking inside pair_meamc.cpp, but I don’t understand from it what’s the error 3 on the function meam_setup_param.

it comes from MEAM::meam_checkindex() this checks the consistency of the indices from your second MEAM parameter file and stores it in “ierr”.

this second file uses numerical indices that have to correspond to the index and ordering of the elements “extracted” from the first MEAM parameter file (the library file).

Any input would be appreciated! :slight_smile: Bellow is my simulation and the library files :

[…]

---------- Define Interatomic Potential ---------------------

pair_style meam/c
pair_coeff * * libraryNiAlCo.meam Al Ni NiAlCo.meam Al Ni

please notice the second meam file has parameters for Ni, Al, and Co. but you “extract” only Al and Ni from the library. also the naming seems to indicate that the ordering of the indices in the second file would be Ni = 1, Al = 2, Co = 3.

[…]

see below, that there are parameters indexed with 1, 2, and 3. so if you come across a setting with 3, you get the error.
if you change the pair_coeff command like below, it should work. please note the order of the elements. you need to confirm this with the publication, that the parameters were taken from.
(and you may need to redo any calculation where you didn’t use Ni Al Co in this order when extracting the parameters from the library file).

pair_coeff * * libraryNiAlCo.meam Ni Al Co NiAlCo.meam Al Ni

axel.

Awesome thank you so much for the help and details, it’s very much appreciated! I had had weird results in the past and was wondering if it was caused by the potential file or my usage of it, now I know it was a classic case of user error!

Thanks again, have a good one!
Antoine.

Dear Axel,

The detailed explanation and instructions are in the e-mail you quoted and confirmed in sebastian’s response.
in short: number and order of elements listed after the meam.library file have to match the numerical indices in the meam parameter file, regardless of how many of them you want to use. the mapping to LAMMPS atom types then is done with the second list of elements, where you have to identify which element matches which atom type in LAMMPS. there you are free to skip elements.

Axel.

Dear all,
I am using CoNiCrFeMn.meam potential with library.meam file. For validating purposes only, I am trying to calculate the cohesive energy of Fe using this potential. I am using a single element out of five, So how I can define numerical indices in the input script for the only a single element?
Before that, I already used NITI.meam for Ni-Ti system. Everything was alright. But in this potential, I don’t know where is the issue? Please help me.

i have given you a short explanation, you have quoted a detailed explanation, and there is an even more detailed and specific explanation in the documentation of the meam/c pair style. it is now simply a matter to follow the instructions. if that is not sufficient, then nobody can help you.

axel.