About PyCifRW

PyCIFRW provides basic support for reading and writing CIF (Crystallographic Information Format) files using Python. It was developed at the Australian National Beamline Facility (ANBF), run by the Australian Synchrotron Research Program (ASRP), as part of a larger project to provide CIF input/output capabilities for data collection. It is currently (Nov 2004) under active development and testing.

Acknowledgements and Credit

In order to implement the CIF grammar specification, PyCifRW uses the Yapps2 parser generator developed by Amit Patel and generously released to the wider community. The remainder of PyCifRW was written by James Hester.

Downloading

The package is packed in a .tar file, which can be downloaded from here. File "INSTALLATION" contains installation instructions.

Conformance

The IUCr version 1.1 working specification was used as a reference.

PyCifRW has been tested on the IUCr sample CIF trap files, and fails or successfully reads as it is supposed to for all 11 tests, except for test 5, which contains the no longer acceptable vertical tab and form feed characters. CIF output conforms to the standard, including line length restrictions.

Supported Platforms

PyCIFRW is written entirely in Python. While this makes parsing of large CIF files rather slow, it will run wherever Python runs. It has been tested on Unix (Linux,Solaris) and Windows 95/98 under Python2.2. Macintoshes will probably have trouble with the Unix-style line termination of the .py files.

Files

PyCiFRW consists of the following files:
CifFile.py Defines the CifFile module for Python
CifFile.nw Noweb file from which CifFile.py is obtained
CifFile.htmlProgramming notes for CifFile derived also from CifFile.nw
YappsCifParse.py Cif parser generated by Yapps2
YappsCifParse.html Programming notes for the grammar input to Yapps2
YappsCifParse.nw Noweb file
Makefile How to derive .html and .py files from .nw files
yappsrt.py Runtime support for Yapps parser (part of Yapps2 distribution)