drug-trajectory-analysis
Skill174 starsChanged 6 months agoMITView on GitHub
Analyze a protein-ligand MD trajectory to compute ligand RMSD, pocket RMSF, hydrogen bonds, contact occupancy, and protein-ligand interaction fingerprints over time.
In this repository133 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/atomisticskills.mdcCursor rule
- .cursor/rules/use-agent-skills.mdcCursor rule
- chem-bond-dissociationSkill
- chem-conformer-searchSkill
- chem-db-mofSkill
- chem-db-qmofSkill
- chem-db-spectraSkill
- chem-dft-orca-advanced-calculationSkill
- chem-dft-orca-optimizationSkill
- chem-dft-orca-singlepointSkill
- chem-docking-voidSkill
- chem-hazard-toxicitySkill
- chem-irc-verificationSkill
- chem-msms-predictSkill
- chem-neb-barrierSkill
- chem-nmr-analysisSkill
- chem-nmr-predictSkill
- chem-react-otSkill
- chem-similarity-searchSkill
- chem-solution-mdSkill
- chem-sorption-gcmcSkill
- chem-sorption-relaxSkill
- chem-sorption-widomSkill
- chem-spectrum-matcherSkill
- chem-thermochemistrySkill
- chem-ts-optimizationSkill
- chem-vibrationSkill
- drug-admet-predictionSkill
- drug-binding-site-definitionSkill
- drug-bioactivity-assaySkill
- drug-complex-system-builderSkill
- drug-db-chemblSkill
- drug-db-pdbSkill
- drug-db-pubchemSkill
- drug-docking-analysisSkill
- drug-docking-vinaSkill
- drug-ligand-prepSkill
- drug-mmpbsa-gbsaSkill
- drug-molecular-fingerprintsSkill
- drug-pocket-detectionSkill
- drug-pose-validationSkill
- drug-protein-ligand-mdSkill
- drug-protein-prepSkill
- drug-redocking-rmsdSkill
- drug-retrosynthesisSkill
- general-arxiv-searchSkill
- general-biorxiv-searchSkill
- general-chemical-literatureSkill
- general-chemical-pricingSkill
- general-deep-researchSkill
- general-fair-data-reviewSkill
- general-patent-searchSkill
- general-peer-reviewSkill
- general-plot-digitizerSkill
- general-presentationSkill
- general-property-unitsSkill
- general-publisher-access-guardSkill
- general-query-literature-databaseSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 61
Ligand RMSD: should plateau below 2-3 A for a stable pose.
- Very specific: line 100
Ligand residue name: must match the name used in the topology PDB.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
- Topology: the solvated complex PDB used as the MD input
2. Run trajectory analysis
# 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 (requirespymol-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 COMmd/analysis/pocket_rmsf.csv: per-residue RMSF of pocket residues (Angstroms)md/analysis/hbonds.csv: hydrogen bond donor-acceptor pairs and occupancy fractionsmd/analysis/contacts.csv: residue-level contact occupancy fractionsmd/analysis/interaction_fingerprints.csv: per-frame binary IFP matrix (requires ProLIF)md/analysis/analysis_summary.json: summary statisticsmd/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:
# 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
# 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-agentwith 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
UNLto 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_framesor--strideto 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
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

