Protein Docking Hdock logo

Protein Docking Hdock

Community
ssinder
protein-docking-hdock

Submits protein-protein docking jobs to the HDOCK server and retrieves the resulting Docking Score, Confidence Score, ligand RMSD and ranked complex models. Uses plain HTTP form submission against the HDOCK server rather than browser automation, supports PDB files, PDB ID:ChainID references and FASTA sequences for both receptor and ligand, records submitted jobs to a CSV so results can be collected later, and can poll for completion. This skill should be used when running protein-protein complex structure prediction on the HDOCK server, checking the docking score of a submitted complex, or downloading top-ranked docked models is requested.

Overview

Publisherssinder
Repositorybioinformatics-agent-skills
Skill nameprotein-docking-hdock
Stars
75
Forks
2
Bundled files
6
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 6 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by ssinder on GitHub. Read the source before you install it.

Installation

Install the Protein Docking Hdock AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ssinder/bioinformatics-agent-skills/tree/main/skills/protein-docking-hdock
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ssinder/bioinformatics-agent-skills.git /tmp/bioinformatics-agent-skills
mkdir -p .claude/skills
cp -r /tmp/bioinformatics-agent-skills/skills/protein-docking-hdock .claude/skills/protein-docking-hdock
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Protein Docking Hdock in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Protein Docking Hdock on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Protein Docking Hdock is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

HDOCK Protein Docking

Overview

This skill submits protein-protein docking jobs to the HDOCK server (http://hdock.phys.hust.edu.cn/) and collects the results: Docking Score, Confidence Score, ligand RMSD, and the ranked complex models.

It uses HTTP, not a browser

HDOCK publishes no REST API — only a web interface. The natural assumption is that this therefore requires Selenium. It does not.

The submission page is a standard HTML form POST. There is no CSRF token, no hidden field, no JavaScript-computed signature, and no session cookie. The form posts to runhdock.php, and the results page is an ordinary HTML table. Everything the old Selenium scripts did is reachable with requests.

The one thing worth knowing is that the form's action attribute is empty, and the real target is set by JavaScript at submit time:

javascript
if( ! sym.value ){
    document.form1.action = "runhdock.php";     // ordinary docking
}else{
    document.form1.action = "runhsymdock.php";  // symmetric multimer
}

Posting to the homepage instead of runhdock.php returns a byte-identical copy of the homepage — HTTP 200, no error, no result. This is the single most likely way to waste an hour of debugging.

Submission and retrieval are separate steps

HDOCK's own documentation says a job "can normally complete within 30 min". Baking the wait into the submission command means the user stares at a blank terminal for half an hour. This skill therefore splits the workflow:

submit_docking.py     →  returns a job URL in ~2 seconds
        ↓ (minutes to tens of minutes, server-side)
fetch_docking_results.py →  reads the score

Submitted jobs are appended to jobs.csv, so a batch can be collected later in one pass.

When to Use This Skill

  • Predicting a protein-protein complex structure with HDOCK
  • Getting the Docking Score / Confidence Score for a candidate complex
  • Screening many receptor-ligand pairs through the HDOCK server
  • Downloading the top-ranked docked models for further analysis

Quick Start

bash
export PYTHONPATH="$PWD/packages"

# 用 PDB ID:ChainID 提交(最快,不用准备文件)
python scripts/submit_docking.py \
    --receptor-pdb-id 1CGI:E --ligand-pdb-id 1CGI:I \
    --job-name my_docking --output-dir results/

# 用 FASTA 序列提交
python scripts/submit_docking.py \
    --receptor-seq receptor.fasta --ligand-seq ligand.fasta \
    --output-dir results/

# 稍后取结果(查一次)
python scripts/fetch_docking_results.py \
    --url http://hdock.phys.hust.edu.cn/data/xxxxxxxxxxxx/ \
    --output-dir results/

# 批量收集所有已提交作业
python scripts/fetch_docking_results.py \
    --jobs-file results/jobs.csv --output-dir results/ --download-models

Workflow

Submission

  1. Provide one input per molecule. Each of the receptor and the ligand accepts exactly one of four input forms: a PDB file, a PDBID:ChainID string, a FASTA sequence, or a FASTA file. The --*-seq arguments accept either inline sequence text or a path to a FASTA file — the skill detects which.
  2. Submit. The skill GETs the homepage first (matching browser behaviour), then POSTs the multipart form to runhdock.php — or runhsymdock.php when --symmetry is given.
  3. Record. The job name, ID and URL are appended to jobs.csv and jobs.json in the output directory. The command returns immediately.

Retrieval

  1. Read the page. The result page has three possible states, which the skill distinguishes explicitly:

    StateMarker on the pageReported status
    Queuedis QUEUEDqueued
    FinishedDocking Score table presentdone
    FailedERROR: messagefailed

    This distinction matters. The old script treated "not ready yet" as "failed" and aborted the whole batch on the first unfinished job.

  2. Parse the ranking matrix. The results page is a matrix: rows are metrics (Docking Score, Ligand rmsd), columns are ranks 1–10. The skill extracts the full row, so the top-10 scores are all available, not just the best one.

  3. Compute Confidence Score if needed. HDOCK's documentation gives the closed form:

    Confidence_score = 1.0 / [1.0 + e^(0.02 * (Docking_Score + 150))]

    When the page does not include the column, the skill computes it from the Docking Score. The formula is public and exact — there is no reason to wait for an element that may never appear.

  4. Optionally download models. --download-models fetches the top-ranked complex models.

Parameters

submit_docking.py

ParameterDefaultDescription
--receptor-pdb-id—Receptor as PDBID:ChainID (e.g. 1CGI:E)
--receptor-seq—Receptor FASTA sequence, inline text or file path
--receptor-pdb—Receptor PDB file path
--ligand-pdb-id—Ligand as PDBID:ChainID
--ligand-seq—Ligand FASTA sequence, inline text or file path
--ligand-pdb—Ligand PDB file path
--job-nametimestampJob label
--emailnoneNotification address; the server emails you when the job finishes
--ligand-typeproteinprotein, rna, dna, rna.d, ssdna
--symmetrynoneSymmetry such as C2 or D3; switches to the symmetric endpoint
--receptor-sitenoneReceptor binding-site residues, comma separated
--ligand-sitenoneLigand binding-site residues, comma separated
--restraintnoneResidue distance restraints
--output-dirhdock_resultsOutput directory for the job records
--timeout180Per-request timeout in seconds

fetch_docking_results.py

ParameterDefaultDescription
--url—Single job result URL
--jobs-file—Job record CSV to process in batch
--output-dirhdock_resultsOutput directory for the results
--waitoffPoll until the job finishes instead of checking once
--poll-interval20Polling interval in seconds
--max-wait3600Maximum wait in seconds
--download-modelsoffDownload the top-ranked complex models
--top-n5How many models to download
--timeout60Per-request timeout in seconds

Outputs

FileContent
jobs.csv / jobs.jsonSubmitted jobs: name, ID, URL, status
results.csv / results.jsonResults: status, Docking Score, Confidence Score, error

Validation

  • A Docking Score is not a binding affinity. HDOCK's documentation is explicit: the score comes from a knowledge-based iterative scoring function and "should not be treated as the true binding affinity of two molecules because it has not been calibrated to the experimental data." It is useful for ranking candidate poses, not for predicting a Kd.
  • A more negative score is better. For comparison, complexes in the PDB normally score around −200 or better.
  • Confidence Score above 0.7 means "likely to interact". The score is a monotone function of the Docking Score, so it adds no information beyond the score itself — it just puts the result on an interpretable scale.
  • A queued job is not a failed job. status=queued means the server is still computing. HDOCK jobs commonly take 5–30 minutes; re-run the retrieval command later rather than resubmitting.
  • "No structure found" means the input was unusable, not that the interaction is impossible. Common causes: a chain ID that does not exist in that PDB entry, a sequence containing characters other than the 20 standard amino acids, or a PDB file that the server cannot parse. Check the chain ID format (1CGI:E — four-character PDB ID, colon, chain).
  • Results are stored for two weeks by the server. Retrieve them within that window or resubmit.
  • Sequence input is modelled, not docked as-is. HDOCK builds a structure from the sequence first (via homology modelling), then docks it. Upload PDB structures when you have them — the accuracy is better and the job is faster.
  • Bind the score to the job, not to the URL alone. Job names are normalised by the server (spaces become underscores); the job_id in the URL is the stable identifier.

References

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Protein Docking Hdock AI skill do?

Submits protein-protein docking jobs to the HDOCK server and retrieves the resulting Docking Score, Confidence Score, ligand RMSD and ranked complex models. Uses plain HTTP form submission against the HDOCK server rather than browser automation, supports PDB files, PDB ID:ChainID references and FASTA sequences for both receptor and ligand, records submitted jobs to a CSV so results can be collected later, and can poll for completion. This skill should be used when running protein-protein complex structure prediction on the HDOCK server, checking the docking score of a submitted complex, or...

Why use Protein Docking Hdock on TypingMind?

Because you install it once and use it with any model. Protein Docking Hdock is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Protein Docking Hdock in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ssinder/bioinformatics-agent-skills/tree/main/skills/protein-docking-hdock. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Protein Docking Hdock?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Protein Docking Hdock?

As many as you like. As long as a model supports skills, you can use Protein Docking Hdock with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Protein Docking Hdock AI skill free?

Yes. It is published on GitHub by ssinder under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇