agentleFS
AWSKnown publisherawslabs/hcls-agent-skills/skills/protein-structure-analysis/SKILL.md

protein-structure-analysis

Skill62 starsChanged 5 months agoMIT-0View on GitHub

Pipeline skill for protein structure analysis covering PDB/mmCIF parsing, RMSD superposition, Ramachandran/dihedral analysis, binding pocket detection, contact maps, B-factor flexibility, DSSP secondary structure, and format conversion. Triggers on PDB, protein structure, RMSD, Ramachandran, binding pocket, Biopython, PyMOL, pocket detection, fpocket, DSSP, PDBQT, structural alignment, superposition.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Wrong: No hydrogens before PDBQT export → Right: obabel -xh then -xr -O receptor.pdbqt → Why: Crystal PDBs lack H.

    line 78
  2. Very specific:

    Wrong: Default dssp binary name → Right: Pass dssp='mkdssp' to DSSP() → Why: Newer installs only provide mkdssp

    line 84
  3. Distinctive:

    Keep code comments minimal and functional

    line 95

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Protein Structure Analysis — Pipeline Skill (Thin Scaffold)

Overview

Adds tool-selection logic, format-conversion rules, and niche gotchas for protein structure tasks. The agent already knows Biopython/PyMOL syntax — this skill prevents common parameter and workflow mistakes.

Usage

  • Activate when parsing PDB/mmCIF, computing RMSD, detecting pockets, or converting formats
  • Activate for Ramachandran plots, contact maps, B-factor analysis, or DSSP assignment
  • Activate when preparing structures for downstream docking (PDBQT export)

Core Concepts

SMCRA hierarchy: Structure → Model → Chain → Residue → Atom. Always iterate at the correct level; NMR files have multiple models.

Altloc: Alternate conformations flagged with non-blank code ('A','B'). Filter to one before any geometry calculation.

fpocket output: Writes <basename>_out/ in the current working directory, not next to the input file. Pockets ranked by druggability score (0–1).

Decision Logic

Tool Selection

TaskToolKey consideration
Parse PDB/mmCIFBiopython PDBParser/MMCIFParserAlways pass QUIET=True
RMSD superpositionBio.PDB.SuperimposerRequires equal-length, 1-to-1 atom lists
Binding pocket detectionfpocket CLINeeds clean PDB (no altloc, no HETATM clutter)
Pocket visualizationPyMOL (-cq for headless)byres all within 5 of organic for pocket selection
Contact analysisBio.PDB.NeighborSearch4.0 Å default cutoff; returns atom pairs
Secondary structureDSSP via BiopythonBinary is mkdssp on newer installs
Format: PDB→mmCIFBio.PDB.MMCIFIOLossless for coordinates
Format: PDB→PDBQTobabel -O out.pdbqt -xrAdd -xh for hydrogens first
RamachandranPPBuilder → get_phi_psi_list()Termini return None — must check

RMSD Type Selection

ScenarioAtoms to useNotes
Backbone comparisonCα onlyStandard for fold similarity
Loop flexibilityAll backbone (N, Cα, C, O)Captures local deviations
Binding site comparisonAll-atom within 5 Å of ligandRequires residue selection first
Identical sequencesAll-atomOnly valid for same-length chains

Critical Parameters

ParameterValueWhen to change
NeighborSearch cutoff4.0 Å3.5 for H-bonds, 5.0 for hydrophobic
Superimposer atomsCαAll-atom only for identical sequences
fpocket -m (min alpha spheres)35 (default)Lower to 15 for small/shallow pockets
DSSP binary namemkdsspUse dssp on legacy installs
obabel -xr flagreceptor modeOmit for flexible ligand PDBQT
PPBuilder vs CaPPBuilderPPBuilderCaPPBuilder only for Cα-only traces

Common Mistakes

  • Wrong: Assuming single model in PDB → Right: Always structure[0] or iterate models → Why: NMR ensembles have many models; raw iteration hits unexpected atoms
  • Wrong: Ignoring altloc in geometry → Right: Filter atom.get_altloc() in ('', 'A') → Why: Duplicate atoms corrupt RMSD and dihedral calculations
  • Wrong: All-atom RMSD when backbone intended → Right: Restrict to Cα for fold comparison → Why: Side-chains inflate RMSD and break correspondence across non-identical sequences
  • Wrong: Unequal-length atom lists in Superimposer → Right: Match by residue number, build parallel lists of equal length → Why: set_atoms() requires strict 1-to-1 correspondence
  • Wrong: No hydrogens before PDBQT export → Right: obabel -xh then -xr -O receptor.pdbqt → Why: Crystal PDBs lack H; docking scoring needs them
  • Wrong: Including HETATM/water in backbone calculations → Right: Filter residue.id[0] == ' ' → Why: Heteroatoms and water corrupt phi/psi and backbone RMSD
  • Wrong: math.degrees() on None phi/psi → Right: Check if phi is not None and psi is not None → Why: Chain termini return None; TypeError crashes
  • Wrong: Default dssp binary name → Right: Pass dssp='mkdssp' to DSSP() → Why: Newer installs only provide mkdssp
  • Wrong: Expecting fpocket output next to input → Right: Run from target directory or move output after → Why: fpocket writes to CWD, not input file location
  • Wrong: Forgetting QUIET=True in parser → Right: PDBParser(QUIET=True) → Why: Non-fatal warnings flood stdout and obscure real errors

Response Format

  • Lead with the command or code the user needs — explain after
  • Structure as: confirm inputs → working code → key parameters explained → gotchas
  • One complete working example per task; do not show every alternative
  • Keep code comments minimal and functional
  • Target: 50-100 lines of code with brief surrounding explanation

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.