Skip to content

Commit

Permalink
Fixed deltaF bug
Browse files Browse the repository at this point in the history
  • Loading branch information
EnricoTrizio committed Oct 2, 2024
1 parent ecf5c69 commit ad548c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mlcolvar/core/loss/committor_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def committor_loss(x: torch.Tensor,
if delta_f < 0: # B higher in energy --> A-B < 0
w[mask_B] = w[mask_B] * torch.exp(delta_f.to(device))
elif delta_f > 0: # A higher in energy --> A-B > 0
w[mask_A] = w[mask_A] * torch.exp(delta_f.to(device))
w[mask_A] = w[mask_A] * torch.exp(-delta_f.to(device))

###### VARIATIONAL PRINICIPLE LOSS ######
# Each loss contribution is scaled by the number of samples
Expand Down

0 comments on commit ad548c1

Please sign in to comment.