MMCIFParser — File Parsing

class sloth.mmcif.parser.MMCIFParser[source]

Bases: BaseParser

High-performance mmCIF parser using gemmi backend with SLOTH’s elegant API.

This parser uses gemmi’s optimized C++ backend for fast parsing while maintaining the exact same API as the original SLOTH parser.

__init__(categories=None)[source]

Initialize the MMCIFParser with gemmi backend.

Parameters:

categories (Optional[List[str]]) – Optional list of categories to parse (for performance)

parse(file_path)[source]

Parse mmCIF file using gemmi backend but return SLOTH data structures with the same elegant API.

Parameters:

file_path (Union[str, Path]) – Path to mmCIF file

Returns:

MMCIFDataContainer with SLOTH’s elegant API

Return type:

MMCIFDataContainer