httk-io is the file input/output module for httk₂. It provides:
- the
httk.iopackage within the PEP 420 nativehttknamespace, currently a CIF/mCIF parser, reader and writer stack; and - the
httk.handlers.iopackage, which registers the.cifloader withhttk-core's plugin registry so files can be read viahttk.core.load.
Most users should install the httk2
metapackage, which selects a useful set of httk modules:
pip install httk2Install only this module (it depends on httk-core and numpy) with:
pip install httk-ioImporting httk.core discovers httk.handlers.io and registers the .cif
loader. httk.core.load then dispatches on the file extension and returns the
raw parsed CIF data as a (data_blocks, header) tuple:
import httk.core # discovery registers the ".cif" loader
data_blocks, header = httk.core.load("structure.cif")
name, block = data_blocks[0]
print(block["cell_length_a"])Development and release instructions are in the
RELEASING.md guide.