A computer program for representing molecules as 3-D models

Peripherals used: card reader or terminal and Calcomp incremental plotter. Plotting suhroutines must he implemented from standard CALCOMP lihrary...
16 downloads 0 Views 910KB Size
edited bv

computer Jerk/. 37

JOHN W . MOORE Eastern Michigan University,

Ypsilanti, Mi 48197

Bits and Pieces, 14 Most authors of Bits and Pieces willmake availahle listings and/or machine-readahle versions of their programs. Please read each description carefully to determine compatihility with your own computing environment before requesting materials from any of the authors. Revised Guidelines for Authors of Bits and Pieces appeared in the December 1982 issue of the JOURNAL.

Documentation contains mathematical background, listing, input description, and sample input. Documentations and copies of the listing are availahle free from the author.

A Computer Program for Representing Molecules as 3-0 Models

Union College Schenectady, NY 12308

K. Kalcher

One of the most difficult concepts for students to grasp in the study of chemistry is the three-dimensional structure of molecules. There are availahle, on large, mainframe computers, programs for the animated display of three-dimensional structures of molecules. The programs illustrate clearly the shapes of molecules, providing insight into their reactivity. There are, however, few such programs for microcomputers, despite their being capable of "high resolution" graphics ( I 1. There are available, however, a cousiderahle numher of very impressive animated graphics routines, in the form of games, for microcomouters. The followine is a descriotion of an auplication of a>-D graphics routine, designed for use in game develoument, to the animation of molecular graphics disulavs . . . on an kpple 11+ (2a). The 3-D games employ driver routines for the manipulation and display of a particular shape (2). These routines define objects as consisting of a series of points, for which it is necessary to provide x, y, and z coordinates, and lines, for which it is necessary to provide the end points. That data is stored in the form of a shape table. The driver routines can then be called to operate on the shape tahle to transform or "move" the shapes. Since line drawings of molecules are just a series of points (the atoms) and lines (the bonds), these driver routines can he easily adapted to the animation of 3-D line drawings of molecules. Chemists usually think in terms of internal, or relative, coordinates such as hond lengths, hond angles, and twist angles, while the shape tables require x,y,z coordinates. While it is a straightforward task to convert from internal coordinates to a Cartesian (x,y,z) system, it is far from trivial for molecules of any complexity. Fortunately, this problem has been solved in the form of programs developed for large computers (3). One such internal-to-Cartesian coordinate program (3a) has been adapted to run on the Apple in an interactive fashion. For most molecules excellent graphical representations can be generated by providing idealized hond and twist angles and average hond lengths. The program, EDIT, has also been adapted to construct shape tables, for the molecules, that can he operated on by the 3-D driver routine. A structure program, MOVIT, allows the user (student) to choose and view a 3-D nicture of a molecule (see Fie. 2). Usine the paddle controls, the molecule can he rotated ;bout the and v axes, and using the z key, rotated about the z axis. to he

Animated 3-D Graphical Display of Line Drawings of Molecules L. A. Hull

lnstitut fur Analyiische Chemie Karl Franzens Universitai A-8010 Graz Austria The program described here was developed to give students an adequate impression of sterical configurations hy drawing molecules where spheres represent the atoms and connection lines between them the honds. The program's output can he copied easily onto overhead transparencies. Three facilities are implemented to heighten the three-dimensional impression a) the plot of shadows that are produced on the spheres when illuminated by light h) the possibility of a perspective viewing point c) the plot of a 3-D model as a stereo pair. An example plot of the structure of haem is shown in Figure 1.

Program PRJMOL-ANSI-FORTRAN on FORTRAN IV level, 699 statements, 150 comments including input description. High speed storage requires 18.6K 36 bit words on a UNIVAC 1100181. Peripherals used: card reader or terminal and Calcomp incremental plotter. Plotting suhroutines must he implemented from standard CALCOMP lihrary.

~

x

I:

Figure 1. Structure of heme as drawn by PRJMOL 96

Journal of Chemical Education