Rapid, memory-conserving, compiler-level search algorithm for

Oct 1, 1973 - Rapid, memory-conserving, compiler-level search algorithm for mixture spectra. Thomas L. Isenhour. Anal. Chem. , 1973, 45 (12), pp 2153â...
0 downloads 0 Views 247KB Size
1I AIDS FOR ANALYTICAL CHEMISTS

I

Rapid, Memory-Conserving, Compiler-Level Search Algorithm for Mixture Spectra Thomas L. lsenhour Department of Chemistry, University of North Carolina, Chapel Hill. N . S . 27574

The recent development of large spectral data compilations in computer compatible form has led to the development of various specific and general search systems (112). This article presents a rapid, memory-conserving search algorithm for mixture spectra which can be conveniently coded a t the compiler level. The system is designed to find all possible components of an unknown mixture by determining whether a certain specified number of major peaks from each standard are contained in the unknown. (Of course, only components included in the standard set will be identified.) Computer memory is minimized by storing the N most intense peaks of each standard as an array in decreasing order of intensity. (N may have any value but would typically be between 3 and 10.) For example, in the powder diffraction data (13) used to develop the method, the d spacings in Angstroms of ilmenite (FeO.TI02) are reported as 2.74 (loo), 1.72 (loo), and 2.54 (%), where the value in parentheses is relative intensity with the most intense peak being 100. When a value of 3 is used for N, the standard array for this compound is 274,172,254. To store M standards then requires M X N variables arranged as an M by N dimensioned array. This storage arrangement allows a relatively large number of standard or reference spectra to be stored in memory, thereby avoiding slower operations with magnetic tape or disk or punched card devices. The unknown is represented by an expanded array which has a variable for each possible resolution unit. In the powder diffraction example where reflections produce values of d ranging from 1.00 to 10 zk 0.01 A, 901 locations are required for the unknown. In the simplest approach, a “one” is stored in each element corresponding to a peak location and a “zero” in the remaining locations. The actual comparison is made by “computing” the match of each standard to the unknown, rather than by the more common peak by peak logical comparison of each standard to the unknown. Each element of the array defining a given standard spectrum is used as a subscript for the unknown spectrum and the sum of referenced peaks accumulated, ie., for standard j if L is the unknown array, LL the matrix of standard spectra, and K the match total D. H . Anderson and G. L. Covert, Anal. Chern.. 39, 1288 (1967) D . S. Eriey, Anal. Chem.. 40, 894 ( 1 9 6 8 ) . D . S . Erley, Appl. Speclrosc.. 25, 200 (1971). F. E . Lytle. Anal. Chem.. 42, 335 (1970) E. A. Knock, I . C . Smith. D. E. Wright, and R . G. Ridley. Anal. Chem.. 42, 1516 ( 1 9 7 0 ) . P. C. Jurs. Ana/. Chern.. 43, 364 (1971). H . S. Hertz, R . A. Hites, and K . Biemann. Anal. Chem., 43, 681 (1971). L. E. Wangen. W . S. Woodward. and T. L. Isenhour, Ana/. Chem.. 43, 1605 ( 1 9 7 1 ) . F E. Lytle. Anal. Chern.. 43, 1334 (1971) R. W . Sebesta and G. G. Johnson. J r , Anal. Chem.. 44, 260 (1972). S. R . Heller, Anal. Chem.. 44, 1951 (1972) S. L. Grotch, Anal. Chem., 45, 2 (1973). J. V . Smith, E d . . “Index to the X-Ray Powder Data File.” American Society for Testing Materials Baltimore. 1959, p 262.

or in FORTRAN

K ( J )= 0 DOlOZ=l,N 10 K ( 4 = K ( J ) + L(LL(J,I)) (For machines where subscripting subscripted variables is not allowed L(LL(J,I)) may be generated by setting MM = LL(J,Z) and using L(MM).) If Kj equals N, then all peaks of spectrum j are contained in the unknown and compound j is a possible component of the unknown. Hence, after the standards and unknown are read in, a complete search algorithm in FORTRAN is

DO20J=l,M

KfJ)= 0 DOlOZ=l,N 10 K ( 4 = K ( J ) + L(LL(J,I)) IF(K(4.EQ.N) WRITE (6,9)J 9 FORMAT(lX,I5,’ HAS ALL MATCHES’) 20 CONTINUE Possible components of the unknown spectrum so identified may then be considered by the experimenter. Computation time is virtually negligible for standard spectra sets of several hundred to a few thousand compounds. (This is also the range of sets which can be stored in core by moderate-sized machines.) For large values of N , a slightly more sophisticated version of the algorithm stops computation whenever any peak fails to match.

DOZOJ=l,M DOlOZ=l,N IF(LGL(J,O).XE.l)GO TO 20 10 CONTINUE WRITE (6,9)J 9 FORMAT(1X,I5,’ HAS ALL MATCHES’) 20 CONTINUE Or, alternatively, the number of matches from the most intense peak down to the first mismatch may be given by the following code. (Remember that the peaks of standards are stored in decreasing order of intensity.) DO20J=l,M K(J)= 0 DOlOZ=l,N K ( 4 = K ( 4 + L(LL(J,O) IF(K(4.LT.I) GO TO 20 10 CONTINUE 20 WRITE(6,g)J, K ( J ) 9 FORMAT(lX,I5,’ HAS’,I5,’ MATCHES’)

ANALYTICAL C H E M I S T R Y , VOL. 45. NO. 12, O C T O B E R 1973

2153

A cut off for the minimum number of matches allowed could also be added. A noise level may be added to the unknown peaks by placing “ones” in locations adjoining the measured unknown peaks. Note that this increases neither the storage requirement nor the compute time. A more sophisticated approach is to give a noise distribution to the unknown peaks such as “ones” for the reported values, “one-half,” on each side of reported values, and “zeros” for all others. In conclusion, the described algorithm may be simply coded in a compiler language, is conservative in memory use, and is still quite rapid in determining which standard spectra can possibly be contained within an unknown

mixture. The same algorithm has also been implemented as a first filter for unknown mass spectra.

ACKNOWLEDGMENT The author wishes to acknowledge the Department of Chemistry, Colorado State University, Ft. Collins, Colo., 80521, where he was visiting professor when this work was done. Further, Tom Copeland and Ken Olson are acknowledged for their help and comments. Received for review February 20, 1973. Accepted April 13, 1973. The financial support of the National Science Foundation is gratefully acknowledged.

Improved Separatory Funnel Narbik A. Karamian Division of Research Services, Environmental Services Branch, National institutes of Health, Bethesda, Md. 20014

There are various methods for the extraction and separation of two liquids present in two distinct layers. The simplest method is to decant one layer from the other. However, this is not a very accurate and effective method because it is not possible to obtain an exact separation of one layer from another and the procedure is also time consuming. Conventional laboratory type separatory funnels are an improvement over decantation methods with regard to the exactness of separation; but the use of such devices is limited to the removal of the lower layer first. Partial contamination of the upper layer during draining also occurs. however, since it intermixes in the stem or on the funnel wall with residual amounts of the lower layer. The use of separatory funnels in chemical and biological processes is obviously widespread. It is frequently important, for example, to analyze solutions that contain elements in the form of impurities, such as trace metals, that are present in concentrations of parts per billion or lower. This analysis can be conveniently carried out by concentrating the impurities by a solvent extraction step, then measuring and identifying them by means of chemical reactions and instrumental analyses. For example, a trace metal solvent extraction is generally carried out by adding a chelating agent that effectively complexes the impurities. A buffer solution is also added and the chelated substances are then extracted from the large solution volume into a small solvent volume. If the solution and the volume of solvent are very carefully controlled, the impurities can be quantitatively concentrated from parts per billion or lower, by a factor of lo3 or more. The analysis is completed by removing the solvent layer containing the extracted chelated impurities from the solution and then measuring and identifying the impurities within it. The devices of this invention are distinct improvements on the design of the separatory funnel and allow rapid, nontedious, multiple extraction and separation of the sample and selective withdrawal of either of two immiscible liquid layers. Figure 1 illustrates a separatory flask container (10) with a stopper closure (11) a t the upper end. At the lower portion (12), the container section connects with a fitted plug (13), which maintains and seals against any leakage around the washer (14). A lock nut device (17) holds the lower portion (12) in contact with the washer (14). The conduit (16) is adjustable by a sliding motion in the plug 2154

(13) and is sealed into it by means of an O-ring (21). In the lower part of the conduit (16) within the plug (13), there is a drainage hole (25) which is brought into alignment with the plug drain hole (26) when it is desired to remove a lower liquid layer. When not in alignment, the upper liquid layer can be removed. This alignment is accomplished by removing the disk lock washer ( 2 8 ) , moving the conduit (16) upward until the flair nuts (27) and (29) meet. The operation of these separatory funnels is practically self-explanatory; however, an extraction using the separatory funnel of Figure 1 will be described. Following an extraction, the substance being sought is transferred from the aqueous sample layer into the solvent layer, for example, methyl isobutyl ketone. Methyl isobutyl ketone is the upper layer since it is lighter than aqueous solution. During this procedure, the drain holes (25) and (26) are in a non-alignment. The height of the conduit (16) is adjusted to the lower level of the methyl isobutyl ketone layer. The solvent layer is then removed by means of the stopcock (18). At this stage, if desired. a second extraction can be performed by simply adding another portion of methyl isobutyl ketone equal in volume t o the first portion and the procedure repeated. This upper layer is also removed via stopcock (18) and combined with the first extracted portion. The aqueous lower layer is removed from the flask by aligning drain holes (23) and (26) and draining ria the stopcock (18). This alignment as mentioned above, is accomplished by manipulation of flair nuts ( 2 7 ) and (29) and lock washer (28). Figure 2 shows the separatory funnel utilizing a threechambered flask structure. In a typical flask of this type, the largest compartment (10) is carefully calibrated to contain a fixed volume of aqueous sample. The second compartment (11) is also calibrated and used for holding an exact volume of organic solvent. The volume relationship between the two compartments (10) and (11) is in the range of 10 to 1 to 100 to 1. The volume of the third compartment (12) is unimportant since its function is to facilitate mixing of the solvent with the liquid to be extracted. The three compartments of the flask are continuous with no barriers. The bottom open portion of the flask is then attached to and sealed with the fitted plug (13) as described above (Figure 1). The height of the conduit (16) is adjusted by a sliding movement to the lower graduated

A N A L Y T I C A L CHEMISTRY, V O L . 45, N O . 12, O C T O B E R 1973