Uniformly random

This module randomly places particles within the box sampling a uniform distribution. Optionally, the volume may be restricted to a cuboid (“slab”) centred and aligned with the simulation box.

class halmd.mdsim.positions.uniform(args)

Construct uniform position module

Parameters:
  • args (table) – keyword arguments

  • args.particle – instance of halmd.mdsim.particle

  • args.box – instance of halmd.mdsim.box

  • args.slab (table) – vector specifying the fraction of the box size to be filled (optional)

  • args.logger – module logger (optional)

slab

Restrict the lattice to a slab of given extents relative to the box size, the slab is centred within the simulation box. More generally, the lattice may be restricted to a cuboid aligned with the box since each direction may be less than unity. The default is {1, … 1}, i.e., no restriction.

set()

Randomly assign uniformly distributed positions to all particles.

disconnect()

Disconnect module from profiler.