root / ase / test / rotate.py @ 1
Historique | Voir | Annoter | Télécharger (336 octet)
1 |
from ase.utils import rotate, irotate |
---|---|
2 |
|
3 |
def test(xyz): |
4 |
a = rotate(xyz) |
5 |
ixyz = '%sx,%sy,%sz' % irotate(a)
|
6 |
a2 = rotate(ixyz) |
7 |
print xyz
|
8 |
print ixyz
|
9 |
#print np.around(a-a2, 5)
|
10 |
assert abs(a-a2).max() < 1e-10 |
11 |
|
12 |
test('10z')
|
13 |
test('155x,43y,190z')
|
14 |
test('55x,90y,190z')
|
15 |
test('180x,-90y,45z')
|
16 |
test('-180y')
|
17 |
test('40z,50x')
|