# -*- coding: utf-8 -*-
"""
Created on Sun Oct 1 16:32:32 2017
@author: Roman
"""
import numpy as np
from math import *
Vxy = 3.71
Vxx = 7.51
Vpp = -8.13
Vss = 5.88
Vsp = 2.31
pi = 3.1415
k = np.array([pi/4, pi/4, pi/4])
E = 7.20
a = 5,4307
i = -1
d1 = np.array([a/4, a/4, a/4])
d2 = np.array([a/4, -a/4, -a/4])
d3 = np.array([-a/4, -a/4, a/4])
d4 = np.array([-a/4, a/4, -a/4])
g1 = exp(i * 1 * (k * d1) + i * 1 * (k * d3) + i *1 * (k * d4))
g2 = exp(i * 1 * (k * d1) + i * 1 * (k * d3) + i *1 * (k * d4))
g3 = exp(i * 1 * (k * d1) + i * 1 * (k * d3) + i *1 * (k * d4))
g4 = exp(i * 1 * (k * d1) + i * 1 * (k * d3) + i *1 * (k * d4))
H = np.array([E, Vss * g1, 0, 0, 0, Vsp * g2, Vsp * g3, Vsp * g4],
[Vss * (-g1), E, -Vsp * g2, -Vsp * g3, -Vsp * g4, 0],
[0, -Vsp * g2, E, 0, 0, Vxx * g1, Vxy * g4, Vxy * g3],
[0, -Vsp * g3, 0, E, 0, Vxy * g4, Vxx * g1, Vxy * g2],
[0, -Vsp * g4, 0, 0, E, Vxy * g3, Vxy * g2, Vxx * g1],
[Vsp * (-g2), 0, Vxx * (-g1), Vxy * (-g4), Vxy * (-g3), E, 0, 0],
[Vsp * (-g3), 0, Vxx * (-g4), Vxy * (-g1), Vxy * (-g2), 0, E, 0],
[Vsp * (-g4), 0, Vxy * (-g3), Vxy * (-g2), Vxx * (-g1), 0, 0, E])
print(np.linalg.eig(H))