Neighbour List

This module provides the implementation for a Verlet neighbour list. It stores the neighbours for each particle that are within a certain radius to reduce the computational cost for the force calculation in each time step.

Due to its nature it can only work with finite interaction potentials.

class halmd.mdsim.neighbour(args)

Construct neighbour module.

Parameters:
  • args (table) – keyword arguments
  • args.particle – instance, or sequence of two instances, of halmd.mdsim.particle
  • args.box – instance of halmd.mdsim.box
  • args.r_cut (number) – cutoff radius of the potential
  • args.skin (number) – neighbour list skin (default: 0.5)
  • args.occupancy (number) – Desired cell occupancy. Defaults to halmd.mdsim.defaults.occupancy() (GPU variant only)
  • args.disable_binning (boolean) – Disable use of binning module and construct neighbour lists from particle positions directly (default: false).
  • args.disable_sorting (boolean) – Disable use of Hilbert sorting halmd.mdsim.sorts.hilbert (default: false).
particle

Sequence of the two instances of halmd.mdsim.particle.

cell_occupancy

Current cell occupancy. Only available on GPU variant.

r_skin

“Skin” of the particle. This is an additional distance ratio added to the cutoff radius. Particles within this extended sphere are stored as neighbours.

disconnect()

Disconnect neighbour module from core and profiler.