Agent skill

Biopython Structure

by aipoch in aipoch/medical-research-skills

Use Bio.PDB to parse and analyze protein structures (PDB/mmCIF) for structural bioinformatics tasks; use when you need structure parsing, geometry calculations, or structural comparison/superposition.

MITAuto-check passedResearch & Science

Install Biopython Structure

skills CLI
$ npx skills add aipoch/medical-research-skills --skill biopython-structure -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aipoch/medical-research-skills biopython-structure --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aipoch/medical-research-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/'scientific-skills/Data Analysis/biopython-structure' .claude/skills/biopython-structure && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
biopython-structure
GitHub stars
2k
Token cost
~2.1k tokens
SKILL.md length
637 words
Files
4 (incl. references)
Skills in repo
567
Repo updated
First seen
Licence
MIT

At a glance

Use Bio.PDB to parse and analyze protein structures (PDB/mmCIF) for structural bioinformatics tasks; use when you need structure parsing, geometry calculations, or structural comparison/superposition.

  • Works in 4 steps: Validate the request against the skill… → Select the documented execution path and… → Produce the expected output using the… → …
  • You need structure parsing
  • SKILL.md covers When to Use, Key Features, Dependencies and Example Usage, plus 8 more sections
  • Calls python

What it does

Biopython Structure is an agent skill from aipoch/medical-research-skills. Use Bio.PDB to parse and analyze protein structures (PDB/mmCIF) for structural bioinformatics tasks; use when you need structure parsing, geometry calculations, or structural comparison/superposition.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `biopython-structure_audit_result_v2.json`, `config/task_config.json` and `references/structure.md`).

It sits in Research & Science, covering Bioinformatics and Protein structure and design. It works with Biopython. The repository describes itself as: Hundreds of agent skills for medical research, including protocol design, data analysis, evidence insights, and academic writing. The licence is MIT.

When your agent uses it

  • You need structure parsing
  • Geometry calculations
  • Structural comparison/superposition

Example prompts

  • “/biopython-structure”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Validate the request against the skill boundary and confirm all required inputs are present.
  2. Select the documented execution path and prefer the simplest supported command or procedure.
  3. Produce the expected output using the documented file format, schema, or narrative structure.
  4. Run a final validation pass for completeness, consistency, and safety before returning the result.

What it can do on your machine

Read from SKILL.md and the folder at commit 686e09d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Biopython Structure loads about 2.1k tokens when it runs, and up to ~5.5k if it reads all its reference files. Until then it costs about 55 tokens; SKILL.md has 637 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~55
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from aipoch/medical-research-skills at commit 686e09d, republished under its MIT licence (© aipoch). 637 words, ~2,143 tokens.

Download SKILL.mdSave it as .claude/skills/biopython-structure/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
biopython-structure
description
Use Bio.PDB to parse and analyze protein structures (PDB/mmCIF) for structural bioinformatics tasks; use when you need structure parsing, geometry calculations, or structural comparison/superposition.
license
MIT
author
AIPOCH

Source: https://github.com/aipoch/medical-research-skills

biopython-structure

When to Use

  • You need to parse PDB or mmCIF files and access the structure hierarchy (model → chain → residue → atom).
  • You want to compute geometric measurements such as distances, bond angles, and dihedral angles between atoms/residues.
  • You need neighbor searches (e.g., find residues/atoms within a cutoff) for contact analysis or local environment inspection.
  • You want to perform structural comparison, including alignment/superposition and RMSD-style evaluation.
  • You need to extract, modify, and save structures (e.g., subset chains/residues and write back to PDB/mmCIF).

Key Features

  • Structure parsing for PDB/mmCIF using Bio.PDB parsers.
  • Hierarchical traversal and selection of models, chains, residues, and atoms.
  • Geometry calculations: distance, angle, and dihedral computations using Bio.PDB utilities.
  • Neighbor search via spatial indexing (NeighborSearch) for efficient cutoff queries.
  • Structural operations: extraction, saving, and superposition (e.g., Superimposer).
  • Quality/annotation hooks: optional integration with DSSP (external executable) for secondary structure and accessibility.

Dependencies

  • biopython (>= 1.79)
  • numpy (>= 1.21)
  • Optional: DSSP executable (e.g., mkdssp, version depends on your system installation)

Example Usage

Create config/task_config.json:

json
{
  "input_path": "data/1ubq.pdb",
  "format": "pdb",
  "chain_id": "A",
  "atom_name": "CA",
  "distance_cutoff": 8.0,
  "output_path": "outputs/chainA_ca_neighbors.json"
}

Create scripts/neighbor_search.py:

python
import json
from pathlib import Path

import numpy as np
from Bio.PDB import PDBParser, MMCIFParser, NeighborSearch

def load_structure(input_path: str, fmt: str):
    if fmt.lower() in ("pdb", ".pdb"):
        parser = PDBParser(QUIET=True)
    elif fmt.lower() in ("cif", "mmcif", ".cif", ".mmcif"):
        parser = MMCIFParser(QUIET=True)
    else:
        raise ValueError(f"Unsupported format: {fmt}")
    return parser.get_structure("structure", input_path)

def main():
    config_path = Path("config/task_config.json")
    with config_path.open("r", encoding="utf-8") as f:
        cfg = json.load(f)

    structure = load_structure(cfg["input_path"], cfg["format"])

    # Use the first model by default
    model = next(structure.get_models())
    chain = model[cfg["chain_id"]]

    # Collect atoms for neighbor search
    all_atoms = list(structure.get_atoms())
    ns = NeighborSearch(all_atoms)

    # Pick a reference atom (first residue in chain that has the requested atom)
    ref_atom = None
    for residue in chain.get_residues():
        if cfg["atom_name"] in residue:
            ref_atom = residue[cfg["atom_name"]]
            break
    if ref_atom is None:
        raise RuntimeError(f"No atom '{cfg['atom_name']}' found in chain {cfg['chain_id']}")

    cutoff = float(cfg["distance_cutoff"])
    neighbors = ns.search(ref_atom.coord, cutoff, level="R")  # residues within cutoff

    results = []
    for res in neighbors:
        # Skip hetero/water if desired; here we keep everything and report identifiers
        res_id = res.get_id()  # (hetflag, resseq, icode)
        results.append(
            {
                "chain_id": res.get_parent().id,
                "resname": res.get_resname(),
                "resseq": int(res_id[1]),
                "icode": (res_id[2] or "").strip(),
            }
        )

    out_path = Path(cfg["output_path"])
    out_path.parent.mkdir(parents=True, exist_ok=True)
    with out_path.open("w", encoding="utf-8") as f:
        json.dump(
            {
                "input_path": cfg["input_path"],
                "reference": {
                    "chain_id": cfg["chain_id"],
                    "atom_name": cfg["atom_name"],
                    "cutoff": cutoff,
                },
                "neighbor_residues": results,
            },
            f,
            ensure_ascii=False,
            indent=2,
        )

if __name__ == "__main__":
    main()

Run the script:

bash
python scripts/neighbor_search.py

Implementation Details

  • Configuration convention: write runtime parameters to config/task_config.json as an intermediate file and invoke scripts via python scripts/<task_name>.py. Avoid stacking many CLI -- arguments; prefer config files.
  • Encoding and JSON output: all file I/O must explicitly use encoding="utf-8". When writing JSON, use ensure_ascii=False to preserve non-ASCII characters.
  • Parsing strategy:
    • Use PDBParser(QUIET=True) for .pdb.
    • Use MMCIFParser(QUIET=True) for .cif/.mmcif.
    • Access hierarchy through iterators (get_models(), get_chains(), get_residues(), get_atoms()).
  • Geometry calculations:
    • Distances are typically computed from atomic coordinates (NumPy arrays) using Euclidean norm, e.g. np.linalg.norm(a.coord - b.coord).
    • Angles/dihedrals can be computed using Bio.PDB vector utilities (e.g., Bio.PDB.vectors.calc_angle, calc_dihedral) when needed.
  • Neighbor search:
    • NeighborSearch(list(structure.get_atoms())) builds a spatial index over atoms.
    • search(center, radius, level="A"|"R"|"C"...) returns neighbors at the requested hierarchy level (atoms, residues, etc.).
  • Scope coverage:
    • PDB/mmCIF parsing and hierarchical access
    • Distance/angle/dihedral computations
    • Neighbor search and structural quality/annotation (optional DSSP)
    • Structure extraction/saving and superposition (e.g., Superimposer)

When Not to Use

  • Do not use this skill when the required source data, identifiers, files, or credentials are missing.
  • Do not use this skill when the user asks for fabricated results, unsupported claims, or out-of-scope conclusions.
  • Do not use this skill when a simpler direct answer is more appropriate than the documented workflow.

Required Inputs

  • A clearly specified task goal aligned with the documented scope.
  • All required files, identifiers, parameters, or environment variables before execution.
  • Any domain constraints, formatting requirements, and expected output destination if applicable.
Show full SKILL.md (243 more words)Show less
  1. Validate the request against the skill boundary and confirm all required inputs are present.
  2. Select the documented execution path and prefer the simplest supported command or procedure.
  3. Produce the expected output using the documented file format, schema, or narrative structure.
  4. Run a final validation pass for completeness, consistency, and safety before returning the result.

Output Contract

  • Return a structured deliverable that is directly usable without reformatting.
  • If a file is produced, prefer a deterministic output name such as biopython_structure_result.md unless the skill documentation defines a better convention.
  • Include a short validation summary describing what was checked, what assumptions were made, and any remaining limitations.

Validation and Safety Rules

  • Validate required inputs before execution and stop early when mandatory fields or files are missing.
  • Do not fabricate measurements, references, findings, or conclusions that are not supported by the provided source material.
  • Emit a clear warning when credentials, privacy constraints, safety boundaries, or unsupported requests affect the result.
  • Keep the output safe, reproducible, and within the documented scope at all times.

Failure Handling

  • If validation fails, explain the exact missing field, file, or parameter and show the minimum fix required.
  • If an external dependency or script fails, surface the command path, likely cause, and the next recovery step.
  • If partial output is returned, label it clearly and identify which checks could not be completed.

Quick Validation

Run this minimal verification path before full execution when possible:

text
No local script validation step is required for this skill.

Expected output format:

text
Result file: biopython_structure_result.md
Validation summary: PASS/FAIL with brief notes
Assumptions: explicit list if any

© aipoch, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in scientific-skills/Data Analysis/biopython-structure of aipoch/medical-research-skills.

  • SKILL.md
  • biopython-structure_audit_result_v2.json
  • config/task_config.json
  • references/structure.md

Open the folder on GitHubat commit 686e09d

Compare with similar skills

Biopython Structure next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Biopython Structure compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Biopython Structure this skillaipoch/medical-research-skills2k—~2.1kAutomated safety check: PassMIT
Biopython Bioinformaticsaiming-lab/AutoResearchClaw15k—~810Automated safety check: PassMIT
Ggetdavila7/claude-code-templates32k11 repos~6.3kAutomated safety check: PassMIT
Bio Entrez LinkGPTomics/bioSkills1.2k2 repos~3.8kAutomated safety check: PassMIT
Bio Pdb Geometric AnalysisFreedomIntelligence/OpenClaw-Medical-Skills3.1k1 repos~3.2kAutomated safety check: PassNone
Bio Pdb Structure IoFreedomIntelligence/OpenClaw-Medical-Skills3.1k1 repos~1.9kAutomated safety check: PassNone

Similar skills

  • Biopython Bioinformatics

    aiming-lab/AutoResearchClaw

    Quick reference for Biopython work: sequence operations, SeqIO file parsing, BLAST searches, Entrez queries, phylogenetic trees and PDB structure analysis.

    15k GitHub stars~810 tokensUpdated 1 mo ago
    Research & ScienceAuto-check passed
  • Gget

    davila7/claude-code-templates

    CLI/Python toolkit for rapid bioinformatics queries. An agent skill from davila7/claude-code-templates.

    32k GitHub starsUsed in 11 repos~6.3k tokens
    Research & ScienceAuto-check passed
  • Bio Entrez Link

    GPTomics/bioSkills

    Find cross-database references between NCBI databases using Biopython Bio.Entrez (ELink).

    1.2k GitHub starsUsed in 2 repos~3.8k tokens
    Research & ScienceAuto-check passed
  • Bio Pdb Geometric Analysis

    FreedomIntelligence/OpenClaw-Medical-Skills

    Perform geometric calculations on protein structures using Biopython Bio.PDB.

    3.1k GitHub starsUsed in 1 repo~3.2k tokens
    Research & ScienceAuto-check passed
  • Bio Pdb Structure Io

    FreedomIntelligence/OpenClaw-Medical-Skills

    Parse and write protein structure files using Biopython Bio.PDB.

    3.1k GitHub starsUsed in 1 repo~1.9k tokens
    Research & ScienceAuto-check passed
  • Bio Pdb Structure Modification

    FreedomIntelligence/OpenClaw-Medical-Skills

    Modify protein structures using Biopython Bio.PDB. An agent skill from FreedomIntelligence/OpenClaw-Medical-Skills.

    3.1k GitHub starsUsed in 1 repo~2.8k tokens
    Research & ScienceAuto-check passed

More from aipoch/medical-research-skills

All 567 skills in this repo
  • Academic Poster Generator

    aipoch/medical-research-skills

    Complete workflow for generating academic research posters from PDF literature; use when you need to extract paper content from PDFs and produce a LaTeX-based poster…

    2k GitHub stars~2.2k tokensUpdated 21 days ago
    Auto-check passed
  • Diagnostic Study Quality Assessment Quadas

    aipoch/medical-research-skills

    Analyzes clinical diagnostic accuracy studies for bias using the QUADAS-2 tool.

    2k GitHub stars~1.4k tokensUpdated 21 days ago
    Auto-check passed
  • Exploratory Data Analysis

    aipoch/medical-research-skills

    Perform comprehensive exploratory data analysis on scientific data files across 200+ file formats.

    2k GitHub stars~3.7k tokensUpdated 21 days ago
    Auto-check passed
  • Iso Certification

    aipoch/medical-research-skills

    A toolkit for preparing ISO 13485:2016 certification documentation for medical device QMS.

    2k GitHub stars~1.8k tokensUpdated 21 days ago
    Auto-check passed
  • Journal Skills

    aipoch/medical-research-skills

    Recommends target journals for manuscript submission by analyzing the paper topic/abstract and the journal distribution of similar PubMed literature; use when users ask for journal…

    2k GitHub stars~1.7k tokensUpdated 21 days ago
    Auto-check passed
  • Latex Posters

    aipoch/medical-research-skills

    Creates academic-poster writing packages for LaTeX using beamerposter, tikzposter, or baposter.

    2k GitHub stars~1.3k tokensUpdated 21 days ago
    Auto-check passed

Works with

Questions about Biopython Structure

What does Biopython Structure do?

Use Bio.PDB to parse and analyze protein structures (PDB/mmCIF) for structural bioinformatics tasks; use when you need structure parsing, geometry calculations, or structural comparison/superposition. Biopython Structure is an agent skill from aipoch/medical-research-skills.PDB to parse and analyze protein structures (PDB/mmCIF) for structural bioinformatics tasks; use when you need structure parsing, geometry calculations, or structural comparison/superposition.

When should I use Biopython Structure?

Biopython Structure fits situations like: you need structure parsing; geometry calculations; structural comparison/superposition.

How do I install Biopython Structure in Claude Code?

Run `npx skills add aipoch/medical-research-skills --skill biopython-structure -a claude-code`. Or copy the skill folder (scientific-skills/Data Analysis/biopython-structure in aipoch/medical-research-skills) into .claude/skills/biopython-structure in your project. Claude Code loads it when a task matches its description.

How do I install Biopython Structure in Codex?

Run `npx skills add aipoch/medical-research-skills --skill biopython-structure -a codex`. Or copy the skill folder (scientific-skills/Data Analysis/biopython-structure in aipoch/medical-research-skills) into .agents/skills/biopython-structure in your project. Codex loads it when a task matches its description.

Can I use Biopython Structure in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aipoch/medical-research-skills --skill biopython-structure -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/biopython-structure, .gemini/skills/biopython-structure, .github/skills/biopython-structure and .opencode/skills/biopython-structure in your project.

What does Biopython Structure need to run?

Going by SKILL.md and its folder, Biopython Structure needs the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Biopython Structure access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Biopython Structure safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Biopython Structure use?

Biopython Structure is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Biopython Structure use?

About 2.1k tokens (SKILL.md is roughly 8.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.4k tokens, read only when the agent opens those files.

What are the alternatives to Biopython Structure?

Skills that share tags, products or a category with Biopython Structure: Biopython Bioinformatics (aiming-lab/AutoResearchClaw, 15k stars), Gget (davila7/claude-code-templates, 32k stars), Bio Entrez Link (GPTomics/bioSkills, 1.2k stars) and Bio Pdb Geometric Analysis (FreedomIntelligence/OpenClaw-Medical-Skills, 3.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Biopython Structure?

aipoch (a GitHub organization) maintains it in aipoch/medical-research-skills, which has 1,974 GitHub stars. The repository holds 567 skills in this directory. The repository was last updated on September 17, 2026.

Source: aipoch/medical-research-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.