pylipid.func.cal_survival_func

pylipid.func.cal_survival_func(durations, t_total, delta_t_list)[source]

Compute the normalised survival function.

Calculate the normalized survival time correlation function of the given list of durations. The survival time correlation function σ(t) is calculated as follow

\[\sigma(t) = \frac{1}{N_{j}} \frac{1}{T-t} \sum_{j=1}^{N_{j}} \sum_{v=0}^{T-t}\tilde{n}_{j}(v, v+t)\]

where T is the length of the simulation trajectory, \(N_{j}\) is the total number of lipid contacts and \(\sum_{v=0}^{T-t} \tilde{n}_{j}(v, v+t)\) is a binary function that takes the value 1 if the contact of lipid j lasts from time ν to time v+t and 0 otherwise. The values of \(\sigma(t)\) are calculated for every value of t from 0 to T ns, for each time step of the trajectories, and normalized by dividing by \(\sigma(t)\), so that the survival time-correlation function has value 1 at t = 0.

Parameters
  • durations (array_like) – A list of contact durations.

  • t_total (scalar) – The duration or length, or the longest if using multiple simulations of different durations/lengths, of the simulation trajectories. Should be in the same time unit as durations.

  • delta_t_list (array_like) – The list of \(\Delta t\) for the survival function \(\sigma\) to check the interaction survival rate.

Returns

survival_func – The survival function \(\sigma\) stored in a dictionary {delta_t: survival rate}.

Return type

dict

See also

pylipid.func.cal_koff

Calculate residence time and koff.