pylipid.func.Duration

class pylipid.func.Duration(contact_low, contact_high, dt)[source]

Dual cutoff scheme for calculating the interaction durations.

In the dual cutoff scheme, a continuous contact starts when a molecule moves closer than the lower distance cutoff and ends when the molecule moves out of the upper cutoff. The duration between these two time points is the duration of the contact.

Here, the contact_low is the lipid index for the lower cutoff and contact_high is the lipid index for the upper cutoff. For calculation of contact durations, a lipid molecule that appears in the contact_low is searched in the subsequent frames of the contact_high and the search then stops if this molecule disappears from the contact_high. This lipid molecule is labeled as ‘checked’, and the duration of this contact is calculated from the number of frames in which this lipid molecule appears in the lipid indices. This calculation iterates until all lipid molecules in the lower lipid index are labeled as ‘checked’.

Parameters
  • contact_low (list) – A list that records the indices of lipid molecule within the lower distance cutoff at each trajectory frame.

  • contact_high (list) – A list that records the indices of lipid molecule within the upper distance cutoff at each trajectory frame.

  • dt (scalar) – The timestep between two adjacent trajectory frames.

__init__(contact_low, contact_high, dt)[source]

Dual cutoff scheme for calculating the interaction durations.

In the dual cutoff scheme, a continuous contact starts when a molecule moves closer than the lower distance cutoff and ends when the molecule moves out of the upper cutoff. The duration between these two time points is the duration of the contact.

Here, the contact_low is the lipid index for the lower cutoff and contact_high is the lipid index for the upper cutoff. For calculation of contact durations, a lipid molecule that appears in the contact_low is searched in the subsequent frames of the contact_high and the search then stops if this molecule disappears from the contact_high. This lipid molecule is labeled as ‘checked’, and the duration of this contact is calculated from the number of frames in which this lipid molecule appears in the lipid indices. This calculation iterates until all lipid molecules in the lower lipid index are labeled as ‘checked’.

Parameters
  • contact_low (list) – A list that records the indices of lipid molecule within the lower distance cutoff at each trajectory frame.

  • contact_high (list) – A list that records the indices of lipid molecule within the upper distance cutoff at each trajectory frame.

  • dt (scalar) – The timestep between two adjacent trajectory frames.

Methods

__init__(contact_low, contact_high, dt)

Dual cutoff scheme for calculating the interaction durations.

cal_durations()

Calculate interaction durations using the dual-cutoff scheme.