Skip to content

Commit

Permalink
Merge pull request #16 from yoheisako/master
Browse files Browse the repository at this point in the history
fixed mbar.jl
  • Loading branch information
ymatsunaga authored Nov 24, 2023
2 parents 5d4a54e + ff5d22d commit 9aa5c09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mbar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,8 @@ function ChainRulesCore.rrule(::typeof(mbar_weight), u_kl, f_k, u_k)
for k = 1:length(w_k)
for n = 1:length(w_k[k])
#du_k[k][n] = dw_k[k][n] * (- w_k[k][n])
du_k[k][n] = dw_k[k][n] * (- w_k[k][n] + w_k[k][n]^2)
#du_k[k][n] = dw_k[k][n] * (- w_k[k][n] + w_k[k][n]^2)
du_k[k][n] = dw_k[k][n] * w_k[k][n]
end
end
return NoTangent(), ZeroTangent(), NoTangent(), du_k
Expand Down

0 comments on commit 9aa5c09

Please sign in to comment.