Protein Docking Lightdock logo

Protein Docking Lightdock

Community
ssinder
protein-docking-lightdock

Runs LightDock protein-protein docking locally by driving the lightdock3_setup.py and lightdock3.py executables, then extracts the best docked complex. Parses the GSO swarm output files with the correct field semantics (glowworm id is the line number, not the LigID column), selects the latest gso_<step>.out by numeric step rather than dictionary order, and generates conformations from the origin-shifted structures that the setup stage produced so the receptor and ligand stay in a consistent coordinate frame. Supports batch receptor-ligand grids, resumable execution, incremental score logging, and DFIRE-based ranking. This skill should be used when protein-protein docking must be performed on the local machine, when a swarm-level score ranking is needed, or when the best docked complex model must be generated as a PDB file.

Overview

Publisherssinder
Repositorybioinformatics-agent-skills
Skill nameprotein-docking-lightdock
Stars
75
Forks
2
Bundled files
7
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.

  • 7 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 Lightdock 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-lightdock
  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-lightdock .claude/skills/protein-docking-lightdock
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Protein Docking Lightdock 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 Lightdock 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 Lightdock 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.

LightDock Local Protein Docking

Overview

This skill runs LightDock, a glowworm-swarm-optimization protein-protein docking engine, on the local machine and turns its raw swarm output into a ranked score table and a set of docked complex structures.

LightDock works differently from the HDOCK skill in this same repository. HDOCK is a web service: you submit a job and the server computes. LightDock is a local program: pip install lightdock, and the search runs on your own CPUs. A single job with 50 swarms × 50 steps takes minutes to hours depending on core count and protein size. A batch of 100 pairs takes days. This skill is therefore built around long-running, resumable, interrupt-safe batch execution rather than around request/response handling.

The hard part of driving LightDock from a script is not the subprocess calls — it is the output semantics. The gso_<step>.out files and the lightdock_<i>.pdb conformations have three separate traps that all produce plausible-looking but wrong results, and this skill fixes all three.

When to Use This Skill

  • Running protein-protein docking locally with full control over swarm/step counts
  • Ranking a batch of receptor-ligand pairs by DFIRE score
  • Recovering the best complex model from an existing LightDock run
  • Producing docked complex structures for downstream MD, interaction analysis, or figure preparation
  • Comparing against the protein-docking-hdock skill when a local (no data leaves the machine) prediction is required

Quick Start

bash
export PYTHONPATH="$PWD/packages"

# 一个受体 vs 一组配体
python scripts/run_docking.py --receptor rec.pdb --ligands ligands/*.pdb \
    --output-dir results/

# 多个受体 vs 多个配体(笛卡尔积)
python scripts/run_docking.py --receptors recs/*.pdb --ligands ligands/*.pdb \
    --output-dir results/

# 快速试跑(先验证流程再上规模)
python scripts/run_docking.py --receptor rec.pdb --ligands a.pdb b.pdb \
    --swarms 5 --glowworms 10 --steps 20 --cores 4 --output-dir test/

# 从已有结果生成最优复合物
python scripts/generate_conformations.py --job-dir results/rec__lig/

# 汇总分数排名
python scripts/extract_scores.py --jobs-root results/ --output-dir scores/

Workflow

  1. Locate the executables — resolve_executables() finds lightdock3_setup.py and lightdock3.py by checking, in order: an explicit --setup-exe / --run-exe path, the current interpreter's <prefix>/bin (where conda and venv installs put them — these are not on PATH, which is why the old scripts hard-coded an absolute path), and finally the system PATH.
  2. Setup stage — lightdock3_setup.py copies both structures into the job directory, strips waters/oxygens/hydrogens per the flags, computes the minimum-volume ellipsoid of the receptor, places the swarms on its surface, and writes setup.json. Critically, it translates both structures to the origin and saves them as lightdock_receptor.pdb / lightdock_ligand.pdb.
  3. Simulation — lightdock3.py setup.json <steps> -c <cores> runs the glowworm swarm optimisation. Each swarm writes gso_<step>.out every 10 steps.
  4. Score extraction — collect_swarm_results() picks the highest-step gso_*.out per swarm by numeric step, parses every glowworm line, and finds the minimum-scoring entry. Lower DFIRE score is better.
  5. Conformation generation — lgd_generate_conformations.py writes lightdock_<i>.pdb files from the GSO coordinates, using the origin-shifted structures so receptor and ligand stay aligned.
  6. Reporting — scores go to docking_scores.csv / .json, incrementally after every job.

Parameters

run_docking.py

ParameterDefaultDescription
--receptor—Single receptor PDB path
--receptors—Multiple receptor PDB paths (forms a grid with --ligands)
--ligandsrequiredLigand PDB paths, glob patterns, or directories
--output-dirlightdock_resultsOutput root
--swarms50Number of swarms (search space breadth)
--glowworms50Glowworms per swarm (sampling density)
--steps50Simulation steps
--cores4Parallel CPU cores
--resumeoffSkip jobs that already have a valid result
--keep-hydrogens / --keep-oxt / --keep-wateroffKeep stripped atoms
--setup-timeout600Setup stage timeout (seconds)
--run-timeout86400Simulation timeout (seconds)
--setup-exe / --run-exeautoExplicit paths to the LightDock scripts

generate_conformations.py

ParameterDefaultDescription
--job-dir—A single docking job directory
--jobs-root—Root whose subdirectories are treated as jobs
--output-dirin-placeWhere to copy the generated conformations
--top1How many conformations to generate (cost scales linearly)
--ligand-chain—Rewrite the ligand chain ID in a copy (original untouched)
--conformations-exeautoExplicit path to lgd_generate_conformations.py

extract_scores.py

ParameterDefaultDescription
--job-dir / --jobs-root—Which jobs to summarise
--output-dirnext to jobsWhere the score tables are written
--per-swarmoffOne row per swarm instead of one row per job

Outputs

FileContent
docking_scores.csvOne row per job: job id, receptor, ligand, status, best score, best swarm, best glowworm
docking_scores.jsonSame content as nested JSON
conformations.csvPer job: chosen swarm, glowworm, score, generated PDB file names
{job}/swarm_<n>/gso_<step>.outRaw glowworm swarm output
{job}/swarm_<n>/lightdock_<i>.pdbGenerated docked complex (receptor + ligand merged)

Validation

  • Score sign — DFIRE scores are negative and lower is better. A positive "best score" usually means the parser picked the wrong column.
  • Score magnitude — a converged small-complex DFIRE score typically lands around -30 to -60. A score near 0 means the search barely moved from the random start.
  • glowworm index vs LigID — the glowworm id is the line number in the GSO file. In single-structure docking, RecID and LigID are both 0. If your report says "best glowworm = 0" for every job, the parser is reading the wrong field.
  • GSO step selection — the file to use is the one with the largest numeric step (gso_100.out over gso_20.out), not the last one alphabetically.
  • Conformation count — lgd_generate_conformations.py clips the requested count to the number of coordinate lines actually found, and says so in its log.
  • Complex sanity — open the generated PDB and confirm the two parts touch but do not interpenetrate. A ligand flying off to the origin means the origin-shifted structures were not used.
  • RMSD — LightDock does not report RMSD by default; run lgd_rank.py if you need it, or compare against a known holo structure.

References

  • references/methodology.md — GSO format semantics, coordinate-frame handling, score extraction, official command reference
  • references/troubleshooting.md — common failures and how to diagnose them

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 Lightdock AI skill do?

Runs LightDock protein-protein docking locally by driving the lightdock3_setup.py and lightdock3.py executables, then extracts the best docked complex. Parses the GSO swarm output files with the correct field semantics (glowworm id is the line number, not the LigID column), selects the latest gso_<step>.out by numeric step rather than dictionary order, and generates conformations from the origin-shifted structures that the setup stage produced so the receptor and ligand stay in a consistent coordinate frame. Supports batch receptor-ligand grids, resumable execution, incremental score loggin...

Why use Protein Docking Lightdock on TypingMind?

Because you install it once and use it with any model. Protein Docking Lightdock 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 Lightdock in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ssinder/bioinformatics-agent-skills/tree/main/skills/protein-docking-lightdock. 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 Lightdock?

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 Lightdock?

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

Is the Protein Docking Lightdock 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 👇