calculate_relaxation_time¶
- mdcraft.analysis.polymer.calculate_relaxation_time(times: ndarray[float], acf: ndarray[float]) float[source]¶
Calculates the orientational relaxation time \(\tau_\mathrm{r}\) of polymers using end-to-end vector autocorrelation function (ACF) time series \(C_\mathrm{ee}(t)\).
A stretched exponential function with \(\tau\) and \(\beta\) as coefficients,
\[C_\mathrm{ee}(t)=\exp{\left[-(t/\tau)^\beta\right]}\]is fitted to the ACF time series, and the relaxation time is estimated using the first moment of \(C_\mathrm{ee}\),
\[\tau_\mathrm{r}=\int_0^\infty C_\mathrm{ee}(t)\,dt =\frac{\tau}{\beta}\Gamma\left(\frac{1}{\beta}\right)\]where \(\Gamma\) is the gamma function.
- Parameters:
- timesnumpy.ndarray
Changes in time \(t-t_0\).
Shape: \((N_\mathrm{frames},)\).
Reference unit: \(\mathrm{ps}\).
- acfnumpy.ndarray
End-to-end vector ACF \(C_\mathrm{ee}(t)\).
Shape: \((N_\mathrm{groups},\,N_\mathrm{bins},\,N_\mathrm{frames})\).
- Returns:
- relaxation_timefloat
Average orientational relaxation time \(\tau_\mathrm{r}\).
Reference unit: \(\mathrm{ps}\).