Back to main menu

## Option: shift

#### Syntax

`-shift <τX> <τY> <τZ>`

`-shift <above|below> <d> <normal> <τX> <τY> <τZ>`

#### Description

This option allows to shift all or part of the system by a vector τ.

If only the (Cartesian) components of the shift vector τ are given, then all atoms are shifted (or selected atoms, see below).

Otherwise, all atoms that are above (or below) the given plane are shifted by the specified vector. The command-line parameters of importance are:

- above|below: this keyword decides if it is the atoms above or below the plane that are removed.
- d: distance to the plane of shift from the origin (in Å).
- normal: direction normal to the plane that contains the shift; can be "x", "y", "z", or a crystallographic direction (see below).
- τX, τY, τZ: components of the displacement vector along X, Y and Z (in Å).

The distance <d> and the vector components τX, τY, τZ, are usually given in Å. It is also possible to give them with respect to the box dimensions with the keyword BOX and an operation (see this page).

The <normal> can be one of 'x', 'y', 'z' (referring to cartesian axes), or a crystallographic direction defined by its Miller indices [hkl], or [hkil] for hexagonal systems (see how to specify Miller indices). If the crystallographic orientation of the system is defined (e.g. through the option `-properties`) then the Miller indices are considered with respect to that orientation. Otherwise the orientation assumed is X=[100], Y=[010], Z=[001].

Note that after being shifted, some atoms may end up out of the box. If you want to wrap these atoms back into the simulation cell you may consider using the option `-wrap`.

If some atoms have shells (in the sense of an ionic core-shell model), then both core and shells are shifted by the same vector.

If a selection was defined (with the option `-select`) then the translation is applied only to selected atoms.

#### Default

By default no shift is applied.

#### Examples

- `atomsk initial.cfg -shift 1.5 2.0 0.6 final.xyz`

  This will read the file `initial.cfg` and shift all atoms by 1.5 Å along X, 2 Å along Y, and 0.6 Å along Z. The result will be output into `final.xyz`.

- `atomsk initial.cfg -shift above 12 z 0.2 0.6 0.0 final.xyz`

  This will read the file `initial.cfg` and shift all atoms that are above 12 Å along Z by (0.2,0.6,0). The result will be output into `final.xyz`.

- `atomsk initial.cfg -shift above 0.5*BOX z 0.2*BOX 0.6*BOX 0.0 final.xyz`

  This will read the file `initial.cfg` and shift all atoms that are above half the height along Z by 0.2 times the box length along X, and 0.6 times the box length along along Y (no displacement along Z). The result will be output into `final.xyz`.

- `atomsk initial.cfg -shift below 3.2 x 0 0 -0.5 final.xyz`

  This will read `initial.cfg` and shift all atoms that have a X coordinate smaller than 3.2 Å by -0.5 Å along Z (shift is 0 along X and Y). The result will be output into `final.xyz`.

- `atomsk initial.cfg -shift above 10 [2-11] 0 0 -0.5 final.xyz`

  This will shift all atoms that are at a greater distance from the origin than 10 Å along the [211] direction by -0.5 Å along Z (shift is 0 along X and Y).

- You may also want to look at the scripts in the "examples" folder provided with the program. The folder "`SrTiO3_gamma_surface`" contains a bash script that builds the different systems for a (1-10) γ-surface calculation in strontium titanate.

Back to main menu