-orthogonal-cell
This option searches for an equivalent orthogonal cell, that preserves the periodicity of the system.
The initial system may have any arbitrary vectors H1, H2, H3. This option searches for linear combinations m⋅H1+n⋅H2+o⋅H3 (with m,n,o integers) that produce vectors aligned with the Cartesian directions X, Y, Z. Then, atom positions are duplicated using the translation vectors H1, H2, H3, so as to fill this new orthogonal cell. Finally, the initial cell vectors are replaced by the vectors of the orthorhombic cell. Since the new cell vectors are linear combinations of the initial cell vectors, they respect the lattice periodicity.
In the particular case where box vectors are already all aligned with the Cartesian directions, but one or more of them point towards negative coordinates, this option will flip them so that they all point towards positive coordinates. The number of atoms will remain unchanged, but atoms will be translated by the appropriate box vector(s). Similarly, if H1 is aligned with the Cartesian Y axis and H2 with X, then this option will exchange these vectors so that H1 is aligned with X and H2 with Y.
If shells (in the sense of an ionic core-shell model) and/or auxiliary properties are present, then they are also duplicated.
If a selection was defined (with the option -select
), then the equivalent atoms in the new cell will be selected.
After this option is applied, the total number of atoms may differ from that of the initial system. It is recommended to call this option before duplicating the system with the option "-duplicate". Note that in certain conditions (for instance, if the initial box vectors have slightly different norms or are incommensurate, or if they form very small angles between them or with Cartesian axes), then Atomsk may fail to find a suitable set of orthogonal vectors.
Note that this option only searches for linear combinations of the initial cell vectors, but it is completely unaware of any additional crystal symmetries. The resulting cell may not be the smallest cell for that crystal orientation. You may attempt to reduce the final cell size by calling the option "-reduce-cell"
after this one.
This option is parallelized with OpenMP. To control the number of parallel threads used by Atomsk, you may use the option -nthreads
.
By default, Atomsk preserves the cell vectors and does not try to find an equivalent orthogonal cell.
atomsk --create hcp 3.21 5.213 Mg -orthogonal-cell Mg.cfg
With this command, Atomsk will create a unit cell of haxagonal magnesium, and then will transform it into a rectangular box. The vectors of the orthogonal box will be linear combinations of the hexagonal box vectors, so that the symmetries of the crystal are preserved. The final result is written in the file Mg.cfg
.
atomsk initial.cfg -rotate 45 z -orthogonal-cell final.cfg
The initial system (initial.cfg
) is rotated by 45° around the Z axis. Then, a suitable equivalent orthogonal cell is found, and atoms are duplicated to fill the new orthogonal cell. The final result will be output to final.cfg
.