Back to main menu

## Option: freeze

#### Syntax

`-freeze <x|y|z|xy|xz|yz|xyz>`

`-freeze <x|y|z|xy|xz|yz|xyz> <above|below> <d> <x|y|z>`

#### Description

This option allows to freeze atoms along X, Y, and/or Z. It has no effect on following Atomsk commands, but will appear in some output files if their format allows it.

The parameters for this option are the following:

- axis: coordinate(s) to be frozen, can be 'x', 'y', 'z' (referring to cartesian coordinates), 'xy', 'xz', 'yz' (freezing two coordinates at one), or 'xyz' or 'all' (freezing all coordinates).
- above|below: this keyword decides if it is the atoms above or below the plane that are fixed.
- d: distance from the origin of the axis where the plane is placed, in angströms (Å).
- normal: direction perpendicular to the plane of freeze; can be x, y, z, or a crystallographic direction (see below).

The distance <d> is usually given in Å. It is also possible to give it with respect to the box dimension along <axis> 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 this option does not actually make atoms inert for Atomsk, it just "marks" them as fixed (by adding three auxiliary properties to each atom: fixx, fixy, fixz). As far as Atomsk is concerned, fixed atoms are not different from other atoms. Only when writing the output files will the fixed atoms be marked differently in formats that support it (see the list of formats). In order to restrict the options of Atomsk to only some atoms one may use the option `-select`.

This option can be used several times to freeze atoms in several directions, or to freeze different atoms (see example 2 below).

If some atoms have shells (in the sense of an ionic core-shell model), then only the core is fixed (and not the shell).

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

#### Default

By default no atom is frozen.

#### Examples

- `atomsk initial.xsf -freeze Y final.gin`

  This will read the file `initial.xsf`, and freeze the Y coordinate of all atoms. The result will be output to the file `final.gin`.

- `atomsk system.xsf -select out box 10 BOX-10 10 BOX-10 10 BOX-10 -freeze all lammps`

  This will read the file `system.xsf`, select atoms that are within 10 Å of each boundary, and freeze these atoms (in all three coordinates X, Y and Z). The result will be output to the file `system.lmp`.

- `atomsk system.xsf -freeze x above 5 z gin`

  This will read the file `system.xsf`, and freeze the X coordinate of all atoms that are above 5 Å along Z. The result will be output to the file `system.gin`.

- `atomsk initial.xsf -freeze xy below 2.4 z final.gin`

  This will freeze the X and Y coordinates of all atoms that are below 2.4 Å along Z.

- `atomsk initial.xsf -freeze all below 0.2*BOX z -freeze all above 0.8*BOX z final.gin`

  This will freeze all atoms that are below 0.2 times the box height along Z, or above 0.8 times that height.

Back to main menu