Back to main menu

## Defining positions with INF and BOX

In many options of Atomsk, it is possible to specify a coordinate either in angströms or with a keyword.

The keywords -INF and INF can be used to define a position as -∞ and +∞ respectively. For instance, using the option `-select` as follows:

`-select in box -INF 0 50 INF 150 200`

includes all atoms which coordinates are in the intervals X=[-∞;+∞], Y=[0;150], Z=[50;200].

The keyword BOX can be used to define coordinates with respect to the box dimensions. This keyword is replaced by the length of the bounding box of the system, i.e. if the simulation box is defined by three vectors H1, H2 and H3:

`H1 = [ H(1,1) H(1,2) H(1,3) ]
H2 = [ H(2,1) H(2,2) H(2,3) ]
H3 = [ H(3,1) H(3,2) H(3,3) ]`

then along the X, Y and Z directions the keyword BOX is replaced by:

`BOX = H(1,1) + H(2,1) + H(3,1) along X
BOX = H(1,2) + H(2,2) + H(3,2) along Y
BOX = H(1,3) + H(2,3) + H(3,3) along Z`

If the box is orthogonal it simply reduces to BOX=H(1,1) along X, BOX=H(2,2) along Y and BOX=H(3,3) along Z.

Multiplication or division with the keyword BOX are equivalent to reduced coordinates. For example, in the following option:

`-select in sphere BOX/2 0.2*BOX 0.7*BOX 30.0`

the position of the sphere is defined as the fractional (or reduced) coordinates (1/2 0.2 0.7).

Addition and subtraction allow to give distances with respect to the maximum value of H(:,:) along that direction. For instance, the following option:

`-select out box 10 10 10 BOX-10 BOX-10 BOX-10`

will select all atoms that are within 10 Å of the borders of the bounding box. Along the X axis, "BOX-10" means "max[H(1,1),H(2,1),H(3,1)] - 10". If the box is orthogonal it simply reduces to H(1,1)-10 along X, H(2,2)-10 along Y and H(3,3)-10 along Z.

Note that only one operator can be used with the keyword BOX, it is not possible to use several operations like "0.4*BOX+2".

Back to main menu