SLOTH Documentation

SLOTH Logo

Lazy by design. Fast by default.


SLOTH (Structural Loader with On-demand Traversal Handling) is a high-performance mmCIF parser for structural biology workflows. Built on the C++ gemmi backend, SLOTH performs eager parsing and lazy object construction β€” efficient for both large-scale pipelines and interactive exploration.

Key features:

  • High-speed parsing via the gemmi C++ backend

  • Lazy construction of row and item objects for memory efficiency

  • Pythonic dot-notation access to mmCIF data

  • Pluggable validation system with cross-category support

  • JSON export/import with automatic relationship resolution

from sloth import MMCIFHandler

handler = MMCIFHandler()
mmcif = handler.read("1abc.cif")

print(mmcif.data_1ABC._struct.title[0])
print(mmcif.data_1ABC._atom_site.Cartn_x[0])

Getting Started

Indices and tables