sciagent-skill-creator
Scaffold a new SciAgent-Skills entry. Picks pipeline/toolkit/database/guide template, creates skills/{category}/{name}/SKILL.md…
Diffusion-based docking that predicts protein-ligand poses without a predefined site. Use for blind docking, when traditional docking fails, or exploring multiple binding modes. Pipeline: prep protein (PDB) and ligand (SMILES/SDF), run inference, analyze confidence-ranked poses.
Claude Code
$ npx -y skills add jaechang-hits/SciAgent-Skills --skill diffdock --agent claude-code
Codex
$ npx skills add jaechang-hits/SciAgent-Skills --skill diffdock -a codex -y
Cursor
$ npx skills add jaechang-hits/SciAgent-Skills --skill diffdock -a cursor -y
Gemini CLI
$ npx skills add jaechang-hits/SciAgent-Skills --skill diffdock -a gemini-cli -y
GitHub Copilot
$ npx skills add jaechang-hits/SciAgent-Skills --skill diffdock -a github-copilot -y
OpenCode
$ npx skills add jaechang-hits/SciAgent-Skills --skill diffdock -a opencode -y
Windsurf
$ npx skills add jaechang-hits/SciAgent-Skills --skill diffdock -a windsurf -y
name: "diffdock" description: "Diffusion-based docking that predicts protein-ligand poses without a predefined site. Use for blind docking, when traditional docking fails, or exploring multiple binding modes. Pipeline: prep protein (PDB) and ligand (SMILES/SDF), run inference, analyze confidence-ranked poses." license: "MIT"
DiffDock uses a diffusion generative model to predict protein-ligand binding poses directly from protein structure and ligand SMILES, treating docking as a generative rather than a search problem. Unlike traditional docking tools (AutoDock Vina, Glide), DiffDock does not require a predefined binding site — it samples poses across the full protein surface. It outputs a ranked set of binding poses with associated confidence scores. DiffDock excels at blind docking tasks and produces diverse pose hypotheses, making it valuable for de novo binding site discovery and challenging targets.
# Recommended: clone and install from source git clone https://github.com/gcorso/DiffDock.git cd DiffDock conda create -n diffdock python=3.9 conda activate diffdock pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cu118 pip install -r requirements.txt # Download pretrained model weights python -c "from utils.download import download_pretrained; download_pretrained()"
from Bio import PDB
from Bio.PDB import PDBParser, PDBIO, Select
class NonHetSelect(Select):
"""Remove HETATM records (ligands, water) — keep only protein atoms."""
def accept_residue(self, residue):
return residue.id[0] == " "
def clean_pdb(input_pdb: str, output_pdb: str):
parser = PDBParser(QUIET=True)
structure = parser.get_structure("protein", input_pdb)
io = PDBIO()
io.set_structure(structure)
io.save(output_pdb, NonHetSelect())
print(f"Cleaned PDB saved to: {output_pdb}")
clean_pdb("raw_protein.pdb", "protein_clean.pdb")from rdkit import Chem
from rdkit.Chem import AllChem, SDWriter
def smiles_to_sdf(smiles: str, output_sdf: str, n_confs: int = 1):
"""Convert SMILES to 3D SDF for DiffDock input."""
mol = Chem.MolFromSmiles(smiles)
mol = Chem.AddHs(mol)
AllChem.EmbedMolecule(mol, AllChem.ETKDGv3())
AllChem.MMFFOptimizeMolecule(mol)
writer = SDWriter(output_sdf)
writer.write(mol)
writer.close()
print(f"Ligand SDF written to: {output_sdf}")
return mol
# Example: ibuprofen
smiles = "CC(C)Cc1ccc(cc1)C(C)C(=O)O"
mol = smiles_to_sdf(smiles, "ligand.sdf")
print(f"Ligand formula: {Chem.rdMolDescriptors.CalcMolFormula(mol)}")# Command-line inference (run from the DiffDock directory)
python inference.py \
--protein_path protein_clean.pdb \
--ligand "CC(C)Cc1ccc(cc1)C(C)C(=O)O" \
--out_dir results/ \
--inference_steps 20 \
--samples_per_complex 40 \
--batch_size 10 \
--no_final_step_noiseimport subprocess
def run_diffdock(protein_pdb: str, ligand_smiles: str, out_dir: str,
n_samples: int = 40, n_steps: int = 20):
cmd = [
"python", "inference.py",
"--protein_path", protein_pdb,
"--ligand", ligand_smiles,
"--out_dir", out_dir,
"--inference_steps", str(n_steps),
"--samples_per_complex", str(n_samples),
"--batch_size", "10",
"--no_final_step_noise",
]
result = subprocess.run(cmd, capture_output=True, text=True, cwd="DiffDock/")
if result.returncode == 0:
print(f"DiffDock complete. Results in: {out_dir}")
else:
print(f"Error: {result.stderr}")
return result
run_diffdock("protein_clean.pdb", "CC(C)Cc1ccc(cc1)C(C)C(=O)O", "results/")import re
from pathlib import Path
import pandas as pd
def parse_diffdock_results(out_dir: str) -> pd.DataFrame:
"""Parse DiffDock output SDF files and confidence scores."""
out_path = Path(out_dir)
records = []
# DiffDock names output files: rank{N}_confidence{score}.sdf
for sdf_file in sorted(out_path.glob("rank*_confidence*.sdf")):
name = sdf_file.stem
# Extract rank and confidence from filename
rank_match = re.search(r"rank(\d+)", name)
conf_match = re.search(r"confidence(-?[\dTurn your AI coding agent into a life sciences expert — 199 bioinformatics skills for Claude Code covering RNA-seq, single-cell analysis, genomics, proteomics, drug discovery, and more. Boosted BixBench from 65% to 92%. Open source.
Scaffold a new SciAgent-Skills entry. Picks pipeline/toolkit/database/guide template, creates skills/{category}/{name}/SKILL.md…
Bayesian modeling with PyMC 5: priors, likelihood, NUTS/ADVI sampling, diagnostics (R-hat, ESS), LOO/WAIC comparison, prediction.…
Time-to-event modeling with scikit-survival: Cox PH (elastic net), Random Survival Forests, Boosting, SVMs for censored data.…
Guided statistical analysis: test choice, assumption checks, effect sizes, power, APA reporting. Pick tests, verify assumptions,…
Python statistical modeling: regression (OLS, WLS, GLM), discrete (Logit, Poisson, NegBin), time series (ARIMA, SARIMAX, VAR),…
DL cell/nucleus segmentation for fluorescence and brightfield microscopy. Pre-trained models (cyto3, nuclei, tissuenet) and a…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.