From dbd8a51d42b8b5c8146cef3ebf6fa3c13b3ff95b Mon Sep 17 00:00:00 2001 From: xzgao Date: Thu, 4 Apr 2024 19:23:28 +0800 Subject: [PATCH] revised energy_long_naive --- src/energy/energy_long_naive.jl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/energy/energy_long_naive.jl b/src/energy/energy_long_naive.jl index 74d9115..2e9a5a4 100644 --- a/src/energy/energy_long_naive.jl +++ b/src/energy/energy_long_naive.jl @@ -87,11 +87,9 @@ function long_energy_us_k(qs::Vector{T}, poses::Vector{NTuple{3, T}}, cutoff::In @assert M_min ≥ 1 @assert M_max ≤ length(uspara.sw) - Ek = zero(T) - - for l in M_min:M_max + Ek = @distributed (+) for l in M_min:M_max s, w = uspara.sw[l] - Ek += long_energy_sw_k(qs, poses, cutoff, L, s, w) + long_energy_sw_k(qs, poses, cutoff, L, s, w) end @debug "long range energy, direct su, k" Ek