Wavevector¶
The module constructs a set of wavevector shells compatible with the reciprocal space of a periodic simulation box and a list of wavenumbers. The wavevectors are of the form
where are integers and
denote the edge length of the cuboid box. A wavevector “shell” is defined
by its wavenumber, i.e. the magnitude
, including a
tolerance. The number of wavevectors within each shell may be limited to
avoid excessively large shells for large wavenumber.
The list of wavenumbers may be constructed using halmd.observables.utility.semilog_grid
,
where the smallest wavenumber is given by .
Example:
local numeric = halmd.numeric
local utility = halmd.observables.utility
local box = halmd.mdsim.box({length={5,10,20}})
local qmin = 2 * math.pi / numeric.max(box.length)
local grid = utility.semilog_grid({start=qmin, stop=5 * math.pi, decimation=10})
local wavevector = utility.wavevector({box = box, wavenumber = grid.value, tolerance=0.05, max_count=7})
-
class
halmd.observables.utility.
wavevector
(args)¶ Construct instance of wavevector module.
Parameters: - args (table) – keyword arguments
- args.box – instance of
halmd.mdsim.box
- args.wavenumber – list of wavenumbers
- args.tolerance (number) – relative tolerance on wavevector magnitude
- args.max_count (integer) – maximum number of wavevectors per wavenumber shell
-
wavenumber
()¶ Returns data slot that yiels the wavenumber grid.
-
value
()¶ Returns data slot that yiels the list of wavevectors grouped by their magnitude in ascending order.
-
__eq
(other)¶ Parameters: other – instance of halmd.observables.utility.wavevector
Implements the equality operator
a = b
and returns true if the otherwavevector
instance is the same as this one.
-
halmd.observables.utility.wavevector.
add_options
(parser, defaults)¶ Add module options to command line parser:
wavenumbers
,tolerance
,max-count
.Parameters: - parser – instance of
halmd.utility.program_options.argument_parser
- defaults (dictionary) – default values for the options
- parser – instance of