Plot Ion Conduction Through a Channel - k-ngo/CATMD GitHub Wiki
Plot Ion Conduction Through a Channel
Overview and Methodology
What It Does
This script tracks the movement of ions through a channel’s selectivity filter (SF) across a molecular dynamics trajectory. It identifies ions near the SF, corrects for periodic boundary conditions (PBCs), detects complete ion crossings, and visualizes ion z-axis positions over time. If an electric field is provided, it estimates single-channel conductance based on observed ion permeation events.
How It Works
- Objective: Quantify ion passage through the channel and correlate this with applied potential.
- Process:
- Aligns trajectory to the SF reference to stabilize orientation.
- Tracks z-position and xy-distance of ions relative to the SF center.
- Applies PBC correction for continuity in ion traces.
- Detects crossings based on:
- Direction of movement
- Entry/exit criteria
- Minimum traversal through the SF region
- Computes single-channel conductance using:
$G = \frac{N \cdot e}{V \cdot t}$
Where:
- $N$ = number of ion crossings
- $e = 1.602 \times 10^{-19}$ C (elementary charge)
- $V$ = applied voltage (in Volts)
- $t$ = simulation duration (in seconds)
Configuration and Inputs
Prerequisites
- Requires a loaded trajectory aligned to the channel axis (z-axis).
Key Configuration Options
-
Selectivity Filter and Ions:
sf_sel
: Atom selection for the selectivity filter (SF).ion_sel
: Selection of the ion species to track (e.g.,resname POT
).
-
Trajectory Alignment:
- Aligns entire trajectory to the SF selection for consistent tracking.
-
Tracking Parameters:
xy_radius
: Maximum xy distance from z-axis to consider an ion “in” the SF. Can be set manually or auto-detected.z_buffer
: Defines vertical bounds above and below the SF for tracking and plotting.
-
Directionality:
ion_direction
:'up'
or'down'
— expected conduction direction based on field polarity.
-
Conductance Parameters:
electric_field_mv
: Voltage across the channel (mV).time_unit
: Simulation duration unit (ps
,ns
,µs
) for conductance calculation.
Output
-
Plot:
- File:
ion_conduction.png
- Y-axis: z-position of each ion over time.
- Horizontal dashed lines mark the SF boundaries.
- Breaks and re-entry are adjusted for PBC and plotted continuously with gap indicators.
- File:
-
Console Output:
- Number of total ion crossings.
- Estimated conductance (in picosiemens, pS).
- Debug info for PBC transitions (optional).
Interpreting the Results
-
Crossing Events:
- Detected based on:
- Start inside the SF and exit in correct direction.
- Entry from one side, traversal through ≥30% of SF z-range, and exit in expected direction.
- Detected based on:
-
Z-traces:
- Smooth trajectories through SF imply conduction events.
- Gaps indicate PBC jumps or movement outside tracking bounds.
-
Conductance Estimate:
$G = \frac{N \cdot e}{V \cdot t}$
- For:
- $N = 12$ ions
- $V = 100$ mV = $0.1$ V
- $t = 300$ ns = $3 \times 10^{-7}$ s
$\Rightarrow G = \frac{12 \cdot 1.602 \times 10^{-19}}{0.1 \cdot 3 \times 10^{-7}} \approx 64.1$ pS
Example Scenarios
High-Conductance Channel
- Observation: Multiple ions cross SF during the trajectory.
- Result: High estimated conductance (e.g., >100 pS).
- Interpretation: Strong permeation consistent with open state.
Blocked or Inactive Channel
- Observation: Ions enter but do not traverse SF.
- Result: No crossings, conductance = 0.
- Interpretation: Suggests a closed, collapsed, or occluded pore.
Directional Conduction
- Observation: Crossings only in
up
direction under positive potential. - Interpretation: Rectification or voltage-gated preference.
Usage Tips
-
Ion Selection:
- Match ion name with topology file (e.g.,
resname POT
,CLA
,SOD
). - Use
ion_direction
to align with expected electrochemical gradient.
- Match ion name with topology file (e.g.,
-
PBC Artifacts:
- Use
debug_pbc=True
to troubleshoot jumps or unexpected exits.
- Use
-
Plot Readability:
- Adjust
z_buffer
for tall channels. - Adjust
xy_radius
for narrow vs. wide pores.
- Adjust
-
Conductance Validation:
- Resulting pS values should be compared to known experimental data.