Skip to content

Commit

Permalink
mixing functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jgreener64 committed Nov 7, 2024
1 parent 339e7a3 commit 7aa678e
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions src/interactions/lennard_jones.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,13 @@ end

no_shortcut(atom_i, atom_j) = false

function lorentz_σ_mixing(atom_i, atom_j)
return (atom_i.σ + atom_j.σ) / 2
end

function lorentz_ϵ_mixing(atom_i, atom_j)
return (atom_i.ϵ + atom_j.ϵ) / 2
end

function lorentz_λ_mixing(atom_i, atom_j)
return (atom_i.λ + atom_j.λ) / 2
end

function geometric_σ_mixing(atom_i, atom_j)
return sqrt(atom_i.σ * atom_j.σ)
end
lorentz_σ_mixing(atom_i, atom_j) = (atom_i.σ + atom_j.σ) / 2
lorentz_ϵ_mixing(atom_i, atom_j) = (atom_i.ϵ + atom_j.ϵ) / 2
lorentz_λ_mixing(atom_i, atom_j) = (atom_i.λ + atom_j.λ) / 2

function geometric_ϵ_mixing(atom_i, atom_j)
return sqrt(atom_i.ϵ * atom_j.ϵ)
end
geometric_σ_mixing(atom_i, atom_j) = sqrt(atom_i.σ * atom_j.σ)
geometric_ϵ_mixing(atom_i, atom_j) = sqrt(atom_i.ϵ * atom_j.ϵ)
geometric_λ_mixing(atom_i, atom_j) = sqrt(atom_i.λ * atom_j.λ)

@doc raw"""
LennardJones(; cutoff, use_neighbors, shortcut, σ_mixing, ϵ_mixing, weight_special)
Expand Down

0 comments on commit 7aa678e

Please sign in to comment.