Skip to content

Commit

Permalink
Update electrostatics.py
Browse files Browse the repository at this point in the history
fix bug
  • Loading branch information
ekindogus committed Apr 8, 2024
1 parent e0ea7d3 commit d5597f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jax_md/_energy/electrostatics.py
Expand Up @@ -129,7 +129,7 @@ def energy_fn(position, **kwargs):
S2 = jnp.abs(structure_factor(g, position, charge))**2
fn = lambda g2: jnp.exp(-g2 / (4*alpha**2)) / g2 * S2

return Z * util.high_precision_sum(safe_mask(mask, fn, g2, 1))
return Z * util.high_precision_sum(util.safe_mask(mask, fn, g2, 1))
return energy_fn


Expand Down

0 comments on commit d5597f9

Please sign in to comment.