-rotate [com] <x|y|z> <θ>
-rotate [com] [hkl] <θ>
-rotate [com] <vx> <vy> <vz> <θ>
This option allows to rotate the system (i.e. both the box and atoms) around a given axis.
The axis of rotation can be one of 'x', 'y', 'z' (referring to cartesian axes), or a crystallographic direction defined by its Miller indices (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]. It is also possible to give any other direction by entering the Cartesian coordinates of a vector (vx vy vz) in angströms. The angle of rotation θ must be provided in degrees.
If the keyword "com" is used, then the center of rotation is the center of mass of the system. Otherwise (i.e. if the keyword is omitted), the center of rotation is the Cartesian origin (0,0,0).
If forces (fx,fy,fz) or velocities (vx,vy,vz) exist as auxiliary properties, then they are rotated accordingly.
This option affects some properties of the system (e.g. the elastic tensor) if they were read with the option -properties
before the present option.
If a selection was defined (with the option -select
) then the rotation is applied only to selected atoms, and the box is not rotated. If the keyword "com" is used, then the selected atoms are rotated around their center of mass.
After the application of this option, some atoms may end up out of the box, which can be fixed thanks to the option -wrap
.
By default the system is not rotated.
atomsk initial.cfg -rotate x 45 final.xyz
This will rotate the whole system (atoms and cell) by 45 degrees around X.
atomsk initial.cfg -select in cylinder Z 0.5*box 0.5*box 25 -rotate com Z 24° final.xyz
This command will select a cylinder of radius 25 Å along Z, then will rotate this cylinder around its center of mass by an angle of 24 degrees around Z. The box will not be rotated.
atomsk initial.cfg -rotate [111] 45 final.xyz
This will rotate the whole system (atoms and cell) by 45 degrees around the [111] crystal direction.
atomsk initial.cfg -rotate 1.2 0.0 3.9 21.7 final.xyz
This will rotate the whole system (atoms and cell) by 21.7 degrees around the Cartesian vector of components (1.2 0.0 3.9).