Establishing a computerized database for laboratory chemicals

Journal of Chemical Education. Advanced .... Establishing a computerized database for laboratory chemicals. Anthony L. ... Published online 1 January ...
1 downloads 0 Views 2MB Size
what can be called "internal thermodynamic equilibrium." The hiehest rate achieved with the BASIC interoreter was U while the executable mbdule proabout ~ O exchanges/min duced with the MS-DOS QuickHASIC cornoiler ran at aoproximately 460 exchangesjmin. One simple way to use the program is to place a large number of molecules in one energy level (say 70 in level 3). A random walk away from the populated level is observed and an initial Gaussian-like distribution is produced. After a few minutes, the molecules concentrate in the lower levels as shown on the left in Figure 7 and the distribution becomes Boltzmann-like and relatively stable. Alternatively, a calculated distrihution can be entered and its stahilitv studied. For a Boltzmann distribution with equally spaced energy levels. the ratio R of the oooulations of adiacent levels is ~ q u a t i o n that s apply to constant and given byR =-N;+~IN;. the present system with unit spacing and that may he helpful to the instructor in formulating projects are R = EI(E 1) and Ng = (1 - R)Nt where E is the average energy per molecule, Nt is the total number of molecules, and N, is the number of molecules expected in the ground state. For examnle., if all of the molecules are olaced initiallv in level 3 or in any distribution that is symmetrical with respect to level 3. then E = 3 and R = 0.75. If 60 molecules are olaced in each of the levels 2, 3, and 4, then, in the long r i n , N, should fluctuate about the value 45. Program BOLTZ also provides for freezing and continuing the action and the option of obtaining numerical hard copy. The latter might be useful in a quantitative study of W, the number of ways an arrangement can be realized, and its dependence on the number i f energy exchanges are described by Schettler (6). The program in its present form might also be used to dramatize some aspects of diffusion. For example, an initial "spike" of 75 molecules in level 10 will diffuse to a symmetrical "hell-shaped" distribution. The probability aspects are nicely illustrated by an initial arrangement of five molecules in level 2 with 10 units of energy. There are (5 10 - 1)!/(5 - 1)!10! = 1001 microstates for this system. There are 5! = 120 ways to realize an arrangement with one molecule in each of the five lowest levels. This arrangement, with probability 12011001, is readily observed as;andom exchange takes place, whereas it requires patience to catch the system in the initial distribution. which can he achieved in onlv one wav. program BOLT5 is an extensive modifiiation of BOLTZ in which the particles are constrained to occupy five energy levels. As described hy Hecht (71,when the number of levels is finite, some unusual concepts arise. An example of such a system is a collection of nuclei with spin 2 in a crystal. In a magnetic field, the five possible spin orientations correspond to five energy levels. These spins can have a negative "spin temperature," a valid concept relating to the inverted Boltzmann distribution. For example, 30 particles initially

+

placed in level 3 (of levels zero through 4) can relax to distributions exemplified by the one on the right in Figure 7. BOLT5 nermits the svstem to he observed for a while. after whici a number of energy units can be added or re: moved. This is accom~aniedbv a modest disolav . . that simulates photon emission or absorption. Suggested energy increments are orovided so that different temoerature reaimes, including absolute zero and intittity, cnn tw studied convenientlv. For exam~le,a svstetn of LOO oarticles with an average energy of 3 units (negative temperature) can be required to radiate 100 units and then evolve to a distribution that tends to have equally populated levels and corresponds to an infinite spin temperature.

Establishing a Computerized Database for Laboratory Chemicals Anthony L. Feliu Department of Neurology Memorial Sloan-Kettering Cancer Center 1275 York Avenue New York, NY 10021

.

+

We have recently implemented a computerized chemical inventory in our laboratory, which is notable for its simplicity, flexibility, and ease of use. The unique components of this system are (1)a main database file with flexible format creatgd ~ ' i t ah word proce~sor,~ and (21 a short progam that allows the database to be searched directly from the ooerating system prompt. The database was created as a "merge file", with each "record" consisting of eight "fields": chemical name, molecular formula, three-letter manufacturer abbreviation, size code (letter-number combination. reoresentine container size as A through E followed by thk nkmber of inits), location code (such as ORGanic cahinet. SOLVent shed. DESIccator), data received (as YY.MM), and two spare fields. Control codes contained a "orimarv meree file" customize the display of data fields in the fink dociment. Individual files for data and merge control codes offer an opoortunitv to prepare listings withiarious formats and to mb;lify formats quickly as needs change. Typically, the primary merge file is configured to generate a tabular listing of the chemicals for subsequent input to the search routine, but it could also be configured to print index cards, if desired. Keystroke macros were created tosort the data alphabetically for printed hackup listings, as well as to purge superfluous control codes (such as hard-page breaks) from the final merge-formatted file. An ASCII coov of this final database file is saved for searching Thedatabase file is interrogatedwith a program (CHEM.BAT, see Fig. 8) designed to exploit the search capabilities of the MS-DOS utility FIND (8). Search terms are passed to CHEM.BAT as arguments on the command line [>CHEM [argll larg2). . with multiple terms being linked during the search ooeration bv imolicit Boolean-AND onerators. The argument list may include an arbitrary combination of names. name fraements. formulas. or other descriotors.' Bv searching a comhittatiunof name fragments instead uf sinsie c~~mvlete names. the CHEM.BAT search alrorithm is caonhle bf retrieving specific chemical names &en when &nonyms are possible or of displaying selected classes of com-

.I,

"

Figure 7. Boltrmann-likedistributions in the positive (left)and negative (right) temperature regimes.

A

The work was performed with Wordperfect, but any word processing program with file merge capability could have been used. Since the FIND utilitv is case soecific. database entries have been standardizes with names lowercase, and location and manufacturer codes uppercase. Search terms must be similarly inpt.1 on the ChEMBAT command ine. Volume 65 Number 1 January 1988

25

---

if AX1 goto blank if A X 1 I . a? pot0 h.LP find .XI. c:\CHEII\MHICLY.TXT shift i f AX1 A goto i i n i

)

Cx\cn3\cn3.TR

The program may be used independently by individual students either before or, if necessary, in place of actual lahoratory experience. Active response of the instrument on the screen adds to the interest and personal satisfaction of the user. Even with the full availability of actual instruments a simulation may he advantageous. Adequate monitors can allow the instructor to demonstrate orooer . use of an instrument to an entire class at one time. One major advantage of a comouter is flexihilitv in shou.ine rather than simnlv telline. can provide kfficiel;t used as a visual aii, a introduction to routine operation, giving the instructor more time to fill in details of other experimental considerations. A program may offer activities that are commonly supplied hy the user. Recording and plotting data may be simplified so the beginning student is better able to consider significance rather than mechanics. I t is also possible to provide immediate information and suggestions concerning technique and interpretation of work as it is performed. SPEC20provides a highly interactive simulation of the Bausch and Lomb Soectronic-20. Written in BASICA. i t runs on the IBM-PC with a standard color graphics adaptor. Theentire instrument (Fie. 9)isdisolaved . - in 640 X 200 hiehresolution graphics with appropriate prompts at the top and bottom of the screen. The instrument and cuvette manioulation are fully animated and the instrument responds &mediately to all commands. Considerable attention has heen paid to details of operation and response. The instrument provides a "light source" mimickine the soectrum of an incandescent lam; that must he t u r n e l o n and allowed a brief warm-up befhe the dark current can he adjusted. Opening the lid to the sample compartment allows "outside light" to be registered on the meter. Small random errors occur if cuvettes are not cleaned and aligned at each insertion. One can choose asample andinsert it any any time with no problem, but the instrument will of course not respond unless it has been turned on. I t does not complain about failure to zero the dark current before beginning measurements, but this will show up in the results. Setting the zero with the sample compartment either open or containing a cuvette is also a possihility, as is changing the wavelength without resettine 100%Taeainst the blank. several consid&ed compromises have been made. The wavelength display is digital, the meter face shows % T but

.

an

echo echo echo ..re

PET R+diochwistry M i n i - M n l i n e Databas.




NlL:

:end

Figure 8. Listing of CHEMBAT.

nounds. Thus. the auerv >CHEMfluor chlor benzene would ietrieve hoth fluor&hl&obenzeneand chlorofluorobenzene, while >CHEM meth chlor would retrieve both methylene chloride and dichloromethane. Similarly, queries seeking information on all acetate salts (>CHEM ocer INOR) or all three-carbon-containingalcohols (>(?HEM C301) are readily input. Additions or deletions to chemical stocks are noted on a bulletin hoard for inclusion in the database file. An updated datahase file is produced from time to time as follows: records are revised or addedto the data file; (if a printed copy is desired. amacro to sort the records is executed): the data file is merged with the primary merge file containing formatting information; a macro-to-strip unnecessary control codes is executed; (optionally, the file is printed); finally, the file is saved in ASCII form for searching. The procedure described is sufficiently general and convenient that an on-line database for chemical inventory is now within reach ofany laboratory with access to a microcomputer operating under MS-DOSand can be implemented within a short time without costlv software or sonhisticated orogramming skills. ~~~~~~

~

~

~

~

SPEC20: A Highly Interactive Simulation of a Manual Spectrophotometer Ralph W. Gable Davidson College Davldson. NC 28036

Simulations of sophisticated laboratory instruments such IR (10,12), and HPLC (11) present an instruas NMR (9), ment, allow the choice of sample and parameters, and then run accordingly to produce output, usually in graphical form. A realistic simulation of a manual spectrophotometer, on the other hand, should show immediate instrument resnonse to each choice. The need for interactive eranhics ];resents a pressing challenge. Programs by Kelter a n d ~ a r r (13) and by Breneman (14) have moved in this direction by providing experiments using somewhat limited simulations of a manual instrument. the Bausch and Lomh Snectronic 20. Although even realistic simulation cannot serve as a full substitute for hands-on experience, it can provide a reasonable degree of familiarity with operation as well as theory. 26

Journal of Chemlcal Education

Figure 9. Screen dump of spectrophdomster display with cuvene ready for wiping and aligning.