Tracking atomic indices of the specified structures

Dear all,
Is there a way in LAMMPS to track the atomic indices (e.g. as they appear in the data file) of the specified structures? In my reaction system, NO2+NO2 → NO3, NO, O2. Using the command “fix reaxff/species” , I could track the number of molecules of NO2, NO3, NO, O2 as a function of time, but I cannot track indices of the atoms belonging to each specified molecule as a function of time, which is necessary to understand the details of the reaction mechanism. The attached figure shows the reactive system, with some of the molecules of interest shown in red.
Thank you and regards,
Victor

Various dump formats will preserve the particle ID of such a system as you dump the trajectory (you must enable atom mapping: atom_modify command — LAMMPS documentation).

The default atom dump style includes these IDs. Compressed dump styles like DCD and XTC also preserve atom ordering that can be read by analysis packages in my experience.

You can do this with fix reaxff/bonds and some postprocessing.

Hi Shern Tee,
Thank you very much. I still need to learn these options better, so I’ll try.
Regards,
Victor

Hello Mkanski,
Yeah, it’s a good idea, thank you.I have created these files before, but didn’t think the way you suggested. Yes, I can extract needed information upon the corresponding number of bonds.Probably there is an option too to output only the atoms with a specific number of bonds per atom. I will check it out.
Regards,
Victor