Skip to content

Instantly share code, notes, and snippets.

@thomasaarholt
Created March 17, 2018 12:01
Show Gist options
  • Save thomasaarholt/c9a6b5f5dca9e667fc5535cb9c3164cd to your computer and use it in GitHub Desktop.
Save thomasaarholt/c9a6b5f5dca9e667fc5535cb9c3164cd to your computer and use it in GitHub Desktop.
Awful way of rotating a cell
def rotate90(sample):
from ase.build import rotate as rot
a1 = (1,0,0)
a2 = (0,0,1)
b1 = (0,0,1)
b2 = (1,0,0)
rot(sample, a1, a2, b1, b2, rotate_cell=False)
sample.cell[0,0], sample.cell[2,2] = sample.cell[2,2], sample.cell[0,0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment