From 7aa678e32c6040afecc8fe88eee7895f1b4373e0 Mon Sep 17 00:00:00 2001 From: Joe Greener Date: Thu, 7 Nov 2024 15:12:16 +0000 Subject: [PATCH] mixing functions --- src/interactions/lennard_jones.jl | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/src/interactions/lennard_jones.jl b/src/interactions/lennard_jones.jl index d3a6252e..9ca2a8e2 100644 --- a/src/interactions/lennard_jones.jl +++ b/src/interactions/lennard_jones.jl @@ -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)