Skip to content

Commit d5bf99c

Browse files
committed
Weighted polarization not polarizability by mistake - fixed.
1 parent fc57c78 commit d5bf99c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mace/modules/loss.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -673,14 +673,14 @@ def forward(
673673
ref.forces_weight, num_atoms
674674
).unsqueeze(-1)
675675
configs_polarization_weight = (
676-
ref.polarization_weight.view(-1, 3) / 5.526349e-3
677-
) # divide by eps_0
676+
ref.polarization_weight.view(-1, 3)
677+
)
678678
configs_becs_weight = torch.repeat_interleave(
679679
ref.becs_weight,
680680
num_atoms,
681681
dim=0,
682682
).view(-1, 3, 3)
683-
configs_polarizability_weight = ref.polarizability_weight.view(-1, 3, 3)
683+
configs_polarizability_weight = ref.polarizability_weight.view(-1, 3, 3) / 5.526349e-3 # divide by eps_0
684684
_, fractional_difference = fold_polarization(
685685
pred["polarization"], ref["polarization"], ref["cell"]
686686
)

0 commit comments

Comments
 (0)