[lammps-users] ERROR: All pair coeffs are not set

Hello,

I am using the LAMMPS version 29Oct2020. I have the model of an alloy where there is an equiatomic distribution of Nickel, Chromium and Cobalt (with 50000 atoms), which was created using AtomSK. In my LAMMPS code, I have used the ‘eam/alloy’ potential and initially, I had defined the pair coefficients using the
‘pair_style eam/alloy
pair_coeff * * FeNiCrCoAl-heaweight.setfl Ni Cr Co’ lines, which did not model the interactions between the atoms properly (which I figured out from the final trajectory after tensile loading). I am currently trying out ‘pair_style hybrid’ to define the pair coefficients between each atom type. I am now getting the following error “ERROR: All pair coeffs are not set”. I checked the LAMMPS forums and found a few threads discussing similar errors, but they all had multiple potentials that were being used in their codes. I have only the eam/alloy potential, and I tried modifying my code according to the suggestions in those threads, but nothing worked. Does anyone have any suggestions as to how I can overcome this issue? I am attaching the LAMMPS code along with this. I have the data file and the EAM potentials file that I am using, and if required, I will send it. Thank you!

############ Input file #######################
############ Tensile loading test #######################
############ CoCrNi alloy #######################

############################# INITIALIZATION ###############################

units metal
dimension 3
boundary p p p
atom_style atomic
neighbor 2.0 bin
neigh_modify every 10 delay 0 check yes

############################# ATOM DEFINITION ##############################

read_data CoNi_110.data

############################# FORCEFIELD ###################################

pair_style hybrid eam/alloy eam/alloy eam/alloy
pair_coeff * * eam/alloy 1 FeNiCrCoCu-with-ZBL.eam.alloy Ni Ni NULL
pair_coeff * * eam/alloy 2 FeNiCrCoCu-with-ZBL.eam.alloy Cr Cr NULL
pair_coeff * * eam/alloy 3 FeNiCrCoCu-with-ZBL.eam.alloy Co Co NULL

pair_style hybrid eam/alloy eam/alloy eam/alloy
pair_coeff * * eam/alloy 1 FeNiCrCoCu-with-ZBL.eam.alloy Ni Cr NULL
pair_coeff * * eam/alloy 2 FeNiCrCoCu-with-ZBL.eam.alloy Ni Co NULL
pair_coeff * * eam/alloy 3 FeNiCrCoCu-with-ZBL.eam.alloy Cr Co NULL

############################# GROUP ATOMS ##################################
region 1 block INF INF 141.048 INF INF INF units box
region 2 block INF INF INF 2.0 INF INF units box

group up region 1
group low region 2
group boundary union up low
group mobile subtract all boundary

##---------------SETTINGS-------------------------------------

timestep 0.001
variable ts equal 0.001

Store final cell length for strain calculations

variable tmp equal “lx”
variable Lx equal {tmp} variable tmp equal "ly" variable Ly equal {tmp}
variable tmp equal “lz”
variable Lz equal ${tmp}

#print “Initial x Length, Lx: {Lx}" #print "Initial y Length, Ly: {Ly}”
#print “Initial z Length, Lz: ${Lz}”

##---------------COMPUTES-------------------------------------

#compute 1 all stress/atom NULL
#compute 2 all reduce sum c_1[1] c_1[2]

variable Lx equal lx
variable Ly equal ly
variable Lz equal lz
variable Vol equal vol
variable thickn equal 3.4
print “Initial x Length, Lx: {Lx}" print "Initial y Length, Ly: {Ly}”
print “Initial z Length, Lz: ${Lz}”
variable strain equal “(lx - v_Lx)/v_Lx”
variable strain1 equal “(ly - v_Ly)/v_Ly”
variable strain2 equal “(lz - v_Lz)/v_Lz”
variable lengthx equal “lx”
variable lengthy equal “ly”
variable lengthz equal “lz”
variable sigmaxx equal “-pxx/10000”
variable sigmayy equal “-pyy/10000”
variable sigmazz equal “-pzz/10000”
variable epsxx equal “v_strain”
variable epsyy equal “v_strain1”
variable epszz equal “v_strain2”

Minimization

min_style cg
timestep 0.001
minimize 1.0e-4 1.0e-6 100 1000
dump 1 all xyz 2000 dump3.xyz
run 10000

Assign original velocities to atoms

compute new all temp
#velocity all create 298.1 487639 temp new
velocity all create 77.0 487639 temp new
run 20000

fix 1 all nvt temp 77.0 77.0 0.1
run 20000
unfix 1

Isobaric-isothermal ensemble

fix 1 all npt temp 77.0 77.0 0.1 iso 0.0 0.0 1000.0

#timestep 0.001

##---------------RELAXATION--------------------------------------

thermo_style custom step temp etotal pxx pyy pzz

thermo_modify flush yes
thermo 1000

dump 3 all xyz 2000 dump3.xyz
run 25000

Fix rigid boundary atoms

compute new2 mobile temp
fix 3 boundary setforce 0.0 0.0 0.0
velocity boundary set 0.0 0.0 NULL

##---------------DEFORMATION--------------------------------------
unfix 1
reset_timestep 0
variable srate equal 5.0e8

#variable srate1 equal “v_srate / 1.0e12”
variable srate1 equal “v_srate / 5.0e10”

fix 5 all deform 1 y erate ${srate1} units box remap x
#run 100

##---------------THERMO-OUTPUTS--------------------------------------
variable CorVol equal f_3[4]*v_thickn/(f_3[3])
variable ConvoFac equal 1/1.0e4

thermo_style custom step temp press etotal v_epsxx v_epsyy v_epszz v_sigmaxx v_sigmayy v_sigmazz pe ke lx ly vol
thermo_modify flush yes
thermo 1000

##---------------OUTPUT--------------------------------------
#fix def1 all print 100 “{epsxx} {epsyy} {epszz} {sigmaxx} {sigmayy} {sigmazz}” file Graphene_100.def1.txt screen no
fix def1 all print 100 “{lengthy} {sigmayy}” file CrCoNiAlloy_110.def1.txt screen no
dump 2 all atom 1000 tensile_test3.lammpstrj
run 270000

Regards,
Rajesh

What you are doing here makes no sense.

  • when specifying a pair_style command multiple times, the second will wipe out the settings of the first
  • when using EAM or other manybody potentials you must have all elements on the same pair_coeff line unless you have separate objects. in the second case you must use a pairwise additive potential for the interactions between the two subsystems
  • your mapping of atom type to element is inconsistent and thus bogus

if the potential does not produce the expected results that will mean one of three things:

  • your expectations were incorrect
  • your simulation settings and interpretation of results are incorrect
  • the potential is not suitable for the specific system

None of those can be corrected by hacks like you are doing.

You have these commands:

pair_style hybrid eam/alloy eam/alloy eam/alloy
pair_coeff * * eam/alloy 1 FeNiCrCoCu-with-ZBL.eam.alloy Ni Ni NULL
pair_coeff * * eam/alloy 2 FeNiCrCoCu-with-ZBL.eam.alloy Cr Cr NULL
pair_coeff * * eam/alloy 3 FeNiCrCoCu-with-ZBL.eam.alloy Co Co NULL

pair_style hybrid eam/alloy eam/alloy eam/alloy
pair_coeff * * eam/alloy 1 FeNiCrCoCu-with-ZBL.eam.alloy Ni Cr NULL
pair_coeff * * eam/alloy 2 FeNiCrCoCu-with-ZBL.eam.alloy Ni Co NULL
pair_coeff * * eam/alloy 3 FeNiCrCoCu-with-ZBL.eam.alloy Cr Co NULL

Not sure why you list them twice. The 2nd pair_style hybrid will just erase the first one.
The problem is you use NULL for the 3rd atom type in all pair_coeff commands.
Which means no pair interactions are assigned to type=3 atoms.

I presume you want each pair_coeff command to use NULL for one of the atom types, 1, 2, or 3.

Not all of them for type 3. Those 3 values do not refer to the 3 elements, they refer to the 3 numeric
types within LAMMPS.

So something like:

Ni Cr NULL
Ni NULL Co
NULL Cu Co

However you are using the same EAM file in all 3 cases. Apparently it already stores the interactions
for all 3 elements. So why not just

pair_style eam/alloy
pair_coeff Fe…eam.alloy Ni Cr Co

This means your type=1 atoms are Ni, type=2 are Cr, and type=3 are Co

Steve

Thank you for the reply, Dr. Plimpton. I am trying to reproduce some results from a paper I have, and I did use
‘pair_style eam/alloy
pair_coeff Fe…eam.alloy Ni Cr Co’.
But it did not give me proper tensile deformation after tensile loading. I tried the tensile loading test after defining the pair coefficients using three different many-body potentials, which modelled Ni-Cr-Co interactions. The result was the same in every case. I have attached a picture of the deformation I got, which led me to try and change the pair style and pair coefficients. I am not sure what is wrong if the pair coefficients were defined properly.

Regards,
Rajesh

No ideas. I suggest you contact the paper authors.

Steve