Density mode

The module computes the complex Fourier modes of the particle density field,

\rho(\vec k) = \sum_{n=1}^N \exp(\text{i} \vec k \cdot \vec r_n) \/.

The auxiliary module halmd.observables.utility.wavevector provides suitable wavevectors that are compatible with the reciprocal lattice of the periodic simulation box.

class halmd.observables.density_mode(args)

Construct instance of halmd.observables.density_mode.

Parameters:
Returns:

instance of density mode sampler

disconnect()

Disconnect density mode sampler from profiler.

wavevector

The wavevector instance passed upon construction.

label

The label of the underlying particle group.

count

The particle count N of the underlying particle group.

class writer(args)

Write time series of density modes to file.

Parameters:
  • args (table) – keyword arguments
  • args.file – instance of file writer
  • args.location (string table) – location within file (optional)
  • args.every (number) – sampling interval
Returns:

instance of density mode writer

The argument location specifies a path in a structured file format like H5MD given as a table of strings. It defaults to {"structure", self.label, "density_mode"}.

disconnect()

Disconnect density mode writer from observables sampler.