# Affine transformation

Applies an affine transformation to the particle positions and/or the simulation cell. The transformation is specified as a 3 x 3 matrix and a translation vector.

The modifier supports two modes: The user can either specify the transformation matrix or the final shape of the simulation cell. In the latter mode the modifier computes the transformation matrix such that the old simulation cell is mapped to the specified target shape.

## Parameters

Transform simulation cell

  Controls whether the transformation matrix is applied to the simulation cell geometry.

Transform particles

  Controls whether the transformation is applied to the atomic coordinates. You can select which particles are affected by the modifier: All particles or only the selected ones.

Transformation matrix - Rotate/Scale/Shear

  The 3 x 3 matrix spcifying the affine transformation. The particle coordinates are left-multiplied with this matrix.

Transformation matrix - Translation

  A translation vector that is added to the particle positions and/or the simulation box after they have been transformed by the 3 x 3 matrix.

Transform to target box

  The three vectors that define the target simulation cell. The 3 x 3 transformation matrix applied to the particles coordinates is calculated from the current simulation cell geometry and the three target cell vectors.