This module places particles on a face-centred cubic (fcc) lattice. Optionally, the lattice may be restricted to a cuboid (“slab”) centred and aligned with the simulation box.

class halmd.mdsim.positions.lattice(args)

Construct Lattice module

  • args (table) – keyword arguments
  • args.particle – Instance of halmd.mdsim.particle.
  • – Instance of
  • args.slab (table) – Vector specifying the fraction of the box size to be filled (optional).

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 all particle positions on an fcc lattice.


Disconnect module from profiler.