Back to main menu

## Option: mirror

#### Syntax

`-mirror <d> <normal>`

#### Description

This option applies a mirror transformation to the system.

The mirror plane is defined as follows:

- d: distance between the mirror plane and the origin of cartesian coordinates.
- normal: direction normal to the mirror plane; can be x, y, z, or a crystallographic direction (see below).

The position <d> is usually given in Å. It is also possible to give it 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 (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].

If forces (fx,fy,fz) or velocities (vx,vy,vz) exist as auxiliary properties, then they are also mirrored.

If some atoms have shells (in the sense of an ionic core-shell model), they are also mirrored along with their cores.

After applying the mirror transformation it is possible that some atoms end up out of the simulation box. They can be put back into the box using periodic boundary conditions thanks to the option `-wrap`.

If a selection was defined (with the option `-select`) then only the selected atoms are mirrored.

#### Default

By default the system is not mirrored.

#### Examples

- `atomsk initial.cfg -mirror 30 x final.xsf`

  This will read the file `initial.cfg`, and apply a mirror plane at 30 Å along the X cartesian axis. The result will be output to the file `final.xsf`.

- `atomsk initial.cfg -mirror 0.5*box Y final.xyz`

  In this case the mirror plane will be placed at the middle of the box along Y.

- `atomsk initial.cfg -mirror 50 [111] final.xyz`

  The mirror plane will be normal to [111] and at a distance of 50 Å from the origin.

Back to main menu