| 68 |
|
|
| 69 |
|
# create the 24 basic arrays using Eq. 12 in Luttinger & Tisza: |
| 70 |
|
for i in range(8): |
| 71 |
+ |
# The X and Y arrays are cubic rotations of the Z array, so we |
| 72 |
+ |
# need to re-order them to match the numbering scheme in |
| 73 |
+ |
# Luttinger & Tisza: |
| 74 |
+ |
if (i > 0 and i < 4): |
| 75 |
+ |
iX = 1 + (i + 1) % 3 |
| 76 |
+ |
iY = 1 + (i ) % 3 |
| 77 |
+ |
elif (i > 3 and i < 7): |
| 78 |
+ |
iX = 4 + (i - 2) % 3 |
| 79 |
+ |
iY = 4 + (i ) % 3 |
| 80 |
+ |
else: |
| 81 |
+ |
iX = i |
| 82 |
+ |
iY = i |
| 83 |
|
which = 0 |
| 84 |
|
for l1 in range(2): |
| 85 |
|
for l2 in range(2): |
| 86 |
|
for l3 in range(2): |
| 87 |
|
lvals = numpy.array([l1,l2,l3]) |
| 88 |
|
value = math.pow(-1, numpy.dot(cell[i], lvals)) |
| 89 |
< |
X[i][which] = value * e1 |
| 90 |
< |
Y[i][which] = value * e2 |
| 91 |
< |
Z[i][which] = value * e3 |
| 89 |
> |
X[iX][which] = value * e1 |
| 90 |
> |
Y[iY][which] = value * e2 |
| 91 |
> |
Z[i][which] = value * e3 |
| 92 |
|
which = which+1 |
| 81 |
– |
|
| 93 |
|
|
| 94 |
|
lp_array = numpy.zeros(0).reshape((0,3)) |
| 95 |
|
for i in range(8): |