Display of organic molecules using BASIC - ACS Publications

Edited by. John W. Moore. Eastern Michigan University. Ypsilanti. MI 48197. From time to time an article in this series will he devoted to short descr...
2 downloads 0 Views 2MB Size
Edited by

John W. Moore Eastern Michigan University Ypsilanti. MI 48197

From time to time an article in this series will he devoted to short descriptions of chemists' applicationsof cornputen in their classrooms or laboratories. Specific guidelines for writing such short descriptions are published below and are available from the computer series editor. The editor of the column also solicits comments on the guidelines to assist in their revision and refinement. Most authors of this and subsequent collections of brief computer applieatiqns will make available program listings andlor machine-readable versions for a nominal fee. Please read each description carefully to determine compatibility with your own computing environment before requesting materials from any of the authors. A variety of applications are described below, and some may be limited to a specific type or model of computer.

Display of Organic Molecules Using BASIC Victor I. Bendall Eastern Kentucky University Richmond, KY 40475 Computer Assisted Instruction (CAI) in organic chemistry usine our timesharine svstem was hampered by our inability to &splay organic molecules drawn-in t h e conventional manner. We have developed a package of subroutines (NUDRAW) written in the BASIC language for graphic display of common orgahic molecules on a storage screen terminal. NUDRAW is used by a programmer to generate the organic structures within his program. NUDRAW alone is not intended for student use hut is convenient software to have available when writing CAI programs since the student sees a conventional picture-of an organic molecule rather than the

250 1 Journal of Chemical Education

Bits and Pieces, 1

clumsy representations commonly necessary with a printing terminal. In its prrsenr form, NIII)I(AW u,ill draw most heterocycles containing one hetero atom as well as all common aliphatic, aromatic, and alicyclic compounds including steroids. To draw a structure, the X , Y coordinates of the first carbon atom are specified and, as appropriate subroutines are seauentiallv called. the organic e r o u ~ i n g are s linked and the foeations bf each polyval&t atom ( u s u k y carbon) are saved. Substituenta can he included a t any location by specification of that location and calling the subroutine to draw the group. Additional subroutines can easilv be added to include other groupings. The practical result is a conventional drawing of any desired molecule upon the terminal screen. For example, to draw bicyclo(5:3:0)decane requires only specification of the two ring sizes, a bridgehead carbon and two subroutines. Using NUDRAW to produce the organic structures, we have developed a number of CAI programs in a time-sharing environment, for the first course in organic chemistry. These include drills for aiding the recognition of the common alkyl groups, amino acids, and functional groups, and interactive exercises in naming organic molecules. The exercise in alcohol nomenclature generates aliphatic alcohol structures essentially a t random and will give the correct IUPAC name for com~arisonwith the student answer. T h e unit on the Cahnlngo'ld-l'relog rules displays a hall-and-stick projection and alluws thestudent toget any view of the model by rotating it around any ot the three spatial axes. NUI)HAW-BASIC-PLVS, 162 multi-statement lines, 50

comments, no files. Students run programs using NUDRAW on any TEKTRONIX graphics terminal. Execution requires 7 K 16-hit words on a PDP 11/70 minicomputer. Documentation consists of a table of the available organic moieties, the subroutines (61 in all) that must be called to draw them and a short auide, with examples, of how to apply NUDRAW in programming. ('opies of the listin): and d~rcumentntionare a\vtilat~lefree from the author nL the address given above. ~~

~

A Computer Program for Studying Stoichiometry Problems Cheryl J. Vaughn, Robert Morris and Toby F. Block University of Wisconsin-Stevens Point Stevens Point, WZ 54481 The ahilitv to solve stoichiometrv nrohlems is one of the most important skills a student ingeneral chemistry must master. We have developed an interactive promam (MOLES) that is designed to he$ students learn to work such prohlems. The program generates, at random, questions such as "How many grams of carbon are there in 125 grams of glucose, CeH,.,Oc?" or "How manv hvdroeen atoms are there in 1.56 .moles of formaldehyde, d ~ x ~ ? " ? h student e is required to s u n ~ l vboth the units and the numerical value of the answer (aiiide rule or pocket calculator should accompany the student to the terminal). Incorrect resDonses are checked for common errors, such as ignoring a subscript or Avogadro's numher. If such an error is found, the student is informed n h ~ ~ itu tand given a second rhanre to find thecorrect answer. If the cornpuler cannot identify the source of trouble, the computer supplies the correct answer and shows how it can he obtained by the factor label method. If the student cannot find the proper units or has no idea of how to work the problem, s h e can request help. The program responds by giving hints useful in obtaining the desired solution. If several requests for help are made, the computer once again supplies the correct answer and appropriate factor-label set-up. Program MOLES was written in Interactive (non-ANSIstandard) FORTRAN. It contains 470 statements and 104 comments. Execution requires 26K 48-hit words on a Burroughsd700. The prog&has been run via Decwriter, hut any terminal coupled to a sufficiently large computer would do. Documentation includes listing and several sample executions; students are given instructions via the terminal at execution time. No card decks or magnetic tape copies can he supplied. Because some of the format statements are specific to the Burrouehs svstem. it mav he necessarv to revise the Droeram slightly'oef&e executing i t on another computer. ~ b n - i t a n dard statements will be indicated on the listing. Listings and sample executions may he obtained, free of charge, by writing o: Dr. Toby F. Block, Department of Chemistry, University of Wisconsin-Stevens Point, Stevens Point, WI 54481.

A Computer Program to Develop Laboratory Schedules G. R. Hertel University of Central Florida Orlando, FL 32816 The computer prugram described here is an aid to the instructor who ii faced with rhe uroblem uf makine UD laboratory schedules in which students, working in pair 2), for all cases in which N P = N E - 1(NP > 4), and for most cases in which N P = NE - 2 ( N P > 4). The program is written in BASIC, specifically, Level I1 BASIC for the TRS-M Microcomputer (2). I t should operate with any BASIC interpreter capable of handling string comparisons and two-dimensional arrays. The maximum matrix that can he handled is limited by available memory. The TRS-80 Level I1 Microcomputer with 16K RAM memory can handle matrices up to and including size 15 X 15 (maximum of 30 students) successfullv. T o exceed N S = 31 certain nrogram lines must he modified to accomodate a more compatible section of the ASCII code for the lower case letters and since the TRS-80 does not display lower case, the display would get confusing). Also, to print out large matrices on the TRS-80 (NE > 15) some modification of print statements would he necessarv. The program itself occupies an~roximatelv 8.5 .. kbytes of memory. ' A description and program listing-printed by a Radio Shack Quick Printer 11-and a TRS-80-compatible cassette tape are available from the author. Send cheek or money order made out to G. R. Hertel, Department of Chemistry, University of Central Florida, P.O. Box 25000, Orlando, Florida 32816 ($3.00 for the program listing; $10.00 for the cassette tape). ~~

~

~

~

The Periodic Chart at the Tip of Your Fingers Lucy T. Pryde Southwestern College Chula Vista, CA 92010 Pocket programmable calculators are hemming increasingly popular among students, even if they have access to lareer more complex computers. There is a fascination in havingso Volume 57. Number 4. A ~ r i l1980 1 251