Skip to content

Commit

Permalink
Updated / corrected holstein to match DMC and PIMC
Browse files Browse the repository at this point in the history
  • Loading branch information
Neutrino155 committed Aug 29, 2023
1 parent ae1c2cc commit 88c09ff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/HolsteinTheory.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ end
function holstein_interaction_energy_integrand(τ, v, w, α, ω, β; dims = 3)
coupling = holstein_coupling(1, α, ω; dims = dims)
propagator = polaron_propagator(τ, v, w, ω, β)
phonon_propagator(τ, ω, β) * (coupling * erf* sqrt(propagator / 2)) / sqrt(2π * propagator))^dims
phonon_propagator(τ, ω, β) * (coupling * erf* sqrt(propagator * dims)) / sqrt(2π * propagator))^dims
end

"""
Expand All @@ -44,7 +44,7 @@ end
function holstein_interaction_energy_integrand(τ, v, w, α, ω; dims = 3)
coupling = holstein_coupling(1, α, ω; dims = dims)
propagator = polaron_propagator(τ, v, w, ω)
phonon_propagator(τ, ω) * (coupling * erf* sqrt(propagator / 2)) / sqrt(2π * propagator))^dims
phonon_propagator(τ, ω) * (coupling * erf* sqrt(propagator * dims / ω)) / sqrt(2π * propagator))^dims
end

"""
Expand All @@ -67,9 +67,9 @@ end
Total free energy for the Holstein model. Here the k-space integral is evaluated analytically.
"""
function holstein_energy(v, w, α, ωβ...; dims = 3)
kinetic_energy = -2 * dims - electron_energy(v, w, ωβ...; dims = dims)
potential_energy = -holstein_interaction_energy(v, w, α, ωβ...; dims = dims)
return kinetic_energy + potential_energy, kinetic_energy, potential_energy
kinetic_energy = -2 * dims - electron_energy(v, w, ωβ...; dims = dims) / dims
potential_energy = -holstein_interaction_energy(v, w, α, ωβ...; dims = dims) / 2.0^dims
return (kinetic_energy + potential_energy), kinetic_energy, potential_energy
end

"""
Expand Down Expand Up @@ -108,15 +108,15 @@ end
General memory function for a given structure factor with frequency dependence.
"""
function general_memory_function(Ω, structure_factor; limits = [0, Inf])
integral, _ = quadgk(t -> (1 - exp(im * Ω * t)) / Ω * imag(structure_factor(t)), limits[1], limits[2], rtol=1e-4)
integral, _ = quadgk(t -> (1 - exp(im * Ω * t)) / Ω * imag(structure_factor(t)), limits[1], limits[2])
return integral
end

"""
General memory function for a given structure factor in the DC limit.
"""
function general_memory_function(structure_factor; limits = [0, Inf])
integral, _ = quadgk(t -> -im * t * imag(structure_factor(t)), limits[1], limits[2], rtol=1e-4)
integral, _ = quadgk(t -> -im * t * imag(structure_factor(t)), limits[1], limits[2])
return integral
end

Expand Down
3 changes: 2 additions & 1 deletion src/KSpaceTheory.jl
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ end
Energy associated with the free electron at finite temperature.
"""
function electron_energy(v, w, ω, β; dims = 3)
dims / β / ω * (log(v / w) - 1 / 2 * log(2π * ω * β) - log(sinh(v * ω * β / 2) / sinh(w * ω * β / 2))) + dims / 4 * (v^2 - w^2) / v * (coth(v * ω * β / 2) - 2 / (v * ω * β)) * ω
# dims / β / ω * (log(v / w) - 1 / 2 * log(2π * ω * β) - log(sinh(v * ω * β / 2) / sinh(w * ω * β / 2))) + dims / 4 * (v^2 - w^2) / v * (coth(v * ω * β / 2) - 2 / (v * ω * β)) * ω
(A(v, w, ω, β) + C(v, w, ω, β)) * dims / 3
end

"""
Expand Down

0 comments on commit 88c09ff

Please sign in to comment.