rotate

rotate(configuration, indices, angle, axis, u0, rotate_lattice=None)

Rotate the elements in rows the angle theta around the axis (x,y,z) centered at (x0,y0,z0).

Parameters:
  • configuration (MoleculeConfiguration | BulkConfiguration | DeviceConfiguration | SurfaceConfiguration) – The configuration containing the atoms.

  • indices (All | sequence of integers) – The indices of the atoms to change.

  • angle (float) – The rotation angle in degrees.

  • axis (sequence) – The direction of the rotation axis.

  • u0 (sequence) – Point the rotation axis goes through.

  • rotate_lattice (bool) – If the lattice should be rotated with the coordinates. Only applies to BulkConfigurations.

Returns:

The rotated configuration.

Return type:

AtomicConfiguration