httk.atomistic.io.cif.cif_writer¶
Functions¶
|
Report whether a value should be written as a CIF loop or sequence. |
|
Write CIF |
Module Contents¶
- httk.atomistic.io.cif.cif_writer.is_sequence(val)[source]¶
Report whether a value should be written as a CIF loop or sequence.
- httk.atomistic.io.cif.cif_writer.write_cif(destination, data, header=None, max_line_length=80)[source]¶
Write CIF
datato a path or open text stream.datais an iterable of(block_name, block)pairs. A block maps data names to scalar values and usesloop_Nkeys to list its loop columns.header, when supplied, is written before the data blocks.- Parameters:
destination (str | os.PathLike[str] | io.TextIOBase) – Filename or open text stream receiving the CIF text.
data (collections.abc.Iterable[tuple[str | None, collections.abc.Mapping[str, object]]]) – Data-block pairs containing scalar data names and loop columns.
header (str | None) – Optional text written before the data blocks.
max_line_length (int) – Maximum preferred line length for emitted values.