ERROR: Invalid type for mass set (../read_data.cpp:1802)

I am currently doing research related to the molecular dynamics simulation of the nano-indentation of BMG (Ni, Zr, Ti). I use Lammps (7 Aug 2019) version.
I have made a Diamond Berkovich indenter and the material files separately using the following potential files available in LAMMPS.

FOR DIAMOND INDENTER:
lattice diamond 3.619
mass * 12.4

FOR MY BMG MATERIAL:
pair_style eam/alloy
pair_coeff * * NiTiZr.set Ni Ti Zr

However, when I bring together the two data files so that both the material and the indenter are in the same simulation, the following issues crop up.
I am confused as to how to go about it.

  1. When I first read the material file and then the indenter file, both structures show up okay, but the atoms in the indenter take the element type as one of the elements in the material file.
  2. When I import the material file and try to make the indenter within that code I cannot form Diamond as I am using eam/alloy pair style.
  3. When I try to make the indenter first and then import the material data file in the following order
    pair_style
    lattice diamond 3.619
    create_atoms 1 region indenterrr_pyramid
    mass * 12.4

## Read data
read_data NiTiZr.data add append

#Define Interatomic Potentials
pair_style eam/alloy
pair_coeff * * NiTiZr.set Ni Ti Zr

“ERROR: Invalid type for mass set (…/read_data.cpp:1802) Last command: read_data NiTiZr.data add append” comes up.

Can I have some help? I have attached the code for method 3 above and the indenter and material formation codes as well. (combine.input/indenterM.lmp/inputfile.input) respectively.

Thank you in advance.
C Peiris

indenterM.lmp (1.13 KB)

inputfile.input (3.34 KB)

combine.input (1.13 KB)

Please re-read the read_data documentation and the explanations about what you have to do when reading multiple data files.

in short, all kinds of types and settings are “locked in” when the simulation cell is created, which happens when the first data file is read. you cannot add bond/atom/whatever types later. thus you need to reserve space for extra types.

your input file is obviously not sufficient to merge the two data files and this is causing the errors.

axel.

Hi,

Thank you very much for the valuable information. I went through the Read_Data section and I am currently rectifying the aforesaid issues, incorporating the extra/atom/type 1 command into the first read_data command in the final input file using:

read_data NiTiZr.data extra/atom/types 1
read_data indenter_created.data add append offset 0 0 0 0 0 # offset inactive here

pair_style hybrid eam/alloy airebo 3.0 1 0

pair_coeff * * eam/alloy NiZrTi.set Ni Zr Ti NULL
pair_coeff * * airebo CH.airebo 2.5 1 0 NULL NULL NULL C

However, I encounter the following error:
ERROR: Incorrect args for pair coefficients (…/pair_airebo.cpp:178)
Last command: pair_coeff * * airebo CH.airebo 2.5 1 0 NULL NULL NULL C

When I remove the " * * ", the error comes up as
ERROR: Numeric index is out of bounds (…/pair_hybrid.cpp:392)
Last command: pair_coeff airebo CH.airebo 2.5 1 0 NULL NULL NULL C

which is really odd since * * is essential in the line and the above error shows that the program has proceeded into identifying the integers within the last executed line without the required " * * ". (explanation for the numeric index error goes as "‘A command with an argument that specifies an integer or range of integers is using a value that is less than 1 or greater than the maximum allowed limit.’’). I have looked at the relevant source codes as well and unable to rectify the issue. Any suggestion on where I have gone wrong?

Secondly, and importantly, I have only defined the necessary potentials individually on the two material and indenter files(without hybrid pair style in them). Should I define hybrid pair style for both of those files/first file to be read as well? (Or not since I am using extra/atom/type keyword)?

Thank you for your time.

C Peiris

Hi,

Thank you very much for the valuable information. I went through the Read_Data section and I am currently rectifying the aforesaid issues, incorporating the extra/atom/type 1 command into the first read_data command in the final input file using:

read_data NiTiZr.data extra/atom/types 1
read_data indenter_created.data add append offset 0 0 0 0 0 # offset inactive here

pair_style hybrid eam/alloy airebo 3.0 1 0

pair_coeff * * eam/alloy NiZrTi.set Ni Zr Ti NULL
pair_coeff * * airebo CH.airebo 2.5 1 0 NULL NULL NULL C

However, I encounter the following error:
ERROR: Incorrect args for pair coefficients (…/pair_airebo.cpp:178)
Last command: pair_coeff * * airebo CH.airebo 2.5 1 0 NULL NULL NULL C

yes, and this the correct behavior, because this line is incorrect. there should not be the “2.5 1 0” there.

When I remove the " * * ", the error comes up as
ERROR: Numeric index is out of bounds (…/pair_hybrid.cpp:392)
Last command: pair_coeff airebo CH.airebo 2.5 1 0 NULL NULL NULL C

which is really odd since * * is essential in the line and the above error shows that the program has proceeded into identifying the integers within the last executed line without the required " * * ". (explanation for the numeric index error goes as "'A command with

no, it didn’t read any numbers. it tried to parse “airebo” and “CH.airebo” as numbers and came up with 0 (since they are not numbers) and hence the out of bounds error. the “* *” is required by the airebo style, but when parsing the first two “words” the parser doesn’t know this yet.

an argument that specifies an integer or range of integers is using a value that is less than 1 or greater than the maximum allowed limit.‘’). I have looked at the relevant source codes as well and unable to rectify the issue. Any suggestion on where I have gone wrong?

see above. your pair_coeff line has to be like for regular airebo, but with “airebo” inserted after "* * ".

Secondly, and importantly, I have only defined the necessary potentials individually on the two material and indenter files(without hybrid pair style in them). Should I define hybrid pair style for both of those files/first file to be read as well? (Or not since I am using extra/atom/type keyword)?

if your data files don’t contain any “PairCoeff” sections (and that is a good thing), you don’t need to set the pair style before reading them. all that is required is to reserve space for all atom types.

what is missing right now is the interaction between atom types 1-3 and 4. this has to be done with a pair-wise additive potential (e.g. lj/cut or morse or similar) and cannot be a manybody potential. also, LAMMPS cannot generate this kind of potential(s) automatically. you would have to look up some suitable parameter set.

axel.