pylipid.api.LipidInteraction.collect_residue_contacts

LipidInteraction.collect_residue_contacts()[source]

Create contacting lipid index for residues.

This function creates contacting lipid index for residues that are used for the rest of calculation in PyLipID. The design of contacting lipid index is to assist the calculation of contacts using a dual-cutoff scheme, which considers a lipid as being in contact when the lipid moves closer than the lower cutoff and as being dissociated when the lipid moves farther than the upper cutoff.

The lipid indices created by this method are stored in the private class variables of _contact_residue_high and _contact_residue_low for each of the cutoffs. These indices are python dictionary objects with residue indices as their keys. For each residue, the lipid index stores the residue index of contacting lipid molecules from each trajectory frame in a list.

The lipid index of the lower cutoff, i.e. _contact_residue_low is used to calculate lipid occupancy and lipid count.

The Pearson correlation matrix of lipid interactions for protein residues is also calculated in this function and stored in the class variable of interaction_corrcoef.

The class attribute dataset() which stores the summary of lipid interaction as a pandas.DataFrame object, is initialized in this method.