Skip to content

Commit

Permalink
Updated sample
Browse files Browse the repository at this point in the history
  • Loading branch information
Anjishnubose committed Aug 3, 2023
1 parent c049d37 commit e9c9799
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 36 deletions.
52 changes: 26 additions & 26 deletions Sample/KagomeHeis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ const b4 = [2.0 + 0.0, 0.0]
const b5 = [2.0 + 1.0, 0.0]
const b6 = [2.0 + 0.5, sqrt(3)/2]

const InitialField = zeros(Float64, 4)
SpinVec = SpinMats(1//2)
const InitialField = zeros(Float64, 4)
const OnSite = SpinMats(1//2)

HoppingUC = UnitCell([a1, a2], 2, 2)
InteractionUC = UnitCell([a1, a2], 2, 4)
AddBasisSite!.(Ref(HoppingUC), [b1, b2, b3, b4, b5, b6], Ref(InitialField))
AddBasisSite!.(Ref(InteractionUC), [b1, b2, b3, b4, b5, b6], Ref(InitialField))
AddBasisSite!.(Ref(HoppingUC), [b1, b2, b3, b4, b5, b6], Ref(InitialField) , Ref(OnSite))
AddBasisSite!.(Ref(InteractionUC), [b1, b2, b3, b4, b5, b6], Ref(InitialField) , Ref(OnSite))

const J = 1.0
Jmatrix = Matrix{Float64}(I, 3, 3)
Expand All @@ -41,39 +41,39 @@ const stat = -1

const mixingAlpha = 0.5

phis = collect(LinRange(-pi/2, pi/2, 51))
phis = collect(LinRange(-pi/2, pi/2, 21))

for ϕ in phis

ChiUC = UnitCell([a1, a2], 2, 2)

AddBasisSite!.(Ref(ChiUC), [b1, b2, b3, b4, b5, b6], Ref(InitialField))
AddBasisSite!.(Ref(ChiUC), [b1, b2, b3, b4, b5, b6], Ref(InitialField), Ref(OnSite))

##### Hopping expectation params
# Hopping with flux ϕ through the triangles, and π-2ϕ through the hexagons
t_flux = Param(1.0, 2)
AddAnisotropicBond!(t_flux, ChiUC, 1, 2, [ 0, 0], exp( im * ϕ/3) * SpinVec[4], 1.0, "[ϕ, ϕ, π - 2*ϕ] Hopping with ϕ/π = $(ϕ/pi)")
AddAnisotropicBond!(t_flux, ChiUC, 2, 3, [ 0, 0], exp( im * ϕ/3) * SpinVec[4], 1.0, "[ϕ, ϕ, π - 2*ϕ] Hopping with ϕ/π = $(ϕ/pi)")
AddAnisotropicBond!(t_flux, ChiUC, 3, 1, [ 0, 0], exp( im * ϕ/3) * SpinVec[4], 1.0, "[ϕ, ϕ, π - 2*ϕ] Hopping with ϕ/π = $(ϕ/pi)")
AddAnisotropicBond!(t_flux, ChiUC, 4, 5, [ 0, 0], exp( im * ϕ/3) * SpinVec[4], 1.0, "[ϕ, ϕ, π - 2*ϕ] Hopping with ϕ/π = $(ϕ/pi)")
AddAnisotropicBond!(t_flux, ChiUC, 5, 6, [ 0, 0], exp( im * ϕ/3) * SpinVec[4], 1.0, "[ϕ, ϕ, π - 2*ϕ] Hopping with ϕ/π = $(ϕ/pi)")
AddAnisotropicBond!(t_flux, ChiUC, 6, 4, [ 0, 0], exp( im * ϕ/3) * SpinVec[4], 1.0, "[ϕ, ϕ, π - 2*ϕ] Hopping with ϕ/π = $(ϕ/pi)")
AddAnisotropicBond!(t_flux, ChiUC, 4, 2, [ 0, 0], exp( im * ϕ/3) * SpinVec[4], 1.0, "[ϕ, ϕ, π - 2*ϕ] Hopping with ϕ/π = $(ϕ/pi)")

AddAnisotropicBond!(t_flux, ChiUC, 2, 6, [ 0, -1], exp( im * (pi + ϕ/3)) * SpinVec[4], 1.0, "[ϕ, ϕ, π - 2*ϕ] Hopping with ϕ/π = $(ϕ/pi)")
AddAnisotropicBond!(t_flux, ChiUC, 4, 6, [ 0, -1], exp(-im * (pi + ϕ/3)) * SpinVec[4], 1.0, "[ϕ, ϕ, π - 2*ϕ] Hopping with ϕ/π = $(ϕ/pi)")
AddAnisotropicBond!(t_flux, ChiUC, 5, 3, [ 1, -1], exp( im * (pi + ϕ/3)) * SpinVec[4], 1.0, "[ϕ, ϕ, π - 2*ϕ] Hopping with ϕ/π = $(ϕ/pi)")
AddAnisotropicBond!(t_flux, ChiUC, 5, 1, [ 1, 0], exp(-im * (pi + ϕ/3)) * SpinVec[4], 1.0, "[ϕ, ϕ, π - 2*ϕ] Hopping with ϕ/π = $(ϕ/pi)")
AddAnisotropicBond!(t_flux, ChiUC, 3, 1, [ 0, 1], exp( im * ϕ/3) * SpinVec[4], 1.0, "[ϕ, ϕ, π - 2*ϕ] Hopping with ϕ/π = $(ϕ/pi)")
AddAnisotropicBond!(t_flux, ChiUC, 1, 2, [ 0, 0], exp( im * ϕ/3) * OnSite[4], 1.0, "[ϕ, ϕ, π - 2*ϕ] Hopping with ϕ/π = $(ϕ/pi)")
AddAnisotropicBond!(t_flux, ChiUC, 2, 3, [ 0, 0], exp( im * ϕ/3) * OnSite[4], 1.0, "[ϕ, ϕ, π - 2*ϕ] Hopping with ϕ/π = $(ϕ/pi)")
AddAnisotropicBond!(t_flux, ChiUC, 3, 1, [ 0, 0], exp( im * ϕ/3) * OnSite[4], 1.0, "[ϕ, ϕ, π - 2*ϕ] Hopping with ϕ/π = $(ϕ/pi)")
AddAnisotropicBond!(t_flux, ChiUC, 4, 5, [ 0, 0], exp( im * ϕ/3) * OnSite[4], 1.0, "[ϕ, ϕ, π - 2*ϕ] Hopping with ϕ/π = $(ϕ/pi)")
AddAnisotropicBond!(t_flux, ChiUC, 5, 6, [ 0, 0], exp( im * ϕ/3) * OnSite[4], 1.0, "[ϕ, ϕ, π - 2*ϕ] Hopping with ϕ/π = $(ϕ/pi)")
AddAnisotropicBond!(t_flux, ChiUC, 6, 4, [ 0, 0], exp( im * ϕ/3) * OnSite[4], 1.0, "[ϕ, ϕ, π - 2*ϕ] Hopping with ϕ/π = $(ϕ/pi)")
AddAnisotropicBond!(t_flux, ChiUC, 4, 2, [ 0, 0], exp( im * ϕ/3) * OnSite[4], 1.0, "[ϕ, ϕ, π - 2*ϕ] Hopping with ϕ/π = $(ϕ/pi)")

AddAnisotropicBond!(t_flux, ChiUC, 2, 6, [ 0, -1], exp( im * (pi + ϕ/3)) * OnSite[4], 1.0, "[ϕ, ϕ, π - 2*ϕ] Hopping with ϕ/π = $(ϕ/pi)")
AddAnisotropicBond!(t_flux, ChiUC, 4, 6, [ 0, -1], exp(-im * (pi + ϕ/3)) * OnSite[4], 1.0, "[ϕ, ϕ, π - 2*ϕ] Hopping with ϕ/π = $(ϕ/pi)")
AddAnisotropicBond!(t_flux, ChiUC, 5, 3, [ 1, -1], exp( im * (pi + ϕ/3)) * OnSite[4], 1.0, "[ϕ, ϕ, π - 2*ϕ] Hopping with ϕ/π = $(ϕ/pi)")
AddAnisotropicBond!(t_flux, ChiUC, 5, 1, [ 1, 0], exp(-im * (pi + ϕ/3)) * OnSite[4], 1.0, "[ϕ, ϕ, π - 2*ϕ] Hopping with ϕ/π = $(ϕ/pi)")
AddAnisotropicBond!(t_flux, ChiUC, 3, 1, [ 0, 1], exp( im * ϕ/3) * OnSite[4], 1.0, "[ϕ, ϕ, π - 2*ϕ] Hopping with ϕ/π = $(ϕ/pi)")

######### Weiss fields
Ordering = Param(1.0, 2)
AddAnisotropicBond!(Ordering, ChiUC, 1, 1, [ 0, 0], sum([ -sqrt(3)/2, -1/2, 0.0] .* SpinVec[1:3]), 0.0, "120 degree ordering")
AddAnisotropicBond!(Ordering, ChiUC, 2, 2, [ 0, 0], sum([ sqrt(3)/2, -1/2, 0.0] .* SpinVec[1:3]), 0.0, "120 degree ordering")
AddAnisotropicBond!(Ordering, ChiUC, 3, 3, [ 0, 0], sum([ 0.0, 1.0, 0.0] .* SpinVec[1:3]), 0.0, "120 degree ordering")
AddAnisotropicBond!(Ordering, ChiUC, 4, 4, [ 0, 0], sum([ -sqrt(3)/2, -1/2, 0.0] .* SpinVec[1:3]), 0.0, "120 degree ordering")
AddAnisotropicBond!(Ordering, ChiUC, 5, 5, [ 0, 0], sum([ sqrt(3)/2, -1/2, 0.0] .* SpinVec[1:3]), 0.0, "120 degree ordering")
AddAnisotropicBond!(Ordering, ChiUC, 6, 6, [ 0, 0], sum([ 0.0, 1.0, 0.0] .* SpinVec[1:3]), 0.0, "120 degree ordering")
AddAnisotropicBond!(Ordering, ChiUC, 1, 1, [ 0, 0], sum([ -sqrt(3)/2, -1/2, 0.0] .* OnSite[1:3]), 0.0, "120 degree ordering")
AddAnisotropicBond!(Ordering, ChiUC, 2, 2, [ 0, 0], sum([ sqrt(3)/2, -1/2, 0.0] .* OnSite[1:3]), 0.0, "120 degree ordering")
AddAnisotropicBond!(Ordering, ChiUC, 3, 3, [ 0, 0], sum([ 0.0, 1.0, 0.0] .* OnSite[1:3]), 0.0, "120 degree ordering")
AddAnisotropicBond!(Ordering, ChiUC, 4, 4, [ 0, 0], sum([ -sqrt(3)/2, -1/2, 0.0] .* OnSite[1:3]), 0.0, "120 degree ordering")
AddAnisotropicBond!(Ordering, ChiUC, 5, 5, [ 0, 0], sum([ sqrt(3)/2, -1/2, 0.0] .* OnSite[1:3]), 0.0, "120 degree ordering")
AddAnisotropicBond!(Ordering, ChiUC, 6, 6, [ 0, 0], sum([ 0.0, 1.0, 0.0] .* OnSite[1:3]), 0.0, "120 degree ordering")

ChiParams = [t_flux, Ordering]
HoppingBlock = ParamBlock(ChiParams, ChiUC)
Expand All @@ -83,7 +83,7 @@ for ϕ in phis
M = Model(HoppingUC, bz, H ; T=T, filling=filling, stat=stat)

mft = TightBindingMFT(M, HoppingBlock, InteractionBlock, InterQuarticToHopping, Dict{String, Float64}("ij" => 1.0, "ii" => 0.0, "jj" => 0.0) )
fileName = "./Sample/KagomeDiracSL/J=$(round(J, digits=3))_phi=$(round/pi, digits=3))Pi.jld2"
fileName = "./Sample/KagomeDiracSL/J=$(round(J, digits=3))_phi=$(round/pi, digits=3))Pi_New.jld2"
SolveMFT!(mft, fileName)

end
20 changes: 10 additions & 10 deletions Sample/RenormalizedSquaretJ.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,20 @@ for filling in fillings
DeltaUC = UnitCell([a1, a2], 2, 2)
InteractionUC = UnitCell([a1, a2], 2, 4)

AddBasisSite!(HoppingUC, b1, InitialField)
AddBasisSite!(HoppingUC, b2, InitialField)
AddBasisSite!(HoppingUC, b1)
AddBasisSite!(HoppingUC, b2)

AddBasisSite!(PairingUC, b1, InitialField)
AddBasisSite!(PairingUC, b2, InitialField)
AddBasisSite!(PairingUC, b1)
AddBasisSite!(PairingUC, b2)

AddBasisSite!(ChiUC, b1, InitialField)
AddBasisSite!(ChiUC, b2, InitialField)
AddBasisSite!(ChiUC, b1)
AddBasisSite!(ChiUC, b2)

AddBasisSite!(DeltaUC, b1, InitialField)
AddBasisSite!(DeltaUC, b2, InitialField)
AddBasisSite!(DeltaUC, b1)
AddBasisSite!(DeltaUC, b2)

AddBasisSite!(InteractionUC, b1, InitialField)
AddBasisSite!(InteractionUC, b2, InitialField)
AddBasisSite!(InteractionUC, b1)
AddBasisSite!(InteractionUC, b2)

##### HoppingParams
t1 = -t*rnorm_hopping_factor
Expand Down

0 comments on commit e9c9799

Please sign in to comment.