SEARCH (221program lines, 20 comments).This program allows the user to retrieve UV spectra based an compound name, lambdamax value(s),or record number. Spectra can also be deleted from 'the library when the proper authorization code is entered. The current contents of the library can be printed to screen andlor a printer as well as the spectra information (in report form), and the spectrum. INITFILE (18 program lines, 3 comments). Initializes a blank formatted disk with a specified number of empty records that can then accommodate spectra. Copies of source code listings in BASIC (with remarks), documentation, and instructional aids are available from Project SERAPHIM on a 5lI4-in.disk.
A BASIC Program for the Calculatfon of Elemental Compositions from Structural Formulas2 Roger A. Smith and Robin W. Spencer Syntex Inc. 2100 Syntex Court Mississauga. Ontario. Canada L5N 3x4 The calculation of molecular weights and elemental comnositions is a trivial vet often tedious task routinelv encountered by organic chemists. This calculation typically consists 'of the following operations: (a) a count of the numher of ,atoms of each element by visual inspection of a drawn structure, (h) multiplications and additions of atomic weights to provide a precise molecular weight, and (c) division by each collective element weight to give the elemental composition. Although simple computer programs (11) may relieve the potential errors and tedium of steps (b) and (c), the determination of the emnirical formula (sten . (a)) . .. remains anuisance and common source of error. w e have therefore written a program in BASIC that accomplishes the entire determination from a simple, familiar "structural formula". This structural formulais the onlv inputto the program. I t may include element symbols, common chemical abbreviations, and parentheses, with or without numerical suhscripts. Additional characters (spaces, commas, hyphens, etc.) may he included to make the formula easier to read. The followine are examoles of such formulas: PhCH=CHBr. H ~ N , ( . H . L I : ~ ~ ' '~Z~-HGcI I~, - A ~ ~ -AcO-tCtMe)211UOE~, OTBDhlS. Note that nested narcnthese, are acreorable 112, . . 13). The program as written includes abbreviations for common organic fragments (Me, Et, iBu, e t ~ . )common , functional or blocking groups (Ac, TMS, CBZ, etc.), and the amino acids. The user can easily incorporate his or her own abbreviations; this is especially useful for representing cyclic and complex fragments. For example, a penicillin nucleus S, "Pen" might be defined in the program as C ~ H ~ N O Zwhich would then allow penicillin S potassium to be input as Contribution number 219 from the institute of Bioorganic Chemistry. Syntex Research.
1076
Journal of Chemical Education
CI(Me)C=CHCH2SCONH-Pen-O-K+ and penicillin V as PhOCHZCONH-Pen-OH, The use of the program proceeds as follows. The current abbreviations are displayed, and the program waits for the user to type the formula. By typing "?" the definitions of the abbreviations are shown. After the formula is entered, calculation proceeds as the program displays the process of deletine snaces. reolacine abbreviations. exoandine oarentheses. an2 counting atoms. The user is alerted if &y undefined abbreviations or elements are found. Finallv the molecular weight, empirical formula, and composition-are given, with options for a printed copy and more entries. For example, after typing in the formula "Z-Phe-Ser-NH(CH2)3C02Et" the following output is produced within seconds: Formula: Z-Phe-Ser-NH(CH2)3CO2Et Molecular weight = 499.5626 Composition C(26) 62.512% H(33) 6.658% N(3) 8.411% O(1) 22.419% Versions of the program are available from Project SERAPHIM for the Apple 11+ (with lower case capability), Apple IIeIIIc, Apple Macintosh, Perkin Elmer 3600 Data Station, and NEC PC-8001A computers. The NEC version is representative of the Microsoft BASIC available on many microcomputers. A second Macintosh version which makes full use of this computer's mouse-and-menu system is also available. In summary, we have written a BASIC program that provides the calculation of precise molecular weights and elemental compositions from linear structural formulas, which may include chemical group abbreviations and nested parentheses. In our research group we have found this program to be very useful, and even those chemists who were initially skeptical or computer-shy now use i t routinely. Literature Cited (11 Rernstein. F. C.: Koetzle, T. F.; Williams. G. J. B.: Meyer E. F.. Jr: Brice, M. D.; Rogors,J.R.:Kennard,O.:Shimanouehi.T.;Taaumi.M. J.Mol.Ria1.1977.112,535. 121 Phillips, S. E. V. J . Mot. Riol. 1960,142.531. (31 Fur Lraininp in convomnt and divergent viewing of sterDo pain, see Wood, W. B.: Wilson, J. H.; Benhow, R. M.: H d ,L. E. '"Biochemistry A Problems Appruaeh." 2nd ed.: Benjamin/Cummine: Menlo Park, CA. 1981; pp. 6 0 4 6 . Ill GarreGT. P. J.; Clingeleffer, D. J.: G u s , J. S.;Rogers, S. J.; Freeman, H. C. J.Bioi. Chrm. 1984,259,2822. 161 Carfinkel. D.:Hers, R. J . Ria! Cham. 1964.239.971. 161 Tardy. D.: Smith. H. W.: Or '+, '. R.: Hetzel. N. "KSIMS KinetieLaboraLory Experi~ merit. Simulator": Condui ' r a Cifv. IA.. 1979. 171 Tardy. D., ~ ~ i of~ Iowa, ~ peraonal n & communication. 1985. 181 Wripht..1. R. Rev.Sci.ln.7lrum. 1978.13.1288. (91 Henner. M.: Lev& P.;Ancian.B. J . Chrm. Educ. 1919.56.684. (101 "Instruction Manual EM-3fiO NMR Spectrophotometer": Varian Assoeistes. 1972: Sect7-8.13~12to 13~13.and14-11. 1111 For example. calculator program8 Ear the TI-59 and HP-4lc have been described: Clarke. F. H. "Calculator Pmeramminn '' for Chemisfrv and the Life Sciences": Acadcmie: New York, 1981;chsp 1. 1121 An Applesoft BASIC program allowing element ~ymbolpand n e s t 4 parentheses hsr appeared: Figueras, J. Acces8 I%& (JulyiAugurfl. 26. 11x1 A proxmm in machineeode for the SharpPC-15W that allavs elementsymbols and cone level of narentheses has rocentlv heen discussed: Pollet. P. L. J. Chem. Edue.
.