kinisi.displacement#
Functions for the calculation of different types of displacement.
- kinisi.displacement.calculate_msd(p, progress=True)#
Calculate the mean-squared displacement.
- Parameters:
p (
Parser) – The parser object containing the relevant simulation trajectory data.progress (
bool) – Whether to show the progress bar. Optional, default isTrue.
- Return type:
- Returns:
A
scipp.DataGroupwith two entries: da, ascipp.DataArrayof the mean-squared displacement (with variances) and time interval and n_samples coordinates, and dimensionality, the number of dimensions the displacements were found along.
- kinisi.displacement.calculate_mstd(p, system_particles=1, ionic_charge=None, progress=True)#
Calculate the mean-squared total displacement, i.e., the displacement of the centre-of-mass of all particles.
- Parameters:
p (
Parser) – The parser object containing the relevant simulation trajectory data.system_particles (
int) – The number of system particles to average over. Note that the constitution of the system particles are defined in index order, i.e., two system particles will involve splitting the particles down the middle into each. Optional, defaults to1.ionic_charge (
Variable) – The ionic charge of the species of interest. This should be either ascippscalar if all of the ions have the same charge or an array of the charge for each individual ion. Optional, defaults toNone, which means that the mean-squared total displacement is computed rather than the mean-squared charge displacement.progress (
bool) – Whether to show the progress bar. Optional, default isTrue.
- Return type:
- Returns:
A
scipp.DataGroupwith two entries: da, ascipp.DataArrayof the mean-squared total (or charge) displacement (with variances) and time interval and n_samples coordinates, and dimensionality, the number of dimensions the displacements were found along.