International
Tables for
Crystallography
Volume G
Definition and exchange of crystallographic data
Edited by S. R. Hall and B. McMahon

International Tables for Crystallography (2006). Vol. G, ch. 5.4, pp. 530-531

Section 5.4.10. How to write a CIF

H. J. Bernsteina* and S. R. Hallb

aDepartment of Mathematics and Computer Science, Kramer Science Center, Dowling College, Idle Hour Blvd, Oakdale, NY 11769, USA, and bSchool of Biomedical and Chemical Sciences, University of Western Australia, Crawley, Perth, WA 6009, Australia
Correspondence e-mail:  yaya@bernstein-plus-sons.com

5.4.10. How to write a CIF

| top | pdf |

Writing a CIF usually is simpler than reading an existing one. An example of a CIF-writing program is shown in Fig. 5.4.10.1[link]. This example is intentionally trivial. The created CIF test.new is shown in Fig. 5.4.10.2[link]. Note that command dict_ causes all output items to be checked against the dictionary cif_core.dic. Unknown names are flagged in the output CIF with the comment '#< not in dictionary'. This applies to both looped and single data items.

[Figure 5.4.10.1]

Figure 5.4.10.1 | top | pdf |

Sample program to create a CIF.

[Figure 5.4.10.2]

Figure 5.4.10.2 | top | pdf |

Sample CIF created by the example program of Fig. 5.4.10.1[link].

A more complex example of writing a CIF is given in the program cif2cif available with the CIFtbx release. A similar program that reads a CIF and writes an XML file is cif2xml, also available with the CIFtbx release.








































to end of page
to top of page