[IUCr Home Page] [CIF Home Page] [CBF/imgCIF] [CBFlib]
| IUCr Home Page | CIF Home Page | CBF/imgCIF | CBFlib |
| NOTICE | doc/GPL | doc/LGPL | imgCIF dictionary |
| Click Here to Make a Donation |

CBFlib

README

Information for CBFlib 0.7.9.1 release of 24 January 2008

by
Paul J. Ellis
Stanford Synchrotron Radiation Laboratory

and
Herbert J. Bernstein
Bernstein + Sons

© Copyright 2006, 2007, 2008 Herbert J. Bernstein


YOU MAY REDISTRIBUTE THE CBFLIB PACKAGE UNDER THE TERMS OF THE GPL.

ALTERNATIVELY YOU MAY REDISTRIBUTE THE CBFLIB API UNDER THE TERMS OF THE LGPL.


Before using this software, please read the
NOTICE
for important disclaimers and the IUCr Policy on the Use of the Crystallographic Information File (CIF) and other important information.

Work on imgCIF and CBFlib supported in part by the U. S. Department of Energy (DOE) under grants ER63601-1021466-0009501 and ER64212-1027708-0011962, by the U. S. National Science Foundation (NSF) under grants DBI-0610407, DBI-0315281 and EF-0312612, the U. S. National Institutes of Health (NIH) under grants 1R15GM078077 from NIGMS and 1R13RR023192 from NCRR and funding from the International Union for Crystallography (IUCr). The content is solely the responsibility of the authors and does not necessarily represent the official views of DOE, NSF, NIH, NIGMS, NCRR or IUCr.


CBFLIB is a library of ANSI-C functions providing a simple mechanism for accessing Crystallographic Binary Files (CBF files) and Image-supporting CIF (imgCIF) files. The CBFLIB API is loosely based on the CIFPARSE API for mmCIF files. Starting with this release, CBFLIB performs validation checks on reading of a CBF. If a dictionary is provided, values will be validated against dictionary ranges and enumerations. Tags missing under parent-child relationships or category key requirements will be reported. CBFlib provides functions to create, read, modify and write CBF binary data files and imgCIF ASCII data files.

Installation

CBFLIB should be built on a disk with at least 350 megabytes of free space, for a full installation with complete tests. Read the instructions below carefully, if space is a problem.

CBFlib_0.7.9.tar.gz is a "gzipped" tar of the code as it now stands.

In addition, CBFlib_0.7.9_Data_Files_Input.tar.gz (13 MB) is a "gzipped" tar of the input data files needed to test the API, CBFlib_0.7.9_Data_Files_Output.tar.gz (34 MB) is a "gzipped" tar of the output data files needed to test the API, and, if space is at a premium, CBFlib_0.7.9_Data_Files_Output_Sigs_Only.tar.gz (1KB) is a "gzipped" tar of only the MD5 signatures of the output data files needed to test the API. Place the CBFlib_0.7.9.tar.gz file in the directory that is intended to contain up to 4 new directories, named CBFlib_0.7.9 (the "top-level" directory), CBFlib_0.7.9_Data_Files_Input and either CBFlib_0.7.9_Data_Files_Output or CBFlib_0.7.9_Data_Files_Output_Sigs_Only. If you have wget on your machine, you only need to download the source tarball. If you do not have wget, you will need to download all the tarballs into the same directory

Uncompress CBFlib_0.7.9.tar.gz with gunzip and unpack it with tar:

     gunzip CBFlib_0.7.9.tar.gz
     tar xvf CBFLIB_0.7.9.tar

To run the test programs, you will also need Paul Ellis's sample MAR345 image, example.mar2300, Chris Nielsen's sample ADSC Quantum 315 image, mb_LP_1_001.img, and Eric Eikenberry's SLS sample Pilatus 6m image, insulin_pilatus6m, as sample data. In addition there are is a PDB mmCIF file, 9ins.cif, and 3 special test files testflatin.cbf, testflatpackedin.cbf and testrealin.cbf. All these files will be dowloaded and extracted by the Makefile from CBFlib_0.7.9_Data_Files_Input. Do not download copies into the top level directory.

After unpacking the archives, the top-level directory should contain a makefile:

  Makefile  Makefile for unix

and the subdirectories:

  src/  CBFLIB source files
  include/  CBFLIB header files
    
  bin/  Executable example programs
  doc/  Documentation
  examples/  Example program source files
  html_images/  JPEG images used in rendering the HTML files
  lib/  Compiled CBFLIB (libcbf.a) and FCBLIB (libfcb.a) libraries
  m4/  CBFLIB m4 macro files (used to build .f90 files)
  mswin/  An MS Windows CodeWarrior project file
  pycbf/  Jon Wright's Python bindings

and additional Makefiles for other systems. All the makefiles are created from m4/Makefile.m4. The current set of Makefiles are Makefile_LINUX, Makefile_LINUX_gcc42, Makefile_OSX, Makefile_OSX_gcc42, Makefile_AIX and Makefile_MINGW. Edit the closest approximation to your system, and then copy that variant to Makefile. For instructions on compiling and testing the library, go to the top-level directory and type:

     make

Once you have a properly configure Makefile, compile and test the package with

     make tests

or, if space is at a premium, with

     make tests_sigs_only

Please refer to the manual doc/CBFlib.html for more detailed information.



Updated 30 December 2007.