How to unify tag[i] and ilist[i] when only using single processor?

Hi,
I am writing a new pari style and I need to unify these two to test my code.

Can I unify them by only reordering the lammps data file? Or add some configs in lammps input file?

Thank you.

Never. Atoms in the neighbor list are reordered at each neighbor list creation.

But, you can always identify which local index a specific atom with a given atom ID has, i.e. which “i” you need to used to get a specific atom->tag[i]. This is done with atom->map().

This is used in several of the test programs in the “unittest” tree. E.g. in the test program for atom styles unittest/formats/test_atom_styles.cpp. Check out the GETIDX macro!

So it’s a hash map. Thank you!

Not necessarily. See atom_modify command — LAMMPS documentation