kinisi.diffusion#
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 the relevant simulation trajectory data.progress (
bool) – Whether to show the progress bar. Optional, default isTrue.
- Return type:
- Returns:
A
scipp.DataArrayobject containing the relevant mean-squared displacement data and number of independent samples.
- 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 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 indiviudal ion. Optional, defaults toNone, which means that the mean-squared total displacement is computed.progress (
bool) – Whether to show the progress bar. Optional, default isTrue.
- Return type:
- Returns:
A
scipp.DataArrayobject containing the relevant mean-squared total displacement data and number of independent samples.