Does anyone know why, when I use ASE to read a lammps-data file then write a lammps-data file the atom type order is changing? E.g. atom type 1 is now atom type 2 via. Is this a bug?
python:
from ase import Atoms
from ase.io import read, write
structure = read('in.data', format='lammps-data')
write('out.data', structure, format='lammps-data')
in.data
LAMMPS data file
10 atoms
2 atom types
0.23804174467495384 19.491958255325184 xlo xhi
0.07381357606622793 19.656186423933754 ylo yhi
0 56.5 zlo zhi
Masses
1 58.6934
2 92.90637
Atoms # atomic
1 1 8.003396981729855 7.81701149126033 1.0535209764894955
2 1 1.8544555442034365 9.172670309685868 0.9556990920000298
3 1 1.262386194517821 3.2102360277389073 4.213469056491476
4 1 4.8380939404195145 5.400518571434123 2.0481053818579635
5 **2** 0.728965153670273 0.6672645065312569 3.9828521945241757
6 1 2.938540565890799 1.7292699978079278 5.562830039925194
7 1 5.209963031033449 5.0870854851364395 4.450506459379925
8 1 2.1052031130812727 5.7946319616994115 3.615858097320411
9 **2** 3.0238292680411685 4.424244277205381 5.820017273188103
10 1 1.640326666016647 2.486739609699881 1.8653504759274637
out.data
(written by ASE)
10 atoms
2 atom types
0.0 19.253916510650228 xlo xhi
0.0 19.582372847867525 ylo yhi
0.0 56.5 zlo zhi
Atoms # atomic
1 2 8.0033969817298534 66.564130034862913 1.0535209764894955
2 2 -75.161210498397466 28.755043157553395 0.95569909200002978
3 2 -56.499363337432854 3.2102360277389073 4.2134690564914763
4 2 -33.669739080880937 24.982891419301648 2.0481053818579635
5 **1** -37.778867867630176 39.832010202266304 3.9828521945241757
6 2 2.9385405658907984 21.311642845675451 5.5628300399251938
7 2 -33.297869990267003 -34.077660210598609 4.4505064593799251
8 2 -17.148713397568955 -52.952486581903159 3.6158580973204111
9 **1** 3.023829268041168 24.006617125072907 5.8200172731881032
10 2 20.894243176666873 22.069112457567407 1.8653504759274639