Skip to content

Commit

Permalink
[Enhancement] Improved EANN Model with Hard Cutoff for Efficient Inte…
Browse files Browse the repository at this point in the history
…raction Handling

Enabled hard cutoff in EANN model, aligning with cutoff rules in XML file.
Allows processing of larger atom pairs, minimizing unnecessary interaction counts.
  • Loading branch information
junminchen committed Apr 7, 2024
1 parent 8c4c767 commit f73eddb
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 f73eddb

Please sign in to comment.