pylipid.func.cal_occupancy

pylipid.func.cal_occupancy(contact_list)[source]

Calculate the percentage of frames in which a contact is formed.

contact_list records a list of residue indices of contact lipid molecules at each trajectory frames. This function calculates the percentage of frames that a lipid contact is formed.

Parameters

contact_list (list) – A list of residue indices of contact lipid molecules at each trajectory frames.

Returns

Ocupancy – The percentage of frames in which a contact is formed

Return type

scalar

Examples

>>> contact_list = [[], [130], [130, 145], [145], [], [], [145], [145]] # contacts are formed in 5 out of the 8 frames
>>> occupancy = cal_occupancy(contact_list)
>>> print(occupancy) # percentage
62.5

See also

pylipid.api.LipidInteraction.compute_residue_occupancy

Calculate the percentage of frames in which the specified residue formed lipid contacts for residues.

pylipid.api.LipidInteraction.compute_site_occupancy

Calculate the percentage of frames in which the specified lipid contacts are formed for binding sites.