3.6.1. horton.io.cif – Crystalographic Information File format

horton.io.cif.dump_cif(filename, data)

Write a CIF file

Arguments:

filename
The name of the new CIF file.
data
An IOData instance. Must contain: cell, coordinates, numbers. May contain title.
horton.io.cif.iter_equiv_pos_terms(comp)

Iterate over the terms in a component from the equiv_pos_as_xyz table

Arguments:

comp
A string with one or more terms, e.g. ‘x’, ‘-y’, ‘y+1/2’, …

Yields: 2-tuples of the form (sign, sybol). For example, the input ‘y-1/2’ will yield to 2-tuples: (+1, ‘y’), (-1, ‘1/2’)

horton.io.cif.equiv_pos_to_generator(s)

Convert a equiv_pos_as_xyz string to a generator matrix

Arguments:

s
A single line from the equiv_pos_as_xyz table

Returns: a (3,4) array where the first three columns contain the rotation matrix and the last column is the translation vector.

horton.io.cif.load_cif(filename, lf)

Load a CIF file

Arguments:

filename
The name of an existing CIF file
lf
An instance of the LinalgFactory class. (Ignored here)

Returns a dictionary with: title, coordinates, numbers, symmetry, links, cell.