pylipid.func.cal_koff

pylipid.func.cal_koff(durations, t_total, timestep, nbootstrap=10, initial_guess=[1.0, 1.0, 1.0, 1.0], cap=True)[source]

Calculate residence time and koff.

This function calculates the normalized survival time correlation function of the given list of durations, and fits t he survival function to a bi-exponential curve 1.

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.

The normalized survival function is then fitted to a biexponential to model the long and short decays of lipid relaxation:

\[\sigma(t) \sim A e^{-k_{1} t}+B e^{-k_{2} t}\left(k_{1} \leq k_{2}\right)\]

This function then takes \(k_{1}\) as the the dissociation \(k_{off}\), and calculates the residence time as \(\tau=1 / k_{o f f}\).

This function also measures the \(r^{2}\) of the biexponential fitting to the survival function to show the quality of the \(k_{off}\) estimation. In addition, it bootstraps the contact durations and measures the \(k_{off}\) of the bootstrapped data, to report how well lipid contacts are sampled from simulations. The lipid contact sampling, the curve-fitting and the bootstrap results can be conveniently checked via the \(k_{off}\) plot. The \(r^{2}\), \(\sigma(t)\) and bootstrapped data are stored in the returned data properties.

Parameters
  • durations (array_like) – A list of interaction durations

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

  • timestep (scalar) – \(\Delta t\) of the survival function \(\sigma\). Often takes the time step of the simulation trajectories or multiples of the trajectory time step. Should be in the same time unit as durations.

  • nbootstrap (int, optional, default=10) – Number of bootstrapping. The default is 10.

  • initial_quess (list, optional, default=(1., 1., 1., 1.)) – The initial guess for fitting of a bi-exponential curve to the survival function. Used by scipy.optimize.curve_fit.

  • cap (bool, optional, default=True) – Cap the returned residence time to t_total. This is useful for cases of poor samplings where the curve fitting may be bad and the calculated residence times may be unrealistically large.

Returns

  • koff (scalar) – The calculated koff. In the unit of \({timeunit^{-1}}\) in which \({timeunit}\) is the same as what is used in durations.

  • res_time (scalar) – The calculated residence time. In the same time unit as used by durations.

  • properties (dict) – A dictionary of all the computed values, including the original and bootstrapped koffs, residence times, ks of the bi-expo curve \(y=A*e^{(-k_1*x)}+B*e^{(-k_2*x)}\) and \(R^2\).

See also

pylipid.plot.plot_koff

Plotting function for interaction durations and the calculated survival function.

pylipid.api.LipidInteraction.compute_residue_koff

Calculate interaction koff and residence time for residues.

pylipid.api.LipidInteraction.compute_site_koff

Calculate interaction koff and residence time for binding sites.

References

1

García, Angel E.Stiller, Lewis. Computation of the mean residence time of water in the hydration shells of biomolecules. 1993. Journal of Computational Chemistry.