|
|
The Crystallographic Interchange File (CIF) format is increasingly used
for data transfer - and some journals now provide templates for authors
to complete when submitting data with their manuscripts.
Although sometimes touted as a "human-readable" format, the CIF format
is actually quite complex, and if errors are to be avoided, users should
be aware of the detailed formatting rules. CrystalMaker is quite fussy
in this regard because, unlike many other programs, CrystalMaker can
parse different text formats "on the fly", auto-detecting the file type
and generating structures, bonds and polyhedra automatically.
Common CIF Errors
1. Data tags with no matching data item(s).
Each CIF data tag (the string beginning with an "_" underscore character)
must have a data item (either a number or a character string) associated with it, e.g.,
| _publ_requested_coeditor_name |
|
Wrong! |
| _publ_requested_coeditor_name |
? |
ok |
| _publ_requested_coeditor_name |
'joe bloggs' |
ok |
2. Data strings not correctly delimited.
Strings containing spaces are interpreted as multiple items, unless they are enclosed within
quotes (for a string on a single line) or semicolons (multi-line string), e.g.,
| _publ_requested_journal |
J. Am. Chem. Soc. |
Wrong! |
| _publ_requested_journal |
'J. Am. Chem. Soc.' |
ok |
_publ_contact_author
Dr B A D Cif
University of Somewhere
Big City
Neverland
|
|
Wrong! Multi-line string needs to be delimited. |
_publ_contact_author
;
Dr O K Cif
University of Somewhere
Big City
Neverland
;
|
|
ok |
3. Loops with no data tags and/or data items. Each cif loop_
construct must be followed by one or more data tags, followed by a series
of data items, e.g.,
loop_
'x, y, z'
'-x, -y, -z'
|
|
Wrong! No data tag |
loop_
_symmetry_equiv_pos_as_xyz
'x, y, z'
'-x, -y, -z'
|
|
ok |
4. Loops with inconsistent data tags and/or data items. The number
of data items must be an exact multiple of the number of data tags, e.g.,
loop_
_atom_site_label
_atom_site_fract_x
_atom_site_fract_y
_atom_site_fract_z
O1 0.1786 0.40597 0.90810
O2 0.2138 0.14537 0.39271 Uij
O3 0.1552 0.17296
|
|
Wrong! Extra data item for 'O2' line; missing item at line 'O3' |
loop_
_atom_site_label
_atom_site_fract_x
_atom_site_fract_y
_atom_site_fract_z
O1 0.1786 0.40597 0.90810
O2 0.2138 0.14537 0.39271
O3 0.1552 0.03600 0.17296
|
|
ok |
Official CIF Validation
The International Union of Crystallography
(IUCr), which has developed the CIF format, provides a free
vcif
program to check the validity of CIF files. We strongly recommend that
regular CIF users try out this program.
How to install vcif on a Mac
-
You need to have the (free) Mac OS X developer tools
installed, so that the source code can be compiled using
the gcc compiler.
(The developer tools are provided with Mac OS X,
on a separate CD from the main installation disc.)
- Download
the source code as a "compressed tar archive for Unix".
-
Once the archive has been expanded, you should have a
folder entitled vcif on your Mac.
-
Launch the Terminal program (/Applications/Terminal.app)
and set the directory to the vcif folder:
Cool Tip! type cd followed by a space, then
drag the vcif folder into the Terminal window;
its directory path is printed at the end of the line, so if you
just hit the return key, your directory path will be correctly set!)
-
In the Terminal, type:
make
followed by the return key. If all goes well, the files will be
compiled, resulting in a Unix executable entitled
vcif.
|
|
How to use vcif
-
Ensure that the Terminal application is open, and that
the directory is set to the vcif folder (see "Cool Tip"
above).
-
From the Finder, drag your CIF file into the vcif folder
-
In the Terminal, type the command ./vcif followed
by a space, then the name of your CIF file (case sensitive!)
and then press return. For example, if your CIF file is
called myfile.cif, then type:-
./vcif myfile.cif
N.B., it is best to avoid spaces or special characters
when using Unix filenames!
-
If all goes well, the vcif program will scan through
your file and print any errors in the terminal window, e.g.,
ERROR: Unexpected string (min) at line 87
ERROR: Number of loop elements not multiple of packetsize at line 273
You can then open your CIF file in a text editor
(we recommend BBEdit)
and go to the specified line numbers to correct the errors.
|
|
|