exatomic.algorithms.diffusion module

Diffusion Coefficients

Various algorithms for computing diffusion coefficients are coded here.

exatomic.algorithms.diffusion.einstein_relation(universe, input_time='ps', input_length='au', length='cm', time='s')[source]

Compute the (time dependent) diffusion coefficient using Einstein’s relation.

\[ \begin{align}\begin{aligned}D\left(t\right) = \frac{1}{6Nt}\sum_{i=1}^{N}\left|\mathbf{r}_{i}\left(t\right) - \mathbf{r}_{i}\left(0\right)\right|^{2}\\D = \lim_{t\to\infty} D\left(t\right)\end{aligned}\end{align} \]
Parameters:
  • universe (Universe) – The universe object

  • input_time (str) – String unit of ‘time’ column in frame table

  • input_length (str) – String unit of xyz coordinates

  • length (str) – String unit name of output length unit

  • time (str) – Sting unit name of output time unit

Returns:

d (DataFrame) – Diffussion coefficient as a function of time

Note

The asymptotic value of the returned variable is the diffusion coefficient. The default units of the diffusion coefficient are \(\frac{cm^{2}}{s}\).