q-Vector Generation๏
A complete list of q-vector generators can be found in List of q-vector generators. However, please keep in mind that for the typical neutron scattering calculations it is necessary to choose a lattice vector generator to get correct results of for the spatial correlations between pairs of atoms (as in e.g. Dynamic Coherent Structure Factor), and a spherical vector generator to simulate the random orientation of the simulated objects in respect to the beam. This means that the SphericalLatticeQVectors generator should be the best choice for most users, unless you are simulating a highly ordered sample with a well known orientation (e.g. a single crystal). Typically, higher levels of order impose more restrictions on the generated q vectors. LinearQVectors can be used for planar (i.e. 2D order) systems, and CircularQVectors for nematic or axially aligned systems (i.e. 1D order).
For properties such as DynamicIncoherentStructureFactor there is no restriction on which vectors can be used in the calculations. In principle, SphericalQVectors generator could be used in this case. However, the matching DynamicCoherentStructureFactor calculation imposes the additional requirement of only lattice vectors being used in the calculation. In order to be able to combine the results of the two calculations into the total dynamic structure factor (e.g. using the NeutronDynamicTotalStructureFactor analysis), lattice vectors should be used for both parts of the calculation.
Reciprocal Lattice q-Vectors๏
Let \(\mathbf{a}\), \(\mathbf{b}\), \(\mathbf{c}\) be the basis vectors which span the MD cell. Any position vector in the MD cell can be written as
so that it defines the position vector in the MD cell. With \(x'\), \(y'\), \(z'\) having values between \(0\) and \(1\) if \(\mathbf{r}\) is in the unit cell. The primes indicate that the coordinates are fractional coordinates. A jump due to periodic boundary conditions can cause \(x'\), \(y'\), \(z'\) to jump by \(\pm1\). The set of dual basis vectors \(\mathbf{a}^*\), \(\mathbf{b}^*\), \(\mathbf{c}^*\) where
If the \(\mathbf{q}\)-vectors are now chosen as
so that this selection of \(\mathbf{q}\)-vectors produces phase changes for handling jumps in particle trajectories. Here \(h\), \(k\), and \(l\) are integers, jumps in the particle trajectories produce phase changes of multiples of \(2\pi\) in the Fourier transformed particle density, i.e. leave it unchanged.
Random sampling of reciprocal space๏
The current implementation of the lattice vector generators SphericalLatticeQVectors, CircularLatticeQVectors and LinearLatticeQVectors assumes that different vectors can have different weights. This is meant to approximate a spherical distribution of vectors in low-symmetry systems where lattice vectors are not uniformly spaced, and also to give preference to vectors with \(|\mathbf{q}|\) close to the nominal value for a specific shell. This behaviour is different from MDANSE 1.5, where the shell population was deterministic for shells containing less lattice vectors than the requested number, and stochastic with binary (0 or 1) weights for other shells.
If you prefer to revert to the original weights scheme of MDANSE 1.5,
you can set the variable force_equal_weights=True for these
vector generators. You can also save the value of this variable in your
instrument profiles, so it is set to True every time you set
the vector parameters using these profiles.
If you use the currently recommended setting of force_equal_weights=False,
the lattice vector generator will randomly create n_vectors vectors
commensurate with the reciprocal lattice defined by the simulation box.
It will then generate n_samples reciprocal space points within
the same vector shell. Each random point will contribute to the weight
of the lattice vector which is the nearest. As a result, the lattice vectors
in the areas of reciprocal space containing many lattice vectors close to
each other will contribute less to the calculation results than the vectors
from the reciprocal space regions containing few lattice vectors. This is meant
to produce a better approximation of spherical sampling with a uniform distribution
of angles. Additionally, the random points used for sampling follow a normal distribution
in \(\mathbf{q}\), assigning a larger weight to the vectors close to the
nominal \(\mathbf{q}\) value of the shell.
The MDANSE GUI offers a preview dialog, visualising the vector distribution that
should be created based on the input parameters. Additionally, the same
detailed information about the vectors that have been generated
and used in the calculation is written into a separate data group or file,
depending on the format used. In the case of .mda files, a data group
called /vector_generator is written into the file. Information about
viewing the vector information can be found in the plotting documentation,
section Plotting vector information from output files.