bio-structural-biology-structure-navigation
БесплатноЗапускает вложенные скриптыНе проверенNavigate the Bio.PDB SMCRA hierarchy (Structure-Model-Chain-Residue-Atom) safely, surfacing the heterogeneity it hides by default. Use when deciding how to…
от lilinji★ 18 звёзд на GitHubОб этом скилле
Version Compatibility
Reference examples tested with: biopython 1.83+
Before using code patterns, verify installed versions match. If versions differ:
- Python:
pip show <package>thenhelp(module.function)to check signatures
If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
Structure Navigation
"Walk the chains, residues, and atoms; pull out the sequence" -> Traverse the Structure-Model-Chain-Residue-Atom (SMCRA) tree, but treat every level as a lossy projection that hides heterogeneity unless asked otherwise.
- Python:
structure[0]['A'][(' ', 100, ' ')]['CA'].coordfor full-tuple direct access
Governing Principle: SMCRA is a convenient tree that HIDES heterogeneity by default
The SMCRA model (Structure > Model > Chain > Residue > Atom) is a readable in-memory tree, but its defaults quietly collapse the very heterogeneity that changes the answer. Five traps recur, and none of them raises an error - the code runs and returns a plausible-looking number computed on the wrong thing.
- A
DisorderedAtomsilently forwards every uncaught call to ONE child - the HIGHEST-OCCUPANCY altloc, not literally altloc 'A'. Soget_atoms(),.coord, distances, clashes, and RMSDs all use a single conformer, invisibly, even when the active site is 60/40 disordered. This is the #1 correctness trap. Enumerate withis_disordered()anddisordered_get_list(); never let both altlocs of one atom enter the same geometric calculation. - The residue id is a 3-tuple
(hetflag, resseq, icode). Naiveresidue.id[1]drops both the hetero flag and the INSERTION CODE, so antibody residues 100, 100A, 100B collapse onto one key;chain[100]works only until an insertion code, a hetero residue, or an altloc residue exists at that number, then raises a KeyError that looks like the residue is missing. Key on the full tuple; reduce toid[1]only for display. - The sequence PPBuilder extracts is the OBSERVED (ATOM-record) sequence with missing-density gaps silently concatenated away - it is NOT the SEQRES/construct/UniProt canonical sequence. A disordered 12-residue loop becomes 12 vanished characters with no marker, so mapping conservation or alignment columns by string position is off-by-many after the first gap. Map through residue NUMBERS (auth_seq_id) or SIFTS, never by string index.
- NMR and multi-state files have multiple
Modelobjects. Iterating chains without first selecting a model conflates conformers;structure[0]silently picks one NMR member and over-claims precision. Ask "how many models and why" first. - mmCIF carries two numbering schemes: auth (matches the paper, has insertion codes, can be negative/gapped) and label (gapless 1..N, no icodes).
MMCIFParserdefaults to auth; flipauth_residues=Falseand residue 100 becomes a different residue. Pick one scheme and stay in it.
Decision: which sequence source
These three "sequences" are routinely conflated; each answers a different question and the wrong one silently misindexes everything downstream.
| Source | What it is | Get it via | Use when | Fails when |
|---|---|---|---|---|
| ATOM / observed | Only residues with modeled coordinates; gaps concatenated away | PPBuilder().build_peptides() then pp.get_sequence() |
Per-atom geometry, contacts, extracting exactly what was resolved | Aligning to UniProt/MSA by string position (gaps shift the frame) |
| SEQRES / declared | Full sequence the depositor says is in the crystal, including unresolved residues | SeqIO.parse(file, 'pdb-seqres') or 'cif-seqres' |
Knowing the true construct length, locating missing loops | Assuming every SEQRES residue has coordinates (it does not) |
| UniProt / canonical | The reference biological sequence (no tags, no engineered mutations) | database-access/uniprot-access + SIFTS residue mapping |
Mapping conservation/domains/mutations onto structure positions | Assuming construct == canonical (tags, point mutations, chimeras differ) |
Decision: residue selection idiom
Filter on the hetflag (id[0]), not the residue name, and know exactly what each idiom keeps and drops.
| Goal | Idiom | Keeps / drops correctly? |
|---|---|---|
| Standard amino acids only | r.id[0] == ' ' |
Correct; drops water, ligands, and modified residues |
| Water | r.id[0] == 'W' |
Correct; water hetflag is 'W', NOT 'H_' - a startswith('H_') water strip MISSES water |
| Ligands and hetero groups | r.id[0].startswith('H_') |
Also catches modified residues (MSE, SEP, PTR) mid-chain - not just free ligands |
| Strip hetero blindly | r.id[0] != ' ' |
DANGEROUS - deletes catalytic metals, cofactors, AND selenomethionine (MSE) out of the chain |
| A specific residue type | r.resname == 'ARG' |
Fine for type queries; never use resname to classify water vs ligand vs standard |
R
Установить bio-structural-biology-structure-navigation в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл bio-structural-biology-structure-navigation?
Navigate the Bio.PDB SMCRA hierarchy (Structure-Model-Chain-Residue-Atom) safely, surfacing the heterogeneity it hides by default. Use when deciding how to handle altloc/DisorderedAtom conformers before a distance or RMSD, indexing residues insertion-code-safe with the full (hetflag, resseq, icode) tuple, choosing the ATOM/observed vs SEQRES/canonical vs UniProt sequence, selecting the right Model for an NMR ensemble, filtering waters/hetero/metals correctly, and reconciling auth vs label numbering. Keywords SMCRA, altloc, DisorderedAtom, insertion code, SEQRES, PPBuilder, auth_seq_id.
Как установить скилл bio-structural-biology-structure-navigation?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл bio-structural-biology-structure-navigation запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic