Use when adding new error messages to React, or seeing "unknown error code" warnings.
npx skills add CharlesHahn/DuIvySkills --skill "gromacs-protein-analysis"
Install specific skill from multi-skill repository
# Description
Comprehensive guide for analyzing and visualizing protein molecular dynamics simulation results from GROMACS. Use when Claude needs to perform trajectory analysis including: (1) Periodic boundary condition correction for protein or protein-ligand complexes, (2) Dynamics Cross-Correlation Matrix (DCCM) analysis to study correlated atomic motions, (3) Residue distance contact matrix (RDCM) to analyze inter-residue contacts, (4) Principal Component Analysis (PCA) to identify collective motions, (5) Free Energy Landscape (FEL) mapping using RMSD/Gyrate or PCA to understand conformational states
# SKILL.md
name: gromacs-protein-analysis
description: "Comprehensive guide for analyzing and visualizing protein molecular dynamics simulation results from GROMACS. Use when Claude needs to perform trajectory analysis including: (1) Periodic boundary condition correction for protein or protein-ligand complexes, (2) Dynamics Cross-Correlation Matrix (DCCM) analysis to study correlated atomic motions, (3) Residue distance contact matrix (RDCM) to analyze inter-residue contacts, (4) Principal Component Analysis (PCA) to identify collective motions, (5) Free Energy Landscape (FEL) mapping using RMSD/Gyrate or PCA to understand conformational states"
GROMACS Protein Analysis
This skill provides comprehensive workflows for analyzing protein molecular dynamics simulation results from GROMACS. It covers five major analysis types commonly used in protein dynamics studies.
Prerequisites
- GROMACS simulation completed with trajectory files (.xtc/.trr) and topology file (.tpr)
- Basic understanding of GROMACS commands
- For visualization: DuIvyTools skill (call
duivytools-helperwhen needed)
Analysis Types
1. Periodic Boundary Condition (PBC) Correction
Correct trajectory for PBC artifacts to prevent molecules from crossing box boundaries and ensure proper alignment for downstream analysis.
Purpose: Remove PBC artifacts, center protein/ligand, eliminate overall translation/rotation
Input: Trajectory file (.xtc), topology file (.tpr), index file (.ndx)
Output: Corrected trajectory (fit.xtc), corrected topology (fit.tpr)
When to use: Before any analysis when molecules cross box boundaries or when RMSD shows abrupt jumps
Detailed workflow: See PBC Correction Guide
2. Dynamics Cross-Correlation Matrix (DCCM)
Analyze correlated motions between atomic pairs to identify coordinated movements in the protein.
Purpose: Identify pairs of atoms that move together (positive correlation) or opposite (negative correlation)
Input: Trajectory file (.xtc), topology file (.tpr), index file (.ndx)
Output: Covariance matrix (covar.dat), DCCM matrix (dccm.xpm), visualization (dccm.png)
Visualization: Use duivytools-helper skill to generate heatmaps
Detailed workflow: See DCCM Analysis Guide
3. Residue Distance Contact Matrix (RDCM)
Calculate average distances between residue pairs to analyze inter-residue contacts and spatial relationships.
Purpose: Map residue-residue distances, identify long-range contacts, analyze protein structure
Input: Trajectory file (.xtc), topology file (.tpr), index file (.ndx)
Output: Distance contact matrix (rdcm.xpm), visualization (rdcm.png)
Visualization: Use duivytools-helper skill to generate heatmaps
Detailed workflow: See RDCM Analysis Guide
4. Principal Component Analysis (PCA)
Identify collective motions and dominant conformational changes by decomposing protein motion into principal components.
Purpose: Extract major collective motions, analyze conformational flexibility, reduce dimensionality
Input: Trajectory file (.xtc), topology file (.tpr), index file (.ndx)
Output: Eigenvalues (eigenvalues.xvg), eigenvectors (eigenvectors.trr), projections (pc1.xvg, pc2.xvg)
Key metrics: First few PCs' contribution percentages
Visualization: Use duivytools-helper skill to plot eigenvalues and projections
Detailed workflow: See PCA Analysis Guide
5. Free Energy Landscape (FEL)
Map free energy surfaces to understand conformational states and transitions using either RMSD/Gyrate or PCA.
Purpose: Identify stable conformations, quantify energy barriers, understand conformational landscape
Method 1 - RMSD + Gyrate: Use structural deviation and compactness as reaction coordinates
Method 2 - PCA: Use principal components as reaction coordinates
Input: RMSD data (rmsd.xvg), Gyrate data (gyrate.xvg) OR PC projections (pc1.xvg, pc2.xvg)
Output: Free energy landscape (gibbs.xpm), energy minima (gibbs.log), frame indices (bindex.ndx), visualization (fel.png)
Visualization: Use duivytools-helper skill to generate 2D/3D FEL plots
Detailed workflow: See FEL Analysis Guide
General Workflow
Before Any Analysis
- Check trajectory quality: Visual inspection of trajectory for artifacts
- PBC correction (if needed): Use PBC correction workflow
- Ensure consistent atom selection: Use same index groups for related analyses
Analysis Sequence
Typical analysis sequence:
1. PBC correction (if needed)
β
2. DCCM analysis
β
3. RDCM analysis
β
4. PCA analysis
β
5. FEL analysis (using RMSD/Gyrate OR PCA)
After Each Analysis
- Verify output files: Check that all expected files are generated
- Visual inspection: Use appropriate visualization to assess results
- Documentation: Record analysis parameters and observations
Key Considerations
Atom Selection
- Backbone: For overall protein motion and RMSD analysis
- C-alpha: For PCA and DCCM (reduces computational cost)
- Protein: For full protein analysis
- Protein_Lig: For protein-ligand complexes
Time Selection
- Equilibration phase: Exclude initial equilibration period (typically first 10-20% of simulation)
- Production phase: Use production phase for analysis
- Consistency: Use same time range for related analyses
Index Groups
- Create appropriate index groups using
gmx make_ndx - Ensure index groups match analysis requirements
- Document index group compositions
When to Call DuIvyTools-Helper
Call the duivytools-helper skill for visualization tasks:
- XVG files: Plot RMSD, RMSF, energies, hydrogen bonds, gyrate
- XPM files: Visualize DCCM, RDCM, FEL matrices
- Projections: Plot PC1, PC2 projections
- Statistical analysis: Calculate averages, distributions
Troubleshooting
Common Issues
RMSD shows abrupt jumps: PBC artifacts - apply PBC correction
DCCM values all near zero: Check atom selection, ensure sufficient dynamics
PCA shows uniform eigenvalues: May indicate no dominant collective motion or excessive noise
FEL shows unrealistic barriers: Check time range selection, ensure sufficient sampling
Files don't match: Verify tpr and xtc have same atom count, use gmx convert-tpr if needed
Reference Documentation
For detailed step-by-step workflows, consult these references:
- PBC Correction Guide - Complete PBC correction workflow
- DCCM Analysis Guide - DCCM calculation and interpretation
- RDCM Analysis Guide - Distance contact matrix analysis
- PCA Analysis Guide - Principal component analysis workflow
- FEL Analysis Guide - Free energy landscape mapping
Quick Reference
Required Input Files
- Trajectory: .xtc or .trr file from GROMACS simulation
- Topology: .tpr file (must match trajectory atom count)
- Index: .ndx file with custom atom groups
Common Output Files
- XVG: Time-series data (RMSD, eigenvalues, projections)
- XPM: Matrix data (DCCM, RDCM, FEL)
- TRR: Vector data (eigenvectors)
- PDB: Structure files (average, extreme conformations)
Analysis Order Recommendation
- Correct PBC if needed
- Perform DCCM and RDCM for contact analysis
- Conduct PCA for collective motion analysis
- Generate FEL for conformational landscape
Best Practices
- Always backup original trajectory files before modifications
- Use consistent time ranges for all related analyses
- Document all parameters and index group selections
- Visualize intermediate results to catch issues early
- Verify atom count consistency between tpr and xtc files
- Check statistical convergence before interpreting results
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.