4.7.2.2. Mean Squared Displacement — MDAnalysis.analysis.msd¶
- Authors:
Hugo MacDermott-Opeskin
- Year:
2020
- Copyright:
GNU Public License v2
This module implements the calculation of Mean Squared Displacements (MSDs) by the Einstein relation. MSDs can be used to characterize the speed at which particles move and has its roots in the study of Brownian motion. For a full explanation of the theory behind MSDs and the subsequent calculation of self-diffusivities the reader is directed to [Maginn2018]. MSDs can be computed from the following expression, known as the Einstein formula:
where \(N\) is the number of equivalent particles the MSD is calculated over, \(r\) are their coordinates and \(d\) the desired dimensionality of the MSD. Note that while the definition of the MSD is universal, there are many practical considerations to computing the MSD that vary between implementations. In this module, we compute a “windowed” MSD, where the MSD is averaged over all possible lag-times \(\tau \le \tau_{max}\), where \(\tau_{max}\) is the length of the trajectory, thereby maximizing the number of samples.
The computation of the MSD in this way can be computationally intensive due to
its \(N^2\) scaling with respect to \(\tau_{max}\). An algorithm to
compute the MSD with \(N log(N)\) scaling based on a Fast Fourier
Transform is known and can be accessed by setting fft=True
[ᵇCalandrini2011, ᵇBuyl2018]. The FFT-based approach requires that the
tidynamics package is
installed; otherwise the code will raise an ImportError.
Please cite [ᵇCalandrini2011, ᵇBuyl2018] if you use this module in addition to the normal MDAnalysis citations.
Vania Calandrini, Eric Pellegrini, Konrad Hinsen, and Gerald Kneller. nMoldyn - Interfacing spectroscopic experiments, molecular dynamics simulations and models for time correlation functions, pages 201–232. Volume 12. 01 2011. doi:10.1051/sfn/201112010.
Pierre Buyl. Tidynamics: a tiny package to compute the dynamics of stochastic and molecular simulations. Journal of Open Source Software, 3:877, 08 2018. doi:10.21105/joss.00877.
