Protein Structure logo

Protein Structure

Community
ssinder
protein-structure

Analyzes protein structures from PDB files: parses ATOM/HETATM records with a dependency-free pure-Python parser, computes radius of gyration, gyration tensor and dipole moments, assigns secondary structure via DSSP or a built-in Kabsch-Sander hydrogen-bond implementation, and optionally retrieves UniProt metadata. This skill should be used when secondary structure assignment, Rg, shape analysis, DSSP, PDB parsing or protein structure annotation is requested.

Overview

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

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

Use it in TypingMind

Enable Protein Structure 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 Structure 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 Structure 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.

Protein Structure Analysis

Overview

This skill turns raw PDB coordinates into quantitative structural descriptors without requiring heavyweight dependencies. It ships a self-contained PDB parser that handles ATOM / HETATM records, multi-model files, alternate locations and insertion codes, plus a built-in secondary-structure assigner based on the Kabsch-Sander hydrogen-bond energy model. Geometry (radius of gyration, gyration tensor principal axes, shape descriptors, dipole moment) is computed in pure Python, and UniProt metadata can be attached on request.

When to Use This Skill

  • Secondary structure assignment of a protein (DSSP, H/E/C content, helix percentage)
  • Radius of gyration, radius of gyration tensor, shape anisotropy of a folded protein
  • Parsing PDB files without installing Biopython
  • Batch statistics over a directory of PDB files (length distribution, average Rg)
  • Attaching UniProt protein names, organism and function to structural results
  • Preliminary characterisation of AlphaFold models or predicted structures

Quick Start

bash
# 单个结构:解析 + 几何 + 二级结构
python scripts/analyze_structure.py --input 1crn.pdb --output results/

# 强制使用内置 DSSP 实现(系统未装 mkdssp 时)
python scripts/analyze_structure.py --input 1crn.pdb --output results/ --dssp-method builtin

# 批量处理整个目录(4 线程)
python scripts/batch_analyze.py --input ./pdb_data --output results/ --workers 4

# 附加 UniProt 元数据(需要网络)
python scripts/analyze_structure.py --input P69905.pdb --output results/ --query-uniprot

Workflow

  1. Parse — pdb_parser.py reads fixed-column PDB records into a Structure → Model → Chain → Residue → Atom tree. Alternate locations keep only the primary conformer (' ', 'A', '1'); MODEL/ENDMDL splits multi-model files.
  2. Summarise — chain/residue/atom counts, element composition, heteroatom inventory, per-chain one-letter sequences.
  3. Geometry — geometry.py computes mass-weighted Rg (and Rg over Cα only), the gyration tensor with a Jacobi eigen-decomposition, shape descriptors (asphericity, acylindricity, relative shape anisotropy) and a partial-charge dipole estimate.
  4. Secondary structure — secondary_structure.py either shells out to mkdssp or runs the built-in assigner: rebuild missing amide hydrogens, evaluate Kabsch-Sander hydrogen-bond energies, and classify H/G/I/E/B/T/S/-.
  5. Annotate — optionally query rest.uniprot.org for protein name, organism, sequence length and function via the shared http_session (retry + rate limit).
  6. Report — write structure_analysis.json and structure_analysis.csv.

Parameters

ParameterScriptDefaultDescription
--inputbothrequiredPDB file or directory of PDB files
--outputbothresults/Output directory for reports
--dssp-methodbothautoauto / external / builtin secondary-structure backend
--dssp-executablebothauto-detectedPath to mkdssp or dssp
--hbond-energyboth-0.5Hydrogen-bond energy threshold (kcal/mol) for the built-in assigner
--modelanalyze1Which model to analyse (1-based)
--query-uniprotbothoffEnable UniProt metadata lookup (network access)
--formatanalyzebothjson / csv / both
--workersbatch4Worker threads for batch processing
--patternbatch*.pdbGlob pattern for batch discovery
--recursivebatchoffRecurse into subdirectories
--min-residuesbatch0Skip structures shorter than this
--max-filesboth0Cap the number of files (0 = unlimited)

Outputs

FileContent
structure_analysis.jsonFull nested report: structure summary, chains, geometry, per-residue secondary structure, UniProt annotation
structure_analysis.csvFlat one-row-per-structure table (Rg, shape class, helix/sheet percentages)
batch_summary.jsonAggregate statistics over a directory plus per-structure detail
batch_results.csvFlat table of the batch run

Validation

  • Hydrogen-bond geometry: in a genuine alpha helix the O(i)···N(i+4) distance must be ~2.9-3.1 Å. The built-in assigner only reports H when that contact exists.
  • Backbone sanity: Cα(i)-Cα(i+1) should be ~3.8 Å and C(i)-N(i+1) ~1.33 Å. Distances far from these indicate a malformed or non-standard PDB.
  • Helix content: globular proteins typically show 20-50% helix. A reported value near 0% or 100% for a folded protein is a red flag for the hydrogen-bond threshold.
  • Cross-check: compare builtin against external DSSP on the same file (--dssp-method builtin vs --dssp-method external). Agreement within a few percent on helix content is expected; large divergence usually means the structure lacks resolved hydrogens or is highly non-standard.
  • Rg plausibility: for a 100-residue globular domain Rg is roughly 11-14 Å (Rg ≈ 2.2 × N^0.38 Å is a common empirical rule).
  • Element counts: hydrogen atoms are usually absent from X-ray structures, so element_counts containing only C/N/O is expected, not a parse failure.

References

  • references/methodology.md — algorithms, formulas and parameter selection rationale
  • 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 Structure AI skill do?

Analyzes protein structures from PDB files: parses ATOM/HETATM records with a dependency-free pure-Python parser, computes radius of gyration, gyration tensor and dipole moments, assigns secondary structure via DSSP or a built-in Kabsch-Sander hydrogen-bond implementation, and optionally retrieves UniProt metadata. This skill should be used when secondary structure assignment, Rg, shape analysis, DSSP, PDB parsing or protein structure annotation is requested.

Why use Protein Structure on TypingMind?

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

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

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

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

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