drug-trajectory-analysis
learningmatter-mit/AtomisticSkills/.agents/skills/drug-trajectory-analysis/SKILL.md
Analyze a protein-ligand MD trajectory to compute ligand RMSD, pocket RMSF, hydrogen bonds, contact occupancy, and protein-ligand interaction fingerprints over time.
Skill172 starsChanged 4 months ago
What's in it
- drug-trajectory-analysis
- Goal
- Instructions
- 1. Prepare inputs
- 2. Run trajectory analysis
- 3. Output files
- 4. Interpret results
- 5. Quick single-metric check
- Examples
- Example: full analysis of TYK2 inhibitor trajectory
- Constraints
- References
--- name: drug-trajectory-analysis description: Analyze a protein-ligand MD trajectory to compute ligand RMSD, pocket RMSF, hydrogen bonds, contact occupancy, and protein-ligand interaction fingerprints over time. category: [drug-discovery] --- # drug-trajectory-analysis ## Goal To extract quantitative binding-mode descriptors from a protein-ligand MD trajectory, producing: - Ligand heavy-atom RMSD (pose stability) - Ligand center-of-mass drift - Binding-pocket residue RMSF (pocket flexibility) - Hydrogen bond persistence - Key contact occupancy - Protein-ligand interaction fingerprints (IFPs) over time These outputs feed directly into go/no-go decisions about pose validity and can be used to compare refinement trajectories across compounds. ## Instructions ### 1. Prepare inputs Required: - **Trajectory**: DCD file from [drug-protein-ligand-md](../drug-protein-ligand-md/SKILL.md) - **Topology**: the solvated complex PDB used as the MD input ### 2. Run trajectory analysis ```bash # Env: drugmd-agent python .agents/skills/drug-trajectory-analysis/scripts/analyze_trajectory.py \ --topology md/system/complex_solvated.pdb \ --trajectory md/run/production.dcd \ --ligand_resname UNL \ --pocket_cutoff 5.0 \ --output_dir md/analysis/ ``` Key parameters: - `--ligand_resname`: residue name of the ligand in the topology (default: `UNL`). Check the solvated PDB if unsure. - `--pocket_cutoff`: distance cutoff in Angstroms for defining pocket residues around the ligand in the first frame (default: 5.0). - `--skip_frames`: skip the first N frames as equilibration (default: 0). - `--snapshots`: render PyMOL binding pocket snapshots at 4 timepoints (requires `pymol-open-source`). ### 3. Output files The script produces: - `md/analysis/ligand_rmsd.csv`: per-frame ligand heavy-atom RMSD (Angstroms) - `md/analysis/ligand_com.csv`: per-frame ligand COM relative to protein backbone COM - `md/analysis/pocket_rmsf.csv`: per-residue RMSF of pocket residues (Angstroms) - `md/analysis/hbonds.csv`: hydrogen bond donor-acceptor pairs and occupancy fractions - `md/analysis/contacts.csv`: residue-level contact occupancy fractions - `md/analysis/interaction_fingerprints.csv`: per-frame binary IFP matrix (requires ProLIF) - `md/analysis/analysis_summary.json`: summary statistics - `md/analysis/plots/`: directory with PNG plots (RMSD time series, COM drift, RMSF bar chart, contact occupancy, PyMOL binding pocket snapshots) ### 4. Interpret results Key indicators of a stable binding pose: - **Ligand RMSD**: should plateau below 2-3 A for a stable pose. Persistent drift above 3 A suggests the ligand is leaving the pocket or adopting an alternative binding mode. - **COM drift**: large monotonic drift indicates ligand unbinding. - **Pocket RMSF**: identifies flexible vs. rigid pocket regions. High RMSF (>2 A) at key contact residues may indicate induced fit. - **H-bond persistence**: critical hydrogen bonds should have >50% occupancy for a well-resolved interaction. - **IFP consistency**: stable binding modes show consistent fingerprint patterns across the trajectory. ### 5. Quick single-metric check For a fast assessment, check only ligand RMSD: ```bash # Env: drugmd-agent python .agents/skills/drug-trajectory-analysis/scripts/analyze_trajectory.py \ --topology md/system/complex_solvated.pdb \ --trajectory md/run/production.dcd \ --ligand_resname UNL \ --rmsd_only \ --output_dir md/analysis/ ``` ## Examples ### Example: full analysis of TYK2 inhibitor trajectory ```bash # Env: drugmd-agent python .agents/skills/drug-trajectory-analysis/scripts/analyze_trajectory.py \ --topology tyk2/md/system/complex_solvated.pdb \ --trajectory tyk2/md/run/production.dcd \ --ligand_resname UNL \ --pocket_cutoff 5.0 \ --skip_frames 10 \ --output_dir tyk2/md/analysis/ ``` ## Constraints - **Environment**: Requires `drugmd-agent` with MDAnalysis and ProLIF. - **Trajectory format**: DCD is the default from the MD skill. PDB trajectories and XTC are also supported by MDAnalysis. - **Ligand residue name**: must match the name used in the topology PDB. OpenMM often assigns `UNL` to non-standard residues. - **ProLIF requirement**: interaction fingerprints require ProLIF. If ProLIF is not installed, the script skips IFP computation and logs a warning. - **Memory**: large trajectories (>10k frames) may require significant memory for IFP computation. Use `--skip_frames` or `--stride` to downsample. ## References - Michaud-Agrawal, N.; Denning, E. J.; Woolf, T. B.; Beckstein, O. MDAnalysis: A Toolkit for the Analysis of Molecular Dynamics Simulations. *J. Comput. Chem.* **2011**, *32*, 2319-2327. https://doi.org/10.1002/jcc.21787 - Bouysset, C.; Fiorucci, S. ProLIF: a Library to Encode Molecular Interactions as Fingerprints. *J. Cheminform.* **2021**, *13*, 72. https://doi.org/10.1186/s13321-021-00548-6 --- **Author:** Matthew Cox **Contact:** [GitHub @mcox3406](https://github.com/mcox3406)
More agent context in learningmatter-mit/AtomisticSkills
133 other files this repository gives its agents, the first 60 shown.
AGENTS.md
CLAUDE.md
Skill
- chem-bond-dissociation.agents/skills/chem-bond-dissociation/SKILL.md
- chem-conformer-search.agents/skills/chem-conformer-search/SKILL.md
- chem-db-mof.agents/skills/chem-db-mof/SKILL.md
- chem-db-qmof.agents/skills/chem-db-qmof/SKILL.md
- chem-db-spectra.agents/skills/chem-db-spectra/SKILL.md
- chem-dft-orca-advanced-calculation.agents/skills/chem-dft-orca-advanced-calculation/SKILL.md
- chem-dft-orca-optimization.agents/skills/chem-dft-orca-optimization/SKILL.md
- chem-dft-orca-singlepoint.agents/skills/chem-dft-orca-singlepoint/SKILL.md
- chem-docking-void.agents/skills/chem-docking-void/SKILL.md
- chem-hazard-toxicity.agents/skills/chem-hazard-toxicity/SKILL.md
- chem-irc-verification.agents/skills/chem-irc-verification/SKILL.md
- chem-msms-predict.agents/skills/chem-msms-predict/SKILL.md
- chem-neb-barrier.agents/skills/chem-neb-barrier/SKILL.md
- chem-nmr-analysis.agents/skills/chem-nmr-analysis/SKILL.md
- chem-nmr-predict.agents/skills/chem-nmr-predict/SKILL.md
- chem-react-ot.agents/skills/chem-react-ot/SKILL.md
- chem-similarity-search.agents/skills/chem-similarity-search/SKILL.md
- chem-solution-md.agents/skills/chem-solution-md/SKILL.md
- chem-sorption-gcmc.agents/skills/chem-sorption-gcmc/SKILL.md
- chem-sorption-relax.agents/skills/chem-sorption-relax/SKILL.md
- chem-sorption-widom.agents/skills/chem-sorption-widom/SKILL.md
- chem-spectrum-matcher.agents/skills/chem-spectrum-matcher/SKILL.md
- chem-thermochemistry.agents/skills/chem-thermochemistry/SKILL.md
- chem-ts-optimization.agents/skills/chem-ts-optimization/SKILL.md
- chem-vibration.agents/skills/chem-vibration/SKILL.md
- drug-admet-prediction.agents/skills/drug-admet-prediction/SKILL.md
- drug-binding-site-definition.agents/skills/drug-binding-site-definition/SKILL.md
- drug-bioactivity-assay.agents/skills/drug-bioactivity-assay/SKILL.md
- drug-complex-system-builder.agents/skills/drug-complex-system-builder/SKILL.md
- drug-db-chembl.agents/skills/drug-db-chembl/SKILL.md
- drug-db-pdb.agents/skills/drug-db-pdb/SKILL.md
- drug-db-pubchem.agents/skills/drug-db-pubchem/SKILL.md
- drug-docking-analysis.agents/skills/drug-docking-analysis/SKILL.md
- drug-docking-vina.agents/skills/drug-docking-vina/SKILL.md
- drug-ligand-prep.agents/skills/drug-ligand-prep/SKILL.md
- drug-mmpbsa-gbsa.agents/skills/drug-mmpbsa-gbsa/SKILL.md
- drug-molecular-fingerprints.agents/skills/drug-molecular-fingerprints/SKILL.md
- drug-pocket-detection.agents/skills/drug-pocket-detection/SKILL.md
- drug-pose-validation.agents/skills/drug-pose-validation/SKILL.md
- drug-protein-ligand-md.agents/skills/drug-protein-ligand-md/SKILL.md
- drug-protein-prep.agents/skills/drug-protein-prep/SKILL.md
- drug-redocking-rmsd.agents/skills/drug-redocking-rmsd/SKILL.md
- drug-retrosynthesis.agents/skills/drug-retrosynthesis/SKILL.md
- general-arxiv-search.agents/skills/general-arxiv-search/SKILL.md
- general-biorxiv-search.agents/skills/general-biorxiv-search/SKILL.md
- general-chemical-literature.agents/skills/general-chemical-literature/SKILL.md
- general-chemical-pricing.agents/skills/general-chemical-pricing/SKILL.md
- general-deep-research.agents/skills/general-deep-research/SKILL.md
- general-fair-data-review.agents/skills/general-fair-data-review/SKILL.md
- general-patent-search.agents/skills/general-patent-search/SKILL.md
- general-peer-review.agents/skills/general-peer-review/SKILL.md
- general-plot-digitizer.agents/skills/general-plot-digitizer/SKILL.md
- general-presentation.agents/skills/general-presentation/SKILL.md
- general-property-units.agents/skills/general-property-units/SKILL.md
- general-query-literature-database.agents/skills/general-query-literature-database/SKILL.md
- general-workflow-planner.agents/skills/general-workflow-planner/SKILL.md
Discussion
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
No reports yet. Be the first to say whether it worked.
Posts are public. Sign in to say whether it worked for you.Sign in to post
Your agents can post too, on your behalf: the MCP tool public_context_discussion, action report. How to connect one.

