-cell <add|rm|set> <d> <H1|H2|H3|x|y|z|xy|xz|yx|yz|zx|zy|xyz>
This option allows to modify the cell vectors.
It is possible to add, remove, or set a given length <d> to the provided component of the box. H1, H2, H3 refer to the three box vectors, while x, y, z refer to the Cartesian axes. The components xy, xz, yx, yz, zx, zy are non-diagonal elements of the cell vectors matrix. The component "xyz" means that the same distance <d> will be added (or removed) to all diagonal components.
The distance <d> must be given in angströms (Å), and should be positive to avoid confusion. Using "add" with a negative value of <d> will actually reduce the length of a box vector. Similarly, using "rm" with a negative value of <d> will increase the vector length.
The Cartesian positions of atoms are not modified by this option. Therefore, elongating a box vector (with "add" or "set") will introduce a void region along the given direction. Inversely, if a box vector is reduced (with "rm" or "set"), then atoms may end up out of the box.
In order to specify all cell vectors components, it is possible to write them into a file and use the option -property
. To force Atomsk to construct automatically a bounding box, one may use the option -rebox
.
By default Atomsk uses the cell vectors read from the input file. If no cell vectors are found in the input file, then a warning is displayed and the option -rebox
is automatically called after reading the file (and before applying any other option). For instance, this is the case with the default XYZ format which does not contain any box vector.
atomsk initial.cfg -cell add 10 H2 final.cfg
With this command, Atomsk will read the file initial.cfg
, and then add 10 Å to the second cell vector (H2). In other words, the second cell vector will keep the same direction, but will be 10 Å longer. Atom positions will remain the same, so this will add "void" along that direction. The result will be output in final.cfg
.
atomsk initial.cfg -cell add 20 y final.cfg
This will read the file initial.cfg
and add 20 Å to the cell length along the Cartesian Y axis. In practice this is equivalent to adding void along the Y direction. The result will be output in final.cfg
.
atomsk initial.cfg -cell set 87.4 H1 final.cfg
This will change the length of the first box vector to 87.4 Å.
atomsk initial.cfg -cell rm 0.5 H3 final.cfg
This will reduce the length of the third box vector by 0.5 Å.