software which writes a .txt file containing the various fields used for
the database search. The MySQL database (named 'cod') has only one table
(named 'data') which is easily updated by uploading the above .txt file.
There are 14 fields in the table defined as :
The 'entry' field starts at 1, and each time a new line is entered in
the 'data' table, 'entry' is incremented by 1.
The 'file' field is a number between 1000000 and 9999999 which is used
for the CIF file retrieving. Note that one CIF may contain several crystal
structure (= several entries). Thus, the CIFs are named between 1000000.cif
and 9999999.cif.
The 'pdf' file is either 1 or 0 if a PDF file exists or not, corresponding
to a CIF file.
The fields 'a', 'b', 'c', 'alpha', 'beta', 'gamma', 'vol' (= volume),
'sg' (= space group) and 'formula' are explicit.
The field 'nel' contains the number of different elements in the chemical
formula. Thanks to this field, searches can be made on strict numbers of
elements (allowing more easily to retrieve binary or ternary compounds).
The field 'text' contains mineral names (if any), authors, reference
and comments. If nothing is found in the CIF, that field contains the word
'unknown'.
COD is essentially a database for finding if your compound structure
is already known, so that the search can be performed on the chemical composition
and for volume and cell parameter ranges.
Below is shown the COD database upload by adding fields in the .txt
file :

Below is the content of the 2 first lines of the first created .txt
file. Each field is enclosed by quotes "etc", and the fields are separated
by the ; character. The line does not contain the 'entry' field, it starts
at the 'file' field.
first line :
"1000000";"0";" 7.8783";" 10.4689";" 16.0680";" 90.000";" 95.147";" 90.000"
;" 1319.90";" 6 ";"P21/n";"C 5.00 H 17.00 O 8.00 N 2.00 P 2.00 Al 1.00"
;"S. PHAN THANH J. MARROT J. RENAUDIN V. MAISONNEUVE [H3N(CH2)5NH3].AlP2O8H,
a One-Dimensional Aluminophosphate"
second line :
"1000001";"0";" 48.4800";" 21.7200";" 10.7400";" 90.000";" 90.000";" 90.000"
;" 11309.10";" 4 ";"P 21 21 21";"C 107.00 H 142.00 O 26.00 N 14.00"
;"Alain Soyer Pristinamycin complex solved using Shake-and-Bake"
etc.
Querying the COD is made by HTML forms and PHP scripts which directly connect
to the MySQL part.
Example of part of PHP simple syntax code for requesting all entries
between volumes vmin and vmax :
$requete = "SELECT * FROM data WHERE vol BETWEEN $vmin and $vmax LIMIT 300";
It means that in the table "data", the field "vol" is searched for values
comprised between vmin and vmax, stopping the search if more than 300 entries
are found.
Updated 17/03/2003