Consider a system of 2, 3, 4, and 5 particles. How many pairwise particle-particle interactions will there be? What about 10 or 100 particles? Consider a system with a density of 1. Using this density, how many particles are in a sphere with radius 1, 2, 5, and 10 units? (These are math problems, you don’t have to use programming to solve them, but you can.)
Can you think of the benefits associated with using a cut-off?
We can modify our calculate_total_energy function to take in a cut-off value:
PYTHON