pylipid.api.LipidInteraction.compute_site_duration¶
- LipidInteraction.compute_site_duration(binding_site_id=None)[source]¶
Calculate interaction durations for binding sites.
PyLipID calculates lipid contacts using a dual-cutoff scheme. In this 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.
PyLipID implements this dual-cutoff tactic by creating a lipid index for the lower and upper cutoff respectively, which records the lipid molecules within that distance cutoff at each trajectory frame for residues. Such lipid indices are created by the method
collect_residue_contacts()
, and are stored in the private class variables of_contact_residue_high
and_contact_residue_low
for each of the cutoffs.For calculating contacts for binding sites, the interacting lipid molecules with binding site residues are merged with duplicates removed to form the lipid indices for the upper cutoff and lower cutoff respectively. Similar to the calculation of residues, a contact duration of a binding sites are calculated as the duration between the time point of a lipid molecule appearing in the lipid index of the lower cutoff and of this molecule disappeared from the upper cutoff index.
This function returns a list of contact durations or lists of contact durations if multiple binding site IDs are provided.
- Parameters
binding_site_id (int or list of int, default=None) – The binding site ID used in PyLipID. This ID is the index in the binding site node list that is calculated by the method
compute_binding_nodes
. The ID of the N-th binding site is (N-1). If None, the contact duration of all binding sites are calculated.- Returns
durations_BS – A list of contact durations or lists of contact durations if multiple binding site IDs are provided.
- Return type
list
See also
pylipid.api.LipidInteraction.collect_residue_contacts
Create the lipid index.
pylipid.api.LipidInteraction.compute_residue_duration
Calculate residue contact durations.
pylipid.func.Duration
Calculate contact durations from lipid index.