checkCIF procedure

PROC-NAME: CHEMS01 Type_1

PURPOSE: To check that the _chemical_formula_sum is properly constructed. i.e. C H followed by alphabetic.

PROCEDURE:

Read the _chemical_formula_sum and check that the formula is in the order, carbon count, hydrogen count followed by the other elements in alphabetic order.
IF _chemical_formula_sum contains an invalid character then issue ALERT B
   "Alert B The sum formula contains an invalid character."
IF _chemical_formula_sum contains more than one moiety then issue ALERT A
   "Alert A The sum formula contains more than one moiety."
IF _chemical_formula_sum contains an invalid element symbol then issue ALERT A
   "Alert A The sum formula contains an invalid element symbol."
IF _chemical_formula_sum contains elements in the wrong order then issue ALERT B
   "Alert B The sum formula contains elements in the wrong order.
Sequence must be C, H, then alphabetical for organics or metal-organics."

OR
   "Alert B The sum formula contains elements in the wrong order.
Sequence must alphabetical for inorganics."

The _chemical_formula_sum must contain just one sequence of elements (i.e. not separated into moieties) in the order C, H, then alphabetical. Do not use any special formatting characters, such as subscripts (e.g. C10 H20 is correct, C~10~ H~20~ is not). There is no space between an element and its count, but there is a space before the next element. Enclose the string in quotes.

Example:
_chemical_formula_sum    'C18 H19 N7 O8 S'


Follow IUCr Journals
Sign up for e-alerts
Follow IUCr on Twitter
Follow us on facebook
Sign up for RSS feeds