Plot Chi Dihedral Angles - k-ngo/CATMD GitHub Wiki

Plot Chi Dihedral Angles

Overview and Methodology

What It Does

This script analyzes side-chain dihedral angles (χ1–χ5) for selected residues across a molecular dynamics trajectory. It produces heatmaps visualizing how these angles evolve over time.

How It Works

  • Objective: Track torsional dynamics of side chains, which can reflect conformational shifts or interaction changes.
  • Process:
    • Chi Selection: Automatically detects available χ1–χ5 angles per residue based on atom names.
    • Calculation: Computes dihedral angles frame by frame for each valid chi torsion.
    • Visualization: Plots a heatmap of dihedral angle evolution over time (−180° to 180°), with one row per residue–chi pair.

Configuration and Inputs

Prerequisites

  • Requires a loaded trajectory.
  • Selection must include only protein residues.

Key Configuration Options

  • Selections:

    • group_sel, group_name: Residue group to analyze (e.g., 'segid TOX', 'TOX').
  • Chi Angles:

    • plot_angles: Choose 'All Available Chi Angles' or a specific one (e.g., 'Chi1 Only').
    • The script identifies which residues have the selected Chi angles and ignores incompatible ones.
  • Plot Customization:

    • Figure size, label fonts, border width/color, and colormap can be customized.

Output

  • Chi Dihedral Heatmap:
    figures/*_Chi_Heatmap.png
    Each row represents a χ angle for a specific residue, colored by angle value (−180° to +180°). Horizontal axis is simulation time.

  • Colorbar Figure:
    Inline figure displaying the angular color scale (used by the heatmap).

  • Console Output:

    • Atom selections and angle availability diagnostics.
    • Notes about missing angles (e.g., ALA, GLY).
    • Save path for the final figure.

Interpreting the Results

  • Stable Horizontal Band:

    • Indicates a fixed rotamer or persistent side-chain orientation.
  • Switching States:

    • Sharp transitions between two angle bands suggest conformational flips (e.g., rotamer transitions).
  • Highly Dynamic Residues:

    • Broad or noisy angle patterns indicate flexible, surface-exposed, or disordered side chains.
  • Missing Data:

    • Residues lacking a given χ angle (e.g., glycine) are skipped and noted in console output.

Example Scenarios

Rotamer Transitions in Binding Sites

  • Scenario: Monitor ligand-contacting residues for side-chain flipping.
  • Observation: χ1 and χ2 of key residues switch between distinct angles during binding.
  • Interpretation: Suggests dynamic adjustment or induced fit at the binding pocket.

Mutation Effects on Side-Chain Flexibility

  • Scenario: Compare χ dynamics of wild-type vs. mutant protein.
  • Observation: Certain χ angles show reduced variability in mutant.
  • Interpretation: Mutation may restrict side-chain dynamics, altering local interactions.

Side Chain Rearrangement During Folding

  • Scenario: Simulate folding of a small peptide.
  • Observation: Gradual convergence of χ angles to distinct bands.
  • Interpretation: Lock-in of native rotamer states as folding progresses.

Usage Tips

  • Chi Angle Coverage:

    • Not all residues have all χ angles. Use 'All Available Chi Angles' to auto-detect valid torsions.
  • Selection Precision:

    • Use specific residue ranges (e.g., 'segid TOX and resid 10–20') to focus on functional regions.
  • Color Interpretation:

    • Heatmap uses a circular colormap (twilight by default), ensuring continuous transitions around −180° ↔ +180°.
  • Plot Clarity:

    • Increase fig_height_factor for more spacing per residue.
    • Use Chi1 Only mode for comparison across residues when only the first side-chain angle is of interest.