Skip to content

Commit 9d88b79

Browse files
authored
Merge pull request #156 from luigibonati/bug_fix_committor
Fixed deltaF bug
2 parents ecf5c69 + ad548c1 commit 9d88b79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlcolvar/core/loss/committor_loss.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def committor_loss(x: torch.Tensor,
157157
if delta_f < 0: # B higher in energy --> A-B < 0
158158
w[mask_B] = w[mask_B] * torch.exp(delta_f.to(device))
159159
elif delta_f > 0: # A higher in energy --> A-B > 0
160-
w[mask_A] = w[mask_A] * torch.exp(delta_f.to(device))
160+
w[mask_A] = w[mask_A] * torch.exp(-delta_f.to(device))
161161

162162
###### VARIATIONAL PRINICIPLE LOSS ######
163163
# Each loss contribution is scaled by the number of samples

0 commit comments

Comments
 (0)