International
Tables for Crystallography Volume G Definition and exchange of crystallographic data Edited by S. R. Hall and B. McMahon © International Union of Crystallography 2006 |
International Tables for Crystallography (2006). Vol. G. ch. 5.3, pp. 511-512
Section 5.3.5.2.1.4. Serving a request list
a
International Union of Crystallography, 5 Abbey Square, Chester CH1 2HU, England |
cif2cif will extract a subset of the data items contained in a CIF as specified by a request list, in the manner of QUASAR. The handling of data names specified in the request list is as described in Section 5.3.5.1.3 above, with the following additional feature. The special string data_which_contains: will extract the specified data items from the first data block in which at least one occurs; the block code need not be known in advance.
Some care must be exercised in attempting to extract data from data blocks by context without prior knowledge of the file contents. Consider the following simple example file:
The loop containing _A1 and _B1 cannot be extracted with a request list of the form because _A1 occurs in the first data block encountered; the output from cif2cif in this example will be
The behaviour of the program differs from QUASAR in two other small ways. When the request list forces the output data stream to contain the same data-block header more than once, an error message is posted to the standard error channel and the data-block headers in the output stream are annotated with a comment of the form ` #〈---- duplicate data block'. In this case the output file does not conform to the CIF syntax rules.
When a data name is requested but no matching data item appears in the output file, cif2cif writes an error message to the standard error channel. However, unlike QUASAR, which inserts the requested data name in the output stream with an associated value of ` ?' (for unknown), cif2cif produces no output for the requested data item.