-sort <property> <order>
This option sorts atoms according to one of their properties.
The parameters for this option are:
-properties
);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.
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.