Static structure factor

The module computes the static structure factor

S_{(\alpha\beta)}(\vec k) = \frac{1}{N} \bigl\langle \rho_\alpha(\vec k)^* \rho_\beta(\vec k) \bigr\rangle

from the Fourier modes of a given pair of (partial) density fields,

\rho_\alpha(\vec k) = \sum_{n=1}^{N_\alpha} \exp(\text{i} \vec k \cdot \vec r_n) \/,

and the total number of particles N. The result is averaged over wavevectors of similar magnitude according to the shells defined by halmd.observables.utility.wavevector.

For details see, e.g., Hansen & McDonald: Theory of simple liquids, chapter 4.1.

class halmd.observables.ssf(args)

Construct instance of halmd.observables.ssf.

  • args (table) – keyword arguments
  • args.density_mode – instance(s) of halmd.observables.density_mode
  • args.norm (number) – normalisation factor
  • args.label (string) – module label (optional)

instance of static structure factor module

The argument density_mode is an instance or a table of 1 or 2 instances of halmd.observables.density_mode yielding the partial density modes \rho_\alpha(\vec k) and \rho_\beta(\vec k). They must have been constructed with the same instance of halmd.observables.utility.wavevector. Passing only one instance implies \alpha = \beta.

The optional argument label defaults to density_mode[1].label ..  "/" .. density_mode[2].label.


Disconnect static structure factor module from profiler.


Callable that yields the static structure factor from the current density modes.


The module label passed upon construction or derived from the density modes.

class writer(args)

Write time series of static structure factor to file.

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

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, "static_structure_factor"}.


Disconnect static structure factor writer from observables sampler.