Digital Computer Program for Calculation of Molecular Formulae D. A. USHER, J. ZANOS GOUGOUTAS, and R. B. W O O D W A R D The Chemistry Department, Harvard University, Cambridge, Mass.
b A digital computer program is de-
BRIEF DESCRIPTION O F THE PROGRAM
scribed which calculates all molecular formulae that correspond to a given set of elemental analyses. All formulae are printed that have calculated elemental percentages which, for each element, differ from the experimentally found values by less than any previously specified amount. Provision is made for the inclusion of elements for which no analytical figures have been obtained.
A. Elements with Analyses. Molecular formulae are considered which contain a n integral number (ni) of atoms of the first element. The number of atoms of each succeeding element must then fall within the range
T
HE PROCESS of searching for molecular formulae which are consistent with a given set of elemental percentage compositions and the associated experimental errors is usually a laborious task. Where the number of elements present is large, the relevant “anticomposition” tables simply do not exist, and when several elements thought to be present have no analysis figures, the amount of work entailed in finding even a few possible formulae can be prohibitive. We here give details of a digital computer program, written in FORT R A S , which calculates and prints all possible molecular formulae that correspond, as closely as desired by the operator, to the given elemental percentage composition. At present, two versions of the program are in use; these vary primarily in the Input/Output routines. The first version uses the IBM 1620 computer (minimum core storage 20,000) with the “AFIT improved FORTRAN” ( I ) processor; this version accepts a maximum of 10 different elements in any one search. A compressed deck (250 cards) of this program can be run on any I B N 1620 equipped with card reader and typewriter output. The second version, which is reproduced here, was written for the IBPlI 1620 with FORTRAX 11-D, and with little modification can be run on larger and faster computers such as the IBM 7094. This version a t present accepts a masinium of 8 elements, but the number can be increased when more core storage is available by expanding onlj- the dimension statements.
330
ANALYTICAL CHEMISTRY
where il,, P,, E , are the atomic weight, the found percentage, and the assigned experimental error for the j t h element. Initially nl is set equal to one, and the above range for each element in turn is tested to see whether it contains one or more integers. If this condition is not satisfied, n1 is increased by one and the process is repeated. Eventually, either n L exceeds the highest number to which it is desired to search and the program terminates, or a value of ni is found such that the above range contains a t least one integer for each element. B.Elements without Analyses. The sum of the calculated percentages of all the elements without analyses must lie within the limits [lo0
- z(P,
+ e l ) ] and [loo
- Z(P, -
E,)]
(The summations extend over all elements with analyses.) All combinations of these elements which comply with this restriction are considered. C. Printed Formulae. Only formulae which have a n even number of odd-valenced atoms are printed. D. Unsaturation Number. The unsaturation number is given by
Where n, is the number of atoms having valency Ti, in the molecular formula. DATA INPUT T O THE PROGRAM
Card 1
Format 30H
Data For comments, identification, etc.
Number of elements for which analyses are known; number of elements for which analyses are not known; number of atoms of the first element to which it is desired to test. The remainder of the cards fall in one of two classes. 2
212, I4
If the Analysis Is Known. Card rl Format A2, Symbol of eleF10.5,12 ment (left justified), Atomic Weight, and Valency. Card B Format Experimental 2F5.2 percentage and error. The error will usually be set at the value of the precision of the analysis.
If the Analysis Is N o t Known. Card A as above 30Card B All elements with analyses must precede those without analyses, and the experimental percentage for the first element must exceed its associated error. If C and H are known it will generally be convenient to place them first, in that order. If the percentage of only one element is known, the list of possibilities may, of course, become very large. OUTPUT
The program prints the identification comments, the symbols of the elements entered as data, the experimental percentages, and the allowable errors for each element. Valid formulae are then printed, together with the calculated percentages for every element and, where appropriate, the difference between the calculated and experimental percentages. These figures are truncated after the second decimal place. The molecular weight and the “unsaturation number” follow. The latter entry gives the number of double bonds or rings in the formula found, subject to the following qualifications.
. E
--
0
-*
I
N x
-.. --
Y
VI
-
Y
0
a c
I
m
N yi
- --
Y
+
c
z
z c
c z
z c
7 u
n
K
K
E
7 Y
4
K
a
LL
m m
3
0
c
z c
0
K
-
a
P
0
z
m N
-
--
N m
+
tn m
Y
e
z
" m
3
-Y
4
W
--Y
z*
N
L
-
-
-
Y
-l W
Y
W
N Y,I
W
-
I
Y-
-
*
a
-
Y
Y
P
" -
-
I,
VI
n r
a u
*
l
Y
w a n m c u
0 Z
2
a
Y -3
- - -
Z
-
C W L L
-
m m
-
Y
- -
.
w
-
3
-
Y
a
Y
Y
-
-
Y
m
< I,
p m
" . a * m m m
m
N m
Y
N VI
N m
4 x
- I -
N
-
4 X N
3
N
-
-
a
Y
N XI
I Y,
N 0
0
C
N
..
N
-ti
N
"
.
-
Y J +
C
. . I
-
xI
Y
X
a
3
x
N
- k k
a
->
d
--
I
N 3
Y Y
c 0
w 0
c
01 N
U
I-
c
U
< _I
a
-
.-. a
3
w
m 0
r
K
U 3
a
U.
a
Y -
0
Y
a ?
-a
N VI
0 m
z
-
Y
Y
Y
01 m
I
3 4
K
w
K
m m
.
Y
+
0
-
W 1
Y
m
z c
e U I
E
0
a
0 0
- - - > .. a
0 Y
..
Y
Y
Y
a 3
J
3
i
3 P v1
N
-
Y
I
a
>
*
O
J
Y
n
r
VI J
U
Y
3
3 m
- -
U 3
0
.
3
x
3 2
Y
1 0 e
YI
3
4-
e
U
a
4 J
0
3
3 .J
.
VI
3
> >
1 -
c
K w'
* -C
- -
- . m
u
E
.-
m X
a
z c
3 i
e
I Y 0 -1
-
L
.-
1
N
c
c
e
-
O
J
L
N
c
I,
It
4 7 "
"
-
U
N
L
-
3 Z
Z
c.
L
C 4 K LL
Y
5
m
5
I
a
c 4
c
z
a
z
I
c
z
P
m
u
"
.
4
K w
J
Y
4
K 0
1
-
Z
z
II
0 L
I,
+
E
Y c
a
; 0 L
~
z
i
e
D
e
-
m
N 3
VOL. 37, NO. 3, MARCH 1965
a
331
For the purpose of this program all ionic bonds are treated as c o v a l e n t e.g., the nitrogen atom in an amine salt or a nitroalkane should be regarded &s pentavalent. Each time an atom occurs in a molecule in a valency state two higher than the valency entered as data for that element, one must be added to the computed unsaturation number. When the search is completed, the message SEARCH COMPLETE THROUGH M X is printed, where M is the symbol of the first element, and X is the number through which it was desired to test. A new search may then be initiated by depressing the start button.
MOLECULAR FORMULAE PROGRAM DEMONSTRATION C
H
77.80 .20
6.10 .20
11 77.62 -. 17
10
12 77.81 .Ol
11
13 77.97 .17
12 6.04
N
5.92 -. 17 5.98
-. 1 1
M.W.
0
2 16.45
0 0.00
1 7.56
1 8.63
0 0.00
UNSATURATION
170.21630
8
185.22817
8
200.24004
8
2 15.98
-.05
SEARCH COMPLETE THROUGH C 15 EXAMPLE
Found: C, 77.80; H , 6.10.% The compound probably contains C, H, N, 0. Set limits of C f 0.20; H =k 0.20 (for example), The following cards would be used as input (the letter “b” signifies a blank column) : CARD NO. (Column 1) 1 2
3 4 5 6 7 8
4
(identification card) (Le., 2 elements with analyses; 2 elements without analyses; and will test to C16). Cards for carbon
DEMONSTRATION b2b2bb 15
Cbbb12.0112bb4 77.80b0.20 Hbbbbl.00797bl b6.10b0.20 Nbbbl4.0067bb3 Obbb15.9994bb2
Cards for hydrogen Card for nitrogen Card for oxygen
The Output is given above. This search required 2.2 minutes; the actual calculation time was less than 25 seconds. LITERATURE CITED
(1) Pratt, R. L., A. F. Institute of Technology, Wright-Patterson A. F. Base,
Ohio.
RECEIVEDfor review October 20, 1964. Accepted January 13, 1965. We are p e d to acknowledge support by the ational Science Foundation (D.A.U.) and by the National Institutes of Health (J.Z.G.).
Continuous Titrations with a Tubular MercuryEDTA Electrode W. J. BLAEDEL and R. H. LAESSIG Department o f Chemistry, University of Wisconsin, Madison, Wis.
b A previously reported continuous automated potentiometric titrator with direct readout i s extended to titrations of metal ions with EDTA. The sensor electrode, a tubular platinum electrode, is plated with metallic mercury and serves as indicator electrode for the titrations when the potential is established b y the presence of low concentrations of Hg(ll) in the titration mixture. The present study is confined to the concentration range 0.04 to 0.003M in order to obtain both direct readout and simplicity of operation. The titrator’s performance is evaluated for different metals that are titratable at pH 10 and shows a relative standard deviation of 0.5%. The electrode is not satisfactory for titrations at pH 5. 332
ANALYTICAL CHEMISTRY
T
53706
TUBULAR platinum electrode (TPE) has recently been introduced as an analytical device (5). I t has been adapted for use in a continuous (4)potentiometric titrator (3) that meters a sample stream a t a constant flow rate, and that controls and measures the flow rate of a reagent stream that is kept chemically equivalent to the sample. The flow rate of the reagent stream is then taken to be proportional to the concentration of the sought-for substance in the sample stream. In the present study, the continuous titrator has been adapted to chelometric titrations with EDTA. The theory and application of the mercury-EDTA indicator electrode have been extensively discussed from both a theoretical and experimental point of view by Reilley and Schmidt (14, 15). Additional uses HE
of the mercury electrode as a p M indicator electrode for direct titrations ( I S , I6), for back-titrations (11, I S ) , and for determination of stability constants of metal-EDTA complexes (16, 21, 22) have been reported. Fritz has developed methods utilizing ‘masking agents to increase the specificity of the titration ( 7 ) . Ringbom treats the relationship of the end point break and accuracy of titrations for potentiometric chelometric methods (18). Barnard, Broad, and Flaschka (1) treat the mercury indicator electrode in an extensive review of the applications and uses of EDTA. In a later review (1962), Schmidt considers specifically the applications of the mercury indicator electrode (19). Recently the possibility of automating the potentiometric EDTA titration was considered (20).