httk.core.loading

Functions

load(→ Any)

Load filename via the loader registered for its type.

Module Contents

httk.core.loading.load(filename: str, **kwargs: Any) Any[source]

Load filename via the loader registered for its type.

Dispatch strips at most one recognized compression suffix (.gz, .bz2, …) to obtain an inner name, then selects a loader by that inner name’s extension (.cif, .poscar, …) or, failing that, by its exact basename (POSCAR, CONTCAR; case-insensitive). The selected loader always receives the original filename; loaders open it through the datastream layer, which transparently decompresses.