I made bead-spring models of polymer.
In order to perform the analysis, the atomic numbers need to be sorted from end to end of the polymer.
I wander if there is a tool or command in lammps which can sort atom ID from end to end.
I am very glad to receive your answer.
I tried both of them,(dump_modify sort id, reset_atom_ids sort yes)
but it was probably sorted accrding to xyz coorinates.
I would like to sort them by molecule.
Reading the documentation will be a much quicker way to figure out how to sort the dump by molecule ID (spoiler: it is possible).
LAMMPS does what the documentation says it does (unless there is a bug). So sorting by atom ID will sort by atom ID. If you want a different sort order, you need to tell the command about it and there has to be some (numerical) property by which that order can be computed. While it is possible to identify individual molecules, it is much more complex and somewhat ambiguous to order a molecule in a generic way (not just for bead-spring chains) from beginning to end.
At that point you are much better off to do this after the fact since this would be rather specific to your case.
I appreciate your response.
Thank you for the spoiler. I will do my best…