From ad548c18269e6d944ee260e0344e5b0a5ebcf2ab Mon Sep 17 00:00:00 2001 From: EnricoTrizio Date: Wed, 2 Oct 2024 15:46:54 +0200 Subject: [PATCH] Fixed deltaF bug --- mlcolvar/core/loss/committor_loss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlcolvar/core/loss/committor_loss.py b/mlcolvar/core/loss/committor_loss.py index a0c3d72..991971c 100644 --- a/mlcolvar/core/loss/committor_loss.py +++ b/mlcolvar/core/loss/committor_loss.py @@ -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