-rotate [com] <axis> <θ>
This option allows to rotate the system (i.e. both the box and atoms) around a cartesian axis.
The user has to provide the axis of rotation (has to be x, y or z -referring to cartesian axes), and the angle of rotation θ (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.