from VisualInterface import *
from NumericInterface import *
##from DataInterface import *

from Visuals import *
from Numerics import *
##from DataOut import *


nSpinsX = 3
nSpinsY = 2

stripeSpacingX = 3
stripeSpacingY = 2


k = vector(0.0,0.0,0.0)                                                     # as of now, commensurate needed for stationany state
pi = 3.14159265358979323846264338327950288419716939937510582097494459

zArray = [[1.0,-1.0],[-1.0,1.0],[1.0,-1.0]]
phaseArray = [[0.0,0.0],[0.0,0.0],[0.0,0.0]]

##chi = abs((cos(k.x)+cos(k.y))/2.0)
##spinMagRatio = .5*(1.0+1.0/chi-((1.0/chi-1.0)*(1.0/chi+3.0))**(0.5))

phiScale = 1.00
phiRatio = 1.00



##phiArray = [[(43.0/180.0)*pi,-(25.0/180.0)*pi],[-(9.0/180.0)*pi,-(9.0/180.0)*pi],[-(25.0/180.0)*pi,(43.0/180.0)*pi]]
##phiArray = [[(69.0/180.0)*pi,-(23.0/180.0)*pi],[-(8.0/180.0)*pi,-(8.0/180.0)*pi],[-(23.0/180.0)*pi,(69.0/180.0)*pi]]
##phiArray = [[(74.5/180.0)*pi,-(41.5/180.0)*pi],[-(12.0/180.0)*pi,-(12.0/180.0)*pi],[-(41.5/180.0)*pi,(74.5/180.0)*pi]]
##phiArray = [[1.0,1.0],[1.0,1.0],[1.0,1.0]]

phiArray = [[(64.0/180.0)*pi,-(29.0/180.0)*pi],[-(8.0/180.0)*pi,-(8.0/180.0)*pi],[-(29.0/180.0)*pi,(64.0/180.0)*pi]]



Ja = -1.0
Jbx = 2.0
Jby = -1.0
Jad = -1.0

trackSpins = [(0,0)]
dt = .020



visuals = Visuals(nSpinsX, nSpinsY, stripeSpacingX, stripeSpacingY, k)
numerics = Numerics(nSpinsX, nSpinsY, k, zArray, phaseArray, phiArray, phiScale, phiRatio, Ja, Jbx, Jby, Jad, dt, visuals)
####dataOut = DataOut(trackSpins, numerics)

visualTk = Tk()
numericTk = Tk()
####dataTk = Tk()

visualInterface = VisualInterface(visualTk, visuals)
numericInterface = NumericInterface(numericTk, numerics)
####dataInterface = DataInterface(dataTk, dataOut)

visualTk.mainloop()
numericTk.mainloop()
##dataTk.mainloop()
