CtrlK
BlogDocsLog inGet started
Tessl Logo

drug-design

End-to-end drug discovery pipeline orchestration. Deterministic Python script that auto-chains structure prediction, pocket detection, de novo design, docking, scoring, and ADMET filtering into reproducible workflows.

68

Quality

83%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Drug Design Pipeline

Overview

This skill provides a deterministic pipeline orchestrator (pipeline.py) that auto-chains multiple drug discovery skills into reproducible workflows. Instead of manually invoking 10+ scripts in the correct order, the agent runs a single command that handles file wiring, schema validation, and manifest logging at every stage.

Why a script instead of manual chaining:

  • Guarantees correct execution order — the agent cannot skip or reorder stages
  • Validates I/O contracts between stages — catches schema mismatches early
  • Logs every invocation to _script_manifest.jsonl — critique agent can verify the full trace
  • Stops on first failure with clear diagnostics — no silent errors

Pipeline Mode Selection

Choose the mode based on what the user wants:

User IntentModeCommand
"Find drugs for target X"full--mode full --protein target.pdb
"Optimize this hit compound"lead-opt--mode lead-opt --protein target.pdb --ligand hit.sdf
"Screen this library"screen--mode screen --protein target.pdb --library compounds.sdf
"Is this target druggable?"assess--mode assess --protein target.pdb
"Design molecules for this pocket"denovo--mode denovo --protein target.pdb

Trigger phrases: "drug discovery pipeline", "find drugs", "design drugs", "screen compounds", "druggability assessment", "de novo design", "lead optimization"

Quick Start

Full Pipeline (target → drug candidates)

python scripts/pipeline.py \
    --mode full \
    --protein target.pdb \
    --output-dir results/ \
    --top-n 10

Lead Optimization (improve an existing hit)

python scripts/pipeline.py \
    --mode lead-opt \
    --protein target.pdb \
    --ligand hit_compound.sdf \
    --output-dir lead_opt_results/ \
    --top-n 20

Virtual Screening (screen a compound library)

python scripts/pipeline.py \
    --mode screen \
    --protein target.pdb \
    --library compound_library.sdf \
    --output-dir screening_results/ \
    --top-n 50

Target Assessment (is this druggable?)

python scripts/pipeline.py \
    --mode assess \
    --protein target.pdb \
    --output-dir assessment/

De Novo Design (generate novel molecules)

python scripts/pipeline.py \
    --mode denovo \
    --protein target.pdb \
    --output-dir denovo_results/ \
    --top-n 15

From Sequence (no PDB available)

python scripts/pipeline.py \
    --mode full \
    --sequence "MKTLLLTLLLGLLVSSALA..." \
    --output-dir results/

Pipeline Stages Reference

Full Pipeline (--mode full)

StageSkillScriptInputOutput
1. Structure Predictionstructure-predictionpredict.pySequencepredicted_structure.pdb
2. Pocket Detectionpocket-detectiondetect.pyPDBpockets.json
3. Druggabilitypocket-detectiondruggability.pyPDB + pockets.jsondruggability.json
4. De Novo Designdenovo-designgenerate_sbdd.pyPDB + pockets.jsoncandidates.sdf
5. Drug-Likeness Filterdenovo-designfilter.pycandidates.sdffiltered.sdf
6. Dockingmolecular-dockingdock.pyPDB + filtered.sdfdocking/poses.sdf
7. Interaction Scoringmolecular-dockingscore.pyPDB + poses.sdfinteractions.json
8. Affinity Predictionbinding-affinitypredict.pyPDB + poses.sdfaffinity.json
9. MM/GBSA Rescorebinding-affinityrescore.pyPDB + poses.sdfmmgbsa.json
10. Consensus Rankingbinding-affinityconsensus.pyAll score filesconsensus.json
11. 3D Visualizationmolecule-visualizationrender_3d.pyPDB + poses.sdfcomplex_3d.html

Lead Optimization (--mode lead-opt)

StageScriptInputOutput
1. Analog Generationgenerate_analogs.pyhit.sdfanalogs.sdf
2. Drug-Likeness Filterfilter.pyanalogs.sdffiltered.sdf
3. Dockingdock.pyPDB + filtered.sdfdocking/poses.sdf
4. Affinity Predictionpredict.pyPDB + poses.sdfaffinity.json
5. Consensus Rankingconsensus.pyaffinity.jsonconsensus.json

Virtual Screening (--mode screen)

StageScriptInputOutput
1. Pocket Detectiondetect.pyPDBpockets.json
2. Batch Scoringbatch.pyPDB + library.sdfscreening_hits.csv
3. Dockingdock.pyPDB + hitsdocking/poses.sdf
4. Affinity Predictionpredict.pyPDB + poses.sdfaffinity.json
5. Consensus Rankingconsensus.pyaffinity.jsonconsensus.json

Target Assessment (--mode assess)

StageScriptInputOutput
1. Structure Predictionpredict.pySequencepredicted.pdb
2. Pocket Detectiondetect.pyPDBpockets.json
3. Druggabilitydruggability.pyPDB + pockets.jsondruggability.json
4. Summary Plotvisualize.pyPDB + druggability.jsonpocket_summary.png
5. Druggability Radarvisualize.pyPDB + druggability.jsondruggability_radar.png
6. 3D Viewrender_3d.pyPDBprotein_3d.html

De Novo Design (--mode denovo)

StageScriptInputOutput
1. Pocket Detectiondetect.pyPDBpockets.json
2. SBDD Generationgenerate_sbdd.pyPDB + pockets.jsoncandidates_sbdd.sdf
3. Fragment Generationgenerate_fragments.pyPDB + pockets.jsoncandidates_frag.sdf
4. Drug-Likeness Filterfilter.pycandidates.sdffiltered.sdf
5. Dockingdock.pyPDB + filtered.sdfdocking/poses.sdf
6. Affinity Predictionpredict.pyPDB + poses.sdfaffinity.json
7. Consensus Rankingconsensus.pyaffinity.jsonconsensus.json

I/O Contract Reference

These are the JSON schemas each stage expects from its upstream stage:

pockets.json (pocket-detection → docking, druggability, denovo)

{
  "pockets": [
    {
      "center": [10.5, 22.3, 15.0],
      "volume_A3": 542.8,
      "residues": ["ASP189", "SER195"]
    }
  ]
}

Critical field: pockets[0].center must be [float, float, float] — dock.py reads this directly.

affinity.json (binding-affinity → consensus)

{
  "predictions": [
    {
      "pose_id": 1,
      "predicted_pKd": 7.2,
      "predicted_dG_kcal": -9.8,
      "confidence": "moderate"
    }
  ]
}

consensus.json (final output)

{
  "rankings": [
    {
      "pose_id": 1,
      "consensus_score": 0.85,
      "consensus_rank": 1,
      "individual_ranks": {"predict": 1, "rescore": 2}
    }
  ]
}

Output Directory Structure

After --mode full:

pipeline_results/
├── pockets.json              # Detected binding pockets
├── druggability.json         # Pocket druggability scores
├── candidates.sdf            # Generated molecules (pre-filter)
├── filtered.sdf              # Drug-like molecules (post-filter)
├── docking/
│   ├── poses.sdf             # Docked poses
│   └── scores.csv            # Docking scores
├── interactions.json          # Protein-ligand interactions
├── affinity.json              # Binding affinity predictions
├── mmgbsa.json                # MM/GBSA rescoring
├── consensus.json             # Final consensus ranking
├── complex_3d.html            # Interactive 3D viewer
├── pipeline_report.json       # Stage timings and status
└── _script_manifest.jsonl     # Full invocation log (for critique)

Script Reference

ArgumentRequiredDescription
--modeYesPipeline mode: full, lead-opt, screen, assess, denovo
--proteinYes*Input PDB file (*or --sequence)
--sequenceNoProtein sequence (triggers structure prediction if no PDB)
--ligandlead-optInput ligand SDF file
--libraryscreenCompound library SDF file
--pocketNoPre-computed pocket JSON (skips pocket detection)
--output-dirNoOutput directory (default: ./pipeline_results/)
--skipNoComma-separated stages to skip
--top-nNoNumber of top compounds (default: 10)
--docking-methodNoDocking engine: vina or diffdock (default: vina)

Error Recovery

ErrorCauseFix
"Script not found"Missing skill or wrong OPENSCIENCE_SKILLS_DIRSet OPENSCIENCE_SKILLS_DIR to skills root or ensure skills are installed
"Schema validation failed"Upstream script produced unexpected outputCheck the failed stage's output file manually
"No pockets detected"Protein too small or no clear cavityTry --skip pocket-detection with manual --pocket coordinates
"Docking failed"Missing Vina binary or wrong PDB formatInstall Vina: pip install vina, or use --docking-method diffdock
"No analogs generated"Input ligand too complex or invalid SMILESCheck ligand parses in RDKit: python -c "from rdkit import Chem; print(Chem.MolFromSmiles('...'))"

Related Skills

  • pocket-detection: Standalone pocket detection with visualization
  • binding-affinity: Standalone affinity prediction and consensus scoring
  • denovo-design: Standalone molecule generation with multiple strategies
  • molecular-docking: Standalone docking with Vina/DiffDock
  • structure-prediction: Standalone protein structure prediction from sequence
  • molecule-visualization: Standalone 2D/3D molecular visualization

References

  • Eberhardt, J. et al. "AutoDock Vina 1.2.0." J. Chem. Inf. Model. 61, 3891-3898 (2021).
  • Corso, G. et al. "DiffDock: Diffusion Steps, Twists, and Turns for Molecular Docking." ICLR (2023).
  • Le Guilloux, V. et al. "Fpocket." BMC Bioinformatics 10, 168 (2009).
  • Wang, R. et al. "The PDBbind database." J. Med. Chem. 47, 2977-2980 (2004).
Repository
synthetic-sciences/openscience
Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.