Can anyone write a Python implementation of a set of particles interacting in 2D according to a short-range particle-particle force and evolving in time under a Metropolis algorithm, which randomly chooses a particle and proposes a random spatial move? I can write such an implementation using the naive approach of updating all the particle-particle interaction energies associated with a given cell that has been proposed to be moved, but would like to see an implementation using a Verlet List or a KD Tree, which I hope can be at least an order of magnitude faster when the number of particles is large (say 100-1000).
An added complication in my particular problem is that the particles replicate and die, but incorporating that into the Verlet/KD Tree approach would be a secondary goal.
Thanks for any help you can offer.