-sort <property> <order>
-sort random
This option sorts atoms according to one of their properties.
The parameters for this option are:
-properties
);If the option is called as "-sort random", then the list of atoms is shuffled in random order.
This option does not transform the system or move atoms. It changes the index of atoms, i.e. the order in which they appear in the final file. For example, after applying this option, the atom #i of chemical symbol Xx at position (x,y,z) and with auxiliary properties of values A1, A2, etc., will still be of the same chemical species, be at the same position, and have the same values of its auxiliary properties, but it will have a different index #j.
By default atoms are not rearranged at all.
atomsk initial.cfg -sort species up final.xyz
This will rearrange the order in which atoms are written, sorting them by increasing value of their atomic weigth.
atomsk initial.cfg -sort z down final.xyz
This will sort atoms by decreasing values of their Z coordinate.
atomsk initial.cfg -sort s pack POSCAR
This will pack atoms that have the same atomic number so that they are contiguous.
atomsk initial.lmc -sort vx up final.xyz exyz
This will read the file initial.lmc
and sort atoms by increasing values of their velocity along X. These data will then be written to the file final.xyz
in extended XYZ format.
atomsk initial.lmc -sort random final.cfg
This will randomize the list of atoms, i.e. the index of all atoms will change so that they appear in a completely random order.