A C language application program interface to CIFLIB [12] has been developed to provide a convenient functional interface to the CIFLIB class library. A reference manual which describes each interface function in detail is available [12].
CIFLIB provides a set of functions which access the error codes generated by those library functions which perform integrity checking. The CIFLIB functions which access and update individual item values return only a single error code. Functions providing read access return only the first error encountered in checking the target item. Similarly, functions providing update access return only the first error encountered in the checking process; however, all of the errors that may be detected during an I/O operation are appended to the warning or error lists maintained for each datablock. Higher level functions, which read and write files and data blocks also append their diagnostic codes to internal error and warning lists. A set of functions has been provided to access and refresh these lists. Functions are also provided to translate individual error codes and to print the contents of an entire data block.
To demonstrate some of the functionality of the C API a dictionary-to-HTML converter application was developed to provide flexible access to the contents of the mmCIF and DDL dictionaries on the World Wide Web . The HTML mmCIF dictionary is organized so that a user can flexibly navigate through the hierarchy of the definitions and between all data item relationships. The first level of presentation is a page of category groups and group descriptions. The contents of each category group can be explored and specific categories within each group can be selected. Each category is presented on a page which includes all of the DDL attributes pertaining to the category description. From within the category presentation, individual data items can be selected. The data item presentation includes all of the relevant DDL attributes and selections for all related data items. Each of these levels of presentation is illustrated in Figures 4 - 7.
Figure 4:
The CIF dictionary-to-HTML screen showing the
category group organization of the dictionary.
Figure 5:
The CIF dictionary-to-HTML screen showing the
categories in the category group atom_group.
Figure 6:
The CIF dictionary-to-HTML screen showing the
description of the category atom_sites.
Figure 7:
The CIF dictionary-to-HTML screen showing a
portion of the description of an individual data item.