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.6, pp. 555-556

Section 5.6.5.2.  makecbf

P. J. Ellisa and H. J. Bernsteinb*

a Stanford Linear Accelerator Center, 2575 Sand Hill Road, Menlo Park, CA 94025, USA, and bDepartment of Mathematics and Computer Science, Kramer Science Center, Dowling College, Idle Hour Blvd, Oakdale, NY 11769, USA
Correspondence e-mail:  yaya@bernstein-plus-sons.com

5.6.5.2. makecbf

| top | pdf |

makecbf is a good example of how to use many of the lower-level CBFlib functions. An example MAR345 image can be found at http://smb.slac.stanford.edu/~ellis/ and on the CD-ROM accompanying this volume. To run makecbf with the example image, type:[Scheme scheme4]

The typical code fragment from makecbf.c shown in Fig. 5.6.5.2[link] creates the DIFFRN_FRAME_DATA category.

[Figure 5.6.5.2]

Figure 5.6.5.2 | top | pdf |

Code fragment to illustrate the creation of the DIFFRN_FRAME_DATA category.

The program img2cif is an extended version of makecbf that allows the user to choose the details of the format of the output CBF. img2cif has the following command-line interface:[Scheme scheme126]-i takes the name of the input image file in MAR300, MAR345 or ADSC CCD detector format. If no input_image file is specified or is given as `-', an image is copied from stdin to a temporary file. -o takes the name of the output CIF (if BASE64 or quoted-printable encoding is used) or CBF (if no encoding is used). If no output_cif is specified or is given as `-', the output is written to stdout. -c specifies the compression scheme (packed, canonical or none; the default is packed). -m selects MIME (Freed & Borenstein, 1996[link]) headers within binary data value text fields. The default is headers for CIFs, no headers for CBFs. -d specifies the use of digests. The default is the MD5 digest (Rivest, 1992[link]) when MIME headers are selected. -e specifies one of the standard MIME encodings: BASE64 (the default) or quoted-printable; or a non-standard decimal, hexadecimal or octal encoding for an ASCII CIF; or `none' for a binary CBF. -b specifies the direction of mapping of bytes into words for decimal, hexadecimal or octal output, marked by `>' for forwards or `<' for backwards as the second character of each line of output, and in # comment lines. The default is backwards.

References

First citation Freed, N. & Borenstein, N. (1996). Multipurpose Internet Mail Extensions (MIME) part one: format of internet message bodies. RFC 2045. Internet Engineering Task Force. http://www.ietf.org/rfc/rfc2045.txt .Google Scholar
First citation Rivest, R. (1992). The MD5 message-digest algorithm. RFC 1321. Internet Engineering Task Force. http://www.ietf.org/rfc/rfc1321.txt .Google Scholar








































to end of page
to top of page