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 is True.

Return type:

Variable

Returns:

A scipp.DataArray object 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 to 1.

  • ionic_charge (Variable) – The ionic charge of the species of interest. This should be either a scipp scalar if all of the ions have the same charge or an array of the charge for each indiviudal ion. Optional, defaults to None, which means that the mean-squared total displacement is computed.

  • progress (bool) – Whether to show the progress bar. Optional, default is True.

Return type:

Variable

Returns:

A scipp.DataArray object containing the relevant mean-squared total displacement data and number of independent samples.