Momentum density mode

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

j_x(\vec k) = \sum_{j=1}^N m_j \vec v_{j,x} \exp(\text{i} \vec k \cdot \vec r_j) \/.

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

Note

Currently, only the component along the x-axis (first Cartesian component) is computed.

class halmd.observables.momentum_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.