Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
wiederm committed Aug 18, 2024
1 parent 897d1b9 commit f743d74
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modelforge/potential/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,9 @@ def physnet_charge_conservation(

# for each atom i, calculate the sum of partial charges for all other
predicted_per_molecule_charge = torch.zeros(
total_charges.shape, dtype=torch.float32, device=total_charges.device
total_charges.shape,
dtype=per_atom_charge.dtype,
device=total_charges.device,
).scatter_add_(0, mol_indices.long(), per_atom_charge)

# Calculate the correction factor for each molecule
Expand Down

0 comments on commit f743d74

Please sign in to comment.