autofragment.io.mmcif

Minimal mmCIF parser for biological partitioning.

This module provides parsing for mmCIF files containing biological structures (proteins, ligands, waters). Requires the gemmi package.

Functions

parse_mmcif(filepath[, add_hydrogens])

Parse an mmCIF file into an MmcifStructure.

Classes

AtomRecord(element, atom_name, coords)

A single atom from the mmCIF file.

MmcifStructure(residues, secondary_segments)

Parsed mmCIF structure.

ResidueRecord(chain_id, res_name, res_seq, ...)

A residue from the mmCIF file.

SecondarySegment(chain_id, start_seq, ...)

A secondary structure segment (helix or sheet).

Exceptions

MmcifParseError

Raised when mmCIF parsing fails.