ERROR: Incorrect args for pair coefficients (src/MANYBODY/pair_eam.cpp:374)

I want to use LAMMPS to simulate Ni’s cascade collisions. “Incorrect args for pair coefficients” error occurred when opting for a potential file in eam format. But when I swap the eam/fs format to work properly, why? Thank you for answering. This is my specific code.

clear
units metal
dimension 3
atom_style atomic
boundary p p p

lattice fcc 3.520
region smallbox block 0 20 0 20 0 20 units lattice
create_box 1 smallbox
create_atoms 1 region smallbox
mass 1 58.6934
region rpka sphere 10 10 10 0.6 units lattice
group pka region rpka

pair_style eam
pair_coeff * * Ni_v6_2.0.eam Ni

Then I changed to the following format

pair_style eam/fs
pair_coeff * * Ni.eam.fs Ni

Very simple. The syntax for the pair_coeff command is different between pair styles eam and eam/fs. Please have a closer look at the documentation for those pair styles.

1 Like

Okay, thanks to akohlmey, I had a rough look at the file before, and then I’ll read it carefully.

I found the pair_coeff command for eam is
pair_style eam
pair_coeff * * Ni_v6_2.0.eam
but now it occurs the “ERROR on proc 0: Not a valid floating-point number: ‘Ni’” error, I don’t really understand.

1 Like

This is a wild guess, but is the file Ni_v6_2.0.eam in the correct format for pair style eam?

In the eam file format you have a floating-point number (the atom mass) as the second word in the first parsed line, while in the eam/fs or eam/alloy potential file formats there is a string with the Element label.

Again, this can be verified from the details of the file formats as described in the documentation.

It would have been easier to know, if you had quoted the full error message.

Also, in case of reporting errors, you should always report which LAMMPS version you are using and what platform you are running on. It didn’t matter in this case, but it is “good citizenship” to stick by the guidelines all the time (and good practice so you won’t forget it when it matters)