Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Anjishnubose committed Apr 4, 2024
2 parents 43940cf + 744d762 commit 565292c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "TightBindingToolkit"
uuid = "2233325a-6eb3-486f-aff0-670e0939fa7e"
authors = ["Anjishnu Bose", "Sreekar Voleti", "Samuel Vadnais"]
version = "2.3.3"
version = "2.3.4"

[deps]
Bijections = "e2ed5e7c-b2de-5872-ae92-c73ca462fb04"
Expand Down Expand Up @@ -29,8 +29,8 @@ StatsBase = "^0.34"
TensorCast = "^0.4"
Tullio = "^0.3"
Bijections = "^0.1"
julia = "^1.7, ^1.9"
LinearAlgebra = "^1.7, ^1.9"
julia = "^1.6, ^1.9"
LinearAlgebra = "^1.6, ^1.9"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

[compat]
Documenter = "0.27"
Documenter = "0.27, 1"
7 changes: 5 additions & 2 deletions src/BdGModel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ Because of this, if you want to calculate the filling at a different chemical po
Eks = reshape(getindex.(M.Ham.bands, Ref(1:N÷2)), prod(M.bz.gridSize))
U11s = reshape(getindex.(M.Ham.states, Ref(1:N÷2), Ref(1:N÷2)), prod(M.bz.gridSize))
U21s = reshape(getindex.(M.Ham.states, Ref(N÷2 + 1: N), Ref(1:N÷2)), prod(M.bz.gridSize))
U12s = reshape(getindex.(M.Ham.states, Ref(1:N÷2), Ref(N÷2 + 1: N)) , prod(M.bz.gridSize))
U22s = reshape(getindex.(M.Ham.states, Ref(N÷2 + 1: N), Ref(N÷2 + 1: N)) , prod(M.bz.gridSize))

nFs = DistFunction.(Eks; T=M.T, mu=0.0, stat=M.stat)

Expand Down Expand Up @@ -134,7 +136,7 @@ Finding the Greens functions, and anomalous greens functions in momentum space a
nFs = DistFunction.(Eks; T=M.T, mu=0.0, stat=M.stat)

@reduce Gk[k1][i, j] |= sum(l) ((conj(U11s[k1][i, l]) * U11s[k1][j, l] * nFs[k1][l])
+ (conj(U12s[k1][i, l]) * U12s[k1][j, l] * (1 - nFs[k1][l])))
+ (conj(U21s[k1][i, l]) * U21s[k1][j, l] * (1 - nFs[k1][l])))

@reduce Fk[k1][i, j] |= sum(l) ((conj(U11s[k1][i, l]) * U21s[k1][j, l] * nFs[k1][l])
+ (conj(U12s[k1][i, l]) * U22s[k1][j, l] * (1 - nFs[k1][l])))
Expand Down Expand Up @@ -171,7 +173,8 @@ one-step function to find all the attributes in BdGModel after it has been init
"""
function SolveModel!(M::BdGModel ; mu_guess::Float64 = 2*M.Ham.bandwidth[1] + 2*M.filling * (M.Ham.bandwidth[2] - M.Ham.bandwidth[1]), get_correlations::Bool = true, get_gap::Bool = false, verbose::Bool = true, mu_tol::Float64 = 1e-3, filling_tol::Float64 = 1e-6)
@assert M.Ham.is_BdG==true "Use other format for pure hopping Hamiltonian"

# println(mu_guess)
# println(M.Ham.bandwidth)
if M.filling<0 ##### Must imply that filling was not provided by user and hence needs to be calculated from given mu
GetFilling!(M)
else
Expand Down

0 comments on commit 565292c

Please sign in to comment.