Hilbert sort

This module re-orders the particle data in halmd.mdsim.particle according to a space-filling Hilbert curve. The idea behind is that interacting particles, being close in space, are also close in memory for better cache efficiency. The module is used and constructed internally by halmd.mdsim.neighbour, i.e. manual construction is not needed.

For details see:

  • S. Aluru and F. Sevilgen, Parallel domain decomposition and load balancing using space-filling curves, Proc. 4th IEEE Int. Conf. High Performance Computing, p. 230 (1997)
  • J. Anderson, C. D. Lorenz, and A. Travesset, General purpose molecular dynamics simulations fully implemented on graphics processing units, J. Comp. Phys. 227, 5342 (2008)
class halmd.mdsim.sorts.hilbert(args)

Construct Hilbert sort module.


If particle instance resides in GPU memory (i.e. particle.memory is gpu), a binning instance is not required for construction of the Hilber sort module.


Sort the particles according to a space-filling Hilbert curve.


Disconnect neighbour module from core and profiler.