atomsk --diff <file1> <file2> [options]
This mode computes the differences between two atomic configurations.
The displacement vectors are defined by the subtraction of the positions of the <file1> from those of the <file2> (in other words disp=<file2>-<file1> ). Both files must have the exact same number of particles, and shall correspond to the same system (i.e. same base vectors, same atom types, etc.) for the computation to make sense. The two files may be in different formats as long as these formats are supported by Atomsk.
If auxiliary properties exist in both systems, then the difference between matching auxiliary properties is also computed, i.e. for auxiliary properties that have exactly the same name in both input files. Auxiliary properties that exist in one input file but not the other are ignored, and will not appear in the final files.
The results are written in six separate files which names are prefixed with the name of the <file2>:
i dr species
" (i
=index of atom, dr
=norm of displacement).Note that this mode assumes that coordinates are not wrapped. If they are wrapped (either because the simulation code has written wrapped coordinates in the file, or because you run Atomsk with the option -wrap
) then some atoms may seem to teleport from one end of the supercell to another, and displacement vectors may be wrong. If coordinates are wrapped you may unwrap them first with the mode --unwrap
.
If you use this mode with one or several options, then these options will be applied on the two files before the difference is computed.
atomsk --diff initial.grs final.xsf
This will compute the difference in atom positions between initial.grs
and final.xsf
.