Lipid Dwell Time Near Protein - k-ngo/CATMD GitHub Wiki
Lipid Dwell Time Near Protein
Overview and Methodology
What It Does
This script computes how long individual lipids remain in close proximity to specific protein residues during a molecular dynamics (MD) trajectory. For each protein-lipid pair that falls within a specified distance cutoff, the script tracks the number of continuous frames (dwell time) the lipid remains nearby. The mean dwell time per protein residue is reported, along with optional grouping by residue type.
How It Works
- Objective: Quantify lipid-residue proximity duration and characterize lipid residence patterns at the membrane–protein interface.
- Process:
- For each frame in the trajectory:
- Identify protein and lipid residues within a cutoff distance.
- Track lipid–residue proximity across frames to compute dwell times.
- Aggregate results to compute:
- Per-residue dwell events and durations.
- Mean dwell time per residue.
- Optional grouping by residue type.
- Generate summary statistics and optionally visualize with boxplots or histograms.
- For each frame in the trajectory:
Configuration and Inputs
Prerequisites
Requires a loaded trajectory.
Key Configuration Options
-
Selections:
protein_sel
: Selection string for protein atoms (e.g.,'segid VSD'
).protein_name
: Short label used in output filenames and plot title.lipid_sel
: Selection string for lipid atoms (e.g.,'segid MEMB'
).lipid_name
: Label used for lipid group in output.lipid_atom
: Optional atom name to restrict contact detection (e.g.,'P'
for phosphorus atoms).
-
Distance and Filtering:
contact_cutoff
: Distance (in Å) to define a contact between protein and lipid atoms.min_dwell_fraction
: Minimum fraction of total simulation time a residue must accumulate in lipid contacts to be included.
-
Grouping:
group_by_type
: IfTrue
, aggregates dwell times by residue type (e.g.,LYS
,ARG
) instead of individual residues.
-
Parallelization:
num_threads
: Number of threads used for multiprocessing (-1
uses all available cores).
Output
-
Plot:
- File:
figures/{protein_name}_{lipid_name}_Dwell_Times.png
- Options:
- Boxplot: Shows distribution of lipid dwell times per residue or residue type.
- Histogram: Shows all dwell time values pooled together.
- Formatted with configurable title, axis labels, and styling.
- File:
-
Console Output:
- Frame-by-frame debug information summarizing:
- Number of detected lipid-residue contact events.
- Residues and lipids involved in each frame.
- Summary table:
- Total and mean dwell times per residue (or type).
- Number of recorded events per residue (or type).
- Frame-by-frame debug information summarizing:
-
CSV Data:
- File:
figures/{protein_name}_{lipid_name}_Dwell_Times.csv
- Each column corresponds to a residue or residue type.
- Each row contains one dwell event (in simulation time units).
- File:
Interpreting the Results
-
Dwell Time Summary:
- A large number of dwell events and higher mean dwell time suggest stronger or more persistent lipid-residue interactions.
- Residues with low total dwell time are excluded based on the
min_dwell_fraction
setting.
-
Grouping Behavior:
- When
group_by_type=True
, dwell times across all residues of a given amino acid type are pooled. - This is useful for identifying general trends in interaction preferences (e.g., positively charged residues attracting lipid headgroups).
- When
-
Boxplot vs Histogram:
- Boxplot: Useful for residue-specific insight and comparison.
- Histogram: Highlights global distribution of dwell times, helpful when visualizing overall contact dynamics.
Example Scenarios
Persistent Lipid Binding Sites
- Observation: Specific residues show high mean dwell times and many dwell events.
- Interpretation: Suggests stable lipid anchoring sites or lipid-protein interaction hotspots.
Transient Lipid Contacts
- Observation: Widespread but short-lived interactions across many residues.
- Interpretation: Suggests dynamic lipid association, consistent with flexible or surface-exposed domains.
Residue Type Enrichment
- Observation: Grouped boxplots reveal longer dwell times for
LYS
,ARG
. - Interpretation: Likely electrostatic attraction with negatively charged lipid headgroups.
Usage Tips
-
Performance:
- Use
num_threads > 1
for large trajectories to improve speed. - Reduce
max_lipids
to speed up plotting and focus on key residues.
- Use
-
Selection Strategy:
- For membrane systems, use
lipid_atom='P'
to restrict contacts to headgroups. - Test selection strings with visualization tools before running the full analysis.
- For membrane systems, use
-
Interpretation Thresholds:
- Adjust
min_dwell_fraction
to filter out noisy or biologically irrelevant contacts. - Higher values focus on more persistent interactions.
- Adjust