Skip to content

Commit 926b30e

Browse files
committed
Add excluded potential version for Calculator class
1 parent eef94c8 commit 926b30e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/torchpme/calculators/calculator.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,12 @@ def _compute_rspace(
5454
# contained in the neighbor list
5555
with profiler.record_function("compute bare potential"):
5656
if self.potential.smearing is None:
57-
potentials_bare = self.potential.from_dist(neighbor_distances)
57+
if self.potential.exclusion_radius is None:
58+
potentials_bare = self.potential.from_dist(neighbor_distances)
59+
else:
60+
potentials_bare = self.potential.from_dist(neighbor_distances) * (
61+
1 - self.potential.f_cutoff(neighbor_distances)
62+
)
5863
else:
5964
potentials_bare = self.potential.sr_from_dist(neighbor_distances)
6065

0 commit comments

Comments
 (0)