Computer programming for chemists

Chemists are becoming increasingly aware of the potentialities of computers as another marvelously versatile tool of re- search. Used properly, comput...
6 downloads 0 Views 2MB Size
REVIEWS

BOOK

Digital Computer Programs for Physical Chemistry. Volumes 1 and 2

Paul A. D . de Maine, University of California, Santa Barbara, and Robert D. Seawight, Union Carhide Corp. Maemillan Co., New York, 1963 and 1965. 16 X 24 cm. Volume 1, xxiii 423 pp. $18. Volume 2, xxvii 493 pp. $19.95.

+

+

Computer Programming for Chemists

Kenneth B. Wibwg, Yale University, W. A. New Haven, Connecticut. Beniamin. Inc.. New York. 1965. viii i s 9 pp. &s. and tables. 16 x 23.5 cm. $12.50.

+

Chemists are hemming increasingly aware of the potentialities of computers as another marvelously versatile tool of research. Used properly, computer techniques open new avenues of investigation. Used with less imagination they provide little more thsn hooks fn11 of numberj and drawers full of cards. Computers are of no use without programs, and it is necessary for each potential user to acquire his own repertoire. I n the opinion cf the reviewer, intelligent use of computer programs is possible only by those who have acquired some firsthand programming experience in witing simple program. On the other hand it takes manv hours of roe ram mine and of ma-

no mare desirable for each chemist to write all of his own program thsn it is that he build his own pII meters, recorders, or spectrophotometers from scratch. The most effective method for making computer programs mailable is 8. matter of some difference of opinion. Some advocate private exchange, and t h k method is extensively used for lack of better ways. Others advocate a central exchange which collects and distributes programs. These have proved to he successfirl. A third possibility k puhlication in a journal or in book form. This is illustrated by the appearance of examples (March and November in THIS JOURNAL 1965). However, proper presentation of complex programs requires a lot of space. A computer program is relatively useless unless accompanied by a really goad writeup or instruction manual. There are a t least fnnr major requirements: ( I ) a clear description of the scientific principles involved, including their mathematical expressions; (2) a, clear description of the computational procedures, inchtding what principles of numercisl analysis are followed, what sorts of least squares adjustments are performed, etc.; (3) clear directions for preparing data sets including several specific examples to help the reader decipher the terminology; and (4) availability of the program itself and of test decks along with the printout produced by the test decks. One way to make a. program available is to "list" it, that is to point out a list of

Paul A . D. de Maine and Robert D. Seawright, Digital Computer programs for Physical Chemistry. Volumes 1 and 2 Kenneth B. Wibe~g,Computer Programming for Chemists

JeffC. Dank, Jr., Advanced Physical Chemistry: Molecules, Structure, and Spectra

J. Timmemans, Physico-Chemical Constants of Pure Organic Substances. Volume 2 Donald J. Cram, Fnndmnentals of Carbanion Chemistry Laurence E. Strong and Wilmer J. Stratton, Chemical Energy Therald Moeller and Dean F. Martin, Laboratory Chemistry Charles A. Gray, Explorations in Chemistry

B. E. Conway, Theory and Principles of Electrode Processes Gordon J. Van Wylen and Richard E. Sonntag, Fundamentals of Classical Thermodynamics George G. Libmuitz, Solid-state Chemistry of Binary Metal Hydrides

K. D. Heller, Ernst Mach: Weghereiter der Modernen Physik

each card in the program. Another is to provide the decks of cards or a tape, e.g., containing the card images. There are two disadvantages to using the list. The minor one is that repunching cards entails some labor. The major disadvantage ia that the repunched deck is almost certain to contain errors that may require boon to lorate and correct. There exists an unfortunate degree of incompatibility among computers today. There artre dozens of variations of FORTRAN, and it is seldom to he expected that a program which works a t one computing center will work without modification somewhere else. The changes may be minor. A program written in FORTRAN-I1 for the IBM-709 series is easily modified to run on the CDC-3600. Unless the programs are written with great care, however, the renuired chances mav he extensive. Mawritten. Part of the incompatibility arises from the almost disdainful individuality that arises a t strong computing centers. I t is going to require an extensive demand for compatihleprogrsm to bring about efforts in this direction. Programming is a new activity to most scientists. Very few have given any prior thought to efficient techniqoes of numerical analysis. Very few know the proper statistical techniques. And to design pmg r a m that are convenient to use involves considerstion of many other factors as well. Criteria far a good program inchlde the following: (1) a logically correct calcul& tion; (2) a computational technique that is efficient for the computer; (3) convenient input data format; (4) clear print-out; (5) provisions for checking fur certain input errors. The first paint is obvious. The second represents the point a t which many programs are weak. As for the l s ~ tthree points, one of the reasons far using a eomputer is to he able to process hundreds or thousands of d a b . For the calculations to he correct, each of the dozens or hundreds of data. cards must he letter-perfect.. Convenient input and clearly organized printout are essential to facilitate cheeking the data. Moreover good programs have built-in checks to guard against certain obvious but potentially devaststing errors. For instance, if a given control, say NPTS (number of data points) NPTS 50, can be useful only if 2 then a. good program will check to see whether NPTS falls in this range. Turning to the volumes by deMaine and Seawright, the question is the extent to which they may he useful to someone wanting a, computer program. Unfortunately they will he of virtually no use. The first consideration is that the programs are written for a very limited IBM 1620 computer. As a result the authors were forced to adopt highly inefficient techniques to get around computer limitations. For example, to get the absolute value of X it was necessary to take the positive square root of X'. Furthermore all the input-output statements will have to be rewritten for another computer. As written, the programs will work only on