Problems with data file

Hello,
I am preparing a data file for an iron-carbon FCC structure to study carbon diffusion in iron. However, LAMMPS keeps showing the message " Unkown Identified in data files" although I defined the atoms exactly like the atomic style as mentioned in LAMMPS documentation.
Here’s an example of the data file

8788 atoms
0 bonds
0 angles
0 dihedrals
0 impropers

       2 atom types
       0 bond types
       0 angle types
       0 dihedral types
       0 improper types

0 46.397 xlo xhi
0 46.397 ylo yhi
0 46.397 zlo zhi

Masses
1 55.845
2 12.0107

Atoms

1 1 0.0 0.0 0.0
2 1 1.7845 1.7845 0.0
3 1 0.0 1.7845 1.7845
4 1 1.7845 0.0 1.7845
5 1 0.0 0.0 3.569
6 1 1.7845 1.7845 3.569
7 1 0.0 1.7845 5.3535
8 1 1.7845 0.0 5.3535
9 1 0.0 0.0 7.138
10 1 1.7845 1.7845 7.138
11 1 0.0 1.7845 8.9225
12 1 1.7845 0.0 8.9225
13 1 0.0 0.0 10.707
14 1 1.7845 1.7845 10.70

8788 1

Please provide the entire LAMMPS output up to the error message. I have a suspicion what could be the mistake, but need to see it to be certain.

LAMMPS (29 Sep 2021 - Update 1)

Using KIM Simulator Model : Sim_LAMMPS_TersoffZBL_HenrikssonBjorkasNordlund_2013_FeC__SM_473463498269_000

For Simulator : LAMMPS 12 Dec 2018

Running on : LAMMPS 29 Sep 2021

Reading data file …
orthogonal box = (0.0000000 0.0000000 0.0000000) to (46.397000 46.397000 46.397000)
1 by 2 by 2 MPI processor grid
reading atoms …
0 atoms
ERROR: Unknown identifier in data file: 2 1 1.7845 1.7845 0.0 (…/read_data.cpp:731)
Last command: read_data Fe_C.data

Primary job terminated normally, but 1 process returned
a non-zero exit code… Per user-direction, the job has been aborted.


mpirun detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:

Process name: [[51886,1],1]
Exit code: 1

Yup. here is the key piece of information. LAMMPS determined that you have 0 atoms, which means that it didn’t read your “atoms” header line in the data file, and that usually happens, when it is the very first line of a data file, which is considered a comment and thus ignored.
So you missed that statement when checking out how to write the data file.
BTW: you can leave out all lines in the header than have a 0 setting. 0 is the default for any of those settings.

1 Like

Thank you so much for your help!
Apprantely, there is an error with the Masses line i can’t figure out. It outputs the following

LAMMPS (29 Sep 2021 - Update 1)

Using KIM Simulator Model : Sim_LAMMPS_TersoffZBL_HenrikssonBjorkasNordlund_2013_FeC__SM_473463498269_000

For Simulator : LAMMPS 12 Dec 2018

Running on : LAMMPS 29 Sep 2021

Reading data file …
orthogonal box = (0.0000000 0.0000000 0.0000000) to (46.397000 46.397000 46.397000)
1 by 2 by 2 MPI processor grid
ERROR: Invalid mass line in data file (…/read_data.cpp:1755)
Last command: read_data Fe_C.data

Primary job terminated normally, but 1 process returned
a non-zero exit code… Per user-direction, the job has been aborted.


mpirun detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:

Process name: [[42688,1],0]
Exit code: 1

I defined the masses as mentioned in the documentation

No, you didn’t. From the read_data documentation:

The body of the file contains zero or more sections. The first line of a section has only a keyword. This line can have a trailing comment starting with ‘#’ that is either ignored or can be used to check for a style match, as described below. The next line is skipped. The remaining lines of the section contain values.

Your data file doesn’t have the empty line after Masses

Ok, this worked. Thank you very much for your time! and sorry for any inconvenience

As a rule of thumb you can always assume that when LAMMPS reports an error, it is due to a mistake you made, unless you are using a feature that is very new or you are doing something that is very unusual. Some of the documentation is rather complex because it tries to be complete and discuss the many ifs and elses that can happen because LAMMPS is rather flexible and thus it is not always easy to pinpoint the cause of a problem and then print a meaningful error message.

1 Like