httk.atomistic.io.cif.cif_writer

Functions

is_sequence(val)

Report whether a value should be written as a CIF loop or sequence.

write_cif(destination, data[, header, max_line_length])

Write CIF data to a path or open text stream.

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.

Parameters:

val (object) – Value to classify, treating strings as scalar values.

Returns:

True for iterable non-string values.

Return type:

bool

httk.atomistic.io.cif.cif_writer.write_cif(destination, data, header=None, max_line_length=80)[source]

Write CIF data to a path or open text stream.

data is an iterable of (block_name, block) pairs. A block maps data names to scalar values and uses loop_N keys to list its loop columns. header, when supplied, is written before the data blocks.

Parameters: