Dear Lammps-Users
I created a data file from my previous codes dump file using a Python script. When I read the new data file in a new code I am getting the following error
ERROR on proc 0: Unknown identifier in data file: 21 1 1897 1898 (read_data.cpp:1410)
I observed that this error always occur after a particular line number (line number 1946) in the data file.
A sample of my data file is
capillary filling of a SWCNT with water density = 1.008068 g/cm^3
1926 atoms
40 bonds
20 angles
3 atom types
1 bond types
1 angle types
-22.14 22.14 xlo xhi
-21.3 21.3 ylo yhi
-1.0 51.0 zlo zhi
Masses
1 12.01
2 1.008
3 16
Atoms
1 1 1 0 4.068000 0.000000 0.000000
2 1 1 0 3.116270 2.614860 0.000000
3 1 1 0 4.006200 0.706401 1.229760
…
1925 21 2 0.423800 0.016872 0.544431 43.492400
1926 21 2 0.423800 0.016872 0.544431 43.492400
Bonds
1 1 1867 1868
2 1 1867 1869
…
19 1 1894 1895
20 1 1894 1896
21 1 1897 1898
…
40 1 1924 1926
Angles
1 1 1868 1867 1869
2 1 1871 1870 1872
…
19 1 1922 1921 1923
20 1 1925 1924 1926
I have attached my data file along with this mail. Can you please have a look at it and help me in finding out the mistake I have done?
new.txt (77.7 KB)
Samuel Palato
Dear Lammps-Users
I created a data file from my previous codes dump file using a Python
script. When I read the new data file in a new code I am getting the
following error
ERROR on proc 0: Unknown identifier in data file: 21 1 1897 1898
(read_data.cpp:1410)
This happens because your data file isn't formatted correctly.
As stated in the doc:
"Blank lines are important. After the header section, new entries are separated by blank lines."
I observed that this error always occur after a particular line number
(line number 1946) in the data file.
A sample of my data file is
# capillary filling of a SWCNT with water density = 1.008068 g/cm^3
1926 atoms
40 bonds
20 angles
3 atom types
1 bond types
1 angle types
-22.14 22.14 xlo xhi
-21.3 21.3 ylo yhi
-1.0 51.0 zlo zhi
Masses
1 12.01
2 1.008
3 16
Atoms
1 1 1 0 4.068000 0.000000 0.000000
2 1 1 0 3.116270 2.614860 0.000000
3 1 1 0 4.006200 0.706401 1.229760
..........
1925 21 2 0.423800 0.016872 0.544431 43.492400
1926 21 2 0.423800 0.016872 0.544431 43.492400
Bonds
1 1 1867 1868
2 1 1867 1869
.............
19 1 1894 1895
20 1 1894 1896
21 1 1897 1898
..............
40 1 1924 1926
Angles
1 1 1868 1867 1869
2 1 1871 1870 1872
..........
19 1 1922 1921 1923
20 1 1925 1924 1926
Your data should be:
1926 21 2 0.423800 0.016872 0.544431 43.492400
Bonds
1 1 1867 1868
.......
40 1 1924 1926
Angles
1 1 1868 1867 1869
....
And so on.
Dear Samuel Palato
Thank you very much for spending your valuable time for me. I had rerun the code by incorporating your suggestions but again I got the error. it says
ERROR on proc 0: Unknown identifier in data file: 18 1 1891 1893 (read_data.cpp:1410)
as you can see the error changed to the previous line.The error always occur at line number 1946. Can you please have a
look at it and help me in finding out the mistake I have done?
new.txt (77.7 KB)
Dear Samuel Palato
Thank you for your suggestions…I have resolved the problem…There were some atoms missing in the data file.
Dear Unni/Dear all,
I read the discussion you posted yesterday and have a Q. How come I know in the “Atoms” section, that which column should contain the “atom types” values? If I am right, in your code it was the third column containing atom types. I would be already thankful for your answer if you could help me.
Regards,
Shima
Dear Unni/Dear all,
I read the discussion you posted yesterday and have a Q. How come I know
in the "Atoms" section, that which column should contain the "atom types"
values? If I am right, in your code it was the third column containing atom
types. I would be already thankful for your answer if you could help me.
the answer is - as to be expected - "it depends" and details are contained
in the documentation. look up the explanation of the read_data command in
the LAMMPS manual. it explains in great detail the format of the data file
and how that depends on the atom style you choose.
axel.