Skip to content

Commit

Permalink
fix virial calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
tjjarvinen committed Jun 26, 2024
1 parent b8ce90e commit 1d54411
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api.jl
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ function ace_virial(V, at;
vir = Folds.sum( domain, executor ) do i
j, R, Z = neigsz(nlist, at, i)
_, tmp = ace_evaluate_d(V, R, Z, _atomic_number(at,i))
site_virial = -sum( zip(R, tmp.dV) ) do (Rⱼ, dVⱼ)
site_virial = -sum( zip(R, tmp.dV); init=SMatrix{3,3}(zeros(Float64, 3,3)) ) do (Rⱼ, dVⱼ)
dVⱼ * Rⱼ'
end
site_virial
Expand Down

0 comments on commit 1d54411

Please sign in to comment.