Back to main menu

## Option: unskew

#### Syntax

`-unskew`

#### Description

This option "unskews" the box, i.e. it modifies box vectors if they form an angle that is very large. The resulting box is equivalent to the starting one, but it appears to be less tilted.

Consider the following supercell vectors:

`| H(1,1) H(1,2) H(1,3) |
| H(2,1) H(2,2) H(2,3) |
| H(3,1) H(3,2) H(3,3) |`

If a non-diagonal element is larger than its main component then the box is considered "skewed". For example, if `|H(2,1)|>0.5*H(1,1)`, then `H(1,1)` will be added or subtracted to it until it is not the case.

Note that the (Cartesian) coordinates of atoms are not affected by this option, so some atoms may be outside of the box after this option is applied, which can be fixed with the option `-wrap`.

This option is mainly useful when producing LAMMPS data files, which require that the box is not tilted too much. It is recommended to use the option `-alignx` before the option `-unskew`.

#### Default

By default the supercell vectors are not unskewed.

#### Examples

- `atomsk system.xsf -alignx -unskew -wrap lmp`

  This will read the file `system.xsf`, rotate the system to align the first box vector with the X axis, reduce the "skewness" (the tilt) of the box, wrap atoms, and write the final result to the LAMMPS data file `system.lmp`.

Back to main menu