This skill reads, writes, downloads, and converts macromolecular structure files with Biopython Bio.PDB, treating format choice and numbering scheme as decisions rather than defaults. mmCIF (PDBx) is the canonical modern format; the legacy fixed-column PDB format is frozen and cannot represent large assemblies (its hard limits are ~62 chains and 99,999 atoms), so big complexes exist only as mmCIF. Bio.PDB parses permissively and silently drops metadata, anisotropic B-factors, and alternate conformers, so a successful parse is not proof of data integrity. The skill covers auth_ vs label_ numbering, reading metadata through MMCIF2Dict, downloading from RCSB, and obtaining the biological assembly separately from the deposited asymmetric unit.
pip install biopython
# Optional, for assembly generation / large-structure fidelity:
pip install gemmi
Tell the AI agent what the task is: - "Download structure 4HHB from RCSB as mmCIF" - "Parse this mmCIF and list the chains and residue count" - "Why do the residue numbers not match the paper?" - "Get the biological assembly for this entry, not the asymmetric unit" - "Extract the resolution and R-free from this mmCIF"
"Parse 1crn.pdb and report how many models, chains, and atoms it has"
"Load this mmCIF with author numbering so the residue ids match the publication"
"This structure downloaded as a .bcif file -- read it into Bio.PDB"
"Download PDB 4HHB as mmCIF into the current directory"
"Fetch the biological assembly for 1ABC, since the deposited file is only the asymmetric unit"
"Download these ten entries as mmCIF and tell me which failed"
"Save only chain A, protein residues, to a new PDB file"
"Convert this large mmCIF to PDB and warn me if chains or serials would overflow"
"Write this structure back out as mmCIF preserving the multi-character chain ids"
"What is the resolution and experimental method of this structure?"
"Bio.PDB says the resolution is None -- get it from the mmCIF dictionary instead"
"Report R-work and R-free for this entry"
.bcif).MMCIFParser defaults to auth_residues=True/auth_chains=True; flipping to label numbering makes residue 100 a different residue, which is the classic "selection points at the wrong residue" bug.structure.header is thin; read resolution, method, and R-free from MMCIF2Dict (values are lists of strings, index [0]).-assembly1.cif.gz file from RCSB or use gemmi's transform_to_assembly.QUIET=False and inspect the PDBConstructionWarnings; a permissive parse can hide a discontinuous chain or a numbering gap.