/mmcif-tools:mmcif-toolsfrom mmcif-tools
Selects, deletes, edits, converts, and inspects mmCIF structure files from the Protein Data Bank, AlphaFold DB, or modelling programs. Useful for manipulating chains, residues, atoms, ligands, waters, renumbering, renaming, format conversion, sequence extraction, and file validation.
Ships in mmcif-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
mmcif-tools is a set of 54 small commands, mmcif_<name>, that select, delete, edit, convert and inspect mmCIF files, in the style of pdb-tools. Each does one job: it reads one file (or standard input) and writes to standard output, so tools chain with pipes. They need Python 3.9 or newer and nothing else; if the commands are missing, install them with python -m pip install mmcif-tools.
mmcif-tools lists every tool with one line each; mmcif-tools reference prints all the help texts.mmcif_<name> --help prints a tool's usage and examples. Read it before using a tool for the first time.-<value> (-A,B for chains, -1:10,20:30 for residue ranges, -HOH for a residue name), and at most one file. Files may be gzip-compressed.ERROR!!. Exit status: 0 on success; 1 when the input cannot be processed or a check fails (mmcif_validate, mmcif_chkensemble); 2 for a mistake on the command line, followed by the usage. Some refusals are deliberate: mmcif_topdb refuses a structure the PDB format cannot hold. Read the message rather than retrying.mmcif_info, mmcif_wc, mmcif_validate, mmcif_gap, mmcif_chkensemble and mmcif_blocks print their report as one JSON object with --json: parse that rather than the text.mmcif_fetch 1brs > 1brs.cif # a PDB entry from the RCSB
mmcif_fetch AF-P69905-F1 > hba.cif # an AlphaFold DB model
mmcif_selchain -A,D 1brs.cif > ad.cif # keep chains A and D
mmcif_delentity -non-polymer,water in.cif # remove ligands, ions and waters, keep modified residues
mmcif_selaltloc in.cif # one conformer per atom (highest occupancy)
mmcif_reres -1 in.cif # author residue numbers from 1, label numbers unchanged
mmcif_tofasta -multi,seqres in.cif # the deposited sequence of each chain
mmcif_topdb in.cif > out.pdb # PDB format, for programs that need it
mmcif_frompdb in.pdb > out.cif # back to mmCIF, with label identifiers
mmcif_assembly in.cif > assembly.cif # biological assembly 1 (mmcif_info lists them)
mmcif_cat -_atom_site.auth_asym_id,auth_seq_id,label_comp_id in.cif # columns as tab-separated text
mmcif_info in.cif # title, method, resolution, entities, assemblies
mmcif_info --json in.cif # the same, as JSON
mmcif_wc in.cif # numbers of models, chains, residues and atoms
mmcif_validate in.cif # syntax, coordinates, links between tables
mmcif_rebuildmeta in.cif # add the tables a file with atoms only lacks
A template for structure prediction (one protein chain, no ligands or waters, one conformer):
mmcif_selchain -A in.cif | mmcif_delentity -non-polymer,water | mmcif_selaltloc > template.cif
In Python, the same tools run in the same process, with the same results:
import mmciftools
text = mmciftools.pipeline('selchain -A', 'delentity -non-polymer,water', path='in.cif')
info = mmciftools.report('info', 'in.cif') # a dict, from --json
mmciftools.run('reres', '-1', input=text, output='out.cif')
run() and pipeline() raise mmciftools.ToolError (with message and status) when a tool fails.
auth_asym_id, auth_seq_id), as viewers and papers do; --label switches a tool to the PDB's label ones. Renumbering changes the author numbers only, so label_seq_id, the position in the sequence that structure prediction programs read, stays right.mmcif_delentity (or mmcif_selentity), not mmcif_delhetatm: HETATM records include modified residues such as selenomethionine inside chains, which the HETATM tools remove too.mmcif_assembly, mmcif_merge and mmcif_mkensemble make new chains that the other tables do not describe.mmcif_validate does not check the file against the PDBx/mmCIF dictionary. BinaryCIF and CIF 2.0 files are not read.diff in.cif out.cif shows exactly what a tool changed.mmcif_wc on the input and the output to check the numbers of chains, residues and atoms.mmcif_validate on the final file; its exit status is 1 if it finds errors.mmcif-tools is free research software, and its authors rely on citations. When you use it in a task:
mmcif-tools cite prints. Add it to their text or references only if they agree.mmcif-tools --version) helps others reproduce the work.Written for mmcif-tools 0.4.1; mmcif-tools --version shows the version installed.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
mmcif, pdb, structural-biology, protein-structures, bioinformatics
npx claudepluginhub matteo-cagiada/mmcif-tools --plugin mmcif-toolsOther plugins' skills for the same job