Back to main menu

Mode: unwrap

Syntax

atomsk --unwrap <reference> <configuration> [<outputfile>] [<formats>] [options]

Description

This mode allows to unwrap atom coordinates of the <configuration>.

Some codes wrap coordinates, i.e. place atoms back inside the simulation box if they leave it during a simulation for instance (see also the option -wrap of Atomsk). This is inconvenient if one is interested in the "absolute" coordinates of atoms -that is, their unwrapped coordinates.

In this mode Atomsk compares the atom positions of the <configuration> to the ones in the <reference>. 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. If the displacement vector of an atom is not in the range of ]-0.5;+0.5] times the vectors of the supercell, then Atomsk considers that this atom must be unwrapped. It will be shifted by one or several supercell vectors, until its displacement vector falls in the aforementionned range.

Beware that in simulations where atoms diffuse a lot (typically by an amount greater than the cell length), if you attempt to unwrap coordinates of the last snapshot using the initial snapshot as a reference, then Atomsk will erronously unwrap atoms. In such cases it is recommended to use the previous snapshot as a reference.

Note that contrary to the wrapping of atoms, unwrapping requires a reference. That is because in a configuration where all atoms are in the simulation box, there is no general way of telling which ones have been wrapped or not -and therefore which ones have to be unwrapped.

If you use this mode with one or several options they will be applied to the <reference> and <configuration> before unwrapping atom coordinates.

Examples

Back to main menu