Skip to content

Commit

Permalink
Merge pull request #178 from Jeremydream/devel
Browse files Browse the repository at this point in the history
[Enhancement] Improved EANN Model with Hard Cutoff for Efficient Inte…
  • Loading branch information
KuangYu authored Apr 7, 2024
2 parents 8c4c767 + f73eddb commit 90cfca1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dmff/eann/eann.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,9 @@ def get_energy(positions, box, pairs, params):
dr = pbc_shift(dr, box, box_inv)

dr_norm = jnp.linalg.norm(dr, axis=1)
buffer_scales2 = jnp.piecewise(buffer_scales, (dr_norm <= self.rc, dr_norm > self.rc),
(lambda x: jnp.array(1), lambda x: jnp.array(0)))
buffer_scales = buffer_scales2 * buffer_scales
self.rs = params['density.rs']
self.inta = params['density.inta']

Expand Down

0 comments on commit 90cfca1

Please sign in to comment.